- Better fix for the AI cheating with X values on replay (fixing the cause and not the effect).

This commit is contained in:
Agetian
2017-06-27 03:09:29 +00:00
parent 83d34ee456
commit 6a43403d6c
2 changed files with 9 additions and 8 deletions

View File

@@ -2654,11 +2654,6 @@ public class ComputerUtil {
AiController aic = ((PlayerControllerAi) ai.getController()).getAi();
Card targetSpellCard = null;
for (Card c : options) {
if (withoutPayingManaCost && c.getManaCost() != null && c.getManaCost().getShardCount(ManaCostShard.X) > 0) {
// The AI will otherwise cheat with the mana payment, announcing X > 0 for spells like Heat Ray when replaying them
// without paying their mana cost.
continue;
}
for (SpellAbility ab : c.getSpellAbilities()) {
if (ab.getApi() == null) {
// only API-based SAs are supported, other things may lead to a NPE (e.g. Ancestral Vision Suspend SA)