Commit a8a8fb18 by BellCodeEditor

save project

parent f0dd6591
Showing with 3 additions and 3 deletions
...@@ -5,8 +5,8 @@ class Hero: # 英雄类 ...@@ -5,8 +5,8 @@ class Hero: # 英雄类
self.hp = 250 self.hp = 250
self.attack = 40 self.attack = 40
self.max_hp = self.hp self.max_hp = self.hp
print("*")*30 print("*"*30)
print("英雄"+name+"创建成功" print("英雄"+name+"创建成功")
print("初始等级"+str(self.level)) print("初始等级"+str(self.level))
print("血量"+str(self.hp)) print("血量"+str(self.hp))
print("攻击力"+str(self.attack)) print("攻击力"+str(self.attack))
...@@ -27,7 +27,7 @@ class Hero: # 英雄类 ...@@ -27,7 +27,7 @@ class Hero: # 英雄类
exit() exit()
class Player(): # 玩家英雄 class Player(Hero): # 玩家英雄
def __init__(self,name): def __init__(self,name):
super().__init__(name) super().__init__(name)
self.hp=200 self.hp=200
......
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