Commit 707e9827 by BellCodeEditor

save project

parent 61c3f3ce
Showing with 18 additions and 3 deletions
......@@ -21,11 +21,11 @@ class Hero(object):
info3 = enemy.name+"还剩下"+str(enemy.hp)+"血量"
info = info1+info2+info3
print(info)
exit()
else:
info3 = enemy.name+"阵亡,游戏结束"
info = info1+info2+info3
print(info)
exit()
class Player(Hero):
def __init__(self,hero_type,name):
......@@ -43,4 +43,19 @@ print("---------------------------------")
print(' 战斗开始')
while True:
print("---------------------------------")
chose = input("(1/2)")
\ No newline at end of file
chose = input("(1/2)")
if choice == "q":
print("游戏结束")
break
elif choice == "1":
houyi.combat(yase)
elif choice == "2":
houyi.cure()
else:
print("重新输入")
continue
status = random.randint(1,3)
if status == 1:
yase.cure()
else:
yase.combat(honyi)
\ 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