Code: Select all
newDamageType{
name = "weakness", type = "WEAKNESS",
projector = function(src, x, y, type, dam, tmp)
local target = game.level.map(x, y, Map.ACTOR)
if target then
local reapplied = target:hasEffect(target.EFF_WEAKENED)
target:setEffect(target.EFF_WEAKENED, dam.dur, { power=incDamage }, reapplied)
end
end,
}