Commit 0f6c3d98 by BellCodeEditor

save project

parent da20ad75
Showing with 7 additions and 8 deletions
...@@ -40,10 +40,6 @@ class Player(Hero): ...@@ -40,10 +40,6 @@ class Player(Hero):
houyi = Player("射手", "后羿") houyi = Player("射手", "后羿")
yase = Hero("垭瑟") yase = Hero("垭瑟")
houyi.combat(yase)
yase.combat(houyi)
houyi.cure()
yase.cure()
print('-'*30) print('-'*30)
print(' 战斗开始') print(' 战斗开始')
while True: while True:
...@@ -51,13 +47,16 @@ while True: ...@@ -51,13 +47,16 @@ while True:
a=input('选技能(1攻击/2治疗)') a=input('选技能(1攻击/2治疗)')
if a=='q': if a=='q':
print('游戏结束') print('游戏结束')
exit() break
elif a=='1': elif a=='1':
houyi.combat(yase) houyi.combat(yase)
elif a=='2': elif a=='2':
houyi.cure() houyi.cure()
else: else:
print('无此技能,重输') print('无此技能,重输')
break continue
b=random.randint(1,3) b=random.randint(1,3)
if b='' if b=='1':
\ No newline at end of file yase.cure()
else:
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