1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

fix latest crash

This commit is contained in:
Steffo 2019-02-18 00:14:31 +01:00
parent 2522774581
commit 4502611e2a

View file

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