MUDL:check saves poison

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


Summary

Function Name check_saves_poison
Settable No
Returns Boolean


Parameter Options
Victim (character)
Victim (character), Attacker (character)
Victim (character), Attacker (character), Modifier (integer)


This function performs a saving throw roll for the Victim and returns True if the save is successful. If the Attacker is specified, any saving throw modifiers on the Attacker will adjust the roll. In addition, a Modifier can be specified to make the roll easier (positive value) or harder (negative value).


Example

setproc <mobile> # every_round
if (target(%c),
(
    if (!check_saves_poison(target(%c), %c, 0),
    (
        msg_character(target(%c), '$N has poisoned you!', %c),
        affect(target(%c), 'poison',
             'location=str modifier=-2 level=' + level(%c) +
             ' seconds=193 bitvector=4096'),

        return(true)
    ))
)),

return(false)