- Check the amount of X on the SA, not necessarily on the card itself.

This commit is contained in:
Agetian
2018-12-04 07:28:42 +03:00
parent fdcccf4669
commit f0f9e26ed1

View File

@@ -670,8 +670,8 @@ public class AiController {
// This is for playing spells regularly (no Cascade/Ripple etc.)
private AiPlayDecision canPlayAndPayFor(final SpellAbility sa) {
boolean XCost = sa.getHostCard() != null && sa.getHostCard().getManaCost() != null
&& sa.getHostCard().getManaCost().countX() > 0;
boolean XCost = sa.getPayCosts() != null && sa.getPayCosts().getCostMana() != null
&& sa.getPayCosts().getCostMana().getAmountOfX() > 0;
if (!XCost && !ComputerUtilCost.canPayCost(sa, player)) {
// for most costs, it's OK to check if they can be paid early in order to avoid running a heavy API check