... not sure if bugged, per se. It
does look like it's only purging physical effects, though, and there may or may not be a percentile check involved. The code definitely doesn't look like it's matching the description, for what that's worth, but I don't actually know what the code is saying it's doing... just kinda' guessing at it. E3: Wait, wait, the description actually says it does that. Odd... I don't remember that.
-- Retch: heal undead; damage living
newDamageType{
name = "purging blight", type = "RETCH",
projector = function(src, x, y, type, dam)
local target = game.level.map(x, y, Map.ACTOR)
if target and (target:attr("undead") or target:attr(retch_heal)) then
target:heal(dam * 1.5, src)
if src.callTalent then
if rng.percent(src:callTalent(src.T_RETCH, "getPurgeChance")) then
local effs = {}
local status = "detrimental"
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.status == status and e.type == "physical" then
effs[#effs+1] = {"effect", eff_id}
end
end
if #effs > 0 then
local eff = rng.tableRemove(effs)
target:removeEffect(eff[2])
end
end
end
elseif target then
DamageType:get(DamageType.BLIGHT).projector(src, x, y, DamageType.BLIGHT, dam)
if src.callTalent then
if rng.percent(src:callTalent(src.T_RETCH, "getPurgeChance")) then
local effs = {}
local status = "beneficial"
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.status == status and e.type == "physical" then
effs[#effs+1] = {"effect", eff_id}
end
end
if #effs > 0 then
local eff = rng.tableRemove(effs)
target:removeEffect(eff[2])
end
end
end
end
end,
}
E: Actually, here's the % check:
getPurgeChance = function(self, t) return self:combatTalentLimit(t, 100, 5, 25) end, -- Limit < 100% I, uh. Don't actually remember how to parse the lua's number scaling whatsit. I'm guessing the chance is definitely pretty low if you've just got a point in retch, though...
E2: For what it's worth, if you had any interest/hadn't already checked yourself, the code's split between the ghoul file in undead talents and retch inside damage_types.lua. Not terribly hard to find, really...
E4: But yeah, a <100% chance to remove a single physical effect per turn isn't the sexist thing in the world. Nice on insane/madness to strip vitality off, though... possibly, anyway.