• Tutorials

  • Home
  • RangerDamageBonus

    • After rolling the damage dice – Check if the target is a monster marked with “Ranger Damage Penalty”. If not then skip the remaining steps.
    • Compute the attacker's “RangerBonusLevel” Skill. It can be zero. If there is no such Skill defined then skip the remaining steps.
    • Prepare to call this hook - “RangerDamageBonus”. Set hookParameter[5] to the value of the “RangerBonusLevel” skill as determined in the previous step.
    • Call this hook for each of the attacker's baseclasses that defines the “RangerBonusLevel” skill.
    • The final value in hookParameter[5] is added to the damage dice roll.

    Parameters

    none

    Context

    Character - the attacker - $AttackerContext()
    Character - the target - $TargetContext()
    Baseclass - the attacker's baseclass - $AttackerContext()

    Notess

    There is no need for this hook to be confined to the particular class named “Ranger”. You could use it to increase damage that good swimmers deal to fish. The word “Ranger” is a carryover from the FRUA game. It is arbitrary and the engine makes no tests for that particular name. The engine makes all of its decisions and computations based on the values you supply for monsters and baseclasses.

    If more than one RangerDamageBonus script is provided and executed, the values in the hook parameters survive from one to the next. You can use any of the hook parameters except hookParameter[0] to communicate between multiple scripts. The scripts will not be run in any guaranteed order, however.