Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Update session save schema for Mystery Encounters #52

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 44 additions & 20 deletions defs/savedata.go
Original file line number Diff line number Diff line change
@@ -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{}
Loading