Commit 56ec9af4 by BellCodeEditor

auto save

parent ddcf1d31
Showing with 8 additions and 4 deletions
...@@ -4,6 +4,11 @@ class hero: ...@@ -4,6 +4,11 @@ class hero:
self.level = 1 self.level = 1
self.hp = hp self.hp = hp
self.attack = attack self.attack = attack
yase = hero("垭瑟"300,20) yase = hero("垭瑟",300,20)
yase.hp = 350 def upgrade():
print("垭瑟的血量为:"yase.hp) yase.level = self.level + 1
\ No newline at end of file yase.hp = self.hp + 50
yase.attack = self.attack + 4
upgrade()
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