Feature Elemental phail use in Fernwarthy's Basement

Ethelred

Member
The KoLmafia wiki section on Basement Diving states that mafia will "Use elementform automatically in the relevant tests." when automating adventures in Fernwarthy's Basement. I suspect this was done back in the days when elemental phials were cheap and easy to make or come by. But after the KoL change to phails some years ago, element phials have become VERY expensive. Is there a way to disable this function given current phial prices? Should I make a feature request for this?
 

the Tristero

New member
It looks like this behavior still occurs. Is this something that should be made into a feature request? Or would it best be handled as a bug report?
 

Theraze

Active member
Well, it's working the way it's designed to, so it's definitely not a bug. It could arguably be New Content due to a KoL change, but several years later it's not really that new. So probably a Feature Request would be most accurate.
 

lostcalpolydude

Developer
Staff member
Moved the thread, because why not?

Removing the line that actually uses a phial would be easy. However, that would just mean trying the elemental test and failing instead (repeatedly, I think?), which doesn't sound like an improvement. So the logic for that whole function needs to be reworked, which first requires understanding all of it.

Looks like it's mostly in BasementRequest.canHandleElementTest() that would need refactoring, with a bit of supporting code elsewhere that could be removed afterward.
 

the Tristero

New member
Removing the line that actually uses a phial would be easy. However, that would just mean trying the elemental test and failing instead (repeatedly, I think?), which doesn't sound like an improvement. So the logic for that whole function needs to be reworked, which first requires understanding all of it.

Looks like it's mostly in BasementRequest.canHandleElementTest() that would need refactoring, with a bit of supporting code elsewhere that could be removed afterward.

This behavior still is occurring. If there is an easy fix it seems worth doing. Based on what the code does now, if phials were excluded I would expect mafia to quit running adventures because the test could not be passed. Certainly that would be preferable to using a phial that is now worth 100-200k (versus the 300 meat value when the code was first written).
 

lostcalpolydude

Developer
Staff member
This behavior still is occurring. If there is an easy fix it seems worth doing. Based on what the code does now, if phials were excluded I would expect mafia to quit running adventures because the test could not be passed. Certainly that would be preferable to using a phial that is now worth 100-200k (versus the 300 meat value when the code was first written).

The simple approach of removing the phial use would still leave mafia calculating that it can pass based on using a phial, so it would not abort (and wasting a few hundred turns could be considered worse than wasting a phial). Removing that from the code is nontrivial, as I remember.

Until someone is inspired to properly fix this, not having a phial (or ingredients for one) should work? My basement diving has all been done manually (with lots of maximizer help, of course), so there's no chance of me ever testing any changes I might make to the automated basementing code.
 

Darzil

Developer
Had a little look. It is a load of code.

I think I'd want to:
Add maximizer option to sort by bonus per price (for elemental tests), and bonus per price per X turns (maybe 10, for hp/stat tests).
Use these in the relay browser decorator, and show more information there.
Add basement.js support for changing elemental resist to show changing target.
That should give the data basis that can then be used for automating the basement via a load of new code.

This is explicitly not a promise to spend weeks working on something I will never use. I have several higher value projects that I have been wanting to do for years.
 
Top