Merge branch 'token' into 'master'

Fix xPaid for Token as drawback

See merge request core-developers/forge!5030
This commit is contained in:
Michael Kamensky
2021-07-15 16:26:15 +00:00

View File

@@ -95,7 +95,7 @@ public class TokenAi extends SpellAbilityAi {
if (sa.getSVar("X").equals("Count$xPaid")) { if (sa.getSVar("X").equals("Count$xPaid")) {
// Set PayX here to maximum value. // Set PayX here to maximum value.
x = ComputerUtilCost.getMaxXValue(sa, ai); x = ComputerUtilCost.getMaxXValue(sa, ai);
sa.setXManaCostPaid(x); sa.getRootAbility().setXManaCostPaid(x);
} }
if (x <= 0) { if (x <= 0) {
return false; // 0 tokens or 0 toughness token(s) return false; // 0 tokens or 0 toughness token(s)