Commit d831ea48 by BellCodeEditor

save project

parent c917a210
Showing with 19 additions and 5 deletions
import random
t=random.randint(1,3)
class Hero(object):
def __init__(self, name):
self.name = name
......@@ -43,9 +45,21 @@ print("-"*30)
print( "战斗开始")
print("-"*30)
while True:
i=input("请选择治疗()2、攻击(1)")
if i=
i=input("请选择治疗(2)、攻击(1)")
if i=="1":
print("攻击成功")
if i=
houyi.combat(yase)
elif i=="2":
print("治疗成功")
cure()
\ No newline at end of file
houyi.cure()
elif i=="p":
break
else:
print("输入错误,请重新输入")
if t==1:
print("攻击成功")
yase.combat(houyi)
elif t==2:
print("治疗成功")
yase.cure()
continue
\ 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