Commit d0a67fd7 by BellCodeEditor

save project

parent 3dade785
Showing with 13 additions and 6 deletions
import
import random
class Hero(object):
def __init__(self, name):
self.name = name
......@@ -44,14 +44,21 @@ print('-'*30)
print( '战斗开始')
while True:
print('-'*30)
o=input()
o=input('请输入1攻击/2治疗')
if o=='q':
print('退出游戏')
break
elif o=='1':
combat(yase)
houyi.combat(yase)
elif o=='2':
cure()
houyi.cure()
else:
print('错误,请输入1或2')
continue
\ No newline at end of file
continue
p=random.randint(1,3)
if p==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