Commit a3d171b0 by BellCodeEditor

save project

parent 7aa78617
Showing with 6 additions and 6 deletions
...@@ -45,24 +45,24 @@ class Player(Hero): ...@@ -45,24 +45,24 @@ class Player(Hero):
print(self.name+"使用了治疗,血量增加:",str(c),",目前的血量为:",self.hp) print(self.name+"使用了治疗,血量增加:",str(c),",目前的血量为:",self.hp)
houyi = Player("射手", "后羿") houyi = Player("射手", "后羿")
yase=Hero("亚瑟") yase=Hero("后羿")
print('-'*30) print('-'*30)
print(' 战斗开始') print(' 战斗开始')
while True: while True:
print("-"*30) print("-"*30)
n=input("请选择释放英雄技能(1攻击/2治疗)") n=input("请选择释放英雄技能(1攻击/2治疗)")
if n=="q": if n=="q":
print("游戏退出") print("游戏结束")
break break
elif n=="1": elif n=="1":
houyi.combat(yase) houyi.combat(yase)
elif n=="2": elif n=="2":
houyi.cure() houyi.cure()
else: else:
print("您已阵亡,游戏结束") print("游戏结束")
break continue
m=random.randint(1,3) n=random.randint(1,3)
if m==1: if n=="1":
yase.combat(houyi) yase.combat(houyi)
else: else:
yase.cure() yase.cure()
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