No categories assigned
LUA:SpellDamage
- Last edited 12 years ago by I need to Update My Profile
LUA Functions: SpellDamage()
Does damage to the given spawn
Syntax
SpellDamage(param1, param2, param3, param4, param5, param6)
Parameters
- Required - param1 (Spawn), param2 (sint32), param3 (int32), param4 (int32)
- param1 is the spawn to take damage
- param2 is the type of damage to do
- param3 is the minimum damage
- param4 is the maximum damage
- Optional - param5 (int32), param6 (int32)
- param5 is crit_mod
- param6 is no_calcs
Usage
function cast(Caster, Target)
SpellDamage(Target, 5, 123, 456)
end
When this spell is cast it will do 123 to 456 magic damage to the target
Notes
If used in a spell script it will attempt to use the spells targets to do the damage
Damage types:
0 Slash
1 Crush
2 Pierce
3 Heat
4 Cold
5 Magic
6 Mental
7 Divine
8 Disease
9 Poison
10 Drown
11 Falling
12 Pain
The crit mod value may be used optionally, if set to 1 this forces the spell to crit, set to 2 and this disables crit, left as 0 the spell will roll crit as normal. The no_calcs param if set to 1 will disable all damage calculations (you still get the base roll if both MinDamage and MaxDamage are set).