- Fix the AI not being able to play cards with {C} in their mana costs. Hopefully this fix is correct.

This commit is contained in:
Agetian
2016-01-15 05:43:12 +00:00
parent 2bac793f58
commit 1f4743aa4f

View File

@@ -1097,7 +1097,7 @@ public class ComputerUtilMana {
} else if (producesAnyColor) { } else if (producesAnyColor) {
anyColorManaSources.add(card); anyColorManaSources.add(card);
} else if (usableManaAbilities == 1) { } 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); colorlessManaSources.add(card);
} else { } else {
oneManaSources.add(card); oneManaSources.add(card);
@@ -1215,6 +1215,9 @@ public class ComputerUtilMana {
if (mp.canProduce("G", m) || reflectedColors.contains(MagicColor.Constant.GREEN)) { if (mp.canProduce("G", m) || reflectedColors.contains(MagicColor.Constant.GREEN)) {
manaMap.get(ManaAtom.GREEN).add(manaMap.get(ManaAtom.GREEN).size(), m); 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()) { if (mp.isSnow()) {
manaMap.get(ManaAtom.IS_SNOW).add(manaMap.get(ManaAtom.IS_SNOW).size(), m); manaMap.get(ManaAtom.IS_SNOW).add(manaMap.get(ManaAtom.IS_SNOW).size(), m);
} }