Commit a3c2d566 by BellCodeEditor

save project

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