diff --git a/2.py b/2.py index e69de29..4c9215a 100644 --- a/2.py +++ b/2.py @@ -0,0 +1,17 @@ +lass Hero: + def __init__(self): + self.level = 99999999999999999999999999999999999999999999999999999999999 + self.hp = 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 + self.attack = 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 +yase = Hero("亚瑟",100,200) +print(yase.hp1) +houyi = Hero('后翌',150,120) +print(houyi.hp1) +def upgrede(): + yase.hp1 = yase.hp1*2 + yase.level = yase.level+1 + yase.attack1 = yase.attack*2 +yase = Hero("亚瑟",100,200) +yase.upgrede() +print(yase.hp1) +print(yase.hp1) \ No newline at end of file