Commit 5ebf6adb by BellCodeEditor

save project

parent b0e7aa64
Showing with 17 additions and 8 deletions
......@@ -27,7 +27,11 @@ class Hero(object):
info = info1+info2+info3
print(info)
exit()
#def shengji(self)
def shengji(self):
self.level+=1
self.hp+=10
self.attack+=10
self.max_hp+=10
class Player(Hero):
def __init__(self,hero_type,name):
super().__init__(name)
......@@ -56,20 +60,25 @@ while True:
houyi.cure()
elif a=='q':
print("退出游戏")
exit()
break
else:
print("重新输入")
print("重新输入")
continue
#b = random.randint(1,2)
if yase.hp==150:
houyi.shengji()
b = input("你要使用什么技能?(1攻击/2治疗/q退出)")
if b=='1':
yase.combat(houyi)
if b=='2':
elif b=='2':
yase.cure()
elif a=='q':
print("退出游戏")
exit()
# b = random.randid
elif b=='q':
print("游戏结束")
break
else:
print("请重新输入")
continue
# houyi.combat(yase)
# yase.combat(houyi)
# houyi.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