Commit 8f8d786a by BellCodeEditor

save project

parent d8c63e39
Showing with 6 additions and 0 deletions
...@@ -5,4 +5,9 @@ class Heor(): ...@@ -5,4 +5,9 @@ class Heor():
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
yase=Heor("垭瑟",300,20) yase=Heor("垭瑟",300,20)
def upgrade():
yase.level=yase.level+1
yase.hp=yase.hp+1
yase.attack=yase.attack+1
upgrade()
print("亚瑟的血量",yase.hp) print("亚瑟的血量",yase.hp)
\ 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