Commit f01c7009 by BellCodeEditor

save project

parent 55171e8c
Showing with 12 additions and 15 deletions
class Hero(): class Hero():
def __init__(self,hp,defense,attck): def __init__(self,level,hp,defense,attck):
self.level=1 self.level=level
self.hp=hp self.hp=hp
self.defense=defense self.defense=defense
self.attck=attck self.attck=attck
Chen = Hero(1229,257,249)
Hoshiguma = Hero(1602,154,221) def a(self):
def a(): self.level=self.level+50
Chen.level=Chen.level+50 self.hp=self.hp+500
Chen.hp=Chen.hp+455 self.defense=self.defense+70
Chen.defense=chen.defense+67 self.attck=self.attck+70
Chen.attck=Chen.attck+112 Chen = Hero(1,1229,257,249)
def b(): Hoshiguma = Hero(1,1602,154,221)
Hoshiguma.level=Hoshiguma.level+50 Chen.a()
Hoshiguma.hp=Hoshiguma.hp+563 \ No newline at end of file
Hoshiguma.defense=Hoshiguma.defense+124
Hoshiguma.attck=Hoshiguma.attck+63
\ 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