Ejemplo n.º 1
0
def leader_header(m: "MonsterModel", is_base: bool):
    if is_base:
        emoji = BASE_EMOJI
        label = 'Base'
    else:
        emoji = TRANSFORM_EMOJI
        label = 'Transform'
    leader_skill = m.leader_skill

    return Box(emoji,
               BoldText(label),
               IdView.leader_skill_header(m).to_markdown(),
               delimiter=' ')
Ejemplo n.º 2
0
    def embed(state: TransformInfoViewState):
        base_mon = state.base_mon
        transformed_mon = state.transformed_mon

        fields = [
            EmbedField(
                '/'.join(['{}'.format(t.name) for t in transformed_mon.types]),
                Box(
                    IdView.normal_awakenings_row(transformed_mon)
                    if len(transformed_mon.awakenings) != 0 else Box(
                        Text('No Awakenings')), base_info(base_mon)),
            ),
            EmbedField('Card info',
                       IdView.misc_info(transformed_mon,
                                        state.true_evo_type_raw,
                                        state.acquire_raw, state.base_rarity),
                       inline=True),
            EmbedField(IdView.stats_header(transformed_mon).to_markdown(),
                       IdView.stats(transformed_mon),
                       inline=True),
            EmbedField(
                IdView.active_skill_header(transformed_mon).to_markdown() +
                base_skill(base_mon),
                Text(transformed_mon.active_skill.desc if transformed_mon.
                     active_skill else 'None')),
            EmbedField(
                IdView.leader_skill_header(transformed_mon).to_markdown(),
                Text(transformed_mon.leader_skill.desc if transformed_mon.
                     leader_skill else 'None'))
        ]

        return EmbedView(EmbedMain(
            color=state.color,
            title=MonsterHeader.long_v2(transformed_mon).to_markdown(),
            url=puzzledragonx(transformed_mon)),
                         embed_thumbnail=EmbedThumbnail(
                             MonsterImage.icon(transformed_mon)),
                         embed_footer=pad_info_footer_with_state(state),
                         embed_fields=fields)