Commit 77e9b4ea by BellCodeEditor

save project

parent 8432c166
Showing with 8 additions and 3 deletions
...@@ -46,18 +46,23 @@ houyi = Player("射手", "后羿") ...@@ -46,18 +46,23 @@ houyi = Player("射手", "后羿")
yase = Hero("垭瑟") yase = Hero("垭瑟")
print('-'*30) print('-'*30)
print(" 战斗开始") print(" 战斗开始")
num=random.randint(1,3)
while True: while True:
print('-'*30) print('-'*30)
choice=input("请选择(1攻击/2治疗):") choice=input("请选择(1攻击/2治疗):")
if choice=="q": if choice=="q":
print("退出游戏") print("退出游戏")
break break
if choice=="1": elif choice=="1":
houyi.combat(yase) houyi.combat(yase)
if choice=="2": elif choice=="2":
houyi.cure() houyi.cure()
else: else:
print("请重新输入1/2") print("请重新输入1/2")
continue continue
fuck=random.randint(1,3)
if fuck==1:
yase.combat(houyi)
elif fuck==2:
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