Commit c6d62e33 by BellCodeEditor

save project

parent c1b89af4
Showing with 5 additions and 9 deletions
class Player(Hero): def cure(self):
def __init__(self,name,hero_trpy): self.hp=self+60
super().__init__(name) if self.hp>self.max_hp:
self.hp=200 self.hp=self.max_hp
self.attack=50 print(self.name+"使用了治疗术,血量增加:",60,"目前血量为:"self.hp)
self.hero_type=hero_type
print("角色"+self.name+"创建成功,英雄类型为:",self.hero_type)
print("当前等级、血量、攻击力分别为:",self.level,self.hp,self.attack)
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