Commit a748f8c8 by BellCodeEditor

save project

parent bf1242d0
Showing with 21 additions and 0 deletions
......@@ -70,3 +70,23 @@ class Hero(object):
print(info)
else:
info3 = enemy.name + "阵亡,游戏结束"
houyi=Player("射手","后羿")
yase=Hero("亚瑟")
while True:
print("-"*30)
a=input("1攻击/2治疗")
if int(a)==1:
houyi.combat(yase)
elif int(a)==2:
houyi.cure()
elif a=="q":
print("end")
break
else:
print("enter 1 or 2")
continue
b=random.randint(1,3)
if b==3
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