Commit d2a023f0 by BellCodeEditor

auto save

parent 2b878a1e
Showing with 9 additions and 8 deletions
...@@ -5,14 +5,14 @@ class hero: ...@@ -5,14 +5,14 @@ class hero:
self.name=name self.name=name
self.HP=HP self.HP=HP
self.ADC=ADC self.ADC=ADC
def Upgrade(self):
self.LV=self.LV+1
self.HP=self.HP+150
self.ADC=self.ADC+5
yase=hero("亚瑟",300,20,1) yase=hero("亚瑟",300,20,1)
houyi=hero("后羿",250,23,1) houyi=hero("后羿",250,23,1)
print("后羿的生命值为")
def YaseUpgrade():
yase.LV=yase.LV+1 Upgrade()
yase.HP=yase.HP+150 Upgrade()
yase.ADC=yase.ADC+5
YaseUpgrade()
YaseUpgrade()
print("亚瑟的等级为"+str(yase.LV)+"级") print("亚瑟的等级为"+str(yase.LV)+"级")
\ 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