Commit 37ee97f3 by BellCodeEditor

save project

parent bd4b1a88
Showing with 8 additions and 10 deletions
......@@ -5,15 +5,13 @@ class hero:
self.hp=hp
self.attack=attack
def upgrade():
ren.level += 1
ren.hp+=50
ren.attack+=4
def npgrade():
zhu.level += 1
zhu.hp+=50
zhu.attack+=4
ren=hero("亚瑟","300","20")
zhu=hero("后羿","250","23")
def upgrade(self):
self.level += 1
self.hp+=50
self.attack+=4
ren=hero("亚瑟",300,20)
zhu=hero("后羿",250,23)
ren.upgrade()
zhu.upgrade()
print(ren.hp)
print(zhu.hp)
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