Commit 8e2b93e8 by BellCodeEditor

auto save

parent 53ce5b46
Showing with 6 additions and 0 deletions
...@@ -4,5 +4,10 @@ class Hero: ...@@ -4,5 +4,10 @@ class Hero:
self.name = name self.name = name
self.level = 1 self.level = 1
self.attack = attack self.attack = attack
def upgrade(self):
self.hp = self.hp + 1000000000000
self.level = self.level + 1
self.attack = self.attack + 1000000
lubanqihao = Hero("鲁班七号",10000000000000000000000000000000000000000000000000000,2000000000000022323221334555000000000025252530000000000000000000000000000000000) lubanqihao = Hero("鲁班七号",10000000000000000000000000000000000000000000000000000,2000000000000022323221334555000000000025252530000000000000000000000000000000000)
print(lubanqihao.hp) print(lubanqihao.hp)
lubanqihao.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