• Tutorials

  • Home
  • Dungeon Craft Help



  • Tutorials

  • Home
  • ComputeSpellDamage

    Just prior to applying the changes to the 'Affected Character Attributes' (as specified in the spelleditor's 'Spell Properties' dialog', we search for a hook named 'ComputeSpellDamage'. We search three places for this hook (in this order):

    1. The Spell itself
    2. The Monster-Type of the combatant being affected. (if it is a monster)
    3. The Combatant being affected.
    We set hook parameter[0] to the empty string. Then each script is called in the order listed above. Each script can examine hook parameter[0]. The return value from each script replaces hook parameter[0].

    Each script that returns a valid numeric value for the adjustment will override any previous value.

    Parameters

    Parameter [5] = contains the damage as computed by the engine.
    Parameter [6] = contains the name of the attribute being adjusted.
    Example:”$CHAR_HITPOINTS”

    Context

    Target Character - $TargetContext()
    Spell - $SpellContext()