From 9f2a5c0d30675e1c26da1b26406046b20452f3ed Mon Sep 17 00:00:00 2001 From: ImperialSympathizer <110984302+ben-lear@users.noreply.github.com> Date: Fri, 27 Sep 2024 11:40:07 -0400 Subject: [PATCH] update session save schema for Mystery Encounters (#52) Co-authored-by: ImperialSympathizer --- defs/savedata.go | 64 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 20 deletions(-) diff --git a/defs/savedata.go b/defs/savedata.go index 1ef6b80..53f0210 100644 --- a/defs/savedata.go +++ b/defs/savedata.go @@ -95,26 +95,28 @@ type EggData struct { type GachaType int type SessionSaveData struct { - Seed string `json:"seed"` - PlayTime int `json:"playTime"` - GameMode GameMode `json:"gameMode"` - Party []PokemonData `json:"party"` - EnemyParty []PokemonData `json:"enemyParty"` - Modifiers []PersistentModifierData `json:"modifiers"` - EnemyModifiers []PersistentModifierData `json:"enemyModifiers"` - Arena ArenaData `json:"arena"` - PokeballCounts PokeballCounts `json:"pokeballCounts"` - Money int `json:"money"` - Score int `json:"score"` - VictoryCount int `json:"victoryCount"` - FaintCount int `json:"faintCount"` - ReviveCount int `json:"reviveCount"` - WaveIndex int `json:"waveIndex"` - BattleType BattleType `json:"battleType"` - Trainer TrainerData `json:"trainer"` - GameVersion string `json:"gameVersion"` - Timestamp int `json:"timestamp"` - Challenges []ChallengeData `json:"challenges"` + Seed string `json:"seed"` + PlayTime int `json:"playTime"` + GameMode GameMode `json:"gameMode"` + Party []PokemonData `json:"party"` + EnemyParty []PokemonData `json:"enemyParty"` + Modifiers []PersistentModifierData `json:"modifiers"` + EnemyModifiers []PersistentModifierData `json:"enemyModifiers"` + Arena ArenaData `json:"arena"` + PokeballCounts PokeballCounts `json:"pokeballCounts"` + Money int `json:"money"` + Score int `json:"score"` + VictoryCount int `json:"victoryCount"` + FaintCount int `json:"faintCount"` + ReviveCount int `json:"reviveCount"` + WaveIndex int `json:"waveIndex"` + BattleType BattleType `json:"battleType"` + Trainer TrainerData `json:"trainer"` + GameVersion string `json:"gameVersion"` + Timestamp int `json:"timestamp"` + Challenges []ChallengeData `json:"challenges"` + MysteryEncounterType MysteryEncounterType `json:"mysteryEncounterType"` + MysteryEncounterSaveData MysteryEncounterSaveData `json:"mysteryEncounterSaveData"` } type ChallengeData struct { @@ -123,6 +125,28 @@ type ChallengeData struct { Severity int `json:"severity"` } +type MysteryEncounterType int + +type MysteryEncounterTier int + +type SeenEncounterData struct { + Type MysteryEncounterType `json:"type"` + Tier MysteryEncounterTier `json:"tier"` + WaveIndex int `json:"waveIndex"` + SelectedOption int `json:"selectedOption"` +} + +type QueuedEncounter struct { + Type MysteryEncounterType `json:"type"` + SpawnPercent int `json:"spawnPercent"` +} + +type MysteryEncounterSaveData struct { + EncounteredEvents []SeenEncounterData `json:"encounteredEvents"` + EncounterSpawnChance int `json:"encounterSpawnChance"` + QueuedEncounters []QueuedEncounter `json:"queuedEncounters"` +} + type GameMode int type PokemonData interface{}