JS-ELEMENT-CAST
The cast() is used to cast a spell. The syntax is similar to BEHAVIOR-ENSPELLED. The syntax is:
Syntax
<caster>.cast( <spell name>, <option0>, ..., <optionN> );Where caster is the room, object, or mobile who is casting the spell, spell name is the name of the spell, and options is one of the following:
| 'args', <args> | Any arguments to be passed to the spell. |
| 'level', <level> | The level of the spell. level should either be a level number or the string "bearer", indicating that the spell is to be cast at the level of the bearer. If no level is supplied the spell will be cast at level one. |
| 'nosave' | Force failure of any applicable saving throws. |
| 'savingmod', <mod> | Allows you to specify a modifier on the victim's saving throw. Positive helps victim. |
| 'sm', <mod> | Abbreviation of "savingmod". |
| 'notouch' | Do not require the mobile Enspelled is attached to touch its victims in the spells that normally require it (chill touch, ...). |
| 'noutter' | Do not utter the runes for this spell. |
For example the following casts a fireball at the actor at level 100.
self.cast( 'fireball', 'level', 100, 'args', actor );
Last edited by Engada in October 2004.