Commit c0dab82a by BellCodeEditor

save project

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