示例#1
0
def _make_prefix(idx, skill, subskill):
    if skill.compound_skill_type_id == 1:
        return emoji_cache.get_emoji('bd') + ' '
    elif skill.compound_skill_type_id in (2, 3):
        return number_emoji_small(idx) + (f' **[{subskill.cooldown}cd]** '
                                          if idx != 1 else ' ')
    return ''
示例#2
0
def _replace_bullets(line, color_index):
    if line.startswith(STAR):
        bullet = emoji_cache.get_emoji(BULLET_EMOJIS[color_index])
        return '{} {}'.format(bullet, line[len(STAR):])
    else:
        return line
 def embed(state, props: ExperienceCurveViewProps):
     regular = get_normal_exp_difference(props.monster, props.low,
                                         props.high, props.offset)
     lb = get_lb_exp_difference(props.monster, props.low, props.high,
                                props.offset)
     slb = get_slb_exp_difference(props.monster, props.low, props.high,
                                  props.offset)
     is_light = props.monster.full_damage_attr.value == 3
     return EmbedView(
         EmbedMain(
             color=state.color,
             title=MonsterHeader.fmt_id_header(props.monster,
                                               use_emoji=True),
             url=puzzledragonx(props.monster),
             description=Text(f'lv{props.low} -> lv{props.high} (' +
                              (trunc_humanize(props.monster.exp_curve)
                               if props.monster.exp_curve else "no") +
                              f' curve)'),
         ),
         embed_thumbnail=EmbedThumbnail(MonsterImage.icon(props.monster)),
         embed_fields=[
             EmbedField(title='Exact',
                        body=Box(
                            LabeledText("Reg", humanize_number(regular)),
                            LabeledText("LB", humanize_number(lb)),
                            LabeledText("SLB", humanize_number(slb)),
                            LabeledText("Net",
                                        humanize_number(regular + lb +
                                                        slb))),
                        inline=True),
             EmbedField(title='Approx',
                        body=Box(
                            LabeledText("Reg", trunc_humanize(regular)),
                            LabeledText("LB", trunc_humanize(lb)),
                            LabeledText("SLB", trunc_humanize(slb)),
                            LabeledText("Net",
                                        trunc_humanize(regular + lb +
                                                       slb))),
                        inline=True),
             EmbedField(
                 title='Resources',
                 body=Box(
                     LabeledText(
                         "Globes " + emoji_cache.get_emoji(
                             f'orb_{props.monster.full_damage_attr.name.lower()}'
                         ),
                         str(
                             get_total_needed(
                                 props.monster, props.low, props.high,
                                 props.offset,
                                 ceil(1.5 * GLOBE_EXP[
                                     props.monster.full_damage_attr.value]),
                                 is_light))),
                     LabeledText(
                         "TA2",
                         str(
                             get_total_needed(props.monster, props.low,
                                              props.high, props.offset,
                                              TA2_EXP, is_light))),
                     LabeledText(
                         "TA3",
                         str(
                             get_total_needed(props.monster, props.low,
                                              props.high, props.offset,
                                              TA3_EXP, is_light))),
                 ),
                 inline=True)
         ],
         embed_footer=embed_footer_with_state(state))
示例#4
0
def number_emoji_small(num: int):
    return emoji_cache.get_emoji(f"bullet_{num}")
示例#5
0
def get_emoji(name):
    if isinstance(name, int):
        name = AWAKENING_ID_TO_EMOJI_NAME_MAP[name]
    return emoji_cache.get_emoji(name)