Commit d6ff53577faef58d62c7407cad6b3b067380a290

Authored by yutio888
1 parent 905a4a6d

Bring back the fix: The duration of an existing effect will not be reduced by se…

…tting a new effect with a shorter duration (controlled by on_merge for some  effects). This means that an effect will not be removed if you save against another application of the same effect.
This was not functioning due to a careless code removal.
... ... @@ -7630,6 +7630,7 @@ function _M:on_set_temporary_effect(eff_id, e, p)
7630 7630 p.getName = e.getName
7631 7631 p.resolveSource = e.resolveSource
7632 7632
  7633 + local old = self.tmp[eff_id]
7633 7634 local olddur = old and not e.on_merge and old.dur or 0 -- let mergable effects handle their own duration
7634 7635 -- Adjust duration based on saves
7635 7636 if p.apply_power and (save_for_effects[e.type] or p.apply_save) then
... ...