Bug - Fixed Incorrect tracking of smile of Mr.A casts

matt.chugg

Moderator
KoLmafia doesn't seem to track casts correctly, only noticed as Guide was telling me I still had 3 casts left, and I knew i'd used them.

I'd case a single smile first, then i'd cast 4 together, but mafia only tracked this as 2 casts. I suspect if i'd cast a single, then a 2 and then another 2 mafia would have tracked it as 3

> ash get_property("_smilesOfMrA")

Returned: 2

If anyone else can confirm that would be helpful, if not i'll do the same, after rollover, with debug mode on in case the html has changed
 
Last edited:

matt.chugg

Moderator
Try r14194 - It was incrementing by 1 each time, not be the number of casts.

Tried again today using 14199 and the problem still exists, smiled a single time, then cast 2, then cast 2 again checking the property in between, which should then have been 1,3,5 not 1,2,3



> ash get_property("_smilesOfMrA")

Returned: 1

> ash get_property("_smilesOfMrA")

Returned: 2

> ash get_property("_smilesOfMrA")

Returned: 3

Will redo tomorrow again as only have partial debug, and it has pages and pages of posts to and from relay_guide.ash
 

Darzil

Developer
Hmm. In the session log, does it have "cast X Smile of Mr A", and if so, is X the number you actually cast or 1 ?

Edit - I'm guessing 1. Mafia does some sanity checking on cast strings, and if you can't cast as many as you ask for, it reduces the number to the number possible. However, for 0 MP cost spells it always sets it to 1! So you do cast 2 Smile of Mr A, it turns it into cast 1 on register, and works from that. Will have to rewrite getCount() to do something else with 0 MP cost spells.
 
Last edited:

matt.chugg

Moderator
Sorted. Thanks.

Guide doesn't seem to auto-refresh like it does with other properties, but I think that's a Guide bug, KoLmafia's property is tracking correctly now.
 
Top