Bug - Fixed Crimbo 2023 coinmasters don't realize the zones aren't always available

ziz

Member
Using KoLmafia r27775 (Build main-425b19c).

The coinmaster handling of the Crimbo 2023 shops (at least the Crimbuccaneer Bar and the Grub Hall) doesn't seem to recognize that they're not always available, causing the coinmaster menu to erroneously not error on purchases, and things like "acquire 1 flask of egggrog" to fail.

To reproduce, have sufficient currency (10 Crimbuccaneer pieces of 12 for egggrog), the "Buy items with tokens at coin masters whenever needed" preference checked, and attempt to buy something from a currently closed Crimbo Town 2023 shop.

Through the coinmaster menu, the gcli response is:
Code:
Visiting the Crimbuccaneer Bar...
Crimbuccaneer Bar successfully looted!
and through `acquire`, the response is:
Code:
> acquire 1 egggrog

Verifying    ingredients for flask of egggrog (1)...
Purchasing flask of egggrog (1    @ 10 Crimbuccaneer pieces of 12)...
Visiting the Crimbuccaneer Bar...
Crimbuccaneer    Bar successfully looted!
Creation failed, no results    detected.

(hm, there's extra spaces in there compared to what I see - but that's what selecting and copying from the gcli gave me. shrug.)

In neither case is an egggrog acquired, unsurprisingly. And, of course, this specific bug isn't likely to be causing problems for very long. I won't be offended at all if this gets closed as wontfix for being a terrible cost/benefit ratio.

Attached is a debug log demonstrating the behavior, and also visiting Crimbo Town at this moment (with the bar closed).
 

Attachments

  • DEBUG_20240104.txt
    17.9 KB · Views: 2

Veracity

Developer
Staff member
When Crimbo closes, we will mark the coinmasters as unavailable.
So this is a temporary issue. :)

That said, I think it should get fixed, since even obsolete code is kept around as an example for the next time we implement something similar.

It should be easy: all coinmasters provide an "accessible" method, which returns null (if available) or an error string (if not).
Chris added code to recognize which adventuring areas are available so that we can abort if the area is peaceful.
I have not looked at the code. If it has the state of all five areas - elf control, pirate control, contested - that is exactly what we'd need.

Unfortunately, I'm leaving on a road trip in a couple hours. In 10 days, I'll arrive at a military base in California, where my spouse has a 6 week contract. I will have plenty of time to work on KoL stuff (I'm expecting to do all my Standard 2024 ascensions), but that will certainly be long after Crimbo23 is closed.

I'd code review the PR, if someone else decides to take it up.
 

Veracity

Developer
Staff member
I'd like crimbo23[Location]Control to be "none", "pirate", "elf", "contested".
none means Crimbo is over.
Otherwise, contested is the equivalent of the "AtWar" preference being true.

I'll add those preferences and set them the same place the AtWar preferences are set.
 

Veracity

Developer
Staff member
Code:
> acquire 1 egggrog

Searching for "flask of egggrog"...
Search complete.
Purchasing flask of egggrog (1 @ 2,900) from #1626728...
Purchases complete.

This is what I get with autoSatisfyWithMall
Oops.

Code:
> create 1 egggrog

The elves and pirates are fighting for control of the bar

This is what would happen otherwise.

And the "buy" button is disabled in the CoinmastersFrame.

I have tests for detecting and setting the new properties.
 
Top