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

Moved finishers (Unfortunate End and Crushing Blow) after resists.

parent 33a2d95c
No related branches found
No related tags found
1 merge request!57Damage handlers reorder
......@@ -349,24 +349,11 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr)
dam = dam * target:callTalent(target.T_ROLL_WITH_IT, "getMult")
print("[PROJECTOR] after Roll With It dam", dam)
end
-- Curse of Misfortune: Unfortunate End (chance to increase damage enough to kill)
if src and src.hasEffect and src:hasEffect(src.EFF_CURSE_OF_MISFORTUNE) then
local eff = src:hasEffect(src.EFF_CURSE_OF_MISFORTUNE)
local def = src.tempeffect_def[src.EFF_CURSE_OF_MISFORTUNE]
dam = def.doUnfortunateEnd(src, eff, target, dam)
end
if src and src.hasEffect and src:hasEffect(src.EFF_SEAL_FATE) then
src:callEffect(src.EFF_SEAL_FATE, "doDamage", target)
end
if src:attr("crushing_blow") and (dam * (1.25 + (src.combat_critical_power or 0)/200)) > target.life then
dam = dam * (1.25 + (src.combat_critical_power or 0)/200)
game.logPlayer(src, "You end your target with a crushing blow!")
end
if target:attr("resist_unseen") and not target:canSee(src) then
dam = dam * (1 - math.min(target.resist_unseen,100)/100)
end
......@@ -414,6 +401,18 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr)
dam = dam * (1 - src.necrotic_minion_be_nice)
end
-- Curse of Misfortune: Unfortunate End (chance to increase damage enough to kill)
if src and src.hasEffect and src:hasEffect(src.EFF_CURSE_OF_MISFORTUNE) then
local eff = src:hasEffect(src.EFF_CURSE_OF_MISFORTUNE)
local def = src.tempeffect_def[src.EFF_CURSE_OF_MISFORTUNE]
dam = def.doUnfortunateEnd(src, eff, target, dam)
end
if src:attr("crushing_blow") and (dam * (1.25 + (src.combat_critical_power or 0)/200)) > target.life then
dam = dam * (1.25 + (src.combat_critical_power or 0)/200)
game.logPlayer(src, "You end your target with a crushing blow!")
end
print("[PROJECTOR] final dam after static checks", dam)
local hd = {"DamageProjector:final", src=src, x=x, y=y, type=type, dam=dam, tmp=tmp, no_martyr=no_martyr}
......
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