Skip to content

Auto Stance 3 bug #171

Open
Open

Description

@Patashu

If both Scryer and Auto Stance 3 are selected but you haven't reached z180 yet, Automaps breaks.

    if (getPageSetting('UseScryerStance'))  useScryerStance();  //"Use Scryer Stance"   (scryer.js)
     else if (getPageSetting('AutoStance')<=1) autoStance();     //"Auto Stance"       (autostance.js)
-    else if (getPageSetting('AutoStance')==2) autoStance2();    //"Auto Stance #2"         (")
+    else if (getPageSetting('AutoStance')===2) autoStance2();    //"Auto Stance #2"         (")
+    else if (getPageSetting('AutoStance')===3) autoStance3();   //"Auto Stance #3"         (")

This if/else if means that only useScryerStance() runs, autoStance3() doesn't.

However, useScryerStance() does not run autoStance code if you're in Auto Stance 3 and haven't reached z180 yet, because it doesn't have a check for Auto Stance 3:

function useScryerStance() {
    var AutoStance = getPageSetting('AutoStance');
    function autostancefunction() {
        if (AutoStance<=1) autoStance();    //"Auto Stance"
        else if (AutoStance==2) autoStance2();   //"Auto Stance #2"
    };
    //check preconditions   (exit quick, if impossible to use)
    var use_auto = game.global.preMapsActive || game.global.gridArray.length === 0 || game.global.highestLevelCleared < 180;
    use_auto = use_auto || game.global.world <= 60;
    use_auto = use_auto || game.global.mapsActive && getCurrentMapObject().location == "Void" && getPageSetting('ScryerUseinVoidMaps2') == 2;
    if (use_auto) {
        autostancefunction();
        wantToScry = false;
        return;
    }

The solution is to edit autostancefunction() to add a check for Auto Stance 3.

Forks like Slivers will also have to apply this fix.

Activity

  1. Patashu commented on Jun 25, 2018

    @Patashu
    Author

    Fix you can cherry pick LokmanChu@49ca01f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions