fixed some cards with malformed mana strings

This commit is contained in:
Evan Kranzler 2022-03-21 18:07:50 -04:00
parent b61125c0f3
commit a5afba5d5a
14 changed files with 17 additions and 14 deletions

View file

@ -439,6 +439,9 @@ public class ManaCostsImpl<T extends ManaCost> extends ArrayList<T> implements M
if (mana == null || mana.isEmpty()) {
return;
}
if (mana.startsWith("{") != mana.endsWith("}")) {
throw new IllegalArgumentException("mana costs should be surrounded by braces on both sides or not at all");
}
if (!extractMonoHybridGenericValue && costsCache.containsKey(mana)) {
ManaCosts<ManaCost> savedCosts = costsCache.get(mana);