Commit d7020641 by BellCodeEditor

save project

parent 04d976e5
Showing with 10 additions and 0 deletions
...@@ -6,6 +6,10 @@ class Hero(object): ...@@ -6,6 +6,10 @@ class Hero(object):
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
if self.hp > self.max_hp: if self.hp > self.max_hp:
...@@ -42,3 +46,8 @@ houyi.combat(yase) ...@@ -42,3 +46,8 @@ houyi.combat(yase)
yase.combat(houyi) yase.combat(houyi)
houyi.cure() houyi.cure()
yase.cure() yase.cure()
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