Add: Extract combat types

This commit is contained in:
LmeSzinc 2024-02-07 04:33:12 +08:00
parent 39ac8831df
commit 8a85d9fae9
4 changed files with 81 additions and 1 deletions

View File

@ -356,6 +356,9 @@ class KeywordExtract:
gen.DictItem(key=character, value=height)
gen.write('./tasks/character/keywords/height.py')
self.load_keywords(['物理', '', '', '', '', '量子', '虚数'], lang='cn')
self.write_keywords(keyword_class='CombatType', output_file='./tasks/character/keywords/combat_type.py')
def generate_battle_pass_quests(self):
battle_pass_quests = read_file(os.path.join(TextMap.DATA_FOLDER, 'ExcelOutput', 'BattlePassConfig.json'))
latest_quests = list(battle_pass_quests.values())[-1]

View File

@ -1,6 +1,7 @@
import tasks.character.keywords.character_list as KEYWORD_CHARACTER_LIST
import tasks.character.keywords.combat_type as KEYWORDS_COMBAT_TYPE
from tasks.character.keywords.character_list import *
from tasks.character.keywords.classes import CharacterList
from tasks.character.keywords.classes import CharacterList, CombatType
DICT_SORTED_RANGES = {
# Mage, hit instantly, no trajectories

View File

@ -25,3 +25,11 @@ class CharacterList(Keyword):
"""
from tasks.character.keywords.height import CHARACTER_HEIGHT
return CHARACTER_HEIGHT.get(self.name, 'Unknown')
@dataclass(repr=False)
class CombatType(Keyword):
instances: ClassVar = {}
def __hash__(self) -> int:
return super().__hash__()

View File

@ -0,0 +1,68 @@
from .classes import CombatType
# This file was auto-generated, do not modify it manually. To generate:
# ``` python -m dev_tools.keyword_extract ```
Physical = CombatType(
id=1,
name='Physical',
cn='物理',
cht='物理',
en='Physical',
jp='物理',
es='Físico',
)
Fire = CombatType(
id=2,
name='Fire',
cn='',
cht='',
en='Fire',
jp='',
es='Fuego',
)
Ice = CombatType(
id=3,
name='Ice',
cn='',
cht='',
en='Ice',
jp='',
es='Hielo',
)
Lightning = CombatType(
id=4,
name='Lightning',
cn='',
cht='',
en='Lightning',
jp='',
es='Rayo',
)
Wind = CombatType(
id=5,
name='Wind',
cn='',
cht='',
en='Wind',
jp='',
es='Viento',
)
Quantum = CombatType(
id=6,
name='Quantum',
cn='量子',
cht='量子',
en='Quantum',
jp='量子',
es='Cuántico',
)
Imaginary = CombatType(
id=7,
name='Imaginary',
cn='虚数',
cht='虛數',
en='Imaginary',
jp='虚数',
es='Imaginario',
)