Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Pokemon(object):
- def __init__(self, name, attack, defense, HP):
- self.name = name
- self.attack = attack
- self.defense = defense
- self.HP = HP
- self.attacks = {}
- def Moves(self,move_1,damage_1,move_2,damage_2):
- self.attacks[move_1] = damage_1
- self.attacks[move_2] = damage_2
- pikachu = Pokemon('Pikachu',40,10,50)
- pidgey = Pokemon('Pidgey',50,30,60)
- pikachu.Moves('tackle',50,'thunderbolt',70)
- pidgey.Moves('gust',80,'tackle',50)
Add Comment
Please, Sign In to add comment