Commit f29255d03eee940611494b3c923bb68f0226afb9

Authored by Chris Davidson
1 parent 29f2f23c

Change Infestation callback

This way it works before Bone Shield.
... ... @@ -155,7 +155,7 @@ newTalent{
155 155 getDamageReduction = function(self, t)
156 156 return self:combatTalentLimit(t, 0.5, 0.1, 0.22)
157 157 end,
158   - tactical = { BUFF = 2 },
  158 + tactical = {BUFF = 3},
159 159 activate = function(self, t)
160 160 local resist = t.getResist(self,t)
161 161 local affinity = t.getAffinity(self,t)
... ... @@ -175,11 +175,10 @@ newTalent{
175 175 self:removeTemporaryValue("worm", p.worm)
176 176 return true
177 177 end,
178   - callbackPriorities={callbackOnHit = -5}, -- High priority since we do more than just reduce damage and want to make sure the worm spawn happens often
179   - callbackOnHit = function(self, t, cb)
180   - if ( cb.value > (0.15 * self.max_life) ) then
181   - local damageReduction = cb.value * t.getDamageReduction(self, t)
182   - cb.value = cb.value - damageReduction
  178 + callbackOnTakeDamage = function(self, t, src, x, y, type, dam, state)
  179 + if ( dam > (0.15 * self.max_life) ) then
  180 + local damageReduction = dam * t.getDamageReduction(self, t)
  181 + dam = dam - damageReduction
183 182
184 183 local nb = 0
185 184 if game.level then
... ... @@ -206,7 +205,7 @@ newTalent{
206 205 carrionworm(self, self, 5, gx, gy)
207 206 end
208 207 end
209   - return cb.value
  208 + return {dam = dam}
210 209 end
211 210 end,
212 211 info = function(self, t)
... ...