Commit e379eaf1 by BellCodeEditor

save project

parent ed228c64
Showing with 7 additions and 2 deletions
......@@ -26,7 +26,12 @@ class Hero(object):
info = info1+info2+info3
print(info)
exit()
def cure(self): # 治疗
blood = random.randint(30,50)
self = self + blood
if self.hp > self.max_hp:
self.hp = self.max_hp
print(self.name+"使用了治疗,血量增加:", 60,",目前的血量为:",self.hp)
class Player(Hero):
def __init__(self,hero_type,name):
super().__init__(name)
......@@ -48,7 +53,7 @@ while True:
print("游戏结束")
break
elif choice == "1":
hoyi. combat(yase)
houyi.combat(yase)
elif choice == "2":
houyi.cure()
else:
......
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