Commit d7020641 by BellCodeEditor

save project

parent 04d976e5
Showing with 11 additions and 2 deletions
...@@ -5,6 +5,10 @@ class Hero(object): ...@@ -5,6 +5,10 @@ class Hero(object):
self.hp = 250 self.hp = 250
self.attack = 40 self.attack = 40
self.max_hp = self.hp self.max_hp = self.hp
def cure(self): # 治疗 def cure(self): # 治疗
self.hp+=60 self.hp+=60
...@@ -41,4 +45,9 @@ yase = Hero("垭瑟") ...@@ -41,4 +45,9 @@ yase = Hero("垭瑟")
houyi.combat(yase) houyi.combat(yase)
yase.combat(houyi) yase.combat(houyi)
houyi.cure() houyi.cure()
yase.cure() yase.cure()
\ No newline at end of file print("-"*30)
print(" 战斗开始")
while True:
print("-"*30)
choice=input("请选择释放英雄技能")
\ 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