Bug - Fixed [Patch] Modifier Maximizer does not prioritize boolean modifiers over shortcuts

Saklad5

Member
Right now, the Modifier Maximizer parses input with the following precedence:
  1. Exact name of numeric modifier
  2. Abbreviations and shortcuts
  3. Exact name of boolean modifier
  4. Error
There is an obvious problem with this: certain boolean modifiers cannot be specified, as they are ignored in favor of shortcuts that happen to match them. In particular, “Adventure Underwater” is never evaluated properly, as the code finds a case-insensitive match for “adv*”, concludes the correct modifier is “Adventures”, and moves on.

The patch I am submitting simply moves the existing code around, changing the precedence to:
  1. Exact name of numeric modifier
  2. Exact name of boolean modifier
  3. Abbreviations and shortcuts
  4. Error
View attachment Boolean Modifiers.patch
 

Saklad5

Member
I'm not sure why you would want to use Adventure Underwater when 'sea' is a thing, but that aside, this patch makes sense.
I made a script to automatically use Unaccompanied Miner with Anemone Mine, and accessing it requires a way to breathe underwater. It does not require your familiar to breathe underwater, though, and it is actually helpful not to have that: adventuring normally does require that, and that makes it a useful way to catch mistakes.
 

Saklad5

Member
Could this be implemented (or acknowledged) soon? It definitely works, as I’ve been using it in my personal instances of KoLmafia (on Ubuntu and macOS) for roughly two weeks.
 

Veracity

Developer
Staff member
Bumping to acknowledge, at least.
I whacked this same section of code, recently, so the patch as it exists will not work.
 
Top