skillCheck.inc Functions
 
 
Includes
The following inc files are included in skillCheck.inc
none
Constants
ADV_SKILL 1
ADV_STATS 2
ADV_ALL ADV_SKILL+ADV_STATS, ie 3
ADV_DISABLE 4 - default is ADV_ALL
 

SkillCheck

Parameters
(mobile, attrib_name, difficulty, award_diff:="", advance_flags:=ADV_ALL)
Name Type
mobile Mobile reference to do the skill check for
attrib_name Name of the attribute to perform the check on.
difficulty Skill difficulty to test against
award_diff Advanced as if the difficulty were this value - defaults to difficulty..
advance_flags Controls the turning on/off of stat and skill advancements for the check
Explanation
Performs a skill check on an attribute and performs skill and stat advancements.
<= 0 means the skill check failed > 0 means it was successful.
Return Values
1 if the skill check was successful
 

CalcSuccessPercent

Parameters
(mobile, attrib_name, difficulty, effective_skill)
Name Type
mobile Mobile reference to get the regen information from.
attrib_name Name of the attribute to perform the check on.
difficulty Skill difficulty to test against
effective_skill The effective skill of the mobile.
Explanation
Retrieves the percentage chance of success based on mobile's skill and the difficulty.
Return Values
Returns an integer of the percentate chance to succeed
 

DifficultyTooEasy

Parameters
(effective_skill, difficulty)
Name Type
effective_skill The skill amount being tested
difficulty Skill difficulty to test against
Explanation
Internal function
Return Values
Returns 1 if true
 

DifficultyTooHard

Parameters
(effective_skill, difficulty)
Name Type
mobile The skill amount being tested
difficulty Skill difficulty to test against
Explanation
Internal function
Return Values
Returns 1 if true