PitTrap

PitTrap

Looks like Floor but drops the player into a Pit when stepped on. Boulders fill the pit instead of falling; Slider and Pusher agents fall through and are removed. Regular agents walk over hidden pits unaffected.

Players with DETECT_HIDDEN see the pit symbol while standing adjacent, then the disguise is restored when they move away.

Constructor

new PitTrap()

Source:

Extends

Classes

PitTrap

Members

terrain :Terrain

Source:
Overrides:
Type:

Methods

getApparentTerrain()

Description:
  • Returns the visual terrain (the one whose symbol is displayed).

Source:
Overrides:

getProxiedTerrain()

Description:
  • Returns the behavioral terrain (the one being wrapped).

Source:
Overrides:

onAdjacentToInternal(event, cell)

Description:
  • When the player enters an adjacent cell and has DETECT_HIDDEN, swaps the cell's animation symbol to reveal the actual terrain.

Source:
Inherited From:
Parameters:
Name Type Description
event GameEvent
cell Cell

onNotAdjacentToInternal(_event, cell)

Description:
  • When the player leaves the adjacent position, restores the cell's animation symbol so the disguise is shown again.

Source:
Inherited From:
Parameters:
Name Type Description
_event GameEvent

Unused.

cell Cell