soolar / sl_ascend

An ascension script for kolmafia
11 stars 5 forks source link

Add Lights Out option #223

Open Saklad5 opened 5 years ago

Saklad5 commented 5 years ago

The Lights Out non-combats at Spookyraven Manor don’t take any turns or resources, apart from the final stages. It’d be nice if sl_ascend advanced to the aforementioned stages (when possible) during a run, allowing the player to complete them in aftercore.

Since KoLmafia already has extremely thorough support for these quests, it should be fairly trivial to automate (I’ve done it myself with a counter script) and have no impact on a run. I recommend the following logic:

Saklad5 commented 5 years ago

This has non-negligible ascension relevance, especially compared to the existing option to waste actual adventures getting the Pretentious Artist quest done (I really think that option should be changed to just start the quest and do nothing else).

Saklad5 commented 5 years ago

This is extremely messy, and mainly the result of my unfamiliarity with sl_ascend’s conventions, but I’ve been using this by inserting it under the call to burn delay:

if(get_counters("Spookyraven Lights Out", 0, 0) == "Spookyraven Lights Out" && get_property("questM20Necklace") == "finished")
    {
        location lights_room = get_property("nextSpookyravenStephenRoom").to_location();
        if(lights_room == $location[The Haunted Laboratory])
            lights_room = get_property("nextSpookyravenElizabethRoom").to_location();
        if(lights_room != $location[The Haunted Gallery] && (lights_room == $location[The Haunted Bedroom] || get_property("questM21Dance") == "finished"))
        {
            boolean disabled = get_property("sl_disableAdventureHandling").to_boolean();
            set_property("sl_disableAdventureHandling", true);
            lights_room.adv1(0, "");
            set_property("sl_disableAdventureHandling", disabled);
        }
    }

Besides the general scruffiness, this has one flaw: it actually used an adventure by getting a semi-rare at the Haunted Storage Room once. This can be avoided by simply skipping rooms with semi-rares during the corresponding window.