def __init__(self, dictionary): ''' Constructor ''' for x in dictionary.keys(): if x == 'abilities': self.abilities = AbilityList(dictionary[x]) else: setattr(self, x, dictionary[x])
class Champion(object): ''' classdocs ''' def __init__(self, dictionary): ''' Constructor ''' for x in dictionary.keys(): if x == 'abilities': self.abilities = AbilityList(dictionary[x]) else: setattr(self, x, dictionary[x]) def getBurst(self, ap, cdr = 0, time = 0): if cdr > .4: cdr = .4 return self.abilities.getTotalDamage(ap, cdr, time)