Commit 308152c3 by BellCodeEditor

save project

parent b788fcfa
Showing with 4 additions and 1 deletions
......@@ -19,7 +19,10 @@ class Hero: # 英雄类
print(info)
exit()
def cure(self):
self.hp=self.hp+30
if self.hp>self.max_hp:
self.hp=self.max_hp
print(self.name+"使用了治疗术,回复了30点血量,还剩"+str(self.hp)+"点血量")
class Player(Hero): # 玩家英雄
def __init__(self,name,hero_type):
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