AI: add flag to check for Blitz restriction

This commit is contained in:
Hans Mackowiak
2022-06-09 06:54:26 +02:00
parent d46168f51d
commit d63d3202d3

View File

@@ -889,6 +889,10 @@ public class AiController {
spellHost.setLastKnownZone(game.getStackZone()); // need to add to stack to make check Restrictions respect stack cmc
spellHost.setCastFrom(card.getZone());
}
// TODO maybe other location for this?
if (!sa.isLegalAfterStack()) {
return AiPlayDecision.AnotherTime;
}
if (!sa.checkRestrictions(spellHost, player)) {
return AiPlayDecision.AnotherTime;
}