def rainbow_crown(self): if self.rainbow_crown_attribute is None: return None return CROWN_TEMPLATE.format( **{ k: getattr(self, 'rainbow_{}'.format(k)) for k in templateVariables(CROWN_TEMPLATE) })
def sub_skill(self): _sub_skill_variables = { k: getattr(self.photo, k) for k in templateVariables(self.photo.sub_skill_template) } _sub_skill_variables['sub_skill_amount'] = self.sub_skill_amount return self.photo.sub_skill_template.format(**_sub_skill_variables)
def japanese_sub_skill(self): if self.i_sub_skill_type is None: return None return self.japanese_sub_skill_template.format( **{ k: getattr(self, k, '') for k in templateVariables(self.japanese_sub_skill_template) })
def japanese_leader_skill(self): if self.leader_skill_color is None: return None return self.LEADER_SKILL_INFO['japanese_template'].format( **{ k: getattr(self, k, '') for k in templateVariables(self.LEADER_SKILL_INFO['template']) })
def leader_skill(self): _leader_skill_variables = { k: getattr(self.photo, k) for k in templateVariables(Photo.LEADER_SKILL_INFO['template']) } _leader_skill_variables[ 'leader_skill_percentage'] = self.final_leader_skill_percentage return Photo.LEADER_SKILL_INFO['template'].format( **_leader_skill_variables)
def skill(self): return self.photo.skill_template.format({ k: getattr(self, k) for k in templateVariables(self.photo.skill_template) })