- Fix AI not playing Jhoira in MoJhoSto. (#3160)

This commit is contained in:
Agetian
2023-05-27 15:06:20 +03:00
committed by GitHub
parent ffd9a555fe
commit a1a24b3270

View File

@@ -39,11 +39,6 @@ public class PlayAi extends SpellAbilityAi {
return false; // prevent infinite loop
}
List<Card> cards = getPlayableCards(sa, ai);
if (cards.isEmpty()) {
return false;
}
if (game.getRules().hasAppliedVariant(GameType.MoJhoSto) && source.getName().equals("Jhoira of the Ghitu Avatar")) {
// Additional logic for MoJhoSto:
// Do not activate Jhoira too early, usually there are few good targets
@@ -58,6 +53,12 @@ public class PlayAi extends SpellAbilityAi {
if ("Instant".equals(sa.getParam("AnySupportedCard")) && MyRandom.percentTrue(chanceToActivateInst)) {
return false;
}
return true;
}
List<Card> cards = getPlayableCards(sa, ai);
if (cards.isEmpty()) {
return false;
}
if ("ReplaySpell".equals(logic)) {