Skip to content

Commit

Permalink
maps.js - world levels not hardcoded anymore. and comment out unused …
Browse files Browse the repository at this point in the history
…line.
  • Loading branch information
genbtc committed Nov 15, 2023
1 parent d2394f2 commit 6d69f64
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions modules/maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ var vanillaMapatZone = false;
//anything/everything to do with maps.
function autoMap() {
var customVars = MODULES["maps"];
//allow script to handle abandoning
// if(game.options.menu.alwaysAbandon.enabled == 1) toggleSetting('alwaysAbandon');
//if we are prestige mapping, force equip first mode
var prestige = autoTrimpSettings.Prestige.selected;
if(prestige != "Off" && game.options.menu.mapLoot.enabled != 1) toggleSetting('mapLoot');
Expand Down Expand Up @@ -377,28 +375,28 @@ function autoMap() {
if (theMap.noRecycle) {
if (theMap.name == 'The Wall' && game.upgrades.Bounty.allowed == 0 && !game.talents.bounty.purchased) {
var theMapDifficulty = Math.ceil(theMap.difficulty / 2);
if(game.global.world < 15 + theMapDifficulty) continue;
selectedMap = theMap.id;
if(game.global.world < theMap.level + theMapDifficulty) continue;
selectedMap = theMap.id; //15
break;
}
if (theMap.name == 'Dimension of Anger' && document.getElementById("portalBtn").style.display == "none" && !game.talents.portal.purchased) {
var theMapDifficulty = Math.ceil(theMap.difficulty / 2);
if(game.global.world < 20 + theMapDifficulty) continue;
selectedMap = theMap.id;
if(game.global.world < theMap.level + theMapDifficulty) continue;
selectedMap = theMap.id; //20
break;
}
var dont = game.global.runningChallengeSquared;
if (theMap.name == 'The Block' && !game.upgrades.Shieldblock.allowed && ((game.global.challengeActive == "Scientist" || game.global.challengeActive == "Trimp") && !dont || getPageSetting('BuyShieldblock'))) {
var theMapDifficulty = Math.ceil(theMap.difficulty / 2);
if(game.global.world < 11 + theMapDifficulty) continue;
selectedMap = theMap.id;
if(game.global.world < theMap.level + theMapDifficulty) continue;
selectedMap = theMap.id; //11
break;
}
var treasure = getPageSetting('TrimpleZ');
if (theMap.name == 'Trimple Of Doom' && (!dont && (game.global.challengeActive == "Meditate" || game.global.challengeActive == "Trapper") && game.mapUnlocks.AncientTreasure.canRunOnce && game.global.world >= treasure)) {
var theMapDifficulty = Math.ceil(theMap.difficulty / 2);
if ((game.global.world < 33 + theMapDifficulty) || treasure > -33 && treasure < 33) continue;
selectedMap = theMap.id;
if ((game.global.world < theMap.level + theMapDifficulty) || treasure > -33 && treasure < 33) continue;
selectedMap = theMap.id; //33
if (treasure < 0) // need to reset
setPageSetting('TrimpleZ', 0);
break;
Expand All @@ -407,14 +405,14 @@ function autoMap() {
//run the prison only if we are 'cleared' to run level 80 + 1 level per 200% difficulty. Could do more accurate calc if needed
if(theMap.name == 'The Prison' && (game.global.challengeActive == "Electricity" || game.global.challengeActive == "Mapocalypse")) {
var theMapDifficulty = Math.ceil(theMap.difficulty / 2);
if(game.global.world < 80 + theMapDifficulty) continue;
selectedMap = theMap.id;
if(game.global.world < theMap.level + theMapDifficulty) continue;
selectedMap = theMap.id; //80
break;
}
if(theMap.name == 'Bionic Wonderland' && game.global.challengeActive == "Crushed" ) {
var theMapDifficulty = Math.ceil(theMap.difficulty / 2);
if(game.global.world < 125 + theMapDifficulty) continue;
selectedMap = theMap.id;
if(game.global.world < theMap.level + theMapDifficulty) continue;
selectedMap = theMap.id; //125
break;
}
}
Expand Down

0 comments on commit 6d69f64

Please sign in to comment.