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()