mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
Improved and fixed X mana cost and pays, mana pool:
* Pay X abilities - fixed that it spends all available mana pool instead only needed; * Pay X abilities - added support of interactions with other X effects like Rosheen Meanderer's mana usage for "pay X to prevent"; * Rosheen Meanderer - fixed that it can't use mana for "you may pay X" like Flameblast Dragon's effect (#5206); * Devs: added support to use VariableManaCost to pay X in code (without generic's workaround, use ManaUtil.createManaCost to generate cost to pay);
This commit is contained in:
parent
500fc935e4
commit
437861ec20
20 changed files with 675 additions and 192 deletions
|
|
@ -256,7 +256,7 @@ public abstract class AbilityImpl implements Ability {
|
|||
VariableManaCost xCosts = new VariableManaCost();
|
||||
// no x events - rules from Unbound Flourishing:
|
||||
// - Spells with additional costs that include X won't be affected by Unbound Flourishing. X must be in the spell's mana cost.
|
||||
xCosts.setAmount(xValue, xValue);
|
||||
xCosts.setAmount(xValue, xValue, false);
|
||||
this.getManaCostsToPay().add(xCosts);
|
||||
} else {
|
||||
this.getManaCostsToPay().clear();
|
||||
|
|
@ -525,7 +525,7 @@ public abstract class AbilityImpl implements Ability {
|
|||
// set the xcosts to paid
|
||||
// no x events - rules from Unbound Flourishing:
|
||||
// - Spells with additional costs that include X won't be affected by Unbound Flourishing. X must be in the spell's mana cost.
|
||||
variableCost.setAmount(xValue, xValue);
|
||||
variableCost.setAmount(xValue, xValue, false);
|
||||
((Cost) variableCost).setPaid();
|
||||
String message = controller.getLogName() + " announces a value of " + xValue + " (" + variableCost.getActionText() + ')';
|
||||
announceString.append(message);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue