Hierarchy

Constructors

Properties

event: IEventEmitter<default, ICreatureManagerEvents>
island: default
list: ITranslationListBuilder<default, CreatureType, boolean> = CreatureManager.list
name: "CreatureManager" = "CreatureManager"

Name of this object manager

objects: SaferArray<default>
reregisterObjectsForMemoryLeaks: boolean = false

Indicates if objects should be re-registered to the memory leak detector after loading

combatStrength: default

Accessors

  • get combatStrength(): default
  • Returns default

  • get game(): Game
  • Returns Game

  • get length(): number
  • Returns number

  • set length(val: number): void
  • This is likely only used during save upgrades

    Parameters

    • val: number

    Returns void

Methods

  • Returns IteratorObject<undefined | default>

  • Called when this object manager is not used anymore (after it was saved!)

    Returns void

  • Parameters

    Returns boolean

  • Returns number

  • Parameters

    • id: number

    Returns undefined | default

  • Parameters

    Returns number

  • getMovePenalty

    Returns

    Blocked penalty - Do no return 0!

    Parameters

    • moveType: MoveType
    • tile: default
    • willMove: boolean

      Set to true if the object is about to move to this tile. This method will confirm if there's an existing npc/creature there and return false if so

    • Optional options: Partial<ICreatureCheckMoveOptions>
    • Optional creature: default

    Returns number

  • wasm calls this when calculating penalties for flow fields

    Parameters

    • moveType: MoveType
    • x: number
    • y: number
    • z: number

    Returns number

  • Returns void

  • Parameters

    Returns void

  • Maybe spawns a Dryad based on target's skill, zone tier, plants around target, and chance.

    Parameters

    • target: default<unknown, number, NPC | Player>

      Human that we check around to find a suitable spawn.

    Returns void

  • Called when an entity is being removed

    Returns

    Return true if this method handled tile updates

    Parameters

    • creature: default

      Entity to remove

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

    Returns boolean

  • Returns void

  • Parameters

    • entity: default
    • Optional options: {
          remainTamed?: boolean;
      }
      • Optional remainTamed?: boolean

    Returns void

  • Returns void

  • Parameters

    • id: number
    • value: undefined | default

    Returns void

  • Spawns a creature.

    Parameters

    • type: CreatureType

      The type of creature to spawn.

    • tile: default

      The tile

    • Optional bypass: boolean

      Whether to bypass checks for whether the creature can spawn there naturally. Defaults to false, if the creature can't spawn naturally, it won't.

    • Optional forceAberrant: boolean

      If provided, forces the spawned creature's aberrant state to be the passed boolean. True = aberrant, false = not aberrant. If not provided, the aberrant state is decided based on chance.

    • Optional spawnTiles: TileGroup

      If set, this will overwrite the creature's description for which tiles it can spawn on

    • Optional bypassCreatureLimit: boolean

      If set, the creature limit will be ignored and spawn the creature over the set limit

    Returns undefined | default

  • Parameters

    • tile: default
    • Optional bypassCreatureLimit: boolean
    • Optional checkTerrainType: boolean

    Returns undefined | default

  • Parameters

    Returns number

  • Parameters

    Returns void

  • Returns void

Generated using TypeDoc