Commit e5c0dc8c by BellCodeEditor

save project

parent d64c547c
Showing with 8 additions and 5 deletions
...@@ -41,24 +41,26 @@ houyi = Player("射手", "后羿") ...@@ -41,24 +41,26 @@ houyi = Player("射手", "后羿")
yase = Hero("垭瑟") yase = Hero("垭瑟")
print("-"*30) print("-"*30)
print(" 战斗开始") print(" 战斗开始")
while True: while True:
print("-"*30) print("-"*30)
s=input("请选择释放英雄技能(1攻击/2治疗):") s=input("请选择释放英雄技能(1攻击/2治疗):")
if s=="q": if s=="q":
print("退出游戏") print("退出游戏")
break break
elif s=="1" : elif s=="1":
houyi.cure() houyi.cure()
elif s=="2": elif s=="2":
houyi.combat(yase) houyi.combat(yase)
else: else:
print("请重新输入") print("请重新输入")
continue continue
l=random.randint(1,3) l=random.randint(1,3)
if l==1: if l==1:
yase.cure() yase.cure()
elif l==2 or l==3: else:
yase.combat(houyi ) yase.combat(houyi)
\ 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