1
0

Add methods and variables for running game

This commit is contained in:
2024-01-15 14:11:24 +01:00
parent 5f1cdcfc7f
commit b20532ae4a
2 changed files with 46 additions and 0 deletions

View File

@ -30,6 +30,21 @@ class Player:
def get_spell_succes_rate(self, spell: Spell):
return 1 * self.wand.succes_rate * spell.succes_rate
def get_queued_effects(self):
output = ""
effect_slowed = "Slowed"
effect_blinded = "Blinded"
if (self.decreased_spell_speed):
output = effect_slowed
if (self.decreased_spell_damage):
if not output:
output = effect_blinded
else: output += ", " + effect_blinded
if not output: output = "None"
return output
def cast_spell_result(self, spell: Spell, succes: bool):
if (succes):
message = "{name} casted '{spell}' with succes"