Page 1 of 1
[r2096] killing blow with Blood Grasp do not heal player
Posted: Sun Dec 05, 2010 5:03 am
by hops
But the damage of the spell will be 1000+ with blood fury and crit for my corruptor, killing most mobs outright, making this spell much less useful.
Re: [r2096] killing blow with Blood Grasp do not heal player
Posted: Tue Dec 07, 2010 12:36 am
by yufra
You could try this fix in tome/data/damage_types.lua:
Code: Select all
-- Drain Life
newDamageType{
name = "drain life", type = "DRAINLIFE",
projector = function(src, x, y, type, dam)
if _G.type(dam) == "number" then dam = {dam=dam, healfactor=0.4} end
local target = game.level.map(x, y, Map.ACTOR)
local realdam = DamageType:get(DamageType.BLIGHT).projector(src, x, y, DamageType.BLIGHT, dam.dam)
if realdam > 0 then
src:heal(realdam * dam.healfactor)
game.logSeen(target, "%s drains life from %s!", src.name:capitalize(), target.name)
end
end,
}
This checks if there is anything there to start with, then if any damage is actually done (which is zero if there is no target) and finally heals and adds the log message.
Re: [r2096] killing blow with Blood Grasp do not heal player
Posted: Tue Dec 07, 2010 2:11 am
by hops
thanks
Re: [r2096] killing blow with Blood Grasp do not heal player
Posted: Tue Dec 07, 2010 2:24 pm
by darkgod
fixed