Commit a0b828c2 by BellCodeEditor

save project

parent cb6e4686
Showing with 1 additions and 5 deletions
...@@ -8,7 +8,7 @@ class Hero(object): ...@@ -8,7 +8,7 @@ class Hero(object):
self.max_hp = self.hp self.max_hp = self.hp
def cure(self) def cure(self):
self.hp=self.hp+60 self.hp=self.hp+60
if self.hp<self.max_hp: if self.hp<self.max_hp:
self.hp=self.max_hp self.hp=self.max_hp
...@@ -48,10 +48,6 @@ class Player(Hero): ...@@ -48,10 +48,6 @@ class Player(Hero):
houyi = Player("射手", "后羿") houyi = Player("射手", "后羿")
yase = Hero("垭瑟") yase = Hero("垭瑟")
print("角色"+self.name+"创建成功,英雄类型为:",self.hero_type)
print("当前等级、血量、攻击力分别为:"selflevel,self.hp,self.attack)
houyi=player("射手","后羿")
yase=hero("垭瑟")
print(30*'-') print(30*'-')
print(' 战斗开始') print(' 战斗开始')
while True: while True:
......
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