Regeneration timed effect doesn't merge
Posted: Tue Feb 01, 2011 7:06 am
I assume this is a bug, and used the same merging as in poison/burning/manasurge/etc. Here is the patch: http://pastebin.com/UUMXahat
Everything about ToME
https://forums.te4.org/
Code: Select all
on_merge = function(self, old_eff, new_eff)
-- Merge the regeneration
local olddam = old_eff.power * old_eff.dur
local newdam = new_eff.power * new_eff.dur
local dur = math.ceil(max(old_eff.dur, new_eff.dur) + 0.5*min(old_eff.dur, new_eff.dur))
old_eff.dur = dur
old_eff.power = (olddam + newdam) / dur
return old_eff
end,
Code: Select all
if heal1 < heal2 then
new_heal = heal2 + 0.5*heal1
else
new_heal = heal1 + 0.5*heal2
end
if dur1 < dur2 then
new_dur = dur2 + 0.5*dur1
else
new_dur = dur1 + 0.5*dur2
end
new_rate = new_heal / new_dur
I personally think this should be fine. The overlapping can only happen with Highers or archmages, and in fact the very existence of this replacement reduces the values of both the racial ability and the Nature spell. The easy way to let them overlap is to simply give them different names - as far as I can tell this is the only reason they replace each other.Canderel wrote: Surely this is what intuitively should happen? Is this overpowered somehow?
nope... how about 2 regen infusions?Grey wrote:The overlapping can only happen with Highers or archmages