Skip to content

Commit

Permalink
Added new enums
Browse files Browse the repository at this point in the history
  • Loading branch information
squaresmile committed Oct 16, 2024
1 parent a6bb183 commit a9166b8
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 32 deletions.
1 change: 1 addition & 0 deletions app/core/nice/func.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def remove_brackets(val_string: str) -> str:
"ShortenMaxCountEachSkill",
"TargetFunctionIndividuality",
"TargetBuffIndividuality",
"TargetEnemyClass",
}
STRING_DATAVALS = {
"PopValueText",
Expand Down
76 changes: 52 additions & 24 deletions app/schemas/gameenums.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ class FuncType(IntEnum):
DAMAGE_NP_BATTLE_POINT_PHASE = 143
SET_NP_EXECUTED_STATE = 144
HIDE_OVER_GAUGE = 145
GAIN_NP_TARGET_SUM = 146


class NiceFuncType(StrEnum):
Expand Down Expand Up @@ -384,6 +385,7 @@ class NiceFuncType(StrEnum):
damageNpBattlePointPhase = "damageNpBattlePointPhase"
setNpExecutedState = "setNpExecutedState"
hideOverGauge = "hideOverGauge"
gainNpTargetSum = "gainNpTargetSum"


FUNC_TYPE_NAME: dict[int, NiceFuncType] = {
Expand Down Expand Up @@ -496,6 +498,7 @@ class NiceFuncType(StrEnum):
143: NiceFuncType.damageNpBattlePointPhase,
144: NiceFuncType.setNpExecutedState,
145: NiceFuncType.hideOverGauge,
146: NiceFuncType.gainNpTargetSum,
}


Expand Down Expand Up @@ -609,6 +612,7 @@ class NiceFuncTargetType(StrEnum):

class BuffType(IntEnum):
NONE = 0
INVALID = -1
UP_COMMANDATK = 1
UP_STARWEIGHT = 2
UP_CRITICALPOINT = 3
Expand Down Expand Up @@ -802,6 +806,7 @@ class BuffType(IntEnum):
PIERCE_SPECIAL_INVINCIBLE = 207
FUNCTIONED_FUNCTION = 208
DONOT_ACT_COMMANDCARD = 209
UP_NPDAMAGE_INDIVIDUALITY_SUM = 210
TO_FIELD_CHANGE_FIELD = 10001
TO_FIELD_AVOID_BUFF = 10002
TO_FIELD_SUB_INDIVIDUALITY_FIELD = 10003
Expand All @@ -811,6 +816,7 @@ class NiceBuffType(StrEnum):
"""Buff Type Enum"""

none = "none"
invalid = "invalid"
upCommandatk = "upCommandatk"
upStarweight = "upStarweight"
upCriticalpoint = "upCriticalpoint"
Expand Down Expand Up @@ -1004,13 +1010,15 @@ class NiceBuffType(StrEnum):
pierceSpecialInvincible = "pierceSpecialInvincible"
functionedFunction = "functionedFunction"
donotActCommandcard = "donotActCommandcard"
upNpdamageIndividualitySum = "upNpdamageIndividualitySum"
toFieldChangeField = "toFieldChangeField"
toFieldAvoidBuff = "toFieldAvoidBuff"
toFieldSubIndividualityField = "toFieldSubIndividualityField"


BUFF_TYPE_NAME: dict[int, NiceBuffType] = {
0: NiceBuffType.none,
-1: NiceBuffType.invalid,
1: NiceBuffType.upCommandatk,
2: NiceBuffType.upStarweight,
3: NiceBuffType.upCriticalpoint,
Expand Down Expand Up @@ -1204,6 +1212,7 @@ class NiceBuffType(StrEnum):
207: NiceBuffType.pierceSpecialInvincible,
208: NiceBuffType.functionedFunction,
209: NiceBuffType.donotActCommandcard,
210: NiceBuffType.upNpdamageIndividualitySum,
10001: NiceBuffType.toFieldChangeField,
10002: NiceBuffType.toFieldAvoidBuff,
10003: NiceBuffType.toFieldSubIndividualityField,
Expand Down Expand Up @@ -1358,6 +1367,7 @@ class BuffAction(IntEnum):
PIERCE_SPECIAL_INVINCIBLE = 144
FUNCTIONED_FUNCTION = 145
DONOT_ACT_COMMANDCARD = 146
NPDAMAGE_INDIVIDUALITY = 147


class NiceBuffAction(StrEnum):
Expand Down Expand Up @@ -1510,6 +1520,7 @@ class NiceBuffAction(StrEnum):
pierceSpecialInvincible = "pierceSpecialInvincible"
functionedFunction = "functionedFunction"
donotActCommandcard = "donotActCommandcard"
npdamageIndividuality = "npdamageIndividuality"


BUFF_ACTION_NAME: dict[int, NiceBuffAction] = {
Expand Down Expand Up @@ -1660,6 +1671,7 @@ class NiceBuffAction(StrEnum):
144: NiceBuffAction.pierceSpecialInvincible,
145: NiceBuffAction.functionedFunction,
146: NiceBuffAction.donotActCommandcard,
147: NiceBuffAction.npdamageIndividuality,
}


Expand Down Expand Up @@ -1875,6 +1887,19 @@ class DataValsType(IntEnum):
ChargeHpMaxBeforeBreakGaugeUp = 184
TargetFunctionIndividuality = 185
TargetBuffIndividuality = 186
TargetEnemyClass = 187
ParamAddIndividualityTargetType = 188
TriggeredFuncIndexAndCheckList = 189
FuncCheckTargetIndividualityTargetType = 190
FuncCheckTargetIndividualityCountHigher = 191
FuncCheckTargetIndividualityCountLower = 192
FuncCheckTargetIndividualityCountEqual = 193
ParamAddSelfIndividualityAndCheck = 194
ParamAddOpIndividualityAndCheck = 195
ParamAddFieldIndividualityAndCheck = 196
SnapShotParamAddSelfIndividualityAndCheck = 197
SnapShotParamAddOpIndividualityAndCheck = 198
SnapShotParamAddFieldIndividualityAndCheck = 199


class ClassRelationOverwriteType(IntEnum):
Expand Down Expand Up @@ -1929,9 +1954,9 @@ class ItemType(IntEnum):
EUQIP_SKILL_USE_ITEM = 28
SVT_COIN = 29
FRIENDSHIP_UP_ITEM = 30
PP = 31
PURE_PRI = 31
TRADE_AP = 32
RI = 33
REVIVAL_ITEM = 33
STORMPOD = 34
BATTLE_ITEM = 35
ANIPLEX_PLUS_CHARGE_STONE = 36
Expand Down Expand Up @@ -1971,9 +1996,9 @@ class NiceItemType(StrEnum):
euqipSkillUseItem = "euqipSkillUseItem"
svtCoin = "svtCoin"
friendshipUpItem = "friendshipUpItem"
pp = "pp"
purePri = "purePri"
tradeAp = "tradeAp"
ri = "ri"
revivalItem = "revivalItem"
stormpod = "stormpod"
battleItem = "battleItem"
aniplexPlusChargeStone = "aniplexPlusChargeStone"
Expand Down Expand Up @@ -2011,9 +2036,9 @@ class NiceItemType(StrEnum):
28: NiceItemType.euqipSkillUseItem,
29: NiceItemType.svtCoin,
30: NiceItemType.friendshipUpItem,
31: NiceItemType.pp,
31: NiceItemType.purePri,
32: NiceItemType.tradeAp,
33: NiceItemType.ri,
33: NiceItemType.revivalItem,
34: NiceItemType.stormpod,
35: NiceItemType.battleItem,
36: NiceItemType.aniplexPlusChargeStone,
Expand Down Expand Up @@ -2095,9 +2120,9 @@ class ShopType(IntEnum):
GRAIL_FRAGMENTS = 10
SVT_COSTUME = 11
START_UP_SUMMON = 12
SHOP13 = 13
PURE_PRI = 13
TRADE_AP = 14
SHOP15 = 15
REVIVAL_ITEM = 15
EVENT_SVT_EQUIP = 16


Expand All @@ -2117,9 +2142,9 @@ class NiceShopType(StrEnum):
grailFragments = "grailFragments"
svtCostume = "svtCostume"
startUpSummon = "startUpSummon"
shop13 = "shop13"
purePri = "purePri"
tradeAp = "tradeAp"
shop15 = "shop15"
revivalItem = "revivalItem"
eventSvtEquip = "eventSvtEquip"


Expand All @@ -2137,9 +2162,9 @@ class NiceShopType(StrEnum):
10: NiceShopType.grailFragments,
11: NiceShopType.svtCostume,
12: NiceShopType.startUpSummon,
13: NiceShopType.shop13,
13: NiceShopType.purePri,
14: NiceShopType.tradeAp,
15: NiceShopType.shop15,
15: NiceShopType.revivalItem,
16: NiceShopType.eventSvtEquip,
}

Expand Down Expand Up @@ -3230,6 +3255,7 @@ class QuestType(IntEnum):
EVENT = 5
HEROBALLAD = 6
WAR_BOARD = 7
AUTO_EXECUTE = 8


class NiceQuestType(StrEnum):
Expand All @@ -3241,6 +3267,7 @@ class NiceQuestType(StrEnum):
event = "event"
heroballad = "heroballad"
warBoard = "warBoard"
autoExecute = "autoExecute"


QUEST_TYPE_NAME: dict[int, NiceQuestType] = {
Expand All @@ -3250,6 +3277,7 @@ class NiceQuestType(StrEnum):
5: NiceQuestType.event,
6: NiceQuestType.heroballad,
7: NiceQuestType.warBoard,
8: NiceQuestType.autoExecute,
}


Expand Down Expand Up @@ -4833,10 +4861,10 @@ class SvtFrameType(IntEnum):
BRONZE = 1
SILVER = 2
GOLD = 3
FRAME_0801 = 4
FRAME_0802 = 5
FRAME_0803 = 6
FRAME_0804 = 7
GOLD_RED = 4
GOLD_RED_GREAT = 5
GOLD_BLACK = 6
GOLD_BLACK_GREAT = 7


class NiceSvtFrameType(StrEnum):
Expand All @@ -4846,21 +4874,21 @@ class NiceSvtFrameType(StrEnum):
bronze = "bronze"
silver = "silver"
gold = "gold"
frame0801 = "frame0801"
frame0802 = "frame0802"
frame0803 = "frame0803"
frame0804 = "frame0804"
goldRed = "goldRed"
goldRedGreat = "goldRedGreat"
goldBlack = "goldBlack"
goldBlackGreat = "goldBlackGreat"


SERVANT_FRAME_TYPE_NAME: dict[int, NiceSvtFrameType] = {
0: NiceSvtFrameType.black,
1: NiceSvtFrameType.bronze,
2: NiceSvtFrameType.silver,
3: NiceSvtFrameType.gold,
4: NiceSvtFrameType.frame0801,
5: NiceSvtFrameType.frame0802,
6: NiceSvtFrameType.frame0803,
7: NiceSvtFrameType.frame0804,
4: NiceSvtFrameType.goldRed,
5: NiceSvtFrameType.goldRedGreat,
6: NiceSvtFrameType.goldBlack,
7: NiceSvtFrameType.goldBlackGreat,
}


Expand Down
13 changes: 13 additions & 0 deletions app/schemas/nice.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,19 @@ class BaseVals(BaseModel):
ChargeHpMaxBeforeBreakGaugeUp: int | None = None
TargetFunctionIndividuality: list[int] | None = None
TargetBuffIndividuality: list[int] | None = None
TargetEnemyClass: list[int] | None = None
ParamAddIndividualityTargetType: int | None = None
TriggeredFuncIndexAndCheckList: int | None = None
FuncCheckTargetIndividualityTargetType: int | None = None
FuncCheckTargetIndividualityCountHigher: int | None = None
FuncCheckTargetIndividualityCountLower: int | None = None
FuncCheckTargetIndividualityCountEqual: int | None = None
ParamAddSelfIndividualityAndCheck: int | None = None
ParamAddOpIndividualityAndCheck: int | None = None
ParamAddFieldIndividualityAndCheck: int | None = None
SnapShotParamAddSelfIndividualityAndCheck: int | None = None
SnapShotParamAddOpIndividualityAndCheck: int | None = None
SnapShotParamAddFieldIndividualityAndCheck: int | None = None
# Extra dataval from SkillLvEntty.DIC_KEY_APPLY_SUPPORT_SVT
ApplySupportSvt: Optional[int] = None
# These are not DataVals but guesses from SkillLvEntity and EventDropUpValInfo
Expand Down
34 changes: 26 additions & 8 deletions scripts/enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export enum NiceFuncType {
DAMAGE_NP_BATTLE_POINT_PHASE = "damageNpBattlePointPhase",
SET_NP_EXECUTED_STATE = "setNpExecutedState",
HIDE_OVER_GAUGE = "hideOverGauge",
GAIN_NP_TARGET_SUM = "gainNpTargetSum",
}

export enum NiceFuncTargetType {
Expand Down Expand Up @@ -196,6 +197,7 @@ export enum NiceFuncTargetType {

export enum NiceBuffType {
NONE = "none",
INVALID = "invalid",
UP_COMMANDATK = "upCommandatk",
UP_STARWEIGHT = "upStarweight",
UP_CRITICALPOINT = "upCriticalpoint",
Expand Down Expand Up @@ -389,6 +391,7 @@ export enum NiceBuffType {
PIERCE_SPECIAL_INVINCIBLE = "pierceSpecialInvincible",
FUNCTIONED_FUNCTION = "functionedFunction",
DONOT_ACT_COMMANDCARD = "donotActCommandcard",
UP_NPDAMAGE_INDIVIDUALITY_SUM = "upNpdamageIndividualitySum",
TO_FIELD_CHANGE_FIELD = "toFieldChangeField",
TO_FIELD_AVOID_BUFF = "toFieldAvoidBuff",
TO_FIELD_SUB_INDIVIDUALITY_FIELD = "toFieldSubIndividualityField",
Expand Down Expand Up @@ -542,6 +545,7 @@ export enum NiceBuffAction {
PIERCE_SPECIAL_INVINCIBLE = "pierceSpecialInvincible",
FUNCTIONED_FUNCTION = "functionedFunction",
DONOT_ACT_COMMANDCARD = "donotActCommandcard",
NPDAMAGE_INDIVIDUALITY = "npdamageIndividuality",
}

export enum NiceBuffLimit {
Expand Down Expand Up @@ -739,6 +743,19 @@ export enum NiceDataValsType {
ChargeHpMaxBeforeBreakGaugeUp = "chargehpmaxbeforebreakgaugeup",
TargetFunctionIndividuality = "targetfunctionindividuality",
TargetBuffIndividuality = "targetbuffindividuality",
TargetEnemyClass = "targetenemyclass",
ParamAddIndividualityTargetType = "paramaddindividualitytargettype",
TriggeredFuncIndexAndCheckList = "triggeredfuncindexandchecklist",
FuncCheckTargetIndividualityTargetType = "funcchecktargetindividualitytargettype",
FuncCheckTargetIndividualityCountHigher = "funcchecktargetindividualitycounthigher",
FuncCheckTargetIndividualityCountLower = "funcchecktargetindividualitycountlower",
FuncCheckTargetIndividualityCountEqual = "funcchecktargetindividualitycountequal",
ParamAddSelfIndividualityAndCheck = "paramaddselfindividualityandcheck",
ParamAddOpIndividualityAndCheck = "paramaddopindividualityandcheck",
ParamAddFieldIndividualityAndCheck = "paramaddfieldindividualityandcheck",
SnapShotParamAddSelfIndividualityAndCheck = "snapshotparamaddselfindividualityandcheck",
SnapShotParamAddOpIndividualityAndCheck = "snapshotparamaddopindividualityandcheck",
SnapShotParamAddFieldIndividualityAndCheck = "snapshotparamaddfieldindividualityandcheck",
}

export enum NiceClassRelationOverwriteType {
Expand Down Expand Up @@ -778,9 +795,9 @@ export enum NiceItemType {
EUQIP_SKILL_USE_ITEM = "euqipSkillUseItem",
SVT_COIN = "svtCoin",
FRIENDSHIP_UP_ITEM = "friendshipUpItem",
PP = "pp",
PURE_PRI = "purePri",
TRADE_AP = "tradeAp",
RI = "ri",
REVIVAL_ITEM = "revivalItem",
STORMPOD = "stormpod",
BATTLE_ITEM = "battleItem",
ANIPLEX_PLUS_CHARGE_STONE = "aniplexPlusChargeStone",
Expand Down Expand Up @@ -820,9 +837,9 @@ export enum NiceShopType {
GRAIL_FRAGMENTS = "grailFragments",
SVT_COSTUME = "svtCostume",
START_UP_SUMMON = "startUpSummon",
SHOP13 = "shop13",
PURE_PRI = "purePri",
TRADE_AP = "tradeAp",
SHOP15 = "shop15",
REVIVAL_ITEM = "revivalItem",
EVENT_SVT_EQUIP = "eventSvtEquip",
}

Expand Down Expand Up @@ -1190,6 +1207,7 @@ export enum NiceQuestType {
EVENT = "event",
HEROBALLAD = "heroballad",
WAR_BOARD = "warBoard",
AUTO_EXECUTE = "autoExecute",
}

export enum NiceConsumeType {
Expand Down Expand Up @@ -1699,10 +1717,10 @@ export enum NiceSvtFrameType {
BRONZE = "bronze",
SILVER = "silver",
GOLD = "gold",
FRAME_0801 = "frame0801",
FRAME_0802 = "frame0802",
FRAME_0803 = "frame0803",
FRAME_0804 = "frame0804",
GOLD_RED = "goldRed",
GOLD_RED_GREAT = "goldRedGreat",
GOLD_BLACK = "goldBlack",
GOLD_BLACK_GREAT = "goldBlackGreat",
}

export enum NiceCommonConsumeType {
Expand Down

0 comments on commit a9166b8

Please sign in to comment.