Page 1 of 1

Saving against an Effect removes existing one.

Posted: Sun Apr 13, 2014 4:18 am
by grayswandir
If you currently have a status effect, and then you save against that same status effect being applied (through saves, not resists), you lose the original status effect.

I tested this by going up to a troll, setting it to be stunned for 10000 turns. Then I changed it's physical save to 100 and hit it with Stunning Blow. It was no longer stunned.

Not really sure if this is a bug or intended behavior. I really don't like it, though.



The fix seems really simple: In engine/interface/ActorTemporaryEffects, on line 110, change:

Code: Select all

if p.dur <= 0 then return self:removeEffect(eff_id) end
to

Code: Select all

if p.dur <= 0 then return end
I tested this briefly, and it worked just fine.

Re: Saving against an Effect removes existing one.

Posted: Sun Apr 13, 2014 4:44 am
by Doctornull
I like this change.

Currently I code my new stuff to check for pre-existing effects (and potentially skip applying a new effect) specifically to work around this.

Re: Saving against an Effect removes existing one.

Posted: Sun Apr 13, 2014 6:27 am
by Marson
Nice and simple, but impactful.