From 4502611e2a846aafda3a972e9e5840aea465a167 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 18 Feb 2019 00:14:31 +0100 Subject: [PATCH] fix latest crash --- utils/cast.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/utils/cast.py b/utils/cast.py index 61a6e249..11de8e97 100644 --- a/utils/cast.py +++ b/utils/cast.py @@ -152,16 +152,13 @@ class Spell: # Spell name self.name = seed # Find the spell type - self.spell_type = None + self.spell_type = SpellType(0) if random.random() < self.damaging_spell_chance: - self.spell_type = SpellType.DAMAGING + self.spell_type |= SpellType.DAMAGING elif random.random() < self.healing_spell_chance: - self.spell_type = SpellType.HEALING + self.spell_type |= SpellType.HEALING if random.random() < self.additional_stats_chance: - if self.spell_type is None: - self.spell_type = SpellType.STATS - else: - self.spell_type |= SpellType.STATS + self.spell_type |= SpellType.STATS # Damaging spells if self.spell_type & SpellType.DAMAGING: self.damage_component = DamageComponent()