Commit c6b24e52 by BellCodeEditor

save project

parent c08e1c8d
Showing with 7 additions and 3 deletions
...@@ -6,7 +6,12 @@ class Hero: ...@@ -6,7 +6,12 @@ class Hero:
self.attack=attack self.attack=attack
yase=Hero('yase',300,20) yase=Hero('yase',300,20)
hy=Hero('houyi',270,23) hy=Hero('houyi',270,23)
k=Hero('K',5600,199) def upgrade():
self.level=self.level+1
self.hp=self.hp+50
self.attack=self.attack+4
upgrade()
print(yase.attack) print(yase.attack)
print(hy.attack) print(hy.attack)
print(k.attack)
\ 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