Commit ecb13b2e by BellCodeEditor

save project

parent f9f64500
Showing with 3 additions and 2 deletions
......@@ -10,7 +10,6 @@ class Hero: # 英雄类
self.hp = self.hp+70
if self.ph>self.max_hp
self.hp=self.max_hp
print(self.name + "使用了治疗,血量增加:"60",目前的血量为:",self.hp)
def combat(self, enemy): # 攻击功能
......@@ -39,6 +38,8 @@ class Player(Hero): # 玩家英雄
print()
player = Player("后羿")
horyi = Player("后羿")
yase=Hero("亚瑟")
print("玩家的血量值为:",player.hp)
print("玩家的攻击力为:",player.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