Commit a3c2d566 by BellCodeEditor

save project

parent 29645d40
Showing with 15 additions and 5 deletions
......@@ -24,7 +24,6 @@ class Hero(object):
info3 = enemy.name+"阵亡,游戏结束"
info = info1+info2+info3
print(info)
print('你干嘛啊~~')
exit()
class Player(Hero):
......@@ -49,6 +48,17 @@ houyi = Player("射手", "后羿")
yase = Hero("垭瑟")
while True:
print("-"*30)
print(" 战斗开始")
print("-"*30)
aaa=input("请选择释放英雄技能(1攻击/2治疗)")
\ No newline at end of file
aaa=input("请选择释放英雄技能(1攻击/2治疗/q退出)")
if aaa=="1":
houyi.combat(yase)
elif aaa=="2":
houyi.cure()
elif aaa=="q":
exit()
else:
print("输入错误,请重新输入")
bbb=random.randint(1,2)
if bbb==1:
yase.combat(houyi)
else:
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