Bug - Fixed Wormride link in relay browser causes mood to be executed

Atheist Nutter

New member
The repro scenario is simple but once-per-ascension:
  • "Run moods during manual adventuring" is turned off.
  • You have a mood defined with effects that will be refreshed as soon as you auto-adventure, e.g. because you don't currently have the effect.
  • Get the worm-riding hooks, which will have a "[wormride]" decorator link.
  • Click the link.

In GenericRequest.java, near L1002 in r8305, all that we are doing is running a UseItemRequest on the drum machine. In UseItemRequest.java, near L1097, because we think that using a drum machine takes a turn, we run RecoveryManager.runBetweenBattleChecks, which I assume includes executing the mood. The number of adventures taken to use the item is determined in getAdventuresUsedByItem, defined on L3730. Drum machines are defined as taking one turn. I attach a speculative fix, but I'm unfamiliar with the code and I am not in a position to test this right now.
 

Attachments

  • wormride.diff
    990 bytes · Views: 43
Last edited:

Bale

Minion
My first thought was this, but yeah. It makes a huge difference that "Run moods during manual adventuring" is turned off.
 

jasonharper

Developer
This looks like a reasonable change, whether or not it actually fixes your problem (and I think it does). Accepted in r8307.
 

Atheist Nutter

New member
My first thought was this, but yeah. It makes a huge difference that "Run moods during manual adventuring" is turned off.

If this fix works, then it will fix that, too. Running the mood and disabling auto-attack are both consequences of thinking that using the item will take more than zero turns.

It's really just a coincidence that wormriding takes zero turns and that can be used as a fix. The assumption is that if using an item takes a turn, it is giving you a boss combat. This is true for e.g. black pudding, but this same logic causes your mood to be executed when running "gong roach". Is that ever desirable? I'd at least like to be able to turn it off.
 
Top