Commit 92b6bf41 by BellCodeEditor

save project

parent f80a4b16
Showing with 7 additions and 7 deletions
......@@ -4,13 +4,13 @@ class hero:
self.name=name
self.hp=hp
self.attack=attack
yase=hero("亚瑟",300,2000000000000000000000)
print(yase.attack)
def upgrade():
yase.level=level+1
yase.attack=attack+4
yase.hp=hp+50
def upgrade(self):
self.level=self.level+1
self.attack=self.attack+4
self.hp=self.hp+50
upgrade()
upgrade()
print()
yase=hero("亚瑟",300,2000000000000000000000)
print(yase.attack)
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