rogueserver/defs/savedata.go

140 lines
5.0 KiB
Go
Raw Normal View History

2024-04-29 14:26:46 -07:00
/*
Copyright (C) 2024 Pagefault Games
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2024-04-29 12:32:58 -07:00
2024-03-17 10:18:51 -07:00
package defs
const SessionSlotCount = 5
2024-03-17 10:18:51 -07:00
type SystemSaveData struct {
TrainerId int `json:"trainerId"`
SecretId int `json:"secretId"`
2024-03-17 10:18:51 -07:00
Gender int `json:"gender"`
DexData DexData `json:"dexData"`
StarterData StarterData `json:"starterData"`
StarterMoveData StarterMoveData `json:"starterMoveData"` // Legacy
StarterEggMoveData StarterEggMoveData `json:"starterEggMoveData"` // Legacy
2024-03-17 10:18:51 -07:00
GameStats GameStats `json:"gameStats"`
Unlocks Unlocks `json:"unlocks"`
AchvUnlocks AchvUnlocks `json:"achvUnlocks"`
VoucherUnlocks VoucherUnlocks `json:"voucherUnlocks"`
VoucherCounts VoucherCounts `json:"voucherCounts"`
Eggs []EggData `json:"eggs"`
GameVersion string `json:"gameVersion"`
Timestamp int `json:"timestamp"`
}
type DexData map[int]DexEntry
type DexEntry struct {
SeenAttr interface{} `json:"seenAttr"` // integer or string
CaughtAttr interface{} `json:"caughtAttr"` // integer or string
NatureAttr int `json:"natureAttr"`
SeenCount int `json:"seenCount"`
CaughtCount int `json:"caughtCount"`
HatchedCount int `json:"hatchedCount"`
Ivs []int `json:"ivs"`
}
type StarterData map[int]StarterEntry
type StarterEntry struct {
2024-05-06 21:16:00 -07:00
Moveset interface{} `json:"moveset"`
EggMoves int `json:"eggMoves"`
CandyCount int `json:"candyCount"`
Friendship int `json:"friendship"`
AbilityAttr int `json:"abilityAttr"`
PassiveAttr int `json:"passiveAttr"`
ValueReduction int `json:"valueReduction"`
ClassicWinCount int `json:"classicWinCount"`
}
2024-03-17 10:18:51 -07:00
type StarterMoveData map[int]interface{}
type StarterEggMoveData map[int]int
type GameStats interface{}
type Unlocks map[int]bool
type AchvUnlocks map[string]int
type VoucherUnlocks map[string]int
type VoucherCounts map[string]int
type EggData struct {
Id int `json:"id"`
2024-03-17 10:18:51 -07:00
GachaType GachaType `json:"gachaType"`
HatchWaves int `json:"hatchWaves"`
Timestamp int `json:"timestamp"`
}
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"`
2024-05-03 20:53:00 -07:00
VictoryCount int `json:"victoryCount"`
FaintCount int `json:"faintCount"`
ReviveCount int `json:"reviveCount"`
2024-03-17 10:18:51 -07:00
WaveIndex int `json:"waveIndex"`
BattleType BattleType `json:"battleType"`
Trainer TrainerData `json:"trainer"`
GameVersion string `json:"gameVersion"`
Timestamp int `json:"timestamp"`
}
type GameMode int
type PokemonData interface{}
type PersistentModifierData interface{}
type ArenaData interface{}
type PokeballCounts map[string]int
type BattleType int
type TrainerData interface{}
type SessionHistoryData struct {
Seed string `json:"seed"`
PlayTime int `json:"playTime"`
Result SessionHistoryResult `json:"sessionHistoryResult"`
GameMode GameMode `json:"gameMode"`
Party []PokemonData `json:"party"`
Modifiers []PersistentModifierData `json:"modifiers"`
Money int `json:"money"`
Score int `json:"score"`
WaveIndex int `json:"waveIndex"`
BattleType BattleType `json:"battleType"`
GameVersion string `json:"gameVersion"`
Timestamp int `json:"timestamp"`
}
type SessionHistoryResult int