Commit 44580cdb by BellCodeEditor

save project

parent 9f5a47a8
Showing with 9 additions and 20 deletions
class Hero:
def __init__(ziji,maxup,name,hp,attack):
def __init__(ziji,level,name,hp,attack):
ziji.level=1
ziji.name=name
ziji.hp=hp
ziji.attack=attack
ys=Hero('ys',300,20)
hy=Hero('hy',250,23)
sq=Hero('sq',1000000000,23000000000)
def upys():
ys.level+=1
ys.hp+=50
ys.attack+=4
upys()
def uphy():
hy.level+=1
hy.hp+=50
hy.attack+=4
uphy()
def upsq():
sq.level+=1
sq.hp+=50
sq.attack+=4
upsq()
\ No newline at end of file
def maxup(ziji):
ziji.level=ziji.level+1
ziji.hp=ziji.hp+50
ziji.attack=ziji.attack+4
ys=Hero('ys',1,300,20)
hy=Hero('hy',1,250,23)
sq=Hero('sq',1,200,30)
sq.maxup()
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