*closed* Possible bug in Overkill talent
Posted: Fri Sep 18, 2015 11:50 pm
This is just something I noticed while looking at the source. Overkill has this activation code in /tome/class/Actor.lua : takeHit():
"self.inc_damage" is a table, so "local incdam = self.inc_damage" is creating a reference to the existing table and "self.inc_damage = {}" is deleting all the values in the table. The code later does "self.inc_damage = incdam" but I believe these are both references to the same (now empty) table, so it's not actually doing anything.
I haven't heard of anyone seeing issues with Overkill clearing all your damage bonuses, so maybe some other code is refreshing "self.inc_damage" before we actually notice problems in-game.
I think if the line "local incdam = self.inc_damage" is changed to this, it will fix the issue:
I can make a fix for this, but I wanted to check here to make sure I'm not overlooking something.
Code: Select all
if dead and src and src.attr and src:attr("overkill") and src.project and not src.turn_procs.overkill then
src.turn_procs.overkill = true
local dam = (self.die_at - self.life) * src:attr("overkill") / 100
local incdam = self.inc_damage
self.inc_damage = {}
src:project({type="ball", radius=2, selffire=false, x=self.x, y=self.y}, self.x, self.y, DamageType.BLIGHT, dam, {type="acid"})
self.inc_damage = incdam
end
I haven't heard of anyone seeing issues with Overkill clearing all your damage bonuses, so maybe some other code is refreshing "self.inc_damage" before we actually notice problems in-game.
I think if the line "local incdam = self.inc_damage" is changed to this, it will fix the issue:
Code: Select all
local incdam = table.clone(self.inc_damage, true)