Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pokemon/pokemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ def attack(self, other_pokemon):
print(f'{self.name} attacked {other_pokemon} for {self.level * 2} damage.')
print("It's super effective")
other_pokemon.lose_health(self.level * 2)

class Trainer:
def __init__(self, pokemon_list, num_potions, name):
self.pokemons = pokemon_list
self.potions = num_potions
self.current_pokemon = 0
self.name = name



Expand All @@ -76,5 +83,7 @@ def attack(self, other_pokemon):
a.lose_health(10)
a.gain_health(1)
a.gain_health(34)
a.attack(d)

print(a.health)
print(d.health)