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

Change Infestation callback

This way it works before Bone Shield.
parent 29f2f23c
No related branches found
No related tags found
No related merge requests found
......@@ -155,7 +155,7 @@ newTalent{
getDamageReduction = function(self, t)
return self:combatTalentLimit(t, 0.5, 0.1, 0.22)
end,
tactical = { BUFF = 2 },
tactical = {BUFF = 3},
activate = function(self, t)
local resist = t.getResist(self,t)
local affinity = t.getAffinity(self,t)
......@@ -175,11 +175,10 @@ newTalent{
self:removeTemporaryValue("worm", p.worm)
return true
end,
callbackPriorities={callbackOnHit = -5}, -- High priority since we do more than just reduce damage and want to make sure the worm spawn happens often
callbackOnHit = function(self, t, cb)
if ( cb.value > (0.15 * self.max_life) ) then
local damageReduction = cb.value * t.getDamageReduction(self, t)
cb.value = cb.value - damageReduction
callbackOnTakeDamage = function(self, t, src, x, y, type, dam, state)
if ( dam > (0.15 * self.max_life) ) then
local damageReduction = dam * t.getDamageReduction(self, t)
dam = dam - damageReduction
local nb = 0
if game.level then
......@@ -206,7 +205,7 @@ newTalent{
carrionworm(self, self, 5, gx, gy)
end
end
return cb.value
return {dam = dam}
end
end,
info = function(self, t)
......
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