From f0eae367b11cca79db95b93d6796e2e709467bce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Caras?= Date: Tue, 19 Apr 2022 12:38:45 +0200 Subject: [PATCH] Update fight.py --- lib/fight.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/fight.py b/lib/fight.py index 7852d17..1374619 100644 --- a/lib/fight.py +++ b/lib/fight.py @@ -4,9 +4,10 @@ from lib.game import Item from .ascii import * from colorama import Fore import keyboard +from random import randrange class FightHandler: - def __init__(self,message:str,name:str,hp:int,attacks:list,lang:dict,eq:Item,img:str="") -> None: + def __init__(self,message:str,name:str,hp:int,attacks:dict,lang:dict,eq:Item,img:str="") -> None: self.selected = 0 keyboard.add_hotkey("up",self.up) keyboard.add_hotkey("down",self.down) @@ -56,5 +57,5 @@ class FightHandler: print(f" {selection}") def attack(self): - self.hp + self.hp -= self.attacks[randrange(len(self.attacks))][atk]. input()