Ejemplo n.º 1
0
 def make_values(self, a_card):
     if a_card.skill:
         return (
             """<td> <div class="icon {0}"></div> </td>"""
         ).format(E(enums.skill_class(a_card.skill.skill_type)))
     else:
         return """<td></td>"""
Ejemplo n.º 2
0
def icon_ex(card_id, is_lowbw=0, collapsible=0, classes=""):
    rec = starlight.data.card(card_id)
    if not rec:
        btext = "(?) bug:{0}".format(card_id)
        ish = """<div class="profile {1}">
            <div class="icon icon_unknown"></div>
            <div class="profile_text {0}"><b>Mysterious Kashikoi Person</b><br>{btext}</div>
        </div>""".format("hides_under_mobile" if collapsible else "",
                         classes,
                         btext=btext)
        return """<a class="noline">{ish}</a>""".format(ish=ish)
    else:
        if not is_lowbw:
            link = "/char/{rec.chara_id}#c_{rec.id}_head".format(rec=rec)
        else:
            link = "/card/{rec.id}".format(rec=rec)

        btext = "({0}) {1}".format(
            enums.rarity(rec.rarity),
            tlable(rec.title, write=0) if rec.title_flag else "")
        ish = """<div class="profile {4}">
            <div class="icon icon_{rec.id} msprites {1}_sm {2}_sm"></div>
            <div class="profile_text {3}"><b>{0}</b><br>{btext}</div>
        </div>""".format(
            tornado.escape.xhtml_escape(rec.chara.conventional),
            enums.stat_dot(rec.best_stat),
            enums.skill_class(rec.skill.skill_type) if rec.skill else "none",
            "hides_under_mobile" if collapsible else "",
            classes,
            rec=rec,
            btext=btext)
        return """<a href="{link}" class="noline">{ish}</a>""".format(
            rec=rec, ish=ish, link=link)
Ejemplo n.º 3
0
 def make_values(self, a_card):
     if a_card.skill:
         return (
             """<td> <div class="icon {0}"></div> </td>"""
         ).format(E(enums.skill_class(a_card.skill.skill_type)))
     else:
         return """<td></td>"""
Ejemplo n.º 4
0
def icon_ex(card_id, is_lowbw=0, collapsible=0):
    rec = starlight.data.card(card_id)
    if not rec:
        btext = "(?) bug:{0}".format(card_id)
        ish = """<div class="profile">
            <div class="icon icon_unknown"></div>
            <div class="profile_text {0}"><b>Mysterious Kashikoi Person</b><br>{btext}</div>
        </div>""".format("hides_under_mobile" if collapsible else "", btext=btext)
        return """<a class="noline">{ish}</a>""".format(ish=ish)
    else:
        if not is_lowbw:
            link = "/char/{rec.chara_id}#c_{rec.id}_head".format(rec=rec)
        else:
            link = "/card/{rec.id}".format(rec=rec)

        btext = "({0}) {1}".format(enums.rarity(rec.rarity), tlable(rec.title, write=0) if rec.title_flag else "")
        ish = """<div class="profile">
            <div class="icon icon_{rec.id} msprites m{1} {2}"></div>
            <div class="profile_text {3}"><b>{0}</b><br>{btext}</div>
        </div>""".format(tornado.escape.xhtml_escape(rec.chara.name),#chara.conventional
            enums.stat_dot(rec.best_stat),
            "m" + enums.skill_class(rec.skill.skill_type) if rec.skill else "",
            "hides_under_mobile" if collapsible else "",
            rec=rec, btext=btext)
        return """<a href="{link}" class="noline">{ish}</a>""".format(rec=rec, ish=ish, link=link)
Ejemplo n.º 5
0
    lambda card: enums.attribute(card.attribute) + "_kc")

rarity = filter_t("Card Rarity",
                  (option_t("SSR", "ssr_kc"), option_t("SR", "sr_kc"),
                   option_t("R", "r_kc"), option_t("N", "n_kc")),
                  lambda card: enums.floor_rarity(card.rarity) + "_kc")

