mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
Fix AI not playing mandatory spell
This commit is contained in:
@@ -1419,14 +1419,15 @@ public class AiController {
|
|||||||
} else {
|
} else {
|
||||||
chance = SpellApiToAi.Converter.get(spell.getApi()).doTriggerAI(player, spell, mandatory);
|
chance = SpellApiToAi.Converter.get(spell.getApi()).doTriggerAI(player, spell, mandatory);
|
||||||
}
|
}
|
||||||
if (!chance)
|
if (!chance) {
|
||||||
return AiPlayDecision.TargetingFailed;
|
return AiPlayDecision.TargetingFailed;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mandatory) {
|
||||||
|
return AiPlayDecision.WillPlay;
|
||||||
|
}
|
||||||
|
|
||||||
if (spell instanceof SpellPermanent) {
|
if (spell instanceof SpellPermanent) {
|
||||||
if (mandatory) {
|
|
||||||
return AiPlayDecision.WillPlay;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!checkETBEffects(card, spell, null)) {
|
if (!checkETBEffects(card, spell, null)) {
|
||||||
return AiPlayDecision.BadEtbEffects;
|
return AiPlayDecision.BadEtbEffects;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user