Commit a3d171b0 by BellCodeEditor

save project

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