mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Fixed AI crashing on Verdant Haven.
This commit is contained in:
@@ -137,12 +137,15 @@ public class ManaEffect extends SpellAbilityEffect {
|
|||||||
abMana.setExpressChoice(choice);
|
abMana.setExpressChoice(choice);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (sa.hasParam("AILogic")) {
|
if (abMana.getExpressChoice().isEmpty()) {
|
||||||
final String logic = sa.getParam("AILogic");
|
final String logic = sa.hasParam("AILogic") ? sa.getParam("AILogic") : null;
|
||||||
String chosen = Constant.Color.BLACK;
|
String chosen = Constant.Color.BLACK;
|
||||||
if (logic.equals("MostProminentInComputerHand")) {
|
if (logic == null || logic.equals("MostProminentInComputerHand")) {
|
||||||
chosen = ComputerUtilCard.getMostProminentColor(act.getCardsIn(ZoneType.Hand));
|
chosen = ComputerUtilCard.getMostProminentColor(act.getCardsIn(ZoneType.Hand));
|
||||||
}
|
}
|
||||||
|
if (chosen.equals("")) {
|
||||||
|
chosen = Constant.Color.GREEN;
|
||||||
|
}
|
||||||
GuiChoose.one("Computer picked: ", new String[]{chosen});
|
GuiChoose.one("Computer picked: ", new String[]{chosen});
|
||||||
abMana.setExpressChoice(MagicColor.toShortString(chosen));
|
abMana.setExpressChoice(MagicColor.toShortString(chosen));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user