Bug - Fixed Mafia's location dropdown gets stuck on Manor 0 after adventuring there

As the title says, for a very long time now mafia's location selection dropdown gets stuck on "Manor 0" after you adventure in a wine rack. Meaning that after you go adventure in other zones, after having spent a turn or more in the racks, the drop down stays at the "Manor 0" entries indefinitely, and will only ever stop being on those entries if you force it something else (by typing into or clearing the input box, say).
 

lostcalpolydude

Developer
Staff member
I'm pretty sure it has to do with pouring wines (or looking at that screen), which causes mafia to set conditions to get those wines to drop (even if you just put them in there). I don't have any proof for that though. I think that if you (check if needed and then) uncheck the conditions box it will start changing. This all assumes relay browser adventuring, and it's been a while since I looked at it.
 

Veracity

Developer
Staff member
This happened to me today. And, while it was stuck, whenever I encountered a "Stop" Adventure (like Drawn Onward), the gCLI reported "There are still unmet conditions". Additionally, it seemed to be stuck on "Wine Cellar (automatic)", even though I never auto-adventured, but, instead, manually visited the northeast, southeast, and so on corners.

I agree with lost's guess that it's likely due to the automatic conditions to get the specific glyph wines.
 

Veracity

Developer
Staff member
When we visit manor3.php in the Relay Browser, we call RequestEditorKit.addWineCellarSpoilers(), which calls RequestEditorKit.changeDustyBottleNames(), which looks at the page text to see if it has 3 GLYPH_PATTERN matches on it. That is the hover text you see when looking at the Wine Cellar Glyphs, where you can pour wines into the basin. If we find three glyphs, we set the selected adventure to "Haunted Wine Cellar (automatic)", add a goal for each glyph-wine that we do not have in inventory, and change the dusty bottle names in the dropdown to have the ordinal in which you have to pour them.

I suppose that is OK for your first visit, but pouring in a wine is also a "visit" to manor3.php - as are visiting the summoning chamber and summoning a demon. The first has "action=pourwine", the second has "place=chamber", and the third has "action=summon". "action=pourwine" probably shows you the glyphs again, and thus triggers re-setting the goals.

We should only do the aforementioned actions when we visit the glyphs, not when we pour a wine or do anything with the summoning chamber.

Note that we can visit the glyphs, pour one wine, go away and come back, and pour the 2nd and 3rd wines, and if we have none of the first wine left, we'll set it as a goal again. That's not great, but we don't track how many wines you have poured, and as far as I know, KoL gives you no indication about which glyphs are glowing. I.e., which ones you have successfully activated. Is there? If so, we could skip adding a goal for that glyph. We could track pouring wines within this session, at least, even if we can't detect you pouring wine from outside KoLmafia.

In any case, we can detect when we open the Summoning Chamber - "There is a grinding of gears from within the pedestal, and a section of the cellar's back wall slides aside to reveal a hidden passage. Eureka!" - and clear the goals at that time.
 

Veracity

Developer
Staff member
This is untested, but Revision 10748 does this:

Improvements to Wine Cellar tracking:

- New setting wineCellarProgress goes from 0 to 3 and is # of wines you have successfully poured into the pedestal.
- When you pour a wine into the pedestal, detect whether it was successful or not and if so, which glyph you have activated. As a result, wineCellarProgress can end up as 0, 1, 2, or 3
- when visiting the pedestal, either to look or to pour wines, we set goals for only the wines corresponding to glyphs you have not yet activated that you do not have in inventory
- when visiting the pedestal, do not mark the wines "1st", "2nd", and "3rd" in the dropdown. Mark the next required wine with "***".

Hopefully, this should resolve this issue. I'll see next week, when I get to the Wine Cellar again. Anybody who gets there earlier should feel free to report back.
 
Top