Skip to content
Snippets Groups Projects
Commit 2b637ad1 authored by Chris Davidson's avatar Chris Davidson
Browse files

Change Virulent Strike to prioritize the lowest duration diseases

parent 1c0f05a5
No related branches found
No related tags found
1 merge request!529Defiler revision
......@@ -52,15 +52,24 @@ newTalent{
local speed2, hit2 = self:attackTargetWith(target, offweapon.combat, nil, self:getOffHandMult(offweapon.combat, t.getDamage(self, t)))
DamageType:projectingFor(self, nil)
local effs = target:effectsFilter(function(e) return e.subtype.disease end, 9999)
if hit1 then
local effs = target:effectsFilter(function(e) return e.subtype.disease end, 1)
if #effs > 0 then table.sort(effs, function(a, b)
local eff = target:hasEffect(a)
local eff2 = target:hasEffect(b)
return eff.dur < eff2.dur end)
end
local eff2 = target:hasEffect(effs[1])
if eff2 then
eff2.dur = eff2.dur + t.getIncrease(self, t)
end
end
if hit2 then
local effs = target:effectsFilter(function(e) return e.subtype.disease end, 1)
if #effs > 0 then table.sort(effs, function(a, b)
local eff = target:hasEffect(a)
local eff2 = target:hasEffect(b)
return eff.dur < eff2.dur end)
end
local eff2 = target:hasEffect(effs[1])
if eff2 then
eff2.dur = eff2.dur + t.getIncrease(self, t)
......@@ -70,7 +79,7 @@ newTalent{
return true
end,
info = function(self, t)
return ([[Strike the target with both weapons dealing %d%% damage with each hit. Each strike that hits will increase the duration of a random disease effect by %d.]]):
return ([[Strike the target with both weapons dealing %d%% damage with each hit. Each strike that hits will increase the duration of the lowest duration disease effect by %d.]]):
format(100 * t.getDamage(self, t), t.getIncrease(self, t))
end,
}
......
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