Commit 409c2c5a by BellCodeEditor

save project

parent 22354288
Showing with 16 additions and 0 deletions
class Hero:
def __init__(self,name,level,hp,atk,defn):
self.name=name
self.level=level
self.hp=hp
self.atk=atk
self.defn=defn
def upL(self):
self.houyi.level+=1
self.houyi.hp+=250
self.ouyi.atk+=100
self.houyi.defn+=50
houyi = Hero("后羿",1,500,100,40)
houyi.upL()
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