Commit 926adcaf by BellCodeEditor

save project

parent 68d98c23
Showing with 8 additions and 7 deletions
...@@ -22,17 +22,19 @@ class Hero: ...@@ -22,17 +22,19 @@ class Hero:
info = info1 +"\n" +info2+"\n" +info3 info = info1 +"\n" +info2+"\n" +info3
print(info) print(info)
exit() exit()
class Player(Hero) class Player(Hero):
def __init__(self,name): def __init__(self,name,hero_type):
super().__init__(name) super(Player, self).__init__(name)
self.hp = 200 self.hp = 200
self.attack = 50 self.attack = 50
self.hero_type = hero_type
print(self.name + " successfully created")
print(self.level + self.hp + self.attack)
yase = Hero("yase",300,20) yase = Player("yase","noob")
yeet = Hero("yeet",400, 30)
yase.combat(yeet)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment