Unlock Door Spells



When the party encounters a door locked by a spell, the engine must determine if the party has a spell memorized which will open the door.



The Wall Editor provides a place to specify a Spell Name for each wall slot. The designer can put one of two things here:

  1. The name of a spell. If anyone in the party has this spell memorized, then the door will open if the player chooses “Use Spell”.

  2. The name of a 'Hook'. This is the name of a script attached to one or more Special Abilities. When a 'Spelled Door' is encounterd, the engine will examine all the spells which the party has memorized. The engine will serach each spell for a Special Ability with a script by the given name. It will run such scripts, one-at-a-time, and if any one returns a value starting with 'Y' then the search will cease and the door will open if the player chooses “Use Spell”.



Search Order

All of the party's memorized spells.



Context

$SpellContext()



Parameters

Hook Parameter[5] is set to the location of the party and the direction it is facing. The format is:



<level>/<x>/<y>/<dir>

Example: “2/4/11/E” would mean the party is facing East on level 2 at x=4, y=11.



Return Value

If the script returns a result starting with 'Y', then the door will open if the player selects “Use Spell”.