Missile Encounter Filter
A Missile consists of the 'missile' itself and 'projectile' within the
missile. For example, a missile might contain an arrow or a FUL BOMB. When a
Missile contacts a solid object, the Missile Encounter Filter is called. The
location of the filter is specified in the Menu/Edit/Global dialog in the
'Special Locations'.
A couple of things should be noted:
- A missile encounter with a monster or a party member occurs when the
missile LEAVES the monster or party member's position within a cell. When
a group of monsters or the party moves, it takes two half-steps. For
example, if the party consists of a single member in the left rear
position and moves forward the member at the left rear first vacates the
left rear position and then the left front position in the process of
moving to the next cell forward. If a missile occupies either of those
two positions then an encounter occurs. So the missile's position at the
time of the encounter is the same as the position of the monster or party
member encountered.
- A missile encounter with a wall occurs as the missile leaves the cell
in front of the wall and is about to move forward into the wall. So the
missile's position at the time of the encounter is one-half cell away
from the position of the wall encountered.
The filter receives six parameters:
- 0 - Action to Perform - Default is 0.
- 1 - The type of encounter
- 2 - Location of the encounter
- 3 - The object ID of the containing Missile
- 4 - The object ID of the contained projectile
- 5 - Absolute direction missile is traveling
- 6 - Party/monster Index (types 1 or 7) or -1 (types 2 through 6)
The types are:
- 1 - The missile encountered a monster.
- 2 - The missile encountered a door.
- 3 - The missile encountered a solid trick wall
- 4 - The missile encountered a solid wall
- 5 - The missile ran out of gas and fell to the floor.
- 6 - The missile encountered the exterior wall of the dungeon
- 7 - The missile encountered a party member
The Filter should set the 'action' field to non-zero and return the
parameters in order to modify the default result of the encounter. The effect
of doing this varies depending on the original type and the action.
The Actions are:
- Ignore encounter. Missile generally proceeds as if it encountered
nothing.
- Stop missile. The encounter is ignored and the missile stops moving. If
the conditions for the encounter remain, the filter will be called again
every tick of the clock.
- Ignore encounter. Turn and move the missile to the absolute direction
specified in parameter 5.
Encounter Type |
Action and Effect |
1
monster
|
- 1 The missile will miss the monster
- 2 Not Implemented
- 3 Not Implemented
|
2
door
|
- 1 The missile will pass through the door
- 2 Not Implemented
- 3 Not Implemented
|
3
trick wall
|
- 1 The missile will pass through the wall
- 2 Not Implemented
- 3 Not Implemented
|
4
solid wall
|
- 1 The missile will pass through the wall
- 2 Not Implemented
- 3 Not Implemented
|
5
fall to floor
|
- 1 The missile will fall to the floor
- 2 Not Implemented
- 3 Not Implemented
|
6
exterior wall
|
- 1 Not Applicable. The missile must stop.
- 2 Not Implemented
- 3 Not Implemented
|
7
party
|
- 1 The missile will pass through the party member
- 2 Not Implemented
- 3 Not Implemented
|