MUDL:check saves breath

From SlothMUD Wiki
Jump to: navigation, search


Summary

Function Name check_saves_breath
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),
(
    msg_character(target(%c), '$N breathes acid at you!', %c),
    if (!check_saves_breath(target(%c), %c, 0),
    (
        damage(target(%c), 10d20)
    ),
    (
        damage(target(%c), 5d20)
    )),
    return(true)
}},

return(false)