Commit 44a12c16 by BellCodeEditor

save project

parent 758d7e4d
Showing with 8 additions and 7 deletions
......@@ -4,14 +4,15 @@ class ThreeSister:
self.HP=HP
self.attack=attack
self.level=level
def upgrade(self):
self.HP+=100
self.level+=1
self.attack+=100
daji=ThreeSister("妲己",6000,1500,1)
anqixia=ThreeSister("安琪瞎",7000,1600,1)
def upgrade():
daji.HP+=100
daji.level+=1
daji.attack+=100
upgrade()
upgrade()
daji.upgrade()
anqixia.upgrade()
print(daji.HP,daji.level,daji.attack)
print(anqixia.HP,anqixia.level,anqixia.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