JS-SPELL
The Spell object represents spells.
Properties:
level | The level of the spell. |
shortDesc | The name of this spell. |
Methods:
buff( args ) | This is shorthand for: if ( subject.addAuraCat( caster, <args> ) ) msg( 'buff' ); |
debuff( args ) | Works identically to buff() except that mobiles not fighting will engage the caster. |
damage() | See JS-SPELL-DAMAGE. |
dice( x, y, z ) | This functions similarly to Mud.dice() except that this method automatically accounts for the Area (and Area Mastery), Empower, and Maximize runes. |
duration( x ) | This returns x * 2 if the Lasting rune is applied otherwise it returns x. |
isActive() | Returns true if this spell hasn't been deleted. |
isFirst() | If the spell is an aura or group spell, this returns true if we are visiting the first target. |
hasShaping() | Returns true if the spell has the specified shaping runes. See JS-CARDINALITY and SHAPING-RUNES. |
makesSave( v,t,m ) | Has the target v make a saving throw roll and returns true if v successfully saved against the type "t" (see SAVING-THROWS) with the optional modifier "m" (if no modifier is provided, a modifier of 0 is used). This method is similar to Char.makesSave() except that this method also takes into account shaping runes and spell modifiers. |
msg( t, s, a ) | This method is used to display built-in proficiency messages (messages created using msgedit) from inside a spell. t is the type of message to display, and is usually buff as area, zone, death, and so on messages are usually displayed automatically. s and a represent the "self" and "actor" of the message and optional. If they are not specified, they default to the caster and the subject, respectively. |
pel( cap ) | Returns the proficiency experience level (PEL) for for this spell up to the specified cap. If this spell has the Heighten rune applied to it, the cap will be increased by 20%. See PEL. |
retaliate( subj ) | This will cause the subject of the spell to retaliate against the caster. If no subj is provided, this method will default to the spell's subject. |
toString() | Returns the name of the clan. |
valueOf() | Returns the name of the clan. |
Inside spells, the self variable refers to the spell itself, not the caster. A caster variable is present which refers to the caster. If the spell has a subject, that is stored in the subject variable. actor is not used.