Bug genie monster resets location

ckb

Minion
Staff member
Fighting a 'genie summoned monster' should keep location==none, but it does not. It resets when entering the fight.

Code:
Preference _genieFightsUsed changed from 0 to 1
Preference lastAdventure changed from The Coral Corral to None

[30] genie summoned monster
Preference lastAdventure changed from None to The Coral Corral
Preference lastEncounter changed from Mer-kin rustler to Black Crayon Mer-kin
Encounter: Black Crayon Mer-kin
 
Looking at this more, GenieRequest.java does this for a fight:
Code:
    if (responseText.contains(">Fight!<")) {
      Preferences.increment("_genieFightsUsed");

      KoLAdventure.clearLocation();

      EncounterManager.ignoreSpecialMonsters();

      RequestLogger.registerLocation("genie summoned monster");
    }

Which is the initial pref increment and the reset of lastAdventure, the the printing of "[turn] genie summoned monster"

Then something else happens after that, and it resets the lastAdventure, which messes up my_location() to be thagt instead of none.
I think the page refresh that happens when you so a genie fight is doing some adventure-like stuff and maybe calling CharPaneRequest.java that is resetting the lastAdventure from there... but I don't quite understand enough of Mafia under the hood to follow what is happening.
 
Back
Top