Commit d121d8b7 by BellCodeEditor

save project

parent 1b1e53f1
Showing with 5 additions and 4 deletions
...@@ -5,10 +5,11 @@ class Hero: # 英雄类 ...@@ -5,10 +5,11 @@ class Hero: # 英雄类
self.hp = 250 self.hp = 250
self.attack = 40 self.attack = 40
self.max_hp = self.hp self.max_hp = self.hp
self.hero_type = hero_type
print("角色"+self.name+"创建成功,英雄类型为:"+self.hero_type) print("角色"+self.name+"创建成功,英雄类型为:"+self.hero_type)
print("玩家的等级为:",str(player.level)) print("玩家的等级为:",str(self.level))
print("玩家的攻击力为:",str(player.attack)) print("玩家的攻击力为:",str(self.attack))
print("玩家的血量值为:",str(player.hp)) print("玩家的血量值为:",str(self.hp))
def combat(self, enemy): # 攻击功能 def combat(self, enemy): # 攻击功能
...@@ -33,4 +34,4 @@ class Player(Hero): # 玩家英雄 ...@@ -33,4 +34,4 @@ class Player(Hero): # 玩家英雄
self.attack = 50 self.attack = 50
player = Player("Uchiha Madara","Kami-Sama") player = Player("Uchiha Madara","Ka mi -Sama")
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