Commit f01c7009 by BellCodeEditor

save project

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