mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
SpellAbility: do xPaid inside spellAbility
This commit is contained in:
committed by
Michael Kamensky
parent
9b9f88129f
commit
0d1105377e
@@ -748,10 +748,10 @@ public class HumanPlay {
|
||||
if (mc.getAmountOfX() > 0 && !"Count$xPaid".equals(xInCard)) { // announce X will overwrite whatever was in card script
|
||||
int xPaid = AbilityUtils.calculateAmount(source, "X", ability);
|
||||
toPay.setXManaCostPaid(xPaid, ability.getParam("XColor"));
|
||||
source.setXManaCostPaid(xPaid);
|
||||
ability.setXManaCostPaid(xPaid);
|
||||
}
|
||||
else if (source.getXManaCostPaid() > 0) { //ensure pre-announced X value retained
|
||||
toPay.setXManaCostPaid(source.getXManaCostPaid(), ability.getParam("XColor"));
|
||||
else if (ability.getXManaCostPaid() != null) { //ensure pre-announced X value retained
|
||||
toPay.setXManaCostPaid(ability.getXManaCostPaid(), ability.getParam("XColor"));
|
||||
}
|
||||
|
||||
int timesMultikicked = source.getKickerMagnitude();
|
||||
|
||||
@@ -314,10 +314,10 @@ public class HumanPlaySpellAbility {
|
||||
if (value == null) {
|
||||
return false;
|
||||
}
|
||||
card.setXManaCostPaid(value);
|
||||
ability.setXManaCostPaid(value);
|
||||
}
|
||||
} else if (manaCost.getMana().isZero() && ability.isSpell()) {
|
||||
card.setXManaCostPaid(0);
|
||||
ability.setXManaCostPaid(0);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user