(Player ai, SpellAbility sa)
| 88 | * forge.game.spellability.SpellAbility) |
| 89 | */ |
| 90 | @Override |
| 91 | protected AiAbilityDecision checkApiLogic(Player ai, SpellAbility sa) { |
| 92 | if (sa.hasParam("AILogic")) { |
| 93 | return new AiAbilityDecision(100, AiPlayDecision.WillPlay); // handled elsewhere, does not meet the standard requirements |
| 94 | } |
| 95 | |
| 96 | // TODO check if it would be worth it to keep mana open for opponents turn anyway |
| 97 | if (ComputerUtil.activateForCost(sa, ai)) { |
| 98 | return new AiAbilityDecision(100, AiPlayDecision.WillPlay); |
| 99 | } |
| 100 | |
| 101 | if (sa.getPayCosts().hasNoManaCost() && sa.getPayCosts().isReusuableResource() |
| 102 | && sa.getSubAbility() == null && (improvesPosition(ai, sa) || ComputerUtil.playImmediately(ai, sa))) { |
| 103 | return new AiAbilityDecision(100, AiPlayDecision.WillPlay); |
| 104 | } |
| 105 | |
| 106 | return new AiAbilityDecision(0, AiPlayDecision.CantPlayAi); |
| 107 | } |
| 108 | |
| 109 | /** |
| 110 | * @param aiPlayer |
nothing calls this directly
no test coverage detected