Commit 6c873e78 by BellCodeEditor

save project

parent c0dab82a
Showing with 3 additions and 2 deletions
...@@ -4,13 +4,13 @@ class Hero: ...@@ -4,13 +4,13 @@ class Hero:
self.name=name self.name=name
self.level=1 self.level=1
self.attack=attack self.attack=attack
yase=Hero("🐎牛B",250,46) yase=Hero("",250,46)
print() print()
def upgrade(): def upgrade():
self.level=yase.level+1 self.level=yase.level+1
self.hp=yase.hp+50 self.hp=yase.hp+50
self.attack=yase.attack+4 self.attack=yase.attack+4
upgrade() yase=Hero
print(yase.level) print(yase.level)
print(yase.hp) print(yase.hp)
print(yase.attack) print(yase.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