def spawn_orb_convert(self, act): skill_text = 'Create {} '.format(act.amount) skill_text += self.concat_list_and( [self.ATTRIBUTES[o] for o in act.orbs]) skill_text += ' ' + pluralize('orb', act.amount) if act.orbs != act.excluding_orbs and act.excluding_orbs != []: templist = set(act.excluding_orbs) - set(act.orbs) skill_text += ' over non ' skill_text += self.concat_list_and( [self.ATTRIBUTES[o] for o in templist]) + ' orbs' elif len(act.excluding_orbs) == 0: skill_text += ' over any ' + pluralize('orb', act.amount) return skill_text
def orb_lock(self, count, attributes): if count == 42 and attributes == self.ATTRS_EXCEPT_BOMBS: return 'Lock all orbs' elif count == 42: return 'Lock all {:s} orbs'.format( self.attributes_to_str(attributes)) elif attributes == self.ATTRS_EXCEPT_BOMBS: return 'Lock {:d} random {:s}'.format(count, pluralize('orb', count)) else: return 'Lock {:d} random {:s} {:s}'.format( count, self.attributes_to_str(attributes), pluralize('orb', count))
def type_attack_boost_convert(self, act): skill_text = self.fmt_duration(act.duration) + fmt_mult( act.multiplier) + 'x ATK for ' skill_text += self.concat_list_and([self.TYPES[t] for t in act.types]) + ' ' skill_text += pluralize('type', len(act.types)) return skill_text
def random_orb_spawn(self, count, attributes): if count == 42: return self.board_change(attributes) else: return 'Spawn {:d} random {:s} {:s}'.format( count, self.attributes_to_str(attributes, 'and'), pluralize('orb', count))
def orb_change(self, orb_from, orb_to, random_count=None, random_type_count=None, exclude_hearts=False): if not isinstance(orb_from, list): orb_from = [orb_from] orb_from = self.attributes_to_str(orb_from) if not isinstance(orb_to, list): orb_to = [orb_to] orb_to = self.attributes_to_str(orb_to) output = 'Change ' if random_count is not None: orbs_text = pluralize('orb', random_count) if orb_from == 'Random': output += '{} random {:s}'.format(random_count, orbs_text) else: output += '{} random {} {}'.format(random_count, orb_from, orbs_text) if exclude_hearts: output += ' (excluding hearts)' elif random_type_count is not None: types_text = pluralize('type', random_type_count) output += '{} random orb {}'.format(random_type_count, types_text) else: if 'Random' in orb_from: output += 'a random attribute' else: output += 'all {} orbs'.format(orb_from) output += ' to ' if 'Random' in orb_to: output += 'a random attribute' else: output += '{} {}'.format(orb_to, 'orbs') return output
def orb_change(self, orb_from, orb_to, random_count=None, random_type_count=None, exclude_hearts=False): if not isinstance(orb_from, list): orb_from = [orb_from] orb_from = self.attributes_to_emoji(orb_from) if not isinstance(orb_to, list): orb_to = [orb_to] orb_to = self.attributes_to_emoji(orb_to) output = '' if random_count is not None: orbs_text = pluralize('orb', random_count) if orb_from == 'Random': output += '({} random'.format(random_count) else: output += '({} random {}'.format(random_count, orb_from) if exclude_hearts: output += ' [ignore {}]'.format(self._ATTRS[5]) elif random_type_count is not None: types_text = pluralize('type', random_type_count) output += '({} random orb {}'.format(random_type_count, types_text) else: if 'Random' in orb_from: output += '(1 Att' else: output += '({}'.format(orb_from) output += emoji_dict['to'] if 'Random' in orb_to: output += 'random att)' else: output += '{})'.format(orb_to) return output
def spawn_spinner(self, turns: int, speed: float, count: int): return 'Create {:s} that {:s} every {:.1f}s for {:s}' \ .format(noun_count('spinner', count), pluralize("change", count, verb=True), speed, noun_count('turn', turns))
def gacha_fever(self, attribute, orb_req): return 'Fever Mode: clear {:d} {:s} {:s}'.format( orb_req, self._ATTRS[attribute], pluralize('orb', orb_req))
def orb_seal(self, turns, position_type, positions): return '({}[{:s}:{:s}] for {})' \ .format(emoji_dict['tape'], pluralize(ORB_SHAPES[position_type], len(positions)), self.concat_list_and([ordinal(x) for x in positions]), turns)
def row_col_spawn(self, position_type, positions, attributes): return '([{:s}: {:s}]{}{:s})'.format( pluralize(ORB_SHAPES[position_type], len(positions)), self.concat_list_and([ordinal(x) for x in positions]), emoji_dict['to'], self.attributes_to_emoji(attributes))
def orb_seal(self, turns, position_type, positions): return 'Seal the {:s} {:s} for {:s}' \ .format(self.concat_list_and([ordinal(x) for x in positions]), pluralize(ORB_SHAPES[position_type], len(positions)), noun_count('turn', turns))
def row_col_spawn(self, position_type, positions, attributes): return 'Change the {:s} {:s} to {:s} orbs'.format( self.concat_list_and([ordinal(x) for x in positions]), pluralize(ORB_SHAPES[position_type], len(positions)), self.attributes_to_str(attributes))