Fix AI not playing mandatory spell

This commit is contained in:
tool4EvEr
2022-02-20 10:35:33 +01:00
parent bfa425516d
commit ca240ce8c3

View File

@@ -1419,14 +1419,15 @@ public class AiController {
} else {
chance = SpellApiToAi.Converter.get(spell.getApi()).doTriggerAI(player, spell, mandatory);
}
if (!chance)
if (!chance) {
return AiPlayDecision.TargetingFailed;
}
if (spell instanceof SpellPermanent) {
if (mandatory) {
return AiPlayDecision.WillPlay;
}
if (spell instanceof SpellPermanent) {
if (!checkETBEffects(card, spell, null)) {
return AiPlayDecision.BadEtbEffects;
}