Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Stance 3 bug #6

Closed
Patashu opened this issue Jun 25, 2018 · 0 comments
Closed

Auto Stance 3 bug #6

Patashu opened this issue Jun 25, 2018 · 0 comments

Comments

@Patashu
Copy link

Patashu commented Jun 25, 2018

Copied from genbtc#171

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant