Commit 20e85364 by BellCodeEditor

save project

parent a1c89071
Showing with 2 additions and 16 deletions
import random
class Hero(object): class Hero(object):
def __init__(self, name): def __init__(self, name):
self.name = name self.name = name
...@@ -43,18 +42,4 @@ print('-'*50) ...@@ -43,18 +42,4 @@ print('-'*50)
print(" 战斗开始") print(" 战斗开始")
while True: while True:
print('-'*50) print('-'*50)
choice=input('请选择1:攻击 or 2:治疗') choice=input('请选择1:攻击 or 2:治疗')
if choice=='1': \ No newline at end of file
houyi.combat(yase)
elif choice=='2':
houyi.cure()
elif choice=='q':
break
else:
print("请重新输入1 or 2")
continue
num=random.randint(1,2)
if num==1:
yase.combat(houyi)
else:
yase.cure()
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