MUDL:damage

From WikiName
Revision as of 23:50, 7 November 2018 by Teker (talk | contribs) (Created page with " __TOC__ = Summary = {|class="abilitiestable" border="0" cellspacing="0" cellpadding="0" ! Function Name | damage |- ! Settable | No |- ! Returns | Boolean |} {|class="ab...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Summary

Function Name damage
Settable No
Returns Boolean


Parameter Options
Victim (character), Amount (integer)
Victim (character), Amount (integer), Damage Type (string)
Victim (character), Attacker (character), Amount (integer)
Victim (character), Attacker (character), Amount (integer), Damage Type (string)
Victim (character), Attacker (character), Amount (integer), Damage Type (string), Damage Flags (integer)


This function deals damage to the victim. If no attacker is specified, it is assumed some non-character effect is causing the damage (poison, trap, etc).


The following damage flags can be combined to modify normal processing.

Damage Flag Value Description
None 0 Normal Operation
HIT_ETHEREAL 1 Attack hits ethereal mobs in all cases.
SILENT_ATTACK 2 No messages are printed as part of the damage function.
BYPASS_SPECTRAL_SHIELD 8 Spectral shield has no effect. Not needed for non-spell attacks that would normally bypass spectral shield.
BYPASS_SPELL_SHIELD 16 Spell shield has no effect. Not needed for non-spell attacks that would normally bypass spell shield.



Example

setproc <parent> # on_foo
damage(%a, %a, 100, 'slash', 0)
return(true)
@


setproc <parent> # PROC_ENABLED 1