Commit 498a0e2f by BellCodeEditor

save project

parent c65da75f
Showing with 20 additions and 5 deletions
...@@ -38,7 +38,22 @@ class Player(Hero): ...@@ -38,7 +38,22 @@ class Player(Hero):
houyi = Player("射手", "后羿") houyi = Player("射手", "后羿")
yase = Hero("垭瑟") yase = Hero("垭瑟")
houyi.combat(yase)
yase.combat(houyi) # yase.combat(houyi)
houyi.cure() # houyi.cure()
yase.cure() # yase.cure()houyi.combat(yase)
\ No newline at end of file print("-"*30)
print(" 战斗开始")
while True:
print("-"*30)
sbstr=input("请选择释放英雄技能(sd攻击/sq治疗)")
if sbstr=="sb":
print("游戏结束")
break
elif sbstr=="sd":
houyi.combat(yase)
elif sbstr=="sq":
houyi.cure()
else:
print("sb")
continue
\ 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