From d48f58067abcee3badcc8eaf3ee8cfbe22305efc Mon Sep 17 00:00:00 2001 From: squaresmile Date: Wed, 16 Oct 2024 10:51:26 -0400 Subject: [PATCH] Added new enums --- app/schemas/enums.py | 3 ++ app/schemas/gameenums.py | 72 +++++++++++++++++++++++++++++++++------- scripts/enum.ts | 14 ++++++++ scripts/extract_enums.py | 14 ++++++++ 4 files changed, 91 insertions(+), 12 deletions(-) diff --git a/app/schemas/enums.py b/app/schemas/enums.py index a9338394..97fe25de 100644 --- a/app/schemas/enums.py +++ b/app/schemas/enums.py @@ -121,6 +121,7 @@ class NiceSkillType(StrEnum): FuncType.EVENT_DROP_UP, FuncType.GAIN_NP_BUFF_INDIVIDUAL_SUM, FuncType.GAIN_NP_INDIVIDUAL_SUM, + FuncType.GAIN_NP_TARGET_SUM, } @@ -1027,6 +1028,7 @@ class Trait(StrEnum): notProtectedByBBDubai = "notProtectedByBBDubai" canFlyInSpace = "canFlyInSpace" buffSpecialInvinciblePierce = "buffSpecialInvinciblePierce" + sakuraSeries = "sakuraSeries" TRAIT_NAME: dict[int, Trait] = { @@ -1240,6 +1242,7 @@ class Trait(StrEnum): 2922: Trait.hasSupereffectiveNPAgainstAlignmentGood, 2923: Trait.hasSupereffectiveNPAgainstAlignmentEvil, 2924: Trait.canFlyInSpace, + 2925: Trait.sakuraSeries, # 2xxx: CQ or Story quests buff 3000: Trait.attackPhysical, # Normal attack, including NP 3001: Trait.attackProjectile, diff --git a/app/schemas/gameenums.py b/app/schemas/gameenums.py index f524cf98..399f7c34 100644 --- a/app/schemas/gameenums.py +++ b/app/schemas/gameenums.py @@ -1954,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 @@ -1996,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" @@ -2036,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, @@ -2120,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 @@ -2142,9 +2142,9 @@ class NiceShopType(StrEnum): grailFragments = "grailFragments" svtCostume = "svtCostume" startUpSummon = "startUpSummon" - shop13 = "shop13" + purePri = "purePri" tradeAp = "tradeAp" - shop15 = "shop15" + revivalItem = "revivalItem" eventSvtEquip = "eventSvtEquip" @@ -2162,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, } @@ -6227,3 +6227,51 @@ class NiceWarReleaseDisplayType(StrEnum): 2: NiceWarReleaseDisplayType.close, 3: NiceWarReleaseDisplayType.announcement, } + + +class GainNpIndividualSumGainIndividualTarget(IntEnum): + SELF = 0 + PLAYER = 1 + ENEMY = 2 + ALL = 3 + OTHER_ALL = 4 + + +class NiceGainNpIndividualSumTarget(StrEnum): + """Gain NP Individual Sum Target""" + + self_ = "self" + player = "player" + enemy = "enemy" + all = "all" + otherAll = "otherAll" + + +GAIN_NP_INDIVIDUAL_SUM_TARGET_NAME: dict[int, NiceGainNpIndividualSumTarget] = { + 0: NiceGainNpIndividualSumTarget.self_, + 1: NiceGainNpIndividualSumTarget.player, + 2: NiceGainNpIndividualSumTarget.enemy, + 3: NiceGainNpIndividualSumTarget.all, + 4: NiceGainNpIndividualSumTarget.otherAll, +} + + +class SvtClassGroupType(IntEnum): + NORMAL = 1 + OTHER = 2 + ALL = 3 + + +class NiceSvtClassGroupType(StrEnum): + """Svt Class Group Type""" + + normal = "normal" + other = "other" + all = "all" + + +SVT_CLASS_GROUP_TYPE_NAME: dict[int, NiceSvtClassGroupType] = { + 1: NiceSvtClassGroupType.normal, + 2: NiceSvtClassGroupType.other, + 3: NiceSvtClassGroupType.all, +} diff --git a/scripts/enum.ts b/scripts/enum.ts index f4f48e70..525ea527 100644 --- a/scripts/enum.ts +++ b/scripts/enum.ts @@ -2130,3 +2130,17 @@ export enum NiceWarReleaseDisplayType { CLOSE = "close", ANNOUNCEMENT = "announcement", } + +export enum NiceGainNpIndividualSumTarget { + SELF = "self", + PLAYER = "player", + ENEMY = "enemy", + ALL = "all", + OTHER_ALL = "otherAll", +} + +export enum NiceSvtClassGroupType { + NORMAL = "normal", + OTHER = "other", + ALL = "all", +} diff --git a/scripts/extract_enums.py b/scripts/extract_enums.py index 51e1df86..6ce10150 100644 --- a/scripts/extract_enums.py +++ b/scripts/extract_enums.py @@ -673,6 +673,20 @@ def cs_enum_to_ts(cs_enums: list[str], raw_class: str, nice_class: str) -> list[ "War Release Display Type", "WAR_RELEASE_DISPLAY_TYPE_NAME", ), + ( + "GainNpIndividualSum.GainIndividualTarget", + "GainNpIndividualSumGainIndividualTarget", + "NiceGainNpIndividualSumTarget", + "Gain NP Individual Sum Target", + "GAIN_NP_INDIVIDUAL_SUM_TARGET_NAME", + ), + ( + "SvtClassGroupType.TYPE", + "SvtClassGroupType", + "NiceSvtClassGroupType", + "Svt Class Group Type", + "SVT_CLASS_GROUP_TYPE_NAME", + ), ]