Commit ba842fdd by BellCodeEditor

save project

parent bf384971
Showing with 13 additions and 2 deletions
import random
class Hero(object):
def __init__(self, name):
self.name = name
......@@ -44,8 +45,18 @@ houyi.combat(yase)
yase.combat(houyi)
while True:
print('-'*30)
a=input('请选择释放英雄技能(1攻击/2治疗)')
a=input('请选择释放英雄技能(1攻击/2治疗/q退出)')
if a=='1':
houyi.combat(yase)
elif a=='2':
houyi.cure()
elif a=='q':
exit()
else:
a=input('请选择释放英雄技能(1攻击/2治疗)')
continue
num=random.randint(1,3)
if num==1:
yase.cure()
elif num==2 or num==3:
yase.combat(houyi)
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