skill_type = filter_t(
    "Skill Type",
    (option_t("Perf. Lock*", "s_pl"), option_t(
        "C. Guard", "s_cprot"), option_t("Combo Bonus", "s_combobonus"),
     option_t("Score Bonus", "s_scorebonus"), option_t("Healer", "s_heal"),
     option_t("H. Guard", "s_life"), option_t("Overload", "s_overload"),
     option_t("All-Round", "s_allround"), option_t("Concen.", "s_perfelegant"),
     option_t("Skill Boost", "s_sb"), option_t("Focus", "s_focus")),
    lambda card: enums.skill_class(card.skill.skill_type)
    if card.skill else None)

high_stat = filter_t(
    "High stat",
    (option_t("Vocal", "m_vo_kc"), option_t("Visual", "m_vi_kc"),
     option_t("Dance", "m_da_kc"), option_t("Balanced", "m_ba_kc")),
    lambda card: enums.stat_dot(card.best_stat) + "_kc")

ls_target_type = filter_t(
    "Target Type",
    (option_t("All", "ca_all"), option_t("Cute", "ca_cute"),
     option_t("Passion", "ca_passion"), option_t("Cool", "ca_cool")), lambda
    card: enums.lskill_effective_target(card.lead_skill.target_attribute)
    if card.lead_skill else None)
Ejemplo n.º 6
0
skill_type = filter_t("特技类型", (
    option_t("强判",       "s_pl"),
    option_t("不断连",     "s_cprot"),
    option_t("C分",        "s_combobonus"),
    option_t("P分",        "s_scorebonus"),
    option_t("奶妈",       "s_heal"),
    option_t("血盾",       "s_life"),
    option_t("过载",       "s_overload"),
    option_t("全才",       "s_allround"),
    option_t("专注",       "s_perfelegant"),
    option_t("技能增强",   "s_sb"),
    option_t("集中/协调",       "s_focus"),
    option_t("生命闪耀",   "s_cbonus_based_life"),
    option_t("返场",       "s_mimic"),
    option_t("三色协同",   "s_synergy")),
lambda card: enums.skill_class(card.skill.skill_type) if card.skill else None)

high_stat = filter_t("偏高数值", (
    option_t("Vocal", "m_vo_kc"),
    option_t("Visual", "m_vi_kc"),
    option_t("Dance", "m_da_kc"),
    option_t("均衡", "m_ba_kc")),
lambda card: enums.stat_dot(card.best_stat) + "_kc")

ls_target_type = filter_t("对象属性", (
    option_t("所有", "ca_all"),
    option_t("Cute", "ca_cute"),
    option_t("Passion", "ca_passion"),
    option_t("Cool", "ca_cool")),
lambda card: enums.lskill_effective_target(card.lead_skill.target_attribute) if card.lead_skill else None)
Ejemplo n.º 7
0
rarity = filter_t("Card Rarity", (
    option_t("SSR", "ssr_kc"),
    option_t("SR",  "sr_kc"),
    option_t("R",   "r_kc"),
    option_t("N",   "n_kc")),
lambda card: enums.floor_rarity(card.rarity) + "_kc")

skill_type = filter_t("Skill Type", (
    option_t("Perf. Lock*", "s_pl"),
    option_t("C. Guard",    "s_cprot"),
    option_t("Combo Bonus", "s_combobonus"),
    option_t("Score Bonus", "s_scorebonus"),
    option_t("Healer",      "s_heal"),
    option_t("H. Guard",    "s_life"),
    option_t("Overload",    "s_overload")),
lambda card: enums.skill_class(card.skill.skill_type) if card.skill else None)

high_stat = filter_t("High stat", (
    option_t("Vocal", "m_vo_kc"),
    option_t("Visual", "m_vi_kc"),
    option_t("Dance", "m_da_kc"),
    option_t("Balanced", "m_ba_kc")),
lambda card: enums.stat_dot(card.best_stat) + "_kc")

ls_target_type = filter_t("Target Type", (
    option_t("All", "ca_all"),
    option_t("Cute", "ca_cute"),
    option_t("Passion", "ca_passion"),
    option_t("Cool", "ca_cool")),
lambda card: enums.lskill_effective_target(card.lead_skill.target_attribute) if card.lead_skill else None)