Commit 23f46b0f by BellCodeEditor

save project

parent 50ab48c3
Showing with 4 additions and 3 deletions
...@@ -6,11 +6,12 @@ class Hero: ...@@ -6,11 +6,12 @@ class Hero:
self.attack=attack self.attack=attack
亚瑟=Hero('亚瑟',4500,130) 亚瑟=Hero('亚瑟',4500,130)
后羿=Hero('后羿',3900,155) 后羿=Hero('后羿',3900,155)
print("亚瑟攻击力为:",亚瑟.attack) #print("亚瑟攻击力为:",亚瑟.attack)
print("后羿攻击力为:",后羿.attack) #rint("后羿攻击力为:",后羿.attack)
def upgrade(): def upgrade():
亚瑟.attack=亚瑟.attack+20 亚瑟.attack=亚瑟.attack+20
亚瑟.level=亚瑟.level+1 亚瑟.level=亚瑟.level+1
亚瑟.hp=亚瑟.hp+200 亚瑟.hp=亚瑟.hp+200
#亚瑟=Hero("亚瑟",4500,130)
#print("当前血量为:",亚瑟.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