Commit 9f5a7e80 by BellCodeEditor

save project

parent beb166ed
Showing with 4 additions and 1 deletions
...@@ -27,7 +27,10 @@ class Hero(object): ...@@ -27,7 +27,10 @@ class Hero(object):
print(info) print(info)
print('你干嘛啊~~') print('你干嘛啊~~')
exit() exit()
def cure(self):
self.hp=self.hp+60
if self.hp>self.max_hp:
self.hp=self.max_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