Commit 06a3ad68 by BellCodeEditor

save project

parent 8533eee3
Showing with 11 additions and 10 deletions
......@@ -5,14 +5,15 @@ class hero:
self.name=name
self.HP=HP
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)
houyi=hero("后羿",250,23,1)
def YaseUpgrade():
yase.LV=yase.LV+1
yase.HP=yase.HP+150
yase.ADC=yase.ADC+5
YaseUpgrade()
YaseUpgrade()
print("亚瑟的等级为"+str(yase.LV)+"级")
\ No newline at end of file
print("亚瑟的等级为"+str(yase.LV)+"级"+"\n"+"亚瑟的攻击力为"+str(yase.ADC)+"点"+"\n"+"亚瑟的血量为"+str(yase.HP)+"点"+"\n")
print("后羿的等级为"+str(houyi.LV)+"级"+"\n"+"后羿的攻击力为"+str(houyi.ADC)+"点"+"\n"+"后羿的血量为"+str(houyi.HP)+"点"+"\n")
yase.Upgrade()
houyi.Upgrade()
print("亚瑟的等级为"+str(yase.LV)+"级"+"\n"+"亚瑟的攻击力为"+str(yase.ADC)+"点"+"\n"+"亚瑟的血量为"+str(yase.HP)+"点"+"\n")
print("后羿的等级为"+str(houyi.LV)+"级"+"\n"+"后羿的攻击力为"+str(houyi.ADC)+"点"+"\n"+"后羿的血量为"+str(houyi.HP)+"点"+"\n")
\ 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