Commit 20810ced by BellCodeEditor

save project

parent e703583e
Showing with 1 additions and 4 deletions
...@@ -4,7 +4,7 @@ class Hero: # 英雄类 ...@@ -4,7 +4,7 @@ class Hero: # 英雄类
self.level = 1 self.level = 1
self.hp = 250 self.hp = 250
self.attack = 40 self.attack = 40
self.max_hp = self.hp
def combat(self, enemy): # 攻击功能 def combat(self, enemy): # 攻击功能
...@@ -33,6 +33,3 @@ print("玩家的攻击力为:",player.attack) ...@@ -33,6 +33,3 @@ print("玩家的攻击力为:",player.attack)
player = Player("后羿")
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