Feature Add laugh it off (Axecore skill) to HP restorer list

I'm concerned I'm missing something obvious that explains why this isn't already there, but on the off chance this wasn't already hashed out in the forums and I missed it:

- added "Laugh It Off" to the hp restorers list, so it can be used for auto recovery.

The attached patch is against r10808. It builds/runs, but I haven't tested it yet because I'm already drunk for the day, and the patch itself is pretty trivial. The one concerning part is unfortunately for this skill, there's no integer average for the amount of HP restored and so that might make the recovery logic struggle. I saw two routes to go, with my extremely limited knowledge of the code - either convert the HPRestoreItem to use a float instead of an int for the HP restore value (and change all the references accordingly), or change it to take two values, a min and a max, and again convert all the references accordingly. If that's a valuable route to go down, I can pursue further, but would prefer guidance on the right way to go before I start digging. Thanks!
 

Attachments

  • laugh_it_off.patch
    702 bytes · Views: 33
I hope I'm not being impatient, but... *bump*.

Any feedback? :) My hope is this is an easy one, as it's an incredibly simple patch. If there's a better/preferred way to do this, let me know, I'm happy to redo it appropriately.
 

StDoodle

Minion
Please keep in mind that I haven't yet dug far into KoLmafia's source, so I'm kind of talking out of my rectal cavity here, but.... it looks like you added the skill "Laugh It Off" as though it were an item. That doesn't seem quite correct. Also, there are additional considerations with this skill; it's the first non-passive (castable) skill that is only available in a specific path, so should it be presented in the list of restores on the HP / MP management pane? If so, how. As you mentioned, it also has a good degree of swing on its restoration; you'd ideally want to assume a higher-end range and continue restoring in "chunks" as you get close to your target HP.

Please don't take this as discouragement, but I feel there is likely a bit more to supporting this skill for restoration than this patch addresses.

Developers, please feel free to edit this post if I'm off base here.
 

roippi

Developer
He didn't add it as an item, that's just how the object is named.

There are other skills/items that have a variable range, and the built-in restoration generally assumes the pessimistic end of the range to minimize server hits. This tends to overshoot the restoration target, but usually not by too much. Unfortunately here it may overshoot by as much as 100%, which kind of sucks. I'm not in axecore at the moment so my ability to come up with a better solution is a bit limited.
 

Theraze

Active member
Yeah... unfortunately I think that LIO is better suited to recovery scripts than core support. And Bale's UR script does already use LIO, both to burn off additional mana if you need healing as well as considering whether, with mana restoration prices, it's the best option available...
 
He didn't add it as an item, that's just how the object is named.

There are other skills/items that have a variable range, and the built-in restoration generally assumes the pessimistic end of the range to minimize server hits. This tends to overshoot the restoration target, but usually not by too much. Unfortunately here it may overshoot by as much as 100%, which kind of sucks. I'm not in axecore at the moment so my ability to come up with a better solution is a bit limited.

Well, I could go down two routes - convert the healing counter to a float, or change it to two values, min and max, to allow for a more "true" representation of the healing - and then the appropriate changes to the actual recovery algs to match. Both of which are a *tad* more invasive, and thus a lot more work. So, wanted some feedback first before going down either route.

re: LIO being a path-only skill, and/or not suited to core support - shrug. I'm extremely new to KoLmafia, so have very little perspective as to what's appropriate or not. :) You guys tell me... My naive take was it's another healing skill, so it should be on the list - there are a ton of other healing skills that (for a given character) may or may not be available, that don't then drop off the list if they're not. If that is the better route, then feedback about how I should take a stab at reworking the list of healing skills would be greatly appreciated as well.
 
Top