Commit 2eb67fa0 by BellCodeEditor

save project

parent 4d06f468
Showing with 10 additions and 1 deletions
......@@ -29,8 +29,17 @@ class Hero(object):
print(info)
print('你干嘛啊~~')
exit()
class Player(Hero):
def cure(self):
sd=random.randint(40,50)
self.hp=self.hp+sd
if self.hp>self.max_hp:
self.hp=self.max_hp
print(self.name+"使用了治疗,血量增加:", sd,",目前的血量为:",self.hp)
random.randint(40,50)
def __init__(self,hero_type,name):
super().__init__(name)
self.hp = 200
......
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