Skip to content

Commit fe4be1d

Browse files
committed
Update new enum from JP 2.126.0
1 parent 13f49ab commit fe4be1d

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

app/schemas/gameenums.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ class FuncType(IntEnum):
290290
CHANGE_ENEMY_STATUS_UI_TYPE = 157
291291
SWAP_FIELD_POSITION = 158
292292
SET_DISPLAY_DIRECT_BATTLE_MESSAGE_IN_FSM = 159
293+
ADD_STATE_TO_FIELD = 160
294+
ADD_STATE_SHORT_TO_FIELD = 161
293295

294296

295297
class NiceFuncType(StrEnum):
@@ -418,6 +420,8 @@ class NiceFuncType(StrEnum):
418420
changeEnemyStatusUiType = "changeEnemyStatusUiType"
419421
swapFieldPosition = "swapFieldPosition"
420422
setDisplayDirectBattleMessageInFsm = "setDisplayDirectBattleMessageInFsm"
423+
addStateToField = "addStateToField"
424+
addStateShortToField = "addStateShortToField"
421425

422426

423427
FUNC_TYPE_NAME: dict[int, NiceFuncType] = {
@@ -544,6 +548,8 @@ class NiceFuncType(StrEnum):
544548
157: NiceFuncType.changeEnemyStatusUiType,
545549
158: NiceFuncType.swapFieldPosition,
546550
159: NiceFuncType.setDisplayDirectBattleMessageInFsm,
551+
160: NiceFuncType.addStateToField,
552+
161: NiceFuncType.addStateShortToField,
547553
}
548554

549555

@@ -907,6 +913,8 @@ class BuffType(IntEnum):
907913
ADD_BASE_HP = 237
908914
SUBSTITUTE_INSTANT_DEATH = 238
909915
SUBSTITUTE_ADD_STATE = 239
916+
OTHER_TREASURE_DEVICE_PRE_BEFORE_FUNCTION = 240
917+
ATTACK_PHASE_START_FUNCTION = 241
910918
TO_FIELD_CHANGE_FIELD = 10001
911919
TO_FIELD_AVOID_BUFF = 10002
912920
TO_FIELD_SUB_INDIVIDUALITY_FIELD = 10003
@@ -1135,6 +1143,8 @@ class NiceBuffType(StrEnum):
11351143
addBaseHp = "addBaseHp"
11361144
substituteInstantDeath = "substituteInstantDeath"
11371145
substituteAddState = "substituteAddState"
1146+
otherTreasureDevicePreBeforeFunction = "otherTreasureDevicePreBeforeFunction"
1147+
attackPhaseStartFunction = "attackPhaseStartFunction"
11381148
toFieldChangeField = "toFieldChangeField"
11391149
toFieldAvoidBuff = "toFieldAvoidBuff"
11401150
toFieldSubIndividualityField = "toFieldSubIndividualityField"
@@ -1364,6 +1374,8 @@ class NiceBuffType(StrEnum):
13641374
237: NiceBuffType.addBaseHp,
13651375
238: NiceBuffType.substituteInstantDeath,
13661376
239: NiceBuffType.substituteAddState,
1377+
240: NiceBuffType.otherTreasureDevicePreBeforeFunction,
1378+
241: NiceBuffType.attackPhaseStartFunction,
13671379
10001: NiceBuffType.toFieldChangeField,
13681380
10002: NiceBuffType.toFieldAvoidBuff,
13691381
10003: NiceBuffType.toFieldSubIndividualityField,
@@ -1543,6 +1555,8 @@ class BuffAction(IntEnum):
15431555
BASE_HP_VALUE = 163
15441556
SUBSTITUTE_INSTANT_DEATH = 164
15451557
SUBSTITUTE_ADD_STATE = 165
1558+
FUNCTION_OTHER_TREASURE_DEVICE_PRE_BEFORE = 166
1559+
FUNCTION_ATTACK_PHASE_START = 167
15461560

15471561

15481562
class NiceBuffAction(StrEnum):
@@ -1714,6 +1728,8 @@ class NiceBuffAction(StrEnum):
17141728
baseHpValue = "baseHpValue"
17151729
substituteInstantDeath = "substituteInstantDeath"
17161730
substituteAddState = "substituteAddState"
1731+
functionOtherTreasureDevicePreBefore = "functionOtherTreasureDevicePreBefore"
1732+
functionAttackPhaseStart = "functionAttackPhaseStart"
17171733

17181734

17191735
BUFF_ACTION_NAME: dict[int, NiceBuffAction] = {
@@ -1883,6 +1899,8 @@ class NiceBuffAction(StrEnum):
18831899
163: NiceBuffAction.baseHpValue,
18841900
164: NiceBuffAction.substituteInstantDeath,
18851901
165: NiceBuffAction.substituteAddState,
1902+
166: NiceBuffAction.functionOtherTreasureDevicePreBefore,
1903+
167: NiceBuffAction.functionAttackPhaseStart,
18861904
}
18871905

18881906

@@ -2169,6 +2187,7 @@ class DataValsType(IntEnum):
21692187
SubstituteEffectList = 255
21702188
ResistEffectList = 256
21712189
EnablePassiveBuffConvert = 257
2190+
FieldBuffApplyTarget = 258
21722191

