Interacting with walls
The world · Walls and doors ·
InfWallSpecialType
In brief
A wall reference can carry a decoration and an interaction type, which decide what happens when the player clicks on the wall or uses the keyboard command. A decoration that runs a script sends an event to the block's script, which decides the effect. A stuck door is opened by force: the strongest character who can act tries, with a chance that grows with strength, from 5 % to 60 %.
Positions are written [XX:YY], column then row, both counted from 00; the
block index is YY × 32 + XX.
Decorations and interactions
A wall reference can select a decoration and an
InfWallSpecialType, which decides what
happens when the player interacts with that wall, for example by clicking on
it. For a decoration that runs a script, the game first checks that the
interaction reaches the decoration, then sends
BLOCK_EVENT_WALL_DECORATION to the block's script, which decides the
effect. This event is a BlockEventMask
value, not a wall property. There is no dedicated "hidden button" flag in
this path: a decoration that is hard to see behaves like any other.1
Forcing a door
A stuck door is a wall whose reference has
INF_WALL_SPECIAL_FORCE_DOOR. The maps place three: [08:03] on level 2,
[15:13] on level 7 and [12:20] on level 8, all of reference 51. Level 9 also
gives reference 51 this type and level 8 reference 52, but no map or script
puts them on a wall. A click must fall on the wall in front, the rectangle
(40, 16)–(136, 88) of the view; another click is left to the rest of the
game. The keyboard command, and a flying object that reaches the handler,
skip this test.
strongest = none
for each character slot, first to last:
if present, conscious, and neither paralyzed nor petrified:
if strongest is none or strength(slot) >= strength(strongest):
strongest = slot
if strongest is none: stop # no message, see below
if 1d20 <= chance[min(strength(strongest), 18)]:
print "You force the door." # text colour 4
faces of the door = 8 if the face holds reference 51, otherwise 18
open the door
else:
print "You try to force the door but fail." # text colour 6
| Strength | 0, 1 | 2 | 3, 4 | 5, 6 | 7, 8 | 9, 10 | 11, 12 | 13, 14 | 15 | 16 | 17 | 18 or more |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1d20 at most | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| Chance | 5% | 10% | 15% | 20% | 25% | 30% | 35% | 40% | 45% | 50% | 55% | 60% |
Only the best strength counts. No other character helps, exceptional strength adds nothing, and nothing limits the number of attempts. Reference 8 is a closed door of the level's first door graphic and 18 of its second: once forced, the door is an ordinary door. Until then a rising door is drawn slightly raised (doors).2
Bug. When no character can try, the game formats "You are not capable of
forcing the door." into a text buffer and never prints it; the two other
outcomes print directly. The attempt ends with nothing on the screen
(inferred: not observed in play). A faithful reimplementation shows no
message. (ANOMALY-140)
Bug. The comparison between two characters adds an exceptional strength
to both strengths, taken from the character already kept on both sides, so it
cancels. Hence the rule above: the highest strength, the last slot on a tie.
The chance depends on strength alone, so this changes nothing in play. A
faithful reimplementation may simply take the highest strength.
(ANOMALY-141)
Sources
Locations refer to the game executable reference; comparative sources are listed in the technical references.