From bcffdda12b170374f9a56bcf2fee05f30ce5bfd7 Mon Sep 17 00:00:00 2001 From: Kwarde Date: Tue, 16 Jan 2024 07:16:45 +0100 Subject: [PATCH] Define player.active_spell_succes; it was (partially) implemented but not defined --- game.py | 3 --- player.py | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/game.py b/game.py index a053ce3..c336716 100644 --- a/game.py +++ b/game.py @@ -124,9 +124,6 @@ try: player1.active_spell, player1.active_spell_levenshtein_distance = get_player_spell_from_input(player1) player2.active_spell, player2.active_spell_levenshtein_distance = get_player_spell_from_input(player2) - player1.active_spell = player1.active_spell - player2.active_spell = player2.active_spell - # OUTCOME: SPELLS # > Get spell succes player1.active_spell_succes = player1.get_spell_succes_rate(player1.active_spell) > random.random() * 100 diff --git a/player.py b/player.py index 6432d87..79cbf5a 100644 --- a/player.py +++ b/player.py @@ -9,6 +9,7 @@ class Player: self.health = MAX_PLAYER_HEALTH self.wand = wand self.active_spell = spell_none + self.active_spell_succes = False self.active_spell_levenshtein_distance = 0 # Penalty => If >0 then damage reduction, 15% per distance self.stunned_rounds = 0