1.31.1 Update!
Happy 1.31.13! Enjoy 1.31.1. You may think that's cheap, but here's me, not caring:
After much sleuthing about and an entire evening spent in the hunt, I'm extremely pleased to report what I believe to be the final death of the persistent Salve/Bandages bug.
The bug was actually a bit more involved than I reported previously. BatBrain had unintentionally been simplifying all monster attacks to be physical, meaning that
die_rounds() ignoring elemental damage was actually mostly fine. BatBrain had only been somewhat inaccurate against elemental monsters -- because it was not applying the player's elemental resistances. When I fixed that part in the last update, other parts which were also using that simplification broke. So as it turns out, that was
a bug but not
the bug.
A much bigger problem was
to_profit() ignoring elemental damage to the player. Fixing this will no doubt have numerous repercussions in improving accuracy for anything that deals elemental damage to the player (including monster attacks). Fixing this would probably have eliminated the Bandages issue for the vast majority of people who experienced it before -- but it wouldn't be entirely gone. It would surface, at odd times and places, a vile vermin haunting the dreams of players with in-combat healing options.
The remainder of the bug was hiding, seemingly innocuously, in
dmg_taken(), the function which reduces a pdmg spread to a float and applies the player's elemental resistance. For any spread which included healing (stored in the data as negative physical damage), it was returning the healing without bothering to foreach the other elements. This was in the interest of speed, since that function is called hundreds of times and there were no healing actions which also dealt the player damage.
However, that was an incredibly shortsighted speed enhancement, since when merging many advevents to determine everything that happens in a round, there may well be both healing and elemental damage -- such as from elemental monsters. This means that when calculating the profit from healing actions -- say, Lasagna Bandages -- the HP calculation would include the healing from Bandages but
not any elemental monster damage!
Now that all of those things have been fixed, I believe this bug ought not surface again. I believe it to be truly dead. However, many have thought the same of bedbugs, or crabs, or James Bond. So I shall stay wary. Yet for the nonce we may enjoy the improvements this update brings to our gaming experience, particularly if we have Bandages/Salve.
If you're using WHAM and have disallowed those skills to avoid the problem of SS stasising with them at senseless times, I'd encourage you to re-allow them and see if they are abused again. I strongly doubt they will be.
One other thing. The double-ice cap has been removed from batfactors, and its effects are added to the monster event only if its stun/dmg effect has not already happened. I was seeing very bad advice with a cap equipped due to the fact that BatBrain assumed the retaliation event would happen every round. This is not a complete fix, since it will still assume that until it actually happens, but it's drastically improved my relay play, at least.
Also, look forward to updates to both SS and BatMan RE within the next hour, adding some nifty support for Siphon Spirits.
Enjoy!