mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18: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);
|
||||
}
|
||||
else {
|
||||
if (sa.hasParam("AILogic")) {
|
||||
final String logic = sa.getParam("AILogic");
|
||||
if (abMana.getExpressChoice().isEmpty()) {
|
||||
final String logic = sa.hasParam("AILogic") ? sa.getParam("AILogic") : null;
|
||||
String chosen = Constant.Color.BLACK;
|
||||
if (logic.equals("MostProminentInComputerHand")) {
|
||||
if (logic == null || logic.equals("MostProminentInComputerHand")) {
|
||||
chosen = ComputerUtilCard.getMostProminentColor(act.getCardsIn(ZoneType.Hand));
|
||||
}
|
||||
if (chosen.equals("")) {
|
||||
chosen = Constant.Color.GREEN;
|
||||
}
|
||||
GuiChoose.one("Computer picked: ", new String[]{chosen});
|
||||
abMana.setExpressChoice(MagicColor.toShortString(chosen));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user