Skip to content

Commit

Permalink
buildings.js - small adjustments - no functional change
Browse files Browse the repository at this point in the history
  • Loading branch information
genbtc committed Nov 15, 2023
1 parent 727950b commit efc0812
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions modules/buildings.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ function buyBuildings() {
if (getBuildingItemPrice(game.buildings.Gym, "wood", false, 1) * Math.pow(1 - game.portal.Resourceful.modifier, game.portal.Resourceful.level) > (game.resources.wood.owned / gymwallpct))
skipGym = true;
}
//ShieldBlock cost Effectiveness:
//ShieldBlock Cost Effectiveness Factor vs Gym: (DONE: now cost correctly factored in, decided by skipLowBlockHighCost in equipment.js)
if (game.equipment['Shield'].blockNow) {
var gymEff = evaluateEquipmentEfficiency('Gym');
var shieldEff = evaluateEquipmentEfficiency('Shield');
Expand All @@ -238,14 +238,14 @@ function buyBuildings() {
if (!game.buildings.Tribute.locked && (getPageSetting('MaxTribute') > game.buildings.Tribute.owned || getPageSetting('MaxTribute') == -1))
safeBuyBuilding('Tribute');

var targetBreed = parseInt(getPageSetting('GeneticistTimer'));
var targetBreed = parseInt(getPageSetting('GeneticistTimer') ?? 0);
//NURSERIES:
//NoNurseriesUntil', 'No Nurseries Until z', 'For Magma z230+ purposes. Nurseries get shut down, and wasting nurseries early on is probably a bad idea. Might want to set this to 230+ as well.'
var nursminlvl = getPageSetting('NoNurseriesUntil');
//Activate dynamic Nurseries to buy nurseries from NoNurseriesUntilZone up to portal before zone.
function dynamicNurseries() {
var maxNursery = getPageSetting('MaxNursery');
var finalZone = getPageSetting('HeHrDontPortalBefore')
var finalZone = getPageSetting('HeHrDontPortalBefore');
var numZ = finalZone - nursminlvl;
var perZ = maxNursery / ((numZ / 10 + 1));
return perZ;
Expand Down Expand Up @@ -303,13 +303,14 @@ function buyStorage() {
jest = simpleSeconds(Bs[B], 45);
jest = scaleToCurrentMap(jest);
}
//LOWLEVEL CODE
if ((game.global.world == 1 && owned > max * customVars.storageLowlvlCutoff1) ||
(game.global.world >= 2 && game.global.world < 10 && owned > max * customVars.storageLowlvlCutoff2) ||
(owned + jest > max * customVars.storageMainCutoff)) {
// debug('Buying ' + B + '(' + Bs[B] + ') at ' + Math.floor(game.resources[Bs[B]].owned / (game.resources[Bs[B]].max * packMod * 0.99) * 100) + '%');
if (canAffordBuilding(B) && game.triggers[B].done) {
if (canAffordBuilding(B) && game.triggers[B].done)
safeBuyBuilding(B);
}
}
//TODO: Very Like Autostorage, detect that.
}
}

0 comments on commit efc0812

Please sign in to comment.