Commit b6259509 by BellCodeEditor

save project

parent 63b9dbc2
Showing with 10 additions and 7 deletions
...@@ -3,9 +3,12 @@ class hero: ...@@ -3,9 +3,12 @@ class hero:
self.level=1 self.level=1
self.hp=300 self.hp=300
self.attack=200 self.attack=200
yase=hero('yase',300,20) yase=hero('垭瑟',300,20)
hy=hero('hy',250,23)
k=hero('k',5600,199) def upgrade():
print(yase.attack) yase.level=yase.level+1
print(hy.attack) yase.hp=yase=yase.hp+50
print(k.attack) yase.attack=yase.attack+4
\ No newline at end of file
upgrade()
upgrade()
\ 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