|
|
|
|
|
%attackCheckAttempt()
Aliases | %attackCheckAttempt( ) |
---|
Parameters | mobile @attacker, mobile @victim, int @skillLevel [, int @bonusModifier [, item @weapon ] ] |
---|
|
This function will evaluate the attacker's ability to hit the victim and make an appropriate roll to determine if the attempt is successful. If the attempt succeeds then 1 is returned; otherwise 0 is returned. The skill level determines the ability of the attacker in the given attack context. This is often set to the actualy skill level of an associated skill or to the quality of an associated skill. The bonus modifier is applied when the roll takes place for success or failure but is rarely used in practice.
Example:
if( %attackCheckAttempt( @actor, @target, @skillLevel ) ) { %damage( @actor, @target, @amount, null, "skill headbutt" ) } else { %damage( @actor, @target, 0, null, "skill headbutt" ) } endif |
|
|
|
|
|
|
|