Commit 71677649 by BellCodeEditor

save project

parent d6c81a0f
Showing with 18 additions and 0 deletions
class Hore:
def __init__(self,name,level,HP,att):
self.name=name
self.level=level
self.HP=HP
self.att=att
def upgrade(self):
self.level=self.level+1
self.HP=self.HP+350
self.att=self.att+250
y=Hore("澜",1,1000,500)
o=Hore("白起",1,5000,100)
y.upgrade()
o.upgrade()
print(y.att)
print(o.att)
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