PrivatedefaultAdds candy to the player's game data for a given PokemonSpecies.
The species ID of the Pokémon to increment candy for
The number of candies to add to the Pokémon
Whether the candy count was incremented
Will not increase the candy count past MAX_STARTER_CANDY_COUNT.
Checks if a species has a particular nature unlocked
The species to check
The Nature to look for
Whether that species has the specified nature unlocked
Checks whether a species has a specified ability index unlocked for its starter
The species to check
The ability index to check
Whether that starter has that ability index unlocked
PrivateconvertDelete the session data at the given slot when overwriting a save file
For deleting the session of a finished run, use tryClearSession
The slot to clear
A Promise that resolves with whether the session deletion succeeded
Converts Pokédex attributes from a bigint to a readable DexAttrProps interface.
The Pokédex attribute to convert
the attributes in DexAttrProps format
Retrieves current run history data, organized by time stamp. At the moment, only retrievable from locale cache
OptionalconfirmWindowXOffset: numberIncrease the number of classic ribbons won with this species.
The species to increment the ribbon count for
If true, will increment the ribbon count for the root species of the given species
The number of classic wins after incrementing.
PrivateinitPrivateinitInitialize system data after it has been parsed from JSON.
The parsed SystemSaveData to initialize from
PrivateinitPrivateinitPrivateinitOptionalcachedSystemDataStr: stringReturn whether the root species of a given PokemonSpecies has been unlocked in the dex
Checks if an Unlockable has been unlocked.
The Unlockable to check
true if the player has unlocked this Unlockable or an override has enabled it
Loads the mapping configurations from localStorage and injects them into the input controller.
true if the configurations are successfully loaded and injected;
false if no configurations are found in localStorage.
Load stored session data and re-initialize the game with its contents.
The 0-indexed position of the save slot to load.
Values < 0 are considered invalid.
A Promise that resolves with whether the session load succeeded (i.e. whether a save in the given slot exists)
Clear a daily run on an offline game, adding it to a locally-stored cache of cleared seeds.
PrivatereinitializeDiscards local save data and re-populates it with data from the server (or the provided data).
(Optional) Save data to load
Save all data related to the current session to localStorage and/or the backend server.
(Default false) Whether to skip verifying user info before saving
(Default false) Whether to sync data to the server
(Default false) Whether to use cached session data from localStorage instead of generating new session data
(Default false) Whether to use cached system data from localStorage instead of generating new system data
A Promise that resolves with whether the save operation succeeded.
Saves the mapping configurations for a specified device.
The name of the device for which the configurations are being saved.
The configuration object containing custom mapping details.
Saves a new entry to Run History
(Default true) Whether to display a message for the unlocked egg move
(Default false) Whether to change the message from "X Egg Move Unlocked!" to "Bulbasaur X Egg Move Unlocked!"
Privatesettrue if Pokemon catch unlocked a new starter, false if Pokemon catch did not unlock a starter
PrivateshowAttempt to clear session data after the end of a run
After session data is removed, attempt to update user info so the menu updates
To delete an unfinished run instead, use deleteSession
Unlocks the given Nature for a PokemonSpecies and its prevolutions.
Will fail silently if root species has not been unlocked
PrivatevalidateStaticfromUsed by the admin panel when searching for user accounts.
The raw JSON string of the SystemSaveData
GameData instance initialized with the parsed SystemSaveDataStaticparse
(Default
false) Whether to skip initialization of fields that are normally randomized on new game start. Used for the admin panel.