Check the scripts/globals/magic.lua:
Code: Select all
function doElementalNuke(caster, spell, target, spellParams)
local DMG = 0;
local V = 0;
local M = 0;
local dINT = caster:getStat(MOD_INT) - target:getStat(MOD_INT);
local hasMultipleTargetReduction = spellParams.hasMultipleTargetReduction; --still unused!!!
local resistBonus = spellParams.resistBonus;
local mDMG = caster:getMod(MOD_MAGIC_DAMAGE);
--[[
Calculate base damage:
D = mDMG + V + (dINT × M)
D is then floored
For dINT reduce by amount factored into the V value (example: at 134 INT, when using V100 in the calculation, use dINT = 134-100 = 34)
]]
if (dINT <= 49) then
V = spellParams.V0;
M = spellParams.M0;
DMG = math.floor(DMG + mDMG + V + (dINT * M));
if (DMG <= 0) then
return 0;
end
elseif (dINT >= 50 and dINT <= 99) then
V = spellParams.V50;
M = spellParams.M50;
DMG = math.floor(DMG + mDMG + V + ((dINT - 50) * M));
elseif (dINT >= 100 and dINT <= 199) then
V = spellParams.V100;
M = spellParams.M100;
DMG = math.floor(DMG + mDMG + V + ((dINT - 100) * M));
elseif (dINT > 199) then
V = spellParams.V200;
M = spellParams.M200;
DMG = math.floor(DMG + mDMG + V + ((dINT - 200) * M));
end
--get resist multiplier (1x if no resist)
local diff = caster:getStat(MOD_INT) - target:getStat(MOD_INT);
local resist = applyResistance(caster, spell, target, diff, ELEMENTAL_MAGIC_SKILL, resistBonus);
--get the resisted damage
DMG = DMG * resist;
--add on bonuses (staff/day/weather/jas/mab/etc all go in this function)
DMG = addBonuses(caster, spell, target, DMG);
--add in target adjustment
local ele = spell:getElement();
DMG = adjustForTarget(target, DMG, ele);
--add in final adjustments
DMG = finalMagicAdjustments(caster, target, spell, DMG);
return DMG;
end
So, for your example, blizzard,
v0 = 70, so if your int is 49 or less, base damage = 70, if your int is 50-99, use 130 base, and if your int is 100 or more, base is 180, and for int of 200+, your base is also 180.
M is the multiplier for additional damage over the int grouping.
For example, if your int is 75
DMG = math.floor(DMG + mDMG + 130 + ((75 - 50) * 1));
The DMG will factor in resists and other stuff, and the mDMG will factor in the mod setting for MOD_MAGIC_DAMAGE.
Somewhere, the base in the sql file spell_list should come up, in the case of blizzard, that is 46 damage base.
Someone else can correct me if I am wrong, but this is what I see when tracing it.
PS. I am far from a good coder, so please take what I say as the way I am seeing it.