21732192

21742193
class ClassRelationOverwriteType(IntEnum):
@@ -7552,3 +7571,27 @@ class NiceUserSvtStatusFlag(StrEnum):
75527571
256: NiceUserSvtStatusFlag.useLevelExceedItemHeroine,
75537572
512: NiceUserSvtStatusFlag.useFriendshipExceedItemHeroine,
75547573
}
7574+
7575+
7576+
class FieldBuffApplyTargetType(IntEnum):
7577+
None_ = 0
7578+
Player = 1
7579+
Enemy = 2
7580+
All = 3
7581+
7582+
7583+
class NiceFieldBuffApplyTargetType(StrEnum):
7584+
"""Field Buff Apply Target Type"""
7585+
7586+
none = "none"
7587+
player = "player"
7588+
enemy = "enemy"
7589+
all = "all"
7590+
7591+
7592+
FIELD_BUFF_APPLY_TARGET_TYPE: dict[int, NiceFieldBuffApplyTargetType] = {
7593+
0: NiceFieldBuffApplyTargetType.none,
7594+
1: NiceFieldBuffApplyTargetType.player,
7595+
2: NiceFieldBuffApplyTargetType.enemy,
7596+
3: NiceFieldBuffApplyTargetType.all,
7597+
}

scripts/enum.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ export enum NiceFuncType {
173173
CHANGE_ENEMY_STATUS_UI_TYPE = "changeEnemyStatusUiType",
174174
SWAP_FIELD_POSITION = "swapFieldPosition",
175175
SET_DISPLAY_DIRECT_BATTLE_MESSAGE_IN_FSM = "setDisplayDirectBattleMessageInFsm",
176+
ADD_STATE_TO_FIELD = "addStateToField",
177+
ADD_STATE_SHORT_TO_FIELD = "addStateShortToField",
176178
}
177179

178180
export enum NiceFuncTargetType {
@@ -441,6 +443,8 @@ export enum NiceBuffType {
441443
ADD_BASE_HP = "addBaseHp",
442444
SUBSTITUTE_INSTANT_DEATH = "substituteInstantDeath",
443445
SUBSTITUTE_ADD_STATE = "substituteAddState",
446+
OTHER_TREASURE_DEVICE_PRE_BEFORE_FUNCTION = "otherTreasureDevicePreBeforeFunction",
447+
ATTACK_PHASE_START_FUNCTION = "attackPhaseStartFunction",
444448
TO_FIELD_CHANGE_FIELD = "toFieldChangeField",
445449
TO_FIELD_AVOID_BUFF = "toFieldAvoidBuff",
446450
TO_FIELD_SUB_INDIVIDUALITY_FIELD = "toFieldSubIndividualityField",
@@ -619,6 +623,8 @@ export enum NiceBuffAction {
619623
BASE_HP_VALUE = "baseHpValue",
620624
SUBSTITUTE_INSTANT_DEATH = "substituteInstantDeath",
621625
SUBSTITUTE_ADD_STATE = "substituteAddState",
626+
FUNCTION_OTHER_TREASURE_DEVICE_PRE_BEFORE = "functionOtherTreasureDevicePreBefore",
627+
FUNCTION_ATTACK_PHASE_START = "functionAttackPhaseStart",
622628
}
623629

624630
export enum NiceBuffLimit {
@@ -887,6 +893,7 @@ export enum NiceDataValsType {
887893
SubstituteEffectList = "substituteEffectList",
888894
ResistEffectList = "resistEffectList",
889895
EnablePassiveBuffConvert = "enablePassiveBuffConvert",
896+
FieldBuffApplyTarget = "fieldBuffApplyTarget",
890897
}
891898

892899
export enum NiceClassRelationOverwriteType {
@@ -2598,3 +2605,10 @@ export enum NiceUserSvtStatusFlag {
25982605
UseLevelExceedItemHeroine = "useLevelExceedItemHeroine",
25992606
UseFriendshipExceedItemHeroine = "useFriendshipExceedItemHeroine",
26002607
}
2608+
2609+
export enum NiceFieldBuffApplyTargetType {
2610+
None_ = "none",
2611+
Player = "player",
2612+
Enemy = "enemy",
2613+
All = "all",
2614+
}

scripts/extract_enums.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ def convert_name(name: str) -> str:
3030
"BattleBranchSkillCondBranchType": {
3131
"None": "None_",
3232
},
33+
"FieldBuffApplyTargetType": {
34+
"None": "None_",
35+
},
3336
}
3437

3538

@@ -823,6 +826,13 @@ def cs_enum_to_ts(cs_enums: list[str], raw_class: str, nice_class: str) -> list[
823826
"User Servant Status Flag",
824827
"USER_SVT_STATUS_FLAG",
825828
),
829+
(
830+
"BattleBuffData.BuffData.FieldBuffApplyTargetType",
831+
"FieldBuffApplyTargetType",
832+
"NiceFieldBuffApplyTargetType",
833+
"Field Buff Apply Target Type",
834+
"FIELD_BUFF_APPLY_TARGET_TYPE",
835+
),
826836
]
827837

828838

0 commit comments

Comments
 (0)