I can also have an /autoattack that doesn't finish the fight, after which mafia's ccs can take over.
Originally Posted by
xKiv
Yes, and there is funky code in FightRequest.updateCombatData:
Code:
// We've started a new round
++FightRequest.currentRound;
// Sanity check: compare our round with what KoL claims it is
Matcher m = ONTURN_PATTERN.matcher( responseText );
if ( m.find() )
{
int round = StringUtilities.parseInt( m.group(1) );
if ( round != FightRequest.currentRound )
{
RequestLogger.printLine( "KoLmafia thinks it is round " + FightRequest.currentRound + " but KoL thinks it is round " + round );
}
}
// *** This doesn't seem right, but is currently necessary for
// *** CCS scripts to behave correctly. FIX
if ( autoAttacked )
{
++FightRequest.preparatoryRounds;
++FightRequest.currentRound;
}
Considering that I want to add a line following the "KoLmafia thinks it is round x" message:
Code:
// Synchronize with KoL
FightRequest.currentRound = round;
in order to show the line ONCE - which is useful for spading, actually, in that it tells you that you just did something which did not actually advance the round number. But seeing it for all the rest of the rounds in the fight is not useful.
I will investigate exactly what autoattack does to the round number and see if I can "FIX" this.