def _pantheon_lines(monsters, base_monster): if not len(monsters): return [] return [ MonsterHeader.short_with_emoji(mon, link=mon.monster_id != base_monster.monster_id) for mon in sorted(monsters, key=lambda x: int(x.monster_id)) ]
def _monster_list(monsters): if not len(monsters): return [] return [ MonsterHeader.short_with_emoji(mon, link=True, prefix=char_to_emoji(i)) for i, mon in enumerate(monsters) ]
def _evo_lines(monsters, current_monster): if not len(monsters): return [] return [ MonsterHeader.short_with_emoji(ae, link=ae.monster_id != current_monster.monster_id) for ae in sorted(monsters, key=lambda x: int(x.monster_id)) ]
def invalid_monster_text(query: str, monster: "MonsterModel", append_text: str, link: bool = False): monster_name = MonsterHeader.short_with_emoji(monster, link=link).to_markdown() return f'Your query `{query}` found {monster_name}{append_text}.'
def _monster_list(monsters): if not len(monsters): return [] return [ MonsterHeader.short_with_emoji(mon, link=True) for mon in sorted(monsters, key=lambda x: int(x.monster_id)) ]
def mat_use_field(mons, title, max_mons=MAX_MONS_TO_SHOW): text = None if len(mons) == 0: text = "None" elif len(mons) > max_mons: text = f"({len(mons) - max_mons} more monster{'s' if len(mons) - max_mons > 1 else ''})" return EmbedField( title, Box(*(MonsterHeader.short_with_emoji(em) for em in mons[:max_mons]), text))
def _monster_list(monsters, current_index): if not len(monsters): return [] return [ MonsterHeader.short_with_emoji(mon, link=SeriesScrollView._is_linked( i, current_index), prefix=char_to_emoji(str(i))) for i, mon in enumerate(monsters) ]
def monster_list(cls, monsters: List["MonsterModel"], current_monster_id: int): if not len(monsters): return [] return [ MonsterHeader.short_with_emoji(mon, link=True, prefix=cls.get_emoji( i, current_monster_id)) for i, mon in enumerate(monsters) ]
def skillup_field(mons, sec, link): text = None text2 = None if len(mons) == 0: text = "None" if sec: text2 = Box( f"({max(len(mons) - MAX_MONS_TO_SHOW, 0) + sec} ", LinkedText(f"more monster{'s' if max(len(mons) - MAX_MONS_TO_SHOW, 0) + sec > 1 else ''}", link), f", incl. {sec} alt evo{'s' if sec > 1 else ''})", delimiter="") elif len(mons) > MAX_MONS_TO_SHOW: text2 = f"({len(mons) - MAX_MONS_TO_SHOW} more monsters)" return EmbedField( "Skillups", Box(*(MonsterHeader.short_with_emoji(em) for em in mons[:MAX_MONS_TO_SHOW]), text, text2))
def embed(state: PantheonViewState): fields = [ EmbedField( 'Pantheon: {}'.format(state.series_name), Box(*[ MonsterHeader.short_with_emoji(m) for m in sorted(state.pantheon_list, key=lambda x: x.monster_no_na) ])) ] return EmbedView( EmbedMain(color=state.color, title=MonsterHeader.long_v2(state.monster).to_markdown(), url=puzzledragonx(state.monster)), embed_footer=pad_info_footer_with_state(state), embed_fields=fields, embed_thumbnail=EmbedThumbnail(MonsterImage.icon(state.monster)), )