From 1f4743aa4f764e406648747d898f8a6a4145edef Mon Sep 17 00:00:00 2001 From: Agetian Date: Fri, 15 Jan 2016 05:43:12 +0000 Subject: [PATCH] - Fix the AI not being able to play cards with {C} in their mana costs. Hopefully this fix is correct. --- forge-ai/src/main/java/forge/ai/ComputerUtilMana.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java b/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java index 6e539c824a6..6fd84513f85 100644 --- a/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java +++ b/forge-ai/src/main/java/forge/ai/ComputerUtilMana.java @@ -1097,7 +1097,7 @@ public class ComputerUtilMana { } else if (producesAnyColor) { anyColorManaSources.add(card); } else if (usableManaAbilities == 1) { - if (manaAbilities.get(0).getManaPart().mana().equals("1")) { + if (manaAbilities.get(0).getManaPart().mana().equals("1") || manaAbilities.get(0).getManaPart().mana().equals("C")) { colorlessManaSources.add(card); } else { oneManaSources.add(card); @@ -1215,6 +1215,9 @@ public class ComputerUtilMana { if (mp.canProduce("G", m) || reflectedColors.contains(MagicColor.Constant.GREEN)) { manaMap.get(ManaAtom.GREEN).add(manaMap.get(ManaAtom.GREEN).size(), m); } + if (mp.canProduce("C", m) || reflectedColors.contains(MagicColor.Constant.COLORLESS)) { + manaMap.get(ManaAtom.COLORLESS).add(manaMap.get(ManaAtom.COLORLESS).size(), m); + } if (mp.isSnow()) { manaMap.get(ManaAtom.IS_SNOW).add(manaMap.get(ManaAtom.IS_SNOW).size(), m); }