Commit ed0cb385 by BellCodeEditor

save project

parent 4954e93d
Showing with 4 additions and 4 deletions
...@@ -5,6 +5,10 @@ class Hero: # 英雄类 ...@@ -5,6 +5,10 @@ class Hero: # 英雄类
self.hp = 250 self.hp = 250
self.attack = 40 self.attack = 40
self.max_hp = self.hp self.max_hp = self.hp
print("英雄"+name+"创建成功"
print("初始等级"+str(self.level))
print("血量"+str(self.hp))
print("攻击力"+str(self.attack))
def combat(self, enemy): # 攻击功能 def combat(self, enemy): # 攻击功能
...@@ -27,10 +31,6 @@ class Player(): # 玩家英雄 ...@@ -27,10 +31,6 @@ class Player(): # 玩家英雄
super().__init__(name) super().__init__(name)
self.hp=200 self.hp=200
self.attack=50 self.attack=50
print("英雄"+name+"创建成功"
print("初始等级"+str(self.level))
print("血量"+str(self.hp))
print("攻击力"+str(self.attack))
player = Player("后羿") player = Player("后羿")
......
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