Commit bd4b1a88 by BellCodeEditor

auto save

parent 22354288
Showing with 19 additions and 0 deletions
class hero:
def __init__(self,name,hp,attack):
self.level=1
self.name=name
self.hp=hp
self.attack=attack
def upgrade():
ren.level += 1
ren.hp+=50
ren.attack+=4
def npgrade():
zhu.level += 1
zhu.hp+=50
zhu.attack+=4
ren=hero("亚瑟","300","20")
zhu=hero("后羿","250","23")
print(ren.hp)
print(zhu.hp)
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