From c41784f4c8a5c71d1fb86a160d7ac2564af68d2a Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sat, 13 Apr 2024 18:48:16 -0400 Subject: [PATCH] Update save data schema to support starter data --- defs/savedata.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/defs/savedata.go b/defs/savedata.go index 7360f76..fe48aab 100644 --- a/defs/savedata.go +++ b/defs/savedata.go @@ -5,8 +5,9 @@ type SystemSaveData struct { SecretId int `json:"secretId"` Gender int `json:"gender"` DexData DexData `json:"dexData"` - StarterMoveData StarterMoveData `json:"starterMoveData"` - StarterEggMoveData StarterEggMoveData `json:"starterEggMoveData"` + StarterData StarterData `json:"starterData"` + StarterMoveData StarterMoveData `json:"starterMoveData"` // Legacy + StarterEggMoveData StarterEggMoveData `json:"starterEggMoveData"` // Legacy GameStats GameStats `json:"gameStats"` Unlocks Unlocks `json:"unlocks"` AchvUnlocks AchvUnlocks `json:"achvUnlocks"` @@ -29,6 +30,17 @@ type DexEntry struct { Ivs []int `json:"ivs"` } +type StarterData map[int]StarterEntry + +type StarterEntry struct { + Moveset interface{} `json:"moveset"` + EggMoves int `json:"eggMoves"` + CandyCount int `json:"candyCount"` + PassiveAttr int `json:"passiveAttr"` + VariantAttr int `json:"variantAttr"` + ValueReduction int `json:"valueReduction"` +} + type StarterMoveData map[int]interface{} type StarterEggMoveData map[int]int