Add AtOppEOT logic to a couple lands that the AI misuses (#8839)

* - AtOppEOT is automatic now (also tweak the FlipACoinAi template to make use of it)

* - AILogic$ Never is now generic.
This commit is contained in:
Agetian
2025-10-05 19:21:15 +03:00
committed by GitHub
parent 4cef049a1d
commit da8b77acf7
3 changed files with 5 additions and 7 deletions

View File

@@ -12,15 +12,13 @@ import forge.game.spellability.SpellAbility;
public class FlipACoinAi extends SpellAbilityAi {
/* (non-Javadoc)
* @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
* @see forge.card.abilityfactory.SpellAiLogic#checkApiLogic(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility)
*/
@Override
protected AiAbilityDecision canPlay(Player ai, SpellAbility sa) {
protected AiAbilityDecision checkApiLogic(Player ai, SpellAbility sa) {
if (sa.hasParam("AILogic")) {
String ailogic = sa.getParam("AILogic");
if (ailogic.equals("Never")) {
return new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
} else if (ailogic.equals("PhaseOut")) {
if (ailogic.equals("PhaseOut")) {
if (!ComputerUtil.predictThreatenedObjects(sa.getActivatingPlayer(), sa).contains(sa.getHostCard())) {
return new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
}