Commit a0fd40c8 by BellCodeEditor

save project

parent 82a97603
Showing with 5 additions and 5 deletions
...@@ -7,9 +7,9 @@ class Hero: ...@@ -7,9 +7,9 @@ class Hero:
yase=Hero('亚瑟',300,20) yase=Hero('亚瑟',300,20)
houyi=Hero('后羿',240,25) houyi=Hero('后羿',240,25)
def Upgrade(): def Upgrade(self):
yase.level=yase.level+1 self.level=self.level+1
yase.ph=yase.ph+50 self.ph=self.ph+50
yase.attact=yase.attact+4 self.attact=self.attact+4
Upgrade() Upgrade(yase)
print(yase.ph) print(yase.ph)
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