Hierarchy

  • CreatureZone

Constructors

Properties

civilizationScoreTiles: SaferNumberIndexedObject<number> = {}
islandId: `${number},${number}`
kills: number = 0
rectangle: default
spawnedCreatures: boolean = false
tames: number = 0
zonePoint: IVector3

Accessors

  • get island(): default
  • Returns default

Methods

  • Adds civilization score to this zone.

    If civilization score for this zone is "dirty", this method does nothing

    Parameters

    • score: number
    • source: undefined | string

    Returns void

  • Returns number

  • Gets the current creature set for this zone

    Returns CreatureType[]

  • Returns default[]

  • Returns default[]

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

  • Parameters

    • atAnyTier: boolean = false

    Returns CreatureType[]

  • Gets the tier of this zone.

    • Either this zone's saved tier, if it was overwritten
    • Or the island's randomly generated starting tier + the zone's distance from the island's starting zone

    Returns number

  • Returns boolean

  • Called when this zone is "active", ie, a human is in this zone or an adjacent zone

    Parameters

    Returns void

  • Returns void

  • Parameters

    • random: Random<IRandomGenerator<any>> = ...

    Returns void

  • Parameters

    • random: Random<IRandomGenerator<any>> = ...

    Returns void

  • Resets & recalculates the civilization score for the zone.

    Returns void

  • Refreshes the provided civilization score for the given tile

    If civilization score for this zone is "dirty", this method does nothing

    Parameters

    • tile: default
    • Optional isRecalculating: boolean

    Returns void

  • Parameters

    • random: Random<IRandomGenerator<any>> = ...

    Returns void

  • Parameters

    Returns void

  • Parameters

    • zLayer: WorldZ

    Returns void

  • Parameters

    • tier: number

    Returns void

  • Gets a random tile in the zone and attempts to spawn a creature there.

    Parameters

    • Optional playingHumans: default<unknown, number, NPC | Player>[]

      The humans currently playing on the island, if nothing is set, then the creature will spawn regardless of player LOS

    Returns void

  • Attempts to spawns some creatures for this zone to start with. Method will no-op if called more than once.

    Returns void

Generated using TypeDoc