Commit efb73757 by BellCodeEditor

save project

parent 7acfa83d
Showing with 0 additions and 6 deletions
...@@ -27,13 +27,7 @@ class Hero(object): ...@@ -27,13 +27,7 @@ class Hero(object):
info = info1+info2+info3 info = info1+info2+info3
print(info) print(info)
exit() exit()
def cure(self): # 治疗
gh=random.randint(30,50)
self.hp+=gh
if self.max_hp > self.hp:
self.hp=self.max_hp
print(self.name+"使用了治疗,血量增加:", gh,",目前的血量为:",self.hp)
class Player(Hero): class Player(Hero):
def __init__(self,hero_type,name): def __init__(self,hero_type,name):
super().__init__(name) super().__init__(name)
......
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