Commit 95fa199b by BellCodeEditor

save project

parent c5781563
Showing with 4 additions and 3 deletions
......@@ -20,11 +20,11 @@ class Hero:
exit()
class Player(Hero):
def __init__(self,name,type1):
super().__init__(name,type1)
super().__init__(name)
self.hp=200
self.type1=type1
self.type1=Hero.type1
self.attack=50
self.name =name
player = Player("后羿")
player = Player("后羿","射hou")
print("玩家的血量值为:",player.hp)
print("玩家的攻击力为:",player.attack)
\ 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