Commit e9508943 by BellCodeEditor

save project

parent 1cad18b3
Showing with 2 additions and 16 deletions
...@@ -50,22 +50,8 @@ houyi = Player("射手", "后羿") ...@@ -50,22 +50,8 @@ houyi = Player("射手", "后羿")
yase = Hero("垭瑟") yase = Hero("垭瑟")
while True: while True:
print("-"*30) print("-"*30)
a = input("你要选择什么技能(1攻击/2防御/q退出)") a = input("你要选择什么技能(1攻击/2防御)")
if a == "1": if a == 1:
houyi.combat(yase)
elif a == "2":
houyi.cure()
elif a == "q":
print("游戏结束")
break
else:
print("请重新输入:你要选择什么技能(1攻击/2防御/q退出)")
continue
num = random.randint(1,3)
if num == "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