Bug Beaten Up and HP restore error

r11176
When beaten up is detected, KoLmafia removes that status effect with Tongue of the Otter, but does not restore HP. HP restore is set to "when <50%, restore to 100%." Tongue of the Otter only restores <1% of character's HP.
 

Theraze

Active member
Do you have Tongue of the Otter checked as an allowed restoration method? Removing malignant effects and HP restoration are two completely unrelated parts of mafia.
 

slyz

Developer
Could you post some gCLI output of when Mafia fails to restore your HP? Could you also post the result of typing
Code:
get hpAutoRecoveryItems
in the gCLI?
 
Do you have Tongue of the Otter checked as an allowed restoration method? Removing malignant effects and HP restoration are two completely unrelated parts of mafia.
It is, but so is Cocoon, the clan Hot Tub, and many other HP restorers. The old behavior was it would clear status effects then do HP restore if conditions were met. The conditions should have been met, but no HP restoration was done.

Looking through the logs, it looks like something bad happens after a "burn MP" call while beaten up.
1) Beaten Up makes MP near Max
2) Burn MP called before removing bad status
3) Not enough MP to call both Tongue and Cocoon?
4) Buys MP restore, uses MP restore, but only casts Tongue.
5) Looping nearly instant deaths. Not sure why HP restore stops being called.

If burn MP is NOT called, this does not seem to happen. This sequence of events happened twice to produce the same result. Key seems to be needing to do an MP restore in the middle.

Could you post some gCLI output of when Mafia fails to restore your HP? Could you also post the result of typing
Code:
get hpAutoRecoveryItems
in the gCLI?
From the logs:
Code:
[369035] A Super-Intense Mega-Grassfire
Encounter: snakefire in the grassfire
Round 0: misspolka wins initiative!
Round 0: misspolka tries to steal an item! (auto-attack)
You lose 220 hit points
Round 2: misspolka executes a macro!
Round 2: misspolka attacks!
You lose 73 hit points
Round 3: misspolka attacks!
You lose 77 hit points

cast 23 Summon Resolutions
You acquire an item: resolution: be wealthier
You acquire an item: resolution: be smarter
You acquire an item: resolution: be feistier
You acquire an item: resolution: be wealthier
You acquire an item: resolution: be feistier
You acquire an item: resolution: be smarter
You acquire an item: resolution: be stronger
You acquire an item: resolution: be kinder
You acquire an item: resolution: be luckier
You acquire an item: resolution: be feistier
You acquire an item: resolution: be sexier
You acquire an item: resolution: be stronger
You acquire an item: resolution: be feistier
You acquire an item: resolution: be stronger
You acquire an item: resolution: be feistier
You acquire an item: resolution: be sexier
You acquire an item: resolution: be smarter
You acquire an item: resolution: be smarter
You acquire an item: resolution: be happier
You acquire an item: resolution: be sexier
You acquire an item: resolution: be stronger
You acquire an item: resolution: be happier
You acquire an item: resolution: be wealthier

cast 1 Tongue of the Otter
You gain 16 hit points
You lose an effect: Beaten Up

buy 30 magical mystery juice for 100 each from Gouda's Grimoire and Grocery
You acquire magical mystery juice (30)
You spent 3,000 Meat

use 12 magical mystery juice
You gain 1,071 Mojo Points

[369036] A Super-Intense Mega-Grassfire
Encounter: snakefire in the grassfire
Round 0: misspolka wins initiative!
Round 0: misspolka tries to steal an item! (auto-attack)
You lose 72 hit points

cast 1 Tongue of the Otter
You gain 17 hit points
You lose an effect: Beaten Up

[369037] A Super-Intense Mega-Grassfire
Encounter: snakefire in the grassfire
Round 0: misspolka wins initiative!
Round 0: misspolka tries to steal an item! (auto-attack)
You lose 213 hit points

cast 1 Tongue of the Otter
You gain 17 hit points
You lose an effect: Beaten Up

[369038] A Super-Intense Mega-Grassfire
Encounter: snakefire in the grassfire
Round 0: misspolka wins initiative!
Round 0: misspolka tries to steal an item! (auto-attack)
You lose 67 hit points

cast 1 Tongue of the Otter
You gain 14 hit points
You lose an effect: Beaten Up
Code:
> get hpAutoRecoveryItems

scroll of drastic healing;cannelloni cocoon;visit the nuns;relaxing hot tub;tongue of the walrus;lasagna bandages;doc galaktik's ailment ointment
 
r11181

Just happened again. This time, it happened without calling MP restore or burn MP.
I did not see this while testing. While testing, I was doing 10-adv autoadventure blocks. I saw times where Beaten Up was properly removed and Cocoon was cast right after.

This occurred during a 100-adv autoadventure block. Not sure if that makes any difference as that was the only variable that was changed.

I wonder...maybe there is some interaction with calling an inbetween script. I have posted my inbetween script below the log.

Code:
[370461] Super-Intense Mega-Grassfire
Encounter: snakefire in the grassfire
Round 0: misspolka wins initiative!
Round 0: misspolka tries to steal an item! (auto-attack)
Round 2: misspolka executes a macro!
Round 2: misspolka attacks!
You lose 58 hit points
Round 3: misspolka attacks!
You lose 56 hit points
Round 4: misspolka attacks!
You lose 52 hit points
Round 5: misspolka attacks!
You lose 52 hit points
Round 6: misspolka attacks!
Round 7: misspolka attacks!
You lose 54 hit points
Round 8: misspolka attacks!
Round 9: misspolka attacks!
You lose 55 hit points
Round 10: misspolka attacks!
You lose 55 hit points
Round 11: misspolka attacks!
Round 12: misspolka wins the fight!
You acquire an item: FDKOL commendation (4)
You gain 7 Strongness
You gain 22 Enchantedness
You gain 33 Roguishness

[370462] Super-Intense Mega-Grassfire
Encounter: snakefire in the grassfire
Round 0: misspolka wins initiative!
Round 0: misspolka tries to steal an item! (auto-attack)
You lose 53 hit points

cast 1 Tongue of the Otter
You gain 19 hit points
You lose an effect: Beaten Up

[370463] Super-Intense Mega-Grassfire
Encounter: snakefire in the grassfire
Round 0: misspolka wins initiative!
Round 0: misspolka tries to steal an item! (auto-attack)
Round 2: misspolka executes a macro!
Round 2: misspolka attacks!
Round 3: misspolka attacks!
You lose 60 hit points

cast 1 Tongue of the Otter
You gain 14 hit points
You lose an effect: Beaten Up

[370464] Super-Intense Mega-Grassfire
Encounter: snakefire in the grassfire
Round 0: misspolka wins initiative!
Round 0: misspolka tries to steal an item! (auto-attack)
Round 2: misspolka executes a macro!
Round 2: misspolka attacks!
You lose 53 hit points

cast 1 Tongue of the Otter
You gain 18 hit points
You lose an effect: Beaten Up

[370465] Super-Intense Mega-Grassfire
Encounter: snakefire in the grassfire
Round 0: misspolka wins initiative!
Round 0: misspolka tries to steal an item! (auto-attack)
You acquire an item: smoking grass
You lose 53 hit points
Code:
script "LLCBetweenAdv.ash";

void doBetweenStuff()
{
    if (in_hardcore()==true) {
        return;
    }
    int mpLimit=0;
    switch (my_name())
    {
        case "misspolka":
	        mpLimit = to_int(to_float(my_maxmp()) * 0.90);
	        if (my_mp() > mpLimit) cli_execute("cast * summon resolutions");
//	        if (my_mp() > mpLimit) cli_execute("cast * summon love song");
	        break;
	    case "luvluvchef":
	        mpLimit = to_int(to_float(my_maxmp()) * 0.90);
	        if (my_mp() > mpLimit) cli_execute("cast * summon resolutions");
//	        if (my_mp() > mpLimit) cli_execute("cast * summon candy heart");
	        break;
        default:
	        mpLimit = to_int(to_float(my_maxmp()) * 0.90);
	        if (my_mp() > mpLimit) cli_execute("cast * summon bricko");
	        break;
    }
    return;
}
	
void main() { doBetweenStuff();}
 

Theraze

Active member
Well, mafia won't heal you when before/after scripts run... but that should only affect you if you have scripts that are actually starting adventures on their own. I manually added restoration to both of mine because I was tired of Dolphin Thieves beating me up. :) But... nothing in THAT script quoted starts combats or otherwise should affect HP...
 

slyz

Developer
There isn't any error/abort, that's strange. Could you paste here the result of typing
Code:
get hpAutoRecovery
and
Code:
get hpAutoRecoveryTarget
?
 
Code:
> get hpAutoRecovery

0.1

> get hpAutoRecoveryTarget

1.0
hpAutoRecovery has been set as high as 0.5 and still shown this behavior. I set it down to 0.1 for testing, which also showed this behavior.


Theraze, it did this when I was just doing Autoadventure manually. Enter 100 adventures and hit begin.
 

Theraze

Active member
For curiosity's sake, what does this return:
Code:
get recoveryScript
If you have a rS that's hijacking mafia's control...
 
Running adventures 20 at a time seems to be okay. Today, got beaten up 31 times and bug behavior did not surface. Bug behavior has appeared when adventures are set to 100+. Could this be some strange race condition? Will keep trying to replicate more instances.
 
r11186
I think I know why it seems to only affect long turn burns. I think it has to do with calling a counter counting script in the middle of the turn burn. This could "taint" KoLmafia somehow (return value?) and disables KoLmafia's restore HP/MP logic. I'm using CounterChecker.ash (v.1.27) by Bale.

This has not happened to my main, who does have a RestoreScript. So, the work-around, ironically, is to have a RestoreScript.

From the gCLI:
Code:
Request 5 of 73 (Events: Super-Intense Mega-Grassfire) in progress...
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
Countdown: 3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting completed.
Checking counters now.

Visit to Dungeon: Limerick Dungeon in progress...

[371190] Limerick Dungeon
Encounter: The Bleary-Eyed Cyclops
You acquire an item: cyclops eyedrops

If I ate even a fortune cookie I'd burst! Remember to eat a fortune cookie when the tummy is emptier.

[371191] Super-Intense Mega-Grassfire
Encounter: snakefire in the grassfire
Strategy: /Users/anthony/Library/Application Support/KoLmafia/ccs/farm-at.ccs [default]
Round 0: misspolka wins initiative!
Round 0: misspolka tries to steal an item! (auto-attack)
You lose 75 hit points
Round 2: misspolka executes a macro!
Round 2: misspolka attacks!
KoLmafia thinks it is round 3 but KoL thinks it is round 2
You lose 75 hit points
Round 3: misspolka attacks!
You lose 72 hit points
Round 4: misspolka attacks!
You lose 73 hit points
Round 5: misspolka attacks!
You lose 66 hit points
Round 6: misspolka attacks!
You lose 71 hit points
Round 7: misspolka attacks!
You lose 77 hit points
Round 8: misspolka attacks!
You lose 74 hit points
Round 9: misspolka attacks!
You lose 209 hit points

Beaten Up will be removed by skill Tongue of the Otter...
Casting Tongue of the Otter 1 times...
You gain 19 hit points
You lose an effect: Beaten Up
Tongue of the Otter was successfully cast.

Request 6 of 73 (Events: Super-Intense Mega-Grassfire) in progress...

[371192] Super-Intense Mega-Grassfire
Encounter: snakefire in the grassfire
Strategy: /Users/anthony/Library/Application Support/KoLmafia/ccs/farm-at.ccs [default]
Round 0: misspolka wins initiative!
Round 0: misspolka tries to steal an item! (auto-attack)
You lose 76 hit points

Beaten Up will be removed by skill Tongue of the Otter...
Casting Tongue of the Otter 1 times...
You gain 14 hit points
You lose an effect: Beaten Up
Tongue of the Otter was successfully cast.

Request 7 of 73 (Events: Super-Intense Mega-Grassfire) in progress...

[371193] Super-Intense Mega-Grassfire
Encounter: snakefire in the grassfire
Strategy: /Users/anthony/Library/Application Support/KoLmafia/ccs/farm-at.ccs [default]
Round 0: misspolka wins initiative!
Round 0: misspolka tries to steal an item! (auto-attack)
You lose 72 hit points
 
Fix. It was an issue with the old CounterChecker script and masked by not being beaten up in a long time without a recovery script.
 
Ug... spoke too soon.

r11191

Not sure why it's sporadic. Set KoLmafia to 340 turns. At turn 317, CounterCheck triggered, successfully nabbing a semirare. At 322, I get beaten up, and again, HP restore does not trigger.

Question: Should KoLmafia be able to restore HP after calling a script without a restoration script? Or should I just add a restore script and call it done?

Code:
Request 322 of 340 (Events: Super-Intense Mega-Grassfire) in progress...

[371927] Super-Intense Mega-Grassfire
Encounter: snakefire in the grassfire
Strategy: /Users/anthony/Library/Application Support/KoLmafia/ccs/farm-at.ccs [default]
Round 0: misspolka wins initiative!
Round 0: misspolka tries to steal an item! (auto-attack)
You acquire an item: smoking grass
You lose 40 hit points
Round 2: misspolka executes a macro!
Round 2: misspolka attacks!
KoLmafia thinks it is round 3 but KoL thinks it is round 2
You lose 42 hit points

Beaten Up will be removed by skill Tongue of the Otter...
Casting Tongue of the Otter 1 times...
You gain 15 hit points
You lose an effect: Beaten Up
Tongue of the Otter was successfully cast.

Request 323 of 340 (Events: Super-Intense Mega-Grassfire) in progress...

[371928] Super-Intense Mega-Grassfire
Encounter: snakefire in the grassfire
Strategy: /Users/anthony/Library/Application Support/KoLmafia/ccs/farm-at.ccs [default]
Round 0: misspolka wins initiative!
Round 0: misspolka tries to steal an item! (auto-attack)
You lose 36 hit points

Beaten Up will be removed by skill Tongue of the Otter...
Casting Tongue of the Otter 1 times...
You gain 20 hit points
You lose an effect: Beaten Up
Tongue of the Otter was successfully cast.

Request 324 of 340 (Events: Super-Intense Mega-Grassfire) in progress...

[371929] Super-Intense Mega-Grassfire
Encounter: snakefire in the grassfire
Strategy: /Users/anthony/Library/Application Support/KoLmafia/ccs/farm-at.ccs [default]
Round 0: misspolka wins initiative!
Round 0: misspolka tries to steal an item! (auto-attack)
You lose 40 hit points

Beaten Up will be removed by skill Tongue of the Otter...
Casting Tongue of the Otter 1 times...
You gain 12 hit points
You lose an effect: Beaten Up
Tongue of the Otter was successfully cast.
 

Theraze

Active member
Again, for curiosity's sake... what's your max hp? Any chance you're running moxie high, hp low and the otter is enough to get you past the 10% you quoted from restoration settings earlier? Unlikely, but... Not sure what else really makes sense for why this would be happening for you. :(
 
Again, for curiosity's sake... what's your max hp? Any chance you're running moxie high, hp low and the otter is enough to get you past the 10% you quoted from restoration settings earlier? Unlikely, but... Not sure what else really makes sense for why this would be happening for you. :(
I wish... around 3000 HP so impossible for Otter to restore up to 10%.
 
Top