Commit 1a3cc5ba by BellCodeEditor

save project

parent ba65bef9
Showing with 17 additions and 2 deletions
import random
class Hero(object):
def __init__(self, name):
self.name = name
......@@ -40,4 +42,18 @@ houyi = Player("射手", "后羿")
yase = Hero("垭瑟")
print("战斗开始")
while True:
cho=input("请选择释放英雄技能(1攻击/2治疗)")
\ No newline at end of file
cho=input("请选择释放英雄技能(1攻击/2治疗)")
if cho=="q":
print("游戏结束")
break
elif cho=="2":
houyi.cure()
elif cho=="1":
houyi.combat(yase)
else:
print("输入正确文字!")
de=random.randint(1,3)
if de==1:
yase.cure()
else:
houyi.combat(yase)
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