Commit 539d375b by BellCodeEditor

save project

parent 8d75fbc4
Showing with 5 additions and 5 deletions
...@@ -6,10 +6,10 @@ class Hero: ...@@ -6,10 +6,10 @@ class Hero:
self.attck=attck self.attck=attck
yase=Hero('亚瑟',300,20) yase=Hero('亚瑟',300,20)
houyi=Hero('后羿',240,30) houyi=Hero('后羿',240,30)
def upgradge(): def upgrade():
yase.level+=1 yase.level+=1
yase.hp+=50 yase.hp+=50
yase.attck+=4 yase.attck+=4
upgradge() upgrade()
print(yase.hp) upgrade()
print(houyi.hp) print(yase.level)
\ No newline at end of file \ No newline at end of file
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