boolean restore_hp( int ) will pass on the int to your recoveryScript if you have one. However, before calling your recoveryScript, it will call MoodManager.removeMalignantEffects() if the "removeMalignantEffects" property is true.
If you do have "removeMalignantEffects" set to true, and if you have turns of Beaten Up, maybe it is MoodManager.removeMalignantEffects() that is trying to use a tiny house?
Looking at the code in MoodManager.getDefaultAction (which will return to removeMalignantEffects() the CLI command to execute), in the case of Beaten Up, tinyHouseClearable will be true and "use 1 tiny house" will be returned (and executed) if these conditions are met:
Code:
if ( tinyHouseClearable && ( KoLCharacter.canInteract() || InventoryManager.hasItem( UneffectRequest.TINY_HOUSE ) ) )
{
return "use 1 tiny house";
}
I tested this with my multi (my main has Tongue of the Walrus): I had 0 hp and 0 meat on hand, hp_autoheal was set to 10%, and I had turns of "Beaten Up".
Code:
> get autoSatisfyWithMall
true
> get removeMalignantEffects
true
> ash restore_hp(0);
Searching for "tiny house"...
Desired purchase quantity not reached (wanted 1, got 0)
Using cached search results for tiny house...
Desired purchase quantity not reached (wanted 1, got 0)
You need 1 more tiny house to continue.
Autorecovery failed.
Returned: false
> set autoSatisfyWithMall = false
autoSatisfyWithMall => false
> ash restore_hp(0);
You need 1 more tiny house to continue.
Autorecovery failed.
Whether autoSatisfyWithMall is set to true or false, Mafia stopped after "use 1 tiny house" failed, and UR was never called (so baleUr_HPTrouble wasn't set to true).
Code:
> set removeMalignantEffects = false
removeMalignantEffects => false
> ash restore_hp(50);
Purchasing some palm-frond fans for use as a combat restorative.
Searching for "palm-frond fan"...
Desired purchase quantity not reached (wanted 3, got 0)
You've had the crap beaten out of you... attempting to find some more crap.
Searching for "soft green echo eyedrop antidote"...
Running out of meat! Time to take some out of the closet...
> get baleUr_HPTrouble
false
Requests complete.
Even with "removeMalignantEffects" set to false, in aftercore with 0 meat on hand, I ran into the abort() in use_mall(), so baleUr_HPTrouble wasn't set to true. This shouldn't happen in-run though.
That was kind of long-winded, but I think that the simplest solution would be to set "removeMalignantEffects" to false in-run.