Commit 1a4aca8a by BellCodeEditor

save project

parent a674b839
Showing with 8 additions and 0 deletions
......@@ -38,6 +38,14 @@ class Player(Hero): # 玩家英雄
print(self.name+"类型为:"+self.hero_type)
print(self.level,self.hp,self.attack)
def cure(self):
blood=random.randint(30,50)
self.hp=self.hp+blood
if self.hp>self.max_hp:
self.hp=self.max_hp
print(self.name+"使用了治疗术,血量增加:",60,",目前的血量为:",self.hp)
houyi = Player("后羿","射手")
yase=Hero("亚瑟")
print("-"*30)
......
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