Commit 14614680 by BellCodeEditor

save project

parent f50090a3
Showing with 18 additions and 0 deletions
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
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