diff --git a/mtg.py b/mtg.py index 77dad2b..be8bb2f 100644 --- a/mtg.py +++ b/mtg.py @@ -26,6 +26,8 @@ class Mana: self.mana = result.mana def __add__(self, other): result = Mana() + if isinstance(other, unicode): + other = str(other) if isinstance(other, str): for m in [c for c in other.upper() if c in Mana.types.keys()]: result.mana[m] = result.mana[m] + 1 @@ -77,6 +79,8 @@ class ManaCost: self.snow = result.snow def __add__(self, other): result = ManaCost() + if isinstance(other, unicode): + other = str(other) if isinstance(other, str): symbols = [] hybrid = re.findall(ManaCost.hybridPattern, other)