Commit d2e24ed1 by BellCodeEditor

save project

parent be8a40e8
Showing with 16 additions and 4 deletions
class Hero(object): class Hero(object):
def __init__(self, name): def __init__(self, name):
self.name = name self.name = name
...@@ -42,7 +43,18 @@ print('-'*30) ...@@ -42,7 +43,18 @@ print('-'*30)
print(' 战斗开始') print(' 战斗开始')
print('-'*30) print('-'*30)
while True: while True:
input=(['攻击1,治疗2']) csgo = input(['攻击1,治疗2'])
if csgo == "1":
houyi.combat(yase)
elif csgo == "2":
houyi.cure()
elif csgo == "q":
exit()
else:
print("再输入")
continue
b=random.randint(1,3)
if b=="1":
yase.cure()
else:
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