Commit d52b4283 by BellCodeEditor

save project

parent 2f45d69b
Showing with 7 additions and 0 deletions
......@@ -34,6 +34,13 @@ class Player(Hero): # 玩家英雄
super(). __init__(name)
self.hp = 200
self.hp.attack = 50
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+"使用了治疗术,血量增加:",blood,",目前的血量为:",self.hp)
houyi = Player("射手""后羿")
yase = Hero("亚瑟")
......
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