Exemple #1
0
    def from_css(css: CrossServerSkill) -> 'LeaderSkill':
        jp_skill = css.jp_skill
        na_skill = css.na_skill
        kr_skill = css.kr_skill

        en_ls_converter = EnLSTextConverter()
        jp_ls_converter = JpLSTextConverter()
        en_description = jp_skill.full_text(
            en_ls_converter) or na_skill.raw_description
        ja_description = jp_skill.full_text(
            jp_ls_converter) or jp_skill.raw_description
        skill_type_tags = skill_text_typing.parse_ls_conditions(css)
        tags = skill_text_typing.format_conditions(skill_type_tags)

        # In the event that we don't have KR data, use the NA name and calculated description.
        kr_name = kr_skill.name if jp_skill != kr_skill else na_skill.name
        ko_desc = kr_skill.raw_description if jp_skill != kr_skill else en_description

        return LeaderSkill(leader_skill_id=jp_skill.skill_id,
                           name_ja=jp_skill.name,
                           name_en=na_skill.name,
                           name_ko=kr_name,
                           desc_ja=ja_description,
                           desc_en=en_description,
                           desc_ko=ko_desc,
                           max_hp=jp_skill.hp,
                           max_atk=jp_skill.atk,
                           max_rcv=jp_skill.rcv,
                           max_shield=jp_skill.shield,
                           max_combos=jp_skill.extra_combos,
                           mult_bonus_damage=jp_skill.mult_bonus_damage,
                           bonus_damage=jp_skill.bonus_damage,
                           extra_time=jp_skill.extra_time,
                           tags=tags)
Exemple #2
0
    def from_css(css: CrossServerSkill) -> 'LeaderSkill':
        jp_skill = css.jp_skill
        na_skill = css.na_skill
        kr_skill = css.kr_skill

        en_ls_converter = EnLSTextConverter()
        jp_ls_converter = JpLSTextConverter()
        na_description = jp_skill.full_text(
            en_ls_converter) or na_skill.raw_description
        jp_description = jp_skill.full_text(
            jp_ls_converter) or jp_skill.raw_description
        skill_type_tags = skill_text_typing.parse_ls_conditions(css)
        tags = skill_text_typing.format_conditions(skill_type_tags)

        # In the event that we don't have KR data, use the NA name and calculated description.
        kr_name = kr_skill.name if jp_skill != kr_skill else na_skill.name
        kr_desc = kr_skill.raw_description if jp_skill != kr_skill else na_description

        return LeaderSkill(leader_skill_id=jp_skill.skill_id,
                           name_jp=jp_skill.name,
                           name_na=na_skill.name,
                           name_kr=kr_name,
                           desc_jp=jp_description,
                           desc_na=na_description,
                           desc_kr=kr_desc,
                           max_hp=jp_skill.hp,
                           max_atk=jp_skill.atk,
                           max_rcv=jp_skill.rcv,
                           max_shield=jp_skill.shield,
                           tags=tags)
Exemple #3
0
import os
import pathlib
import padtools
from pad.common import pad_util
from pad.common.shared_types import Server
from pad.raw.skills import skill_text_typing
from pad.raw.skills.en.active_skill_text import EnASTextConverter
from pad.raw.skills.jp.active_skill_text import JpASTextConverter
from pad.raw.skills.en.leader_skill_text import EnLSTextConverter
from pad.raw.skills.jp.leader_skill_text import JpLSTextConverter
from pad.raw.skills.jp.enemy_skill_text import JpESTextConverter
from pad.raw.skills.en.enemy_skill_text import EnESTextConverter
from pad.raw.skills.leader_skill_info import LeaderSkill

AS_CONVERTERS = (JpASTextConverter(), EnASTextConverter(), EnASTextConverter())
LS_CONVERTERS = (JpLSTextConverter(), EnLSTextConverter(), EnLSTextConverter())
ES_CONVERTERS = (JpESTextConverter(), EnESTextConverter(), EnESTextConverter())

from pad.raw_processor import merged_database
from pad.raw_processor.crossed_data import CrossServerDatabase
from pad.raw.skills.enemy_skill_info import BEHAVIOR_MAP


def parse_args():
    parser = argparse.ArgumentParser(description="Runs the integration test.",
                                     add_help=False)
    input_group = parser.add_argument_group("Input")
    input_group.add_argument("--input_dir",
                             required=True,
                             help="Path to a folder where the input data is")