- Fix Remove Any Counter for the AI

This commit is contained in:
Agetian
2019-05-29 14:24:01 +03:00
parent ba35cbb578
commit d3b8a2cc0e
2 changed files with 10 additions and 1 deletions

View File

@@ -110,6 +110,15 @@ public class ComputerUtilCost {
&& !source.hasKeyword(Keyword.UNDYING)) { && !source.hasKeyword(Keyword.UNDYING)) {
return false; return false;
} }
} else if (part instanceof CostRemoveAnyCounter) {
if (sa != null) {
final CostRemoveAnyCounter remCounter = (CostRemoveAnyCounter) part;
PaymentDecision decision = new AiCostDecision(sa.getActivatingPlayer(), sa).visit(remCounter);
return decision != null;
}
return false;
} }
} }
return true; return true;

View File

@@ -107,7 +107,7 @@ public class DrawAi extends SpellAbilityAi {
} }
} }
if (!ComputerUtilCost.checkRemoveCounterCost(cost, source)) { if (!ComputerUtilCost.checkRemoveCounterCost(cost, source, sa)) {
return false; return false;
} }