Hierarchy

Constructors

  • Returns Game

Properties

absoluteTime: number
autoSave: AutoSave = ...
challengeCollection?: ChallengeModifiersCollection
commandManager: default = ...
customMilestoneModifiersAllowed: boolean
difficulty: GameMode
event: IEventEmitter<Game, IGameEvents>
gameplayModifierData: SaferNumberIndexedObject<any> = {}
history: default[] = []
initialThumbnailTimeout: undefined | number
interval: 16.6666 = INTERVAL
islands: default = ...
languageManager: default = ...
lastSaveBuildTime?: number
lastSaveVersion?: String
milestoneManager: MilestoneManager = ...
milestonesCollection?: GameplayModifiersCollection<default, Milestone, MilestoneModifierInstance<any>, [default<unknown, number, NPC | Player>?]>
modManager: default = ...
originalPlayOptions: Partial<IPlayOptions>
paused: Set<PauseSource>
playerManager: default = ...
playing: boolean
previousSaveVersion: IVersionInfo
references: default = ...
replay: undefined | default
resetting: undefined | Promise<void>
saveClear: boolean
saveLoad: SaveLoad = ...
saveManager: default
saveSize?: string
saveVersion: String
slot: undefined | number
steamworks: default
stringTokenizer: undefined | default
tickHelper: TickHelper = ...

Helps instruct when to increment the time in simulated and real-time mode

tickSpeed: number
tileDecorations: Uint16Array
time: default
turnMode: TurnMode
uninit: Uninit = ...
upgrades: string[] = []
version: String = gameVersion

The version the save was originally created on

visible: boolean = true
webGlContext: undefined | WebGlContext
webWorkerManager: WebWorkerManager = ...
worldId: string

Accessors

  • get actionExecutor(): typeof default
  • Returns typeof default

  • get isChallenge(): boolean
  • Returns boolean

  • get isPaused(): boolean
  • Returns boolean

  • get isSimulatedOrRealTimeMode(): boolean
  • Returns boolean

Methods

  • Creates the renderer. Should only be called once when starting / loading a save

    Parameters

    Returns Promise<void>

  • Changes the turn mode if it's not correct

    Returns void

  • Returns void

  • Gets the largest damage type weaknesses of a human or creature based on a type and damage value

    Returns

    returns DamageType array or undefined if there are no weaknesses

    Parameters

    • defense: Defense

      Defense of the human or creature

    • damageTypes: DamageType

      Measures the weaknesses compared to damage types passed

    • damage: number

      The damage value given to the human or creature

    Returns DamageType[]

  • Parameters

    Returns number

  • Parameters

    • delay: number
    • timestamp: number = ...

    Returns IMovementTime

  • Parameters

    • identifier: string

    Returns undefined | default<unknown, number, NPC | Player>

  • Get humans in the game; ie, players, NPCs, and other non-player humans. Parameters include additional players that may not be relevant, such as ghosts, connecting players, absent players, the dedicated server fake player. Only want players?

    See

    PlayerManager.getAll

    Returns

    Array of Human objects

    Parameters

    • Optional includeGhosts: boolean

      True to include players that are ghosts

    • Optional includeConnecting: boolean

      True to include players that are connecting

    • Optional includeDedicatedServer: boolean

      True to include the dedicated server fake player

    • Optional includeAbsent: boolean

      True to include the absent players

    Returns default<unknown, number, NPC | Player>[]

  • Returns number

  • It's important that this is lowest, so that it happens after modManager's globalSlotReady event

    Returns void

  • Returns Promise<void>

  • Parameters

    Returns void

  • Returns void

  • Parameters

    • Optional options: {
          clearSpritePackCache?: boolean;
      }
      • Optional clearSpritePackCache?: boolean

    Returns Promise<void>

  • Parameters

    Returns boolean

  • Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Serialization tracking

    Parameters

    Returns void

  • Parameters

    Returns void

  • Resets the game state. This should be called when returning to the main menu from a game and/or right before starting/joining a game. This method should be able to be called multiple times in a row and nothing unexpected should occur.

    Parameters

    • saveType: false | SaveType = SaveType.BackToMainMenu

      Saves the game with the specified save type. Set to false to not save. Defaults to BackToMainMenu.

    • shouldDisconnect: boolean = true

      Marks if the game should disconnect from multiplayer. Defaults to true.

    • hasDisconnected: boolean = false

      Marks if the game just disconnected from multiplayer. Defaults to false.

    Returns Promise<void>

  • Parameters

    • position: undefined | IVector2
    • random: Random<IRandomGenerator<any>>

    Returns BiomeTypes

  • Parameters

    Returns void

  • Parameters

    • tickSpeed: number

    Returns void

  • Parameters

    Returns void

  • Stops the game logic loop timer

    Returns void

  • Parameters

    • ticks: number = 5001
    • biomeType: BiomeType = BiomeType.Coastal

    Returns Promise<void>

  • Called when an Island is ticking. Always tick time immediately in manual mode. Schedules a time tick in simulated mode.

    Parameters

    • isIslandTimeAdjustment: boolean

      True if it's due to island fast forwarding

    Returns void

  • Returns string

  • Triggers a game logic loop to run in the next javascript event loop

    Returns void

  • Returns void

  • Returns Promise<void>

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Do not call this directly. Use updateOption instead

    Parameters

    Returns void

  • Returns void

  • Returns void

Generated using TypeDoc