Commit 8fd640a3 by BellCodeEditor

save project

parent 663db21e
Showing with 14 additions and 5 deletions
...@@ -39,15 +39,23 @@ class Player(Hero): ...@@ -39,15 +39,23 @@ class Player(Hero):
houyi = Player("射手", "后羿") houyi = Player("射手", "后羿")
yase = Hero("垭瑟") yase = Hero("垭瑟")
print('_' * 30) print('-' * 30)
print(' 战斗开始') print(' 战斗开始')
while True: while True:
print('_' * 30) print('-' * 30)
if input("请选择释放技能(攻击1/治疗2)") == '1': a = input("请选择释放技能(攻击1/治疗2)")
if a == '1':
houyi.combat(yase) houyi.combat(yase)
else: elif a == '2':
houyi.cure() houyi.cure()
if random.randint(1,2) == '1': elif a == 'q':
print('游戏结束')
break
else:
print('请重新输入')
continue
a = random.randint(1,2)
if a == 1:
yase.combat(houyi) yase.combat(houyi)
else: else:
yase.cure() yase.cure()
\ 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