Constructors

Properties

achvUnlocks: AchvUnlocks
dexData: DexData
eggPity: number[]
eggs: Egg[]
gameStats: GameStats
gender: PlayerGender
runHistory: RunHistoryData
secretId: number
starterData: StarterData
trainerId: number
unlockPity: number[]
unlocks: Unlocks
voucherCounts: VoucherCounts
voucherUnlocks: VoucherUnlocks

Methods

  • Parameters

    • dataStr: string
    • shorten: boolean = false

    Returns string

  • Parameters

    • species: default
    • forSeen: boolean = false
    • optimistic: boolean = false

    Returns bigint

  • Parameters

    • systemDataStr: string
    • OptionalcachedSystemDataStr: string

    Returns Promise<boolean>

  • Loads the mapping configurations from localStorage and injects them into the input controller.

    Returns boolean

    true if the configurations are successfully loaded and injected; false if no configurations are found in localStorage.

    This method checks if the 'mappingConfigs' entry exists in localStorage. If it does not exist, the method returns false. If 'mappingConfigs' exists, it parses the configurations and injects each configuration into the input controller for the corresponding gamepad or device key. The method then returns true to indicate success.

  • Parameters

    • scene: default
    • skipVerification: boolean = false
    • sync: boolean = false
    • useCachedSession: boolean = false
    • useCachedSystem: boolean = false

    Returns Promise<boolean>

  • Saves a gamepad setting to localStorage.

    Parameters

    • device: Device
    • localStoragePropertyName: string
    • setting: SettingGamepad | SettingKeyboard

      The gamepad setting to save.

    • settingDefaults: any
    • valueIndex: number

      The index of the value to set for the gamepad setting.

    Returns boolean

    true if the setting is successfully saved.

    This method initializes an empty object for gamepad settings if none exist in localStorage. It then updates the setting in the current scene and iterates over the default gamepad settings to update the specified setting with the new value. Finally, it saves the updated settings back to localStorage and returns true to indicate success.

  • Saves the mapping configurations for a specified device.

    Parameters

    • deviceName: string

      The name of the device for which the configurations are being saved.

    • config: any

      The configuration object containing custom mapping details.

    Returns boolean

    true if the configurations are successfully saved.

  • Saves a setting to localStorage

    Parameters

    • setting: string

      string ideally of SettingKeys

    • valueIndex: number

      index of the setting's option

    Returns boolean

    true

  • Parameters

    • pokemon: default
    • incrementCount: boolean = true
    • fromEgg: boolean = false

    Returns Promise<void>

  • Parameters

    • pokemon: default
    • incrementCount: boolean = true
    • trainer: boolean = false

    Returns void

  • Parameters

    • pokemon: default
    • species: default
    • incrementCount: boolean = true
    • fromEgg: boolean = false

    Returns Promise<void>

  • Parameters

    Returns Promise<[success: boolean, newClear: boolean]>