Commit 1426dac8 by BellCodeEditor

save project

parent 01bd0d50
Showing with 18 additions and 1 deletions
......@@ -41,7 +41,24 @@ class Player(Hero): # 玩家英雄
houyi = Player("后羿","射手")
hero=Hero("s")
import random
while True:
print("-"*30)
chioce=input('请选择攻击/治疗术1/2:')
choice=input('请选择攻击/治疗术1/2:')
if choice=='1':
houyi.combat(hero)
elif choice=='2':
houyi.cure()
elif choice=='q':
break
else:
print('请重新输入1/2:')
continue
num=random.randint(1,2)
if num=="1":
hero.combat(houyi)
if num=="2":
hero.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