No categories assigned

LUA:SpellHeal

Revision as of 13:45, 7 December 2013 by Thefoof (talk | contribs) (Usage)

This function will calculate heal amount and send a heal packet for the spellcast.

Syntax

SpellHeal([Spawn] Target, [String] HealType, [int] MinHeal, [int] MaxHeal, ([int] crit_mod), ([int] no_calcs))

Usage

function cast(Caster, Target, HealType, MinHeal, MaxHeal)
    SpellHeal(Target, HealType, MinHeal, MaxHeal)
end


Assume the value for Target is the target of the spell, HealType is "Heal", MinHeal is 14, MaxHeal is 16, so you would have a heal damage roll based on 14 and 16, apply amount mods such as potency ect, and then the target would receive that much health, followed by the heal amount popping up in-game.


The list of useable HealTypes are "Heal", "Power", "Repair" (not yet implemented) and "Savagery" (also not yet implemented). If type cannot be determined the spell defaults to the type "Heal".


You may optionally set the crit_mod param, setting this to 1 forces a crit, setting to 2 disables crit, leaving it as 0 has crit roll as normal.


Optionally you may also set no_calcs to 1, which will disable all damage calculations (you still get the base damage roll if both MinHeal and MaxHeal are used).


This will only work when called with an lua spell.



Back to LUA Spell Functions Index