Commit d92c1114 by BellCodeEditor

save project

parent e5909ed0
Showing with 26 additions and 2 deletions
import random
class Hero(object):
def __init__(self, name):
self.name = name
......@@ -45,4 +46,27 @@ print(" 开始战斗")
while True:
print('-' * 30)
juese=input("请输入操作指令,1发起攻击。2是治疗血量")
\ No newline at end of file
if juese=="q":
exit
elif juese==1:
print('-' * 30)
combat(yase)
elif juese==2:
print('-' * 30)
cure()
elif juese==3:
print('-' * 30)
print("你投降了")
break
else:
print("警报警报,无效字符报错")
continue
win=random.randint(1,3)
if win == 1:
yase.cure()
else:
combat(houyi)
print("菜")
exit
\ 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