mirror of
https://github.com/magefree/mage.git
synced 2025-12-29 23:12:10 -08:00
Bargain ability - fixed that cards can't be cast without full mana (#11089)
* [WOE] Fix Hamlet Glutton & friends * add tests
This commit is contained in:
parent
4b8e6ba9bc
commit
24315460fe
5 changed files with 130 additions and 6 deletions
|
|
@ -49,10 +49,15 @@ public class BargainAbility extends StaticAbility implements OptionalAdditionalS
|
|||
));
|
||||
}
|
||||
|
||||
public static OptionalAdditionalCost makeBargainCost(){
|
||||
OptionalAdditionalCost cost = new OptionalAdditionalCostImpl(keywordText, reminderText, new SacrificeTargetCost(bargainFilter));
|
||||
cost.setRepeatable(false);
|
||||
return cost;
|
||||
}
|
||||
|
||||
public BargainAbility() {
|
||||
super(Zone.STACK, null);
|
||||
this.additionalCost = new OptionalAdditionalCostImpl(keywordText, reminderText, new SacrificeTargetCost(bargainFilter));
|
||||
this.additionalCost.setRepeatable(false);
|
||||
this.additionalCost = makeBargainCost();
|
||||
this.rule = additionalCost.getName() + ' ' + additionalCost.getReminderText();
|
||||
this.setRuleAtTheTop(true);
|
||||
this.addHint(BargainCostWasPaidHint.instance);
|
||||
|
|
@ -111,7 +116,6 @@ public class BargainAbility extends StaticAbility implements OptionalAdditionalS
|
|||
return activationKey != null && getActivationKey(source, game).equalsIgnoreCase(activationKey);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TODO: remove with Tag Cost Tracking.
|
||||
* Return activation zcc key for searching spell's settings in source object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue