Bug - Fixed 11093 breaks alternate tavern commands

Theraze

Active member
> ash tavern("fight")

Going after Baron von Ratsworth...

Visiting Bart Ender
MCD: Sensitive location, not adjusting.

[108] Tavern Cellar (row 5, col 2)
Encounter: Hot and Cold Running Rats
Encounter: drunken rat
This goes for all of the alternate commands (besides faucet)... faucet returns the square, number 22. The "baron", "fight", and "explore" commands all just burn turns fighting rats.
 

fronobulax

Developer
Staff member
Tavern Quest (explore)

What is Tavern Quest (explore) supposed to do? I thought it was supposed to visit the unexplored squares in the Tavern Basement (until all were explored) but what it is doing for me in r11309 is fighting rats in the same square. Error with my expectations? Some preference that got hosed? Something I should report as a Bug?

Thanks.
 

BladeLight

Member
Tavern Baron Finding

It keeps going on to the same spot over and over and over...
Searching for Baron von Ratsworth...

Visiting Bart Ender
Checking for updates (running Best Between Battle Script Ever ver. 2.6)...
Running Best Between Battle Script Ever version: 2.6 (current)
Autoselling items to NPCs...
You gain 5,000 Meat
Items sold.
You have the latest use_for_items.txt. Will not check again today.

[456] Tavern Cellar (row 4, col 2)
Encounter: Hot and Cold Running Rats
Encounter: drunken rat
Strategy: skill mighty axing
Round 0: DracoTrainer wins initiative!
Round 1: DracoTrainer executes a macro!
Round 1: DracoTrainer tries to steal an item!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 2: DracoTrainer uses the bubbly potion!
Round 3: DracoTrainer casts MIGHTY AXING!
Round 4: drunken rat takes 182 damage.
Round 4: DracoTrainer wins the fight!
You gain 11 Meat
You acquire an item: rat whisker
You acquire an item: rat appendix
You gain 9 Strengthliness
You gain 1 Enchantedness
You gain 10 Smarm

[457] Tavern Cellar (row 4, col 2)
Encounter: Hot and Cold Running Rats
Encounter: drunken rat
Strategy: skill mighty axing
Round 0: DracoTrainer wins initiative!
Round 1: DracoTrainer executes a macro!
Round 1: DracoTrainer tries to steal an item!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 2: DracoTrainer uses the swirly potion!
Round 3: DracoTrainer casts MIGHTY AXING!
Round 4: drunken rat takes 137 damage.
Round 4: DracoTrainer wins the fight!
You gain 9 Meat
You acquire an item: rat whisker
You gain 14 Strongness
You gain 2 Magicalness
You gain 5 Chutzpah

[458] Tavern Cellar (row 4, col 2)
Encounter: Hot and Cold Running Rats
Encounter: drunken rat
Strategy: skill mighty axing
Round 0: DracoTrainer wins initiative!
Round 1: DracoTrainer executes a macro!
Round 1: DracoTrainer tries to steal an item!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 2: DracoTrainer uses the murky potion!
Round 3: DracoTrainer casts MIGHTY AXING!
Round 4: drunken rat takes 166 damage.
Round 4: DracoTrainer wins the fight!
You gain 10 Meat
You acquire an item: rat whisker
You gain 13 Beefiness
You gain 6 Enchantedness
You gain 3 Smarm

[459] Tavern Cellar (row 4, col 2)
Encounter: Hot and Cold Running Rats
Encounter: drunken rat
Strategy: skill mighty axing
Round 0: DracoTrainer loses initiative!
Round 1: DracoTrainer executes a macro!
Round 1: DracoTrainer tries to steal an item!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 2: DracoTrainer uses the effervescent potion!
Round 3: DracoTrainer casts MIGHTY AXING!
Round 4: drunken rat takes 170 damage.
Round 4: DracoTrainer wins the fight!
You gain 10 Meat
You acquire an item: rat whisker
You acquire an item: rat appendix
You gain 11 Beefiness
You gain 5 Mysteriousness
You gain 4 Chutzpah

[460] Tavern Cellar (row 4, col 2)
Encounter: Hot and Cold Running Rats
Encounter: drunken rat
Strategy: skill mighty axing
Round 0: DracoTrainer wins initiative!
Round 1: DracoTrainer executes a macro!
Round 1: DracoTrainer tries to steal an item!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 2: DracoTrainer uses the cloudy potion!
Round 3: drunken rat drops 2 attack power.
Round 3: drunken rat drops 2 defense.
Round 3: DracoTrainer casts MIGHTY AXING!
Round 4: drunken rat takes 180 damage.
Round 4: DracoTrainer wins the fight!
You gain 9 Meat
You acquire an item: rat whisker
You gain 10 Muscleboundness
You gain a Muscle point!
You gain 6 Mysteriousness
You gain 5 Smarm
You gain a Moxie point!
 

Veracity

Developer
Staff member
bump.

I won't be able to look at this before I spin the new release, but I'd like it to be fixed relatively soon...
 

fronobulax

Developer
Staff member
I was looking at this today but did not make any progress. I'll keep chipping away at it but wouldn't mind if someone else figured it out first.
 

Theraze

Active member
Well this:
Code:
		while ( ( goal == TavernManager.FAUCET && faucet == -1 ||
			  goal == TavernManager.BARON && baron == -1 ||
			  goal == TavernManager.FIGHT_BARON && baron == -1 ||
			  goal == TavernManager.EXPLORE && unexplored != -1 ) &&
			KoLmafia.permitsContinue() &&
			KoLCharacter.getCurrentHP() > 0 &&
			KoLCharacter.getAdventuresLeft() > 0 )
		{
			// TavernRequest will visit the next unexplored square
			RequestThread.postRequest( adventure );
is what mafia currently uses to find the next square. The adventure value is set above to
Code:
		// If the goal has not yet been found, then explore
		KoLAdventure adventure = AdventureDatabase.getAdventure( "Tavern Cellar" );
I mean, we COULD hack out the adventure section, but the way it current works, it just does the default adventure type for "explore next" and since 11093 set your default adventure to be the faucet, it just hard-broke tavern exploration.

Easiest fix would either be reverting 11093 so that exploration just works again, or if Veracity wants to retain her efficiency in rat farming the fastest way to enable that would probably be adding a new virtual adventure location, similar to the Hidden City's automatic/encounter types, for explore/faucet. :)
 

Veracity

Developer
Staff member
1) I would like auto-adventuring in the Tavern Cellar to repeatedly hit the faucet. Even though there is not currently a PVP mini that rewards that, I believe that is the correct thing to do.

2) I would like the menu bar and cli commands that say find the baron or explore the rest of the cellar to do the expected thing.

Reverting the submit that enabled the first at the expense of the second will enable the second at the expense of the first.

It should be possible to have both. I'll look at it, by and by.
 

Veracity

Developer
Staff member
Since I broke it, I decided to fix it. Revision 11517.
Note that I that I FIXED it, not that I TESTED it.
Perhaps you can do that. ;)
 

Theraze

Active member
Doesn't appear to be working quite yet. :(
[758] Tavern Cellar (row 4, col 3)
Encounter: The Tavern Cellar
MCD: Sensitive location, not adjusting.

[758] Tavern Cellar (row 4, col 3)
Encounter: The Tavern Cellar
KoLmafia declares world peace.

> baron

Searching for Baron von Ratsworth...

Visiting Bart Ender
MCD: Sensitive location, not adjusting.

[758] Tavern Cellar (row 4, col 3)
Encounter: The Tavern Cellar
MCD: Sensitive location, not adjusting.

[758] Tavern Cellar (row 4, col 3)
Encounter: The Tavern Cellar
MCD: Sensitive location, not adjusting.

[758] Tavern Cellar (row 4, col 3)
Encounter: The Tavern Cellar
KoLmafia declares world peace.
Upper is from the script execution, lower is from manually running "baron" CLI command. Both from 11517.
 

Veracity

Developer
Staff member
I notice that it is not incrementing the adventure counter. Which is to say, it wasn't actually consuming adventures. Debug log, please? Thanks.
 

Theraze

Active member
> baron

Searching for Baron von Ratsworth...

Visiting Bart Ender

[904] Tavern Cellar (row 4, col 3)
Encounter: The Tavern Cellar

[904] Tavern Cellar (row 4, col 3)
Encounter: The Tavern Cellar

[904] Tavern Cellar (row 4, col 3)
Encounter: The Tavern Cellar

[904] Tavern Cellar (row 4, col 3)
Encounter: The Tavern Cellar

[904] Tavern Cellar (row 4, col 3)
Encounter: The Tavern Cellar
KoLmafia declares world peace.
Disabled recoveryScript, beforeBattleScript, and afterAdventureScript.
 

Attachments

  • DEBUG_20120928.txt
    99.8 KB · Views: 34

lostcalpolydude

Developer
Staff member
I see
<VALUE string [You were beaten up by the last hitman - aborting]>
in there, so it looks like there's still a script running (though I can't tell what script). On the other hand, if it's aborting, why is mafia still trying to adventure?
 

Theraze

Active member
That's an unconditional trigger caused by nemesis. However, being in a zombie run, there are no hitmen, and it shouldn't be going active... though it would still be parsed and would show in the debug log...

If I'm reading this correctly, it's evaluating false. No abort.
Code:
      <IF>
         <OPER &&>
            <OPER contains>
               <CALL item_drops>
                  <VARREF> null
               <VALUE item [secret tropical island volcano lair map]>
            <OPER ==>
               <CALL item_amount>
                  <VALUE item [secret tropical island volcano lair map]>
               <VALUE int [0]>
         <SCOPE>
            <TYPES>
            <VARIABLES>
            <FUNCTIONS>
            <COMMANDS>
               <CALL abort>
                  <VALUE string [You were beaten up by the last hitman - aborting]>
Executing top-level commands
      if
      Test: ( ( item_drops() contains "secret tropical island volcano lair map" ) && ( item_amount() == 0 ) )
         Operator: &&
            Operand 1: ( item_drops() contains "secret tropical island volcano lair map" )
               Operator: contains
                  Operand 1: item_drops()
                     Param #1: null
                        Param #1: null
                           Param #1: "lastEncounter"
                           [NORMAL] <- "lastEncounter"
                           Entering function get_property
                           Function get_property returned: The Tavern Cellar
                        [NORMAL] <- "The Tavern Cellar"
                        Entering function to_monster
                        Function to_monster returned: none
                     [NORMAL] <- "none"
                     Entering function item_drops
                     Function item_drops returned: aggregate int [item]
                  [NORMAL] <- aggregate int [item]
                  Operand 2: secret tropical island volcano lair map
                  [NORMAL] <- "secret tropical island volcano lair map"
               <- false
            [NORMAL] <- false
      <- false
      [NORMAL] <- false
   [NORMAL] <- false
 
Top