- Fixed the AI not putting the Najeela trigger on stack if it doesn't want to use it.

This commit is contained in:
Agetian
2018-09-16 19:03:24 +03:00
parent 8e0e976681
commit d87e63c9a7

View File

@@ -311,6 +311,12 @@ public class TokenAi extends SpellAbilityAi {
} }
} }
if (mandatory) {
// Necessary because the AI goes into this method twice, first to set up targets (with mandatory=true)
// and then the second time to confirm the trigger (where mandatory may be set to false).
return true;
}
if ("OnlyOnAlliedAttack".equals(sa.getParam("AILogic"))) { if ("OnlyOnAlliedAttack".equals(sa.getParam("AILogic"))) {
Combat combat = ai.getGame().getCombat(); Combat combat = ai.getGame().getCombat();
return combat != null && combat.getAttackingPlayer() != null return combat != null && combat.getAttackingPlayer() != null