Commit 1c8c2cc7 by BellCodeEditor

save project

parent 7eb5874e
Showing with 3 additions and 3 deletions
...@@ -21,15 +21,15 @@ class Hero(object): ...@@ -21,15 +21,15 @@ class Hero(object):
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 self.hero_type=hero_type
print("角色"+self.name+"创建成功",self.hero_type) print("角色"+self.name+"创建成功",self.hero_type)
print("当前等级,血量,攻鸡力为",self.level,self.hp,self.attack) print("当前等级,血量,攻鸡力为",self.level,self.hp,self.attack)
print(self.name+"哼哼哼啊啊啊啊啊啊啊啊啊啊啊啊啊啊") print(self.name+"哼哼哼啊啊啊啊啊啊啊啊啊啊啊啊啊啊")
van =Player("VAN","射手") van =Player("VAN","dark地牢的主人")
muji=Hero("木吉") muji=Hero("木吉")
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