mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-29 02:57:25 +00:00
Add: Extract combat types
This commit is contained in:
parent
39ac8831df
commit
8a85d9fae9
@ -356,6 +356,9 @@ class KeywordExtract:
|
|||||||
gen.DictItem(key=character, value=height)
|
gen.DictItem(key=character, value=height)
|
||||||
gen.write('./tasks/character/keywords/height.py')
|
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):
|
def generate_battle_pass_quests(self):
|
||||||
battle_pass_quests = read_file(os.path.join(TextMap.DATA_FOLDER, 'ExcelOutput', 'BattlePassConfig.json'))
|
battle_pass_quests = read_file(os.path.join(TextMap.DATA_FOLDER, 'ExcelOutput', 'BattlePassConfig.json'))
|
||||||
latest_quests = list(battle_pass_quests.values())[-1]
|
latest_quests = list(battle_pass_quests.values())[-1]
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import tasks.character.keywords.character_list as KEYWORD_CHARACTER_LIST
|
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.character_list import *
|
||||||
from tasks.character.keywords.classes import CharacterList
|
from tasks.character.keywords.classes import CharacterList, CombatType
|
||||||
|
|
||||||
DICT_SORTED_RANGES = {
|
DICT_SORTED_RANGES = {
|
||||||
# Mage, hit instantly, no trajectories
|
# Mage, hit instantly, no trajectories
|
||||||
|
@ -25,3 +25,11 @@ class CharacterList(Keyword):
|
|||||||
"""
|
"""
|
||||||
from tasks.character.keywords.height import CHARACTER_HEIGHT
|
from tasks.character.keywords.height import CHARACTER_HEIGHT
|
||||||
return CHARACTER_HEIGHT.get(self.name, 'Unknown')
|
return CHARACTER_HEIGHT.get(self.name, 'Unknown')
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(repr=False)
|
||||||
|
class CombatType(Keyword):
|
||||||
|
instances: ClassVar = {}
|
||||||
|
|
||||||
|
def __hash__(self) -> int:
|
||||||
|
return super().__hash__()
|
||||||
|
68
tasks/character/keywords/combat_type.py
Normal file
68
tasks/character/keywords/combat_type.py
Normal 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',
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user