Bug - Fixed KoL "Auto-Attack" vs Mafia

fredg1

Member
When defeating a Sausage Goblin with KoL's Auto attack (combat options), Mafia does not update _sausageFights nor _lastSausageMonsterTurn.
Pretty sure the sausage goblin isn't related to the problem, but it's the only one so far that could "highlight" it.

What the auto attack was set to didn't seem to matter (normal attack, saucegeyser).

Happened in Dreadsylvania, in case it's relevant (not using aa elsewhere).
 

lostcalpolydude

Developer
Staff member
I'm using KoL's auto-attack, and both of those settings are updating properly for me. So it looks like more details will be needed.
 

fredg1

Member
[20338] Dreadsylvanian Village
Encounter: sausage goblin
Round 0: fredg1 wins initiative!
Round 0: fredg1 casts SAUCEGEYSER! (auto-attack)
Round 1: Tollace is looking a little thin.
Round 1: sausage goblin takes 16790 damage.
Round 1: fredg1 wins the fight!
You gain 100 Meat
After Battle: Tollace hops around, dancing a jig accompanied by wet squelching noises.
You acquire an item: magical sausage casing
After Battle: You gain 260 Beefiness
After Battle: You gain 267 Wizardliness
After Battle: You gain 587 Cheek
You gain a Moxie point!
This combat did not cost a turn

> set _lastSausageMonsterTurn=147,161

_lastSausageMonsterTurn => 147,161

> set _sausageFights=8

_sausageFights => 8

[...]

[20346] Dreadsylvanian Village
Encounter: sausage goblin
Round 0: fredg1 wins initiative!
Round 0: fredg1 casts SAUCEGEYSER! (auto-attack)
Round 1: Tollace is looking a little thin.
Round 1: sausage goblin takes 8388 damage.
Round 1: fredg1 wins the fight!
You gain 117 Meat
After Battle: Tollace hops around, dancing a jig accompanied by wet squelching noises.
You acquire an item: magical sausage casing
After Battle: You gain 267 Strengthliness
After Battle: You gain 251 Mysteriousness
You gain a Mysticality point!
After Battle: You gain 599 Roguishness
This combat did not cost a turn

> get _lastSausageMonsterTurn

147,161

> get _sausageFights

8

> ash total_turns_played()

Returned: 147169

> set _lastSausageMonsterTurn=147,169

_lastSausageMonsterTurn => 147,169

> set _sausageFights=9

_sausageFights => 9

[...]

[20361] Dreadsylvanian Village
Encounter: sausage goblin
Round 0: fredg1 wins initiative!
Round 0: fredg1 casts SAUCEGEYSER! (auto-attack)
Round 1: Tollace is looking a little thin.
Round 1: sausage goblin takes 8412 damage.
Round 1: fredg1 wins the fight!
You gain 120 Meat
After Battle: Tollace hops around, dancing a jig accompanied by wet squelching noises.
You acquire an item: magical sausage casing
After Battle: You gain 302 Muscleboundness
After Battle: You gain 260 Enchantedness
After Battle: You gain 549 Cheek
This combat did not cost a turn

> ash total_turns_played()

Returned: 147184

> get _lastSausageMonsterTurn

147,169

> get _sausageFights

9
 

fredg1

Member
Yes.

Something to remember is that those two values are normally updated as SOON as the fight starts, NOT at the end.
 

Veracity

Developer
Staff member
Looks like it always gets killed by the autoattack. Can you get a debug log for such a fight, please?

Check Preferences -> General -> Extra Debugging -> Log cleaned HTML tree of fight pages
debug on

When such a fight occurs

debug off

Look in the DBEUG log. I want to see everything from:

Code:
class net.sourceforge.kolmafia.request.RelayRequest
Connecting to fight.php...

Requesting: https://www.kingdomofloathing.com/fight.php?ireallymeanit=xxxxxxxx
to:

Code:
Parsing result: You gain 31 Strengthliness
After Battle: You gain 31 Strengthliness
Processing result:  Substats: 31 / 0 / 0
Parsing result: You gain 66 Wizardliness
After Battle: You gain 66 Wizardliness
Processing result:  Substats: 0 / 66 / 0
Parsing result: You gain 29 Sarcasm
After Battle: You gain 29 Sarcasm
Processing result:  Substats: 0 / 0 / 29
This combat did not cost a turn
 

Darzil

Developer
If autoattack kills, is current round not 1 ?

Code:
// First round quest update
		if ( FightRequest.currentRound == 1 )
		{
			QuestManager.updateQuestFightStarted( responseText, monsterName );
		}
 

Veracity

Developer
Staff member
Yes, that is exactly the problem.

We do round 0 stuff.
We increment the round to 1 and process what happened.
We see WINWINWIN and set the round to 0 and do end of battle stuff.
THEN we do that check you cited.

I moved that call into the Round 0 section. I tested with a sausage golem and it worked fine.

Monsters in the QuestManager method that would have similarly not worked, had your autoattack killed the monster:

The demon version of your Nemesis (quest tracking) (as if you could kill it with auto-attack)
The Cake Lord (quest tracking)
GNG-R-3 (removing gingerservo)
X-32-F Combat Training Snowman (counting parts)
sausage goblin (preferences)
vote monsters (preferences and counters)

Revision 19463
 
Top