boolean nemesis_Seal_Clubber()
{
// max muscle with a 2h-club
cli_execute( "muscle, 2 hand, type club" );
//Set up the numbers to work out how many wails to get from the pups
int pups_to_kill = 0;
int pups_killed = 0;
//This section checking for a shield is irrelevant with the 2 handed instruction above.
//I'm keeping it in to give you flexibility.
boolean is_shield( item it )
{
int[int] m;
file_to_map("itemdescs.txt", m);
return ( contains_text( visit_url("desc_item.php?whichitem=" + m[it.to_int()]) , "off-hand item (shield)" ) );
}
//Now the calculation for the mother's likely damage...
int damage_stat = my_buffedstat($stat[moxie]);
if( is_shield( equipped_item( $slot[off-hand] ) ) && have_skill( $skill[Hero of the Half-Shell] ) )
{
damage_stat = my_buffedstat($stat[muscle]);
}
int absorbFrac = damage_absorption_percent() / 100;
int [int] possible_mothers;
for i from 1 to 10
{
int diff = max( ((150*(1.385^(i)) + monster_level_adjustment()) - damage_stat ) , 0 );
possible_mothers[i] = (diff + ((150*(1.385^(i)) + monster_level_adjustment())/4) - damage_reduction()) * (1 - absorbFrac);
}
int x = 1;
while( x < 11 )
{
if( possible_mothers[x] < my_maxhp() )
x = x + 1;
else
{
pups_to_kill = x - 1;
x = 12;
}
}
if( !contains_text( visit_url( "volcanoisland.php?pwd=" + my_hash() + "&action=npc" ) , "you, my friend" )
&& !contains_text( visit_url( "volcanoisland.php?pwd=" + my_hash() + "&action=npc" ) , "pot of palm" )
&& !contains_text( visit_url( "volcanoisland.php?pwd=" + my_hash() + "&action=npc" ) , "Let's see what you've brought" )
{
//First of two macros. This one is a stasis macro to get the pups wailing.
string macroone;
macro += "if monstername Hellseal Pup";
macro += "call pup_stasis";
macro += "endif";
macro += "mark __yyendifjump0";
macro += "if monstername Mother Hellseal";
macro += "if hasskill 3004";
macro += "skill 3004";
macro += "endif";
macro += "mark __yyendifjump2";
macro += "endif";
macro += "mark __yyendifjump1";
macro += "call attack_routine";
macro += "sub pup_stasis";
macro += "while !match \"emits a high-pitched screeching wail\" && !pastround 27";
macro += "call infinite_use_item";
macro += "endwhile";
macro += "mark __yyendwhilejump0";
macro += "endsub";
macro += "sub attack_routine";
macro += "skill lunging thrust smack";
macro += "repeat";
macro += "endsub";
macro += "sub infinite_use_item";
macro += "if hascombatitem 1316";
macro += "use 1316";
macro += "goto __yyendifjump3";
macro += "endif";
macro += "if hascombatitem 8";
macro += "use 8";
macro += "goto __yyendifjump3";
macro += "endif";
macro += "if hascombatitem 2";
macro += "use 2";
macro += "goto __yyendifjump3";
macro += "endif";
macro += "if hascombatitem 2678";
macro += "use 2678";
macro += "goto __yyendifjump3";
macro += "endif";
macro += "if hascombatitem 536";
macro += "use 536";
macro += "goto __yyendifjump3";
macro += "endif";
macro += "if hascombatitem 185";
macro += "use 185";
macro += "goto __yyendifjump3";
macro += "endif";
macro += "abort \"No infinite use items detected!\"";
macro += "mark __yyendifjump3";
macro += "endsub";
while( pups_killed < pups_to_kill )
{
adventure( 1 , $location[The Broodling Grounds] , macroone );
if( last_monster() == $monster[hellseal pup] )
pups_killed = pups_killed + 1;
}
//The second macro tries to use CLEESH on the second pup to completely avoid the problem of an extra wail.
//If someone lacks CLEESH, it simply uses lunging thrust smack as that's likely to OHKO anyway.
string macrotwo;
macro += "if monstername Hellseal Pup";
macro += "if hasskill 15";
macro += "skill 15";
macro += "endif";
macro += "mark __yyendifjump1";
macro += "endif";
macro += "mark __yyendifjump0";
macro += "if monstername Mother Hellseal";
macro += "if hasskill 3004";
macro += "skill 3004";
macro += "endif";
macro += "mark __yyendifjump3";
macro += "endif";
macro += "mark __yyendifjump2";
macro += "call attack_routine";
macro += "sub attack_routine";
macro += "skill lunging thrust smack";
macro += "repeat";
macro += "endsub";
while( item_amount( $item[hellseal brain] ) < 6 && item_amount( $item[hellseal sinew] ) < 6 && item_amount( $item[hellseal hide] ) < 6 )
adventure( 1 , $location[The Broodling Grounds] , macrotwo );
visit_url( "volcanoisland.php?pwd=" + my_hash() + "&action=npc" );
}
else print( "You have already killed enough mother hellseals. Go fight in the dark cave!" );
}