I had been thinking about that recently. It would also mean another setting (off by default?) to decide whether to run your mood while using pvp fights.
I'd rather let the computer figure that out for me
decide whether to run your mood while using pvp fights.
I had been thinking about that recently. It would also mean another setting (off by default?) to decide whether to run your mood while using pvp fights.
I don't necessarily see why a separate preference is needed. PVP burns turns of buffs just like an adventure, I think we should treat it just like adventuring.
Just like you do when you adventure ^^Obviously this would mean I'd need to work-around this by setting my mood to apathetic while PvPing to prevent that.
NO NO NO NO!
That would be very bad for me. When I'm in hardcore and using PvP to burn off the last 10 turns of "On the Trail" it might also burn off my last 2 turns of "Leash of Linguinini". If it immediately recast Leash, then it would waste 8 turns of the buff while I was PvPing. I'd much rather cast Leash when I'm done with PvP.
Obviously this would mean I'd need to work-around this by setting my mood to apathetic while PvPing to prevent that. However it would be much too easy to forget to turn off my mood whenever I PvP in hardcore and then turn it back on again.
Please don't do this to me.
KoLmafia.executeBeforePVPScript();
if ( !can_interact() )
exit;
int attacks = pvp_attacks_left();
if ( attacks == 0 )
exit;
string PVPoutfit = "PVP fights";
if ( have_outfit( PVPoutfit) && !is_wearing_outfit( PVPoutfit ) )
outfit( PVPoutfit );
boolean [ effect ] PVPeffects = $effects[
... your effects here ...
];
int keep = 0;
foreach eff in PVPeffects {
int left = have_effect( eff );
if ( left <= keep ) {
print( "Effect: " + eff + " has only " + left + " turns remaining" );
cli_execute( "up " + eff );
}
}
if ( attacks <= ( 10 - keep ) && have_effect( $effect[ Starry Eyed ] ) == 0 )
cli_execute( "telescope look high" );
... any other one-per-day effects here ...
It would be nice to track PVP Fights gained from consumption or the Goth Kid, presumably by modifying the ResultProcessor to detect them. But we also need to get PVP Fights left at login, and it's not in api.php, yet, near as I can tell. I submitted a bug report asking for that.