Skip to content

Commit 8c6738f

Browse files
authored
- Add support for Prepared to AlterAttributeAi (don't prepare something that's already prepared) (#10481)
1 parent 91a939e commit 8c6738f

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

forge-ai/src/main/java/forge/ai/ability/AlterAttributeAi.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ protected AiAbilityDecision checkApiLogic(Player aiPlayer, SpellAbility sa) {
100100
return new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
101101
}
102102
return new AiAbilityDecision(100, AiPlayDecision.WillPlay);
103+
case "Prepare":
104+
case "Prepared":
105+
// AI should not try to Prepare creatures that are already Prepared
106+
if (c.isPrepared()) {
107+
return new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
108+
}
109+
return new AiAbilityDecision(100, AiPlayDecision.WillPlay);
103110
}
104111
}
105112
}

0 commit comments

Comments
 (0)