Cliff

Cliff

Cliff — decorator that enforces directional cliff traversal.

The player can only enter a Cliff cell from a matching-terrain side, and only exit to a matching-terrain side (enforced by onEnterInternal / onExitInternal, which cancel with a "too steep" message otherwise — mirrors Java's Cliff.onEnterInternal/onExitInternal exactly).

Non-player agents are the mirror image: Java's canEnter/canExit (which in the original engine are only ever consulted for agent AI movement, never for the player) allow a monster in/out only via a MISMATCHED neighbor. Since this port's canEnter is also consulted for the player's own physical traversability check, canEnter/canExit branch on PLAYER (same pattern as AgentGate/SecretPassage in this file) so player behavior stays governed by the matching-terrain rule above, while non-player agents get Java's mismatched-terrain rule.