Commit 763dd00d by BellCodeEditor

save project

parent 38ab4575
Showing with 4 additions and 3 deletions
......@@ -26,10 +26,11 @@ class Player(Hero): # 玩家英雄
def __init__(self,name,hero_type):
super().__init__(name)
self.hp = 1000
self.attack = 1000
self.attacks = 1000
self.lever = 10
print("角色" + self.name + "做好了,")
print("当前级别" + self.hp + "攻击力为" +)
player = Player("后羿")
print("当前级别" + str(self.hp) + "攻击力为" + str(self.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