Commit 869ef170 by BellCodeEditor

save project

parent 9a581ef4
Showing with 22 additions and 1 deletions
......@@ -7,8 +7,28 @@ class Hero(object):
self.name = name
def combat(): # 攻击
???
yase = Hero("垭瑟")
houyi= Hero("后羿")
yase.combat(houyi)
# LV=1
# class hero:
# def __init__(self,name,HP,ADC,LV):
# self.LV=1
# 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)
# 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