def attack(opponent): rand_damage = random.randint(8, 32) opponent['HP'] -= rand_damage print(rand_damage, " damage!") return opponent