Bug - Fixed v14.5 r9225: Two ways of facing the goblin king, you see?

Ruby Eyes

Member
So, apparently, when one happens to have perfume and knob goblin harem girl disguise in inventory, it doesn't seem to matter if one is actually wearing the knob goblin elite guard uniform and having the knob cake - mafia still switches to the "old" way: using perfume and dressing with the harem girl disguise.
A clannie confirmed that he ran into the same issue some time ago.

That's some moxie and muscle less than the uniform, so obviously I lost that fight. Dressed with uniform again, healed and re-tried (no more perfume in my inventory), and mafia didn't change outfits.

I would like mafia to check for cake and uniform as well - if those are there/equipped, please don't switch to the harem girl approach!
 

slyz

Developer
That happens if you auto-adventure in the Throne Room ? or when you click on the Throne Room in the Relay Browser ?
 

Ruby Eyes

Member
Pardon, in the relay browser. Ascension-relevant stuff I always do manually.

edit: I'm also pretty sure there are no scripts involved. I have only the crimbo11.ash (that's when I started using mafia), bumcheek's snapshot script and an attempt at a mushroom plot script.
 
Last edited:

lostcalpolydude

Developer
Staff member
Here's a diff that should change that. If you're wearing KGE (and have the cake) then it gets used. The harem outfit is still preferred if you don't have either one on, but the important thing is that wearing an outfit means you use that outfit. Not actually tested.

I feel like there should be a better way to organize this code, but nothing came to mind.
 

Attachments

  • throne.diff
    715 bytes · Views: 56

slyz

Developer
I finally tracked it down, and was going to propose a similar change.

I can't think of a more elegant solution either ^^
 
Do not change to Harem outfit to figh Goblin King, at least not without asking

KoLmafia version 14.6, r9313, in WinXP SP3. Internet Explorer 8 as relay browser.
Hardcore Seal Clubber, Path= Bees Hate You. (Ouch.)

Didn't even think of the perfume's name. Got into Harem outfit, tried to use Knob Goblin perfume, can't because of the letter b in the name. Got into Knob Goblin Elite (KGE) Guard outfit, went to Knob Kitchens 3 times, made the cake, clicked Throne Room. Got the usual 3-part graphic about fighting the King, clicked his balls to set detuned radio from 10 to 3. Then clicked in the center there, to fight the king.

I got smacked around for 10HP and thrown out, with the King telling me I didn't smell like a harem girl. Checked the GCLI. KoLmafia had changed to the Harem Girl outfit without notifying me. I was cross for a few seconds, logged out, logged in through Firefox only, beat the king in the KGE outfit, giggled, logged out, switched back to KoLmafia.

I'm thinking this is a feature that is not working as designed (rather than a bug), due to the Bees Hate You path's interference with the ability to use Knob Goblin perfume. Perhaps it wouldn't have happened if I had not tried to [use] the perfume? In any case, since I actually was in a correct state (KGE outfit, with Knob cake in inventory), could it please at least ask the user before changing to the Harem Girl outfit? Could it be fixed to correctly recognize both states?

Did I say it okay? I LOVE YOU GUYS!!!!
 

slyz

Developer
Here is a patch that should avoid the problem (compiles, but untested).

Little side note: I usually add an import when I use a function from another file that wasn't already imported. I noticed that KoLAdventure doesn't import KoLCharacter although it uses some of its functions, so I didn't add it. Should I look up good practice about imports in Java?
 

Attachments

  • BeeHarem.patch
    713 bytes · Views: 43
Last edited:

muczachan

Member
Additionally, mafia puts you into Harem Girl outfit and tries to use knob perfume even if you have killed the King already. (Just checked on r9314, misclicked while going to see Mr. Alarm.)
 

Ruby Eyes

Member
So, do patches like this have to be added and compiled into the program by the user? I hadn't been aware of that ... I suppose I'll keep killing that king without mafia then, since my knowledge about Java is probably on the same level as your knowledge about JCL.
Thanks for the warning, Storella! :)
 

Veracity

Developer
Staff member
Looking at the existing code, it already checks for either the (harem girl + perfume or effect) or the (knob goblin elite guard uniform + cake). It happens to look for the harem girl and perfume first.

Unfortunately, using the perfume doesn't work in Beecore.

I could make it look for the guard + cake first - which could conceivably break in a future challenge path.
I could make ownership of perfume not be enough in Beecore - you have to already have the effect via the special adventure.
I could assume that if you are already wearing a specific outfit, you want to use that method.

Or I could say "if you have made a knob cake, why in the world did you waste enough turns in the harem to get the outfit and perfume?" :)

I will look at the code and do some combination of the above. That last question stands, regardless of the solution I come up with.
 

Theraze

Active member
I actually did both because I was curious if I could overcome the outfit-Bs in the other after my first go at the king failed... Ended up doing the perfume because of less total Bs, but I can see it done by newbies due to random wanderings otherwise.
 

Veracity

Developer
Staff member
Revision 9431 does this:

If you are already wearing the harem girl outfit and already have the perfume effect, OK
If you are already wearing the harem girl outfit and are not in Beecore and have a perfume, use perfume and OK
If you are already wearing the elite guard uniform and can make (or have) the cake, retrieve it and OK
If you have the harem girl outfit and either have the effect or (not in Beecore) the perfume, put on the outfit, get the effect, and OK
If you have the elite guard uniform and can make (or have) the cake, put on the outfit, retrieve the cake and OK
Otherwise you are hapless and hopeless and fail.
 
Top