Feature Track anger for Mother Hellseal

Bale

Minion
It would be awesome if KoLmafia kept track of how many times the hellseal pup was injured and in combat you see, "The little hellseal gives you an aggrieved look, raises its head, and emits a high-pitched screeching wail. You hear a loud growling noise somewhere nearby. Uh-oh."

Then _hellsealCries would be incremented by 1.
If the character loses a fight to a mother hellseal then _hellsealCries would be decremented by 1.

That alone would help me. For extra credit it would be an additional level of awesome if the stats for the mother hellseal reflect this information. There's a chart for this on the wiki HERE.
 
For info, here is how nemesis.ash tracks Mother hellseal level:

Basically, this checks how much damage the Mother Hellseal inflicted on you, and compares it to the theoretical maximum damage done by Mother Hellseals of different levels, until it finds the right level.

The speculate part of mother_damage() is because it's used when choosing which club to use, but that could be simplified in this context.
PHP:
float mother_damage( int mother_level, item wpn )
{
	cli_execute( "speculate equip " + wpn + "; quiet;" );

	float mox = numeric_modifier( "_spec", "Buffed Moxie" ) ;

	// calculate monster attack
	float basemonatt = 150 * 1.385 ** mother_level ;
	float ml = numeric_modifier( "_spec", "Monster Level" );
	float monatt = basemonatt + ml + min( 5, floor( basemonatt * 0.05 ) );

	// calculate base damage
	float dam = max( 0, monatt - mox ) + monatt * 0.25 - numeric_modifier( "_spec", "Damage Reduction" );

	// calculate damage after damage absorbtion
	float da = numeric_modifier( "_spec", "Damage Absorption" );
	float absfrac = min( 0.9, max( 0, ( square_root( da / 10.0 ) - 1.0 ) / 10.0 ) );
	dam = dam * ( 1.0 - absfrac );

	vprint( "Level " + mother_level + " Mother damage with a " + wpn + ": " + dam, 10 );
	return dam;
}
float mother_damage( int mother_level ) { return mother_damage( mother_level, equipped_item( $slot[ weapon ] ) ); }

// track mother level
int current_mother_level = 1;
int parse_mother_level( string page )
{
	matcher damage_matcher = create_matcher( "You lose (\\d[\\d,]*) hit points", page );
	if ( !damage_matcher.find() ) return current_mother_level;
	int damage = damage_matcher.group( 1 ).to_int();

	for i from 1 to 10
	{
		if ( damage > mother_damage( i ) ) continue;
		return i;
	}
	return current_mother_level;
}

(...)

string page = visit_url( "volcanoisland.php?action=tuba" );

(...)

// We are fighting a mother. Deduce the level from the first hit.
current_mother_level = parse_mother_level( page );
 
I'm not sure we need to do anything so fancy as to convert damage into estimated ML.

Of course.. there is the problem of what is essentially "open loop feedback" with the counting cries method - if lag eats the page where the seal cries out, _hellsealCries will always be off by at least 1. So maybe I take that back and there is merit to slyz' method.
 
I'm not sure we need to do anything so fancy as to convert damage into estimated ML.
It's a fairly easy way of making sure that Mafia isn't out of synch (which could happen if you adventure outside of Mafia, or if lag eats the seal crying out). And it has one advantage over checking the stats gain : you get hit at every fight, but you don't always win the fight.
 
You can avoid getting hit for the early fights, right? You could potentially check both, not that it's necessarily a good idea.
 
Mother hellseal tracking

It would be nice if KoLmafia remembers how many mother hellseals were called (= how many hellseal pups cried out) every day. Something like _motherHellsealsCalled.

According to KoLwiki, KoL's internal counter behaves like this:

* Increases each time a hellseal pup cries out
* Decreases whenever you lose or run away from a mother hellseal
* Resets on rollover

The in-game message for hellseal pup crying out is: "The little hellseal gives you an aggrieved look, raises its head, and emits a high-pitched screeching wail. You hear a loud growling noise somewhere nearby. Uh-oh."
 
Huh, didn't know this thread existed. I could swear I couldn't find any when I searched for similar threads. Thanks, bale.
 
I see an additional incentive to implement slyz's method: if mafia develops the ability to estimate ML based on damage taken, that could be useful for any monster with unknown stats. So if you enter combat against an Unknown Whatchamacallit (at which point $monster[unknown whatchamacallit] is valid anyway), the moment you take damage mafia sets its stats to an appropriate estimate, giving consult scripts a much better idea how to defeat it.

Could also be used to find incorrect ML information, like when the Dungeons of Doom monsters were made tougher.

I'm just saying, this could have handy applications outside of just mother hellseals.
 
Back
Top