Skip to content
Snippets Groups Projects
Commit 33a2d95c authored by Alex Ksandra's avatar Alex Ksandra
Browse files

Moved psionic shields after percentage resists because they act like flat reduction plenty of time.

parent 76a8b6ff
No related branches found
No related tags found
1 merge request!57Damage handlers reorder
......@@ -228,41 +228,6 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr)
return 0 + add_dam
end
lastdam = dam
-- Static reduce damage for psionic kinetic shield
if target.isTalentActive and target:isTalentActive(target.T_KINETIC_SHIELD) then
local t = target:getTalentFromId(target.T_KINETIC_SHIELD)
dam = t.ks_on_damage(target, t, type, dam)
end
-- Static reduce damage for psionic spiked kinetic shield
if target:attr("kinspike_shield") then
local t = target:getTalentFromId(target.T_KINETIC_SHIELD)
dam = t.kss_on_damage(target, t, type, dam)
end
-- Static reduce damage for psionic thermal shield
if target.isTalentActive and target:isTalentActive(target.T_THERMAL_SHIELD) then
local t = target:getTalentFromId(target.T_THERMAL_SHIELD)
dam = t.ts_on_damage(target, t, type, dam)
end
-- Static reduce damage for psionic spiked thermal shield
if target:attr("thermspike_shield") then
local t = target:getTalentFromId(target.T_THERMAL_SHIELD)
dam = t.tss_on_damage(target, t, type, dam)
end
-- Static reduce damage for psionic charged shield
if target.isTalentActive and target:isTalentActive(target.T_CHARGED_SHIELD) then
local t = target:getTalentFromId(target.T_CHARGED_SHIELD)
dam = t.cs_on_damage(target, t, type, dam)
end
-- Static reduce damage for psionic spiked charged shield
if target:attr("chargespike_shield") then
local t = target:getTalentFromId(target.T_CHARGED_SHIELD)
dam = t.css_on_damage(target, t, type, dam)
end
if dam ~= lastdam then
game:delayedLogDamage(src, target, 0, ("%s(%d to psi shield)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", lastdam-dam), false)
end
--target.T_STONE_FORTRESS could be checked/applied here (ReduceDamage function in Dwarven Fortress talent)
-- affinity healing, we store it to apply it after damage is resolved
......@@ -320,6 +285,41 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr)
end
print("[PROJECTOR] after self-resists dam", dam)
end
lastdam = dam
-- Static reduce damage for psionic kinetic shield
if target.isTalentActive and target:isTalentActive(target.T_KINETIC_SHIELD) then
local t = target:getTalentFromId(target.T_KINETIC_SHIELD)
dam = t.ks_on_damage(target, t, type, dam)
end
-- Static reduce damage for psionic spiked kinetic shield
if target:attr("kinspike_shield") then
local t = target:getTalentFromId(target.T_KINETIC_SHIELD)
dam = t.kss_on_damage(target, t, type, dam)
end
-- Static reduce damage for psionic thermal shield
if target.isTalentActive and target:isTalentActive(target.T_THERMAL_SHIELD) then
local t = target:getTalentFromId(target.T_THERMAL_SHIELD)
dam = t.ts_on_damage(target, t, type, dam)
end
-- Static reduce damage for psionic spiked thermal shield
if target:attr("thermspike_shield") then
local t = target:getTalentFromId(target.T_THERMAL_SHIELD)
dam = t.tss_on_damage(target, t, type, dam)
end
-- Static reduce damage for psionic charged shield
if target.isTalentActive and target:isTalentActive(target.T_CHARGED_SHIELD) then
local t = target:getTalentFromId(target.T_CHARGED_SHIELD)
dam = t.cs_on_damage(target, t, type, dam)
end
-- Static reduce damage for psionic spiked charged shield
if target:attr("chargespike_shield") then
local t = target:getTalentFromId(target.T_CHARGED_SHIELD)
dam = t.css_on_damage(target, t, type, dam)
end
if dam ~= lastdam then
game:delayedLogDamage(src, target, 0, ("%s(%d to psi shield)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", lastdam-dam), false)
end
--Vim based defence
if target:attr("demonblood_def") and target.getVim then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment