Bug - Fixed Doesn't recognize failure to switch familiar while in a choice adventure

Terion

Member
That title is a bit convoluted, but I think it's still accurate. I was in the Spooky Forest working to open the Hidden Temple; I found this when I tried to change from my BBBugbear to my Disembodied Hand (which was holding my comedy prop) in the middle of the Arboreal Respite choice tree. Mafia thinks the familiar was switched, so when I finished the choice series and went to the next adventure, it threw up the 100% warning because it thought I was using the Hand (I was actually still using the BBBugbear.)

First two trials were under r9769, third was after updating to r9782; same outcome in all tests.

CLI from the first time, when I attempted the switch via /fam in the chat:
Code:
[614] Spooky Forest
Encounter: Arboreal Respite
Encounter: Through Thicket and Thinnet
You get more familiar with Don't Bite, your Disembodied Hand.
Encounter: O Lith, Mon
You acquire an item: Spooky Temple map
Adjusting familiar weight by 19 pounds

Second time, attempting the switch via familiar command in CLI:
Code:
[616] Spooky Forest
Encounter: Arboreal Respite
Encounter: Through Thicket and Thinnet

> familiar disembodied hand

Putting 20 GOTO 20 the Baby Bugged Bugbear back into terrarium...
Taking Don't Bite the Disembodied Hand out of terrarium...
Requests complete.

You acquire an item: Spooky-Gro fertilizer

And third time, after I updated to 9782, swap attempt through CLI:
Code:
[621] Spooky Forest
Encounter: Arboreal Respite
Encounter: Through Thicket and Thinnet

> fam disemb

Putting 20 GOTO 20 the Baby Bugged Bugbear back into terrarium...
Taking Don't Bite the Disembodied Hand out of terrarium...
Requests complete.

You acquire an item: Spooky-Gro fertilizer
Adjusting familiar weight by 19 pounds

Text result from chat when /fam is attempted mid-choice adventure:
Code:
You get more familiar with Don't Bite, your Disembodied Hand.
Oops! Sorry, Dave, you appear to be in a choice adventure.
 

slyz

Developer
It looks like FamiliarRequest.registerRequest() is responsible for changing Mafia's idea of your current familiar, and it does so based only the URL that was submitted, without checking the response text.

The easiest fix would be to unallow familiar switching while you are adventuring (since the same problem arises when trying to switch familiar during a fight).

For reference, when in a choice adventure:
Code:
> familiar hobo monkey

Putting Gobert the Pair of Stomping Boots back into terrarium...
Taking Ultralord of the Hobo Jungle the Hobo Monkey out of terrarium...
class net.sourceforge.kolmafia.request.FamiliarRequest
Connecting to familiar.php...

Requesting: http://www7.kingdomofloathing.com/familiar.php?action=newfam&newfam=89&ajax=1
3 request properties

Field: Cookie = [PHPSESSID=*snip*]
Field: User-Agent = [KoLmafia v14.7]
Field: Content-Type = [application/x-www-form-urlencoded]

Retrieving server reply...

Retrieved: http://www7.kingdomofloathing.com/familiar.php?action=newfam&newfam=89&ajax=1

10 header fields
Field: null = [HTTP/1.1 200 OK]
Field: Date = [Tue, 13 Sep 2011 11:14:25 GMT]
Field: Content-Length = [24]
Field: Expires = [Thu, 19 Nov 1981 08:52:00 GMT]
Field: Connection = [close]
Field: Content-Type = [text/html; charset=UTF-8]
Field: Server = [Apache/2.2.3 (CentOS)]
Field: X-Powered-By = [PHP/5.1.6]
Field: Cache-Control = [no-store, no-cache, must-revalidate, post-check=0, pre-check=0]
Field: Pragma = [no-cache]

no|in a choice adventure
Processing results...
Requests complete.
and when in a fight:
Code:
> familiar hobo monkey

Putting Gobert the Pair of Stomping Boots back into terrarium...
Taking Ultralord of the Hobo Jungle the Hobo Monkey out of terrarium...
class net.sourceforge.kolmafia.request.FamiliarRequest
Connecting to familiar.php...

Requesting: http://www7.kingdomofloathing.com/familiar.php?action=newfam&newfam=89&ajax=1
3 request properties

Field: Cookie = [PHPSESSID=*snip*]
Field: User-Agent = [KoLmafia v14.7]
Field: Content-Type = [application/x-www-form-urlencoded]

Retrieving server reply...

Retrieved: http://www7.kingdomofloathing.com/familiar.php?action=newfam&newfam=89&ajax=1

10 header fields
Field: null = [HTTP/1.1 200 OK]
Field: Date = [Tue, 13 Sep 2011 11:23:48 GMT]
Field: Content-Length = [13]
Field: Expires = [Thu, 19 Nov 1981 08:52:00 GMT]
Field: Connection = [close]
Field: Content-Type = [text/html; charset=UTF-8]
Field: Server = [Apache/2.2.3 (CentOS)]
Field: X-Powered-By = [PHP/5.1.6]
Field: Cache-Control = [no-store, no-cache, must-revalidate, post-check=0, pre-check=0]
Field: Pragma = [no-cache]

no|in a fight
Processing results...
Requests complete.

For a successful familiar switch:
Code:
> familiar hobo monkey

Putting Gobert the Pair of Stomping Boots back into terrarium...
Taking Ultralord of the Hobo Jungle the Hobo Monkey out of terrarium...
class net.sourceforge.kolmafia.request.FamiliarRequest
Connecting to familiar.php...

Requesting: http://www7.kingdomofloathing.com/familiar.php?action=newfam&newfam=89&ajax=1
3 request properties

Field: Cookie = [PHPSESSID=*snip*]
Field: User-Agent = [KoLmafia v14.7]
Field: Content-Type = [application/x-www-form-urlencoded]

Retrieving server reply...

Retrieved: http://www7.kingdomofloathing.com/familiar.php?action=newfam&newfam=89&ajax=1

10 header fields
Field: null = [HTTP/1.1 200 OK]
Field: Date = [Tue, 13 Sep 2011 11:31:31 GMT]
Field: Content-Length = [471]
Field: Expires = [Thu, 19 Nov 1981 08:52:00 GMT]
Field: Connection = [close]
Field: Content-Type = [text/html; charset=UTF-8]
Field: Server = [Apache/2.2.3 (CentOS)]
Field: X-Powered-By = [PHP/5.1.6]
Field: Cache-Control = [no-store, no-cache, must-revalidate, post-check=0, pre-check=0]
Field: Pragma = [no-cache]

<script type="text/javascript">top.charpane.location.href="charpane.php";</script><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Results:</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><center>You put Gobert back in the Terrarium.<p>You take Ultralord of the Hobo Jungle with you.</center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table>
Processing results...

EDIT: I guess FamiliarRequest.java should be "modernized" by adding a FamiliarRequest.parseResponse() that is called in FamiliarRequest.processResults(). Maybe other requests (like EquipmentRequest) would benefit from this too.
 
Last edited:

Ferdawoon

Member
Maximizer equiping during choiceadventure don't abort

r9832

I forgot that I had tabbed away from Mafia during a choice adventure and when I tabbed back remembered that I still had my Knob Goblin Harem gear on (to get the daily meat from the Treasury) so went to the Maximizer to equip some new gear.
It got me some results and I marked the ones I wanted and clicked Execute Selected and Mafia went on to equip it. After that I kept adventuring and then noticed that the character image at the top of the char pane in the webbrowser did not change. I thought it strange, went to Gear Manager in Mafia to check and it showed as me having the new gear equipped but going to the Equipment Inventory in the webbrowser show me having the Harem Girl outfit on.

Mafia did not seem to recognize that I was in a choice adv meaning I could not really change my gear, but the settings changed in Mafia to show so anyway.

EDIT: A bit in the same area, when I then ran maximizer again, this time outside a choice adv, it got frustrated over the Halos. Is till had Time Halo from rollover and Maximizer wanted Frosty Halo, but in a different slot, with a lower accessory number (time was in slot Acc2, and Maximizer wanted to put Frost Halo in Acc1) it bugged saying that I cannot equip more than one halo, as it should. The problem is that it now show as me having both equipped. It is the marked selection for Acc1 and to really equip it now with the other halo gone I need to equip something else and "re-equip" Frost Halo to make it work.
 
Last edited:
Top