Mimic

Mimic

Displays the symbol of one terrain while behaving like another, creating a hidden terrain effect. When a player with the DETECT_HIDDEN flag is adjacent, the cell briefly reveals the actual terrain's symbol.

Typical use: disguise a dangerous or traversable cell as something else — subclasses SecretPassage and PitTrap are the canonical examples.

Constructor

new Mimic()

Source:

Classes

Mimic

Methods

getApparentTerrain()

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

Source:

getProxiedTerrain()

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

Source:

onAdjacentToInternal()

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

Source:

onNotAdjacentToInternal(_event, cell)

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

Source:
Parameters:
Name Type Description
_event GameEvent

Unused.

cell Cell