Lua functions

SpellDamage

Registered in this checkout as EQ2Emu_lua_SpellDamage; implementation found at WorldServer/Lua/LuaFunctions.cpp:2185.

Historical signature: SpellDamage(target, type, min_damage, max_damage, crit_mod, no_calcs, class_id)

Parameter and behavior details in the historical explanation are under review against the current implementation.

Function: SpellDamage(target, type, min_damage, max_damage, crit_mod, no_calcs, class_id)

Description: Damage a Target inside of a Spell Script.

Parameters:

  • luaspell (int32) - Integer value luaspell.
  • type (int32) - Integer value type.
  • min_damage (int32) - Integer value min_damage.
  • max_damage (int32) - Integer value max_damage.
  • crit_mod (int32) - Integer value crit_mod.
  • no_calcs (int32) - Integer value no_calcs.
  • class_id (uint32) - Integer value class_id.

Returns: None.

Checked example

Active call in a local runtime Lua script. Critical and calculation flags and class filters are optional. This is a contextual call pattern, not a tested standalone script.

SpellDamage(Target, 3, 30, 50)

Evidence: server/Spells/Commoner/LadonFieryBreath.lua:14; binding EQ2Emu_lua_SpellDamage.

Current registration: WorldServer/Lua/LuaInterface.cpp. Historical explanation: EQ2Emu Lua documentation.