Help

JS-ELEMENT-DAMAGE

For immortals

The damage() is used to perform damage against a character or object. The syntax is similar to BEHAVIOR-DAMAGER. The syntax is:

Syntaxdamager.damage( type, amount, target, option0, ..., optionN );

Where damage is the room, object, or mobile who is doing the damage, type is the type of damage (see RESISTANCES), target is the character or object to damage, and options is one of the following:

'saving', <type>   The type of saving throw to save against for
                   half damage.  type is one of SAVING-THROWS.
'noitems'          By default damage() affects items.  Specifying this
                   option prevents items from being damaged.
'silent'           Prevents damage() from displaying its own damage
                   message.  This is useful when you wish to provide your own
                   custom messages.

For example the following does 100 points of fire damage to the actor, who can save against reflex for half damage.

self.damage( 'fire', 100, actor, 'saving', 'reflex' );

If you wish to do damage that is not based on a resistance, you can specify a damage type of 'none'.

If you are doing damage inside of a spell, see JS-SPELL-DAMAGE and use that instead.