Commit d4c95325 by BellCodeEditor

save project

parent eecff9f4
Showing with 3 additions and 0 deletions
......@@ -27,6 +27,9 @@ class Player(Hero): # 玩家英雄
super().__init__(name)
self.hp = 250
self.attack = 40
print(f"角色{self.name}创建成功,英雄类型为:射手")
print(f'当前等级、血量、攻击力分别为:{self.level},{self.hp},{self.attack} ')
player = Player("后羿")
print("玩家的血量值为:",player.hp)
......
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