Skip to content

Commit

Permalink
MaxScientists. Caps your scientists.
Browse files Browse the repository at this point in the history
Change the early game code to be active until 300 totalHeliumEarned
  • Loading branch information
gen BTC authored and gen BTC committed Sep 11, 2016
1 parent 935774b commit e6853af
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
15 changes: 6 additions & 9 deletions AutoTrimps2.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ function setScienceNeeded() {
for (var upgrade in upgradeList) {
upgrade = upgradeList[upgrade];
if (game.upgrades[upgrade].allowed > game.upgrades[upgrade].done) { //If the upgrade is available
if (game.global.world == 1 && game.global.totalHeliumEarned<=100 && upgrade.startsWith("Speed")) continue; //skip speed upgrades on fresh game until level 2
if (game.global.world == 1 && game.global.totalHeliumEarned<=300 && upgrade.startsWith("Speed")) continue; //skip speed upgrades on fresh game until level 2
scienceNeeded += getScienceCostToUpgrade(upgrade);
}
}
Expand Down Expand Up @@ -1306,7 +1306,7 @@ function buyJobs() {
}

//FRESH GAME LEVEL 1 CODE
if (game.global.world == 1 && game.global.totalHeliumEarned<=100){
if (game.global.world == 1 && game.global.totalHeliumEarned<=300){
if (game.resources.trimps.owned < game.resources.trimps.realMax() * 0.9){
if (game.resources.food.owned > 5 && freeWorkers > 0){
if (game.jobs.Farmer.owned == game.jobs.Lumberjack.owned)
Expand All @@ -1331,7 +1331,7 @@ function buyJobs() {
if (game.jobs.Scientist.owned < buyScientists && game.resources.trimps.owned > game.resources.trimps.realMax() * 0.1){
var toBuy = buyScientists-game.jobs.Scientist.owned;
var canBuy = Math.floor(trimps.owned - trimps.employed);
if(buyScientists > 0 && freeWorkers > 0)
if((buyScientists > 0 && freeWorkers > 0) && (getPageSetting('MaxScientists') > game.jobs.Scientist.owned || getPageSetting('MaxScientists') == -1))
safeBuyJob('Scientist',toBuy <= canBuy ? toBuy : canBuy);
}
else
Expand Down Expand Up @@ -1383,12 +1383,9 @@ function buyJobs() {
//if earlier in the game, buy a small amount of scientists
if (game.jobs.Farmer.owned < stopScientistsatFarmers && !breedFire) {
var buyScientists = Math.floor((scientistRatio / totalRatio * totalDistributableWorkers) - game.jobs.Scientist.owned);
//bandaid to prevent situation where 1 scientist is bought, causing floor calculation to drop by 1, making next calculation -1 and entering hiring/firing loop
//proper fix is including scientists in totalDistributableWorkers and the scientist ratio in the total ratio, but then it waits for 4 jobs
if(buyScientists > 0 && freeWorkers > 0) safeBuyJob('Scientist', buyScientists);
if((buyScientists > 0 && freeWorkers > 0) && (getPageSetting('MaxScientists') > game.jobs.Scientist.owned || getPageSetting('MaxScientists') == -1))
safeBuyJob('Scientist',buyScientists);
}
//once over 250k farmers, fire our scientists and rely on manual gathering of science
//else if (game.jobs.Scientist.owned > 0) safeBuyJob('Scientist', game.jobs.Scientist.owned * -1);
}
//Buy Farmers:
if(!game.jobs.Farmer.locked && !breedFire) {
Expand Down Expand Up @@ -1576,7 +1573,7 @@ function manualLabor() {
var breedingTrimps = game.resources.trimps.owned - game.resources.trimps.employed;

//FRESH GAME NO HELIUM CODE.
if (game.global.world <=3 && game.global.totalHeliumEarned<=100) {
if (game.global.world <=3 && game.global.totalHeliumEarned<=300) {
var breedingTrimps = game.resources.trimps.owned - game.resources.trimps.employed;
if (game.global.buildingsQueue.length == 0 && (game.global.playerGathering != 'trimps' || game.buildings.Trap.owned == 0)){
if (!game.triggers.wood.done || game.resources.food.owned < 10 || Math.floor(game.resources.food.owned) < Math.floor(game.resources.wood.owned))
Expand Down
25 changes: 13 additions & 12 deletions NewUI2.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,21 +133,22 @@ createSetting('VoidCheck', 'Void Difficulty Check', 'How many hits to be able to
createSetting('FarmerRatio', 'Farmer Ratio', '', 'value', '1',null,"Core2");
createSetting('LumberjackRatio', 'Lumberjack Ratio', '', 'value', '1',null,"Core2");
createSetting('MinerRatio', 'Miner Ratio', '', 'value', '1',null,"Core2");
createSetting('MaxExplorers', 'Max Explorers', 'Map the planet!!', 'value', '150',null,"Core2");
createSetting('MaxTrainers', 'Max Trainers', 'Fist bump me bro', 'value', '-1',null,"Core2");
createSetting('MaxHut', 'Max Huts', '', 'value', '50',null,"Core2");
createSetting('MaxHouse', 'Max Houses', '', 'value', '50',null,"Core2");
createSetting('MaxMansion', 'Max Mansions', '', 'value', '50',null,"Core2");
createSetting('MaxHotel', 'Max Hotels', '', 'value', '50',null,"Core2");
createSetting('MaxResort', 'Max Resorts', '', 'value', '50',null,"Core2");
createSetting('MaxScientists', 'Max Scientists', 'Advanced. Cap your scientists. recommend: -1 ("infinite" still controls itself and caps to around 250k under normal situations)', 'value', '-1',null,"Core2");
createSetting('MaxExplorers', 'Max Explorers', 'Cap your explorers, most of fragments are gained by looting not gathering. recommend: 150', 'value', '150',null,"Core2");
createSetting('MaxTrainers', 'Max Trainers', 'Advanced. Cap your trainers. recommend: -1', 'value', '-1',null,"Core2");
createSetting('MaxHut', 'Max Huts', '', 'value', '100',null,"Core2");
createSetting('MaxHouse', 'Max Houses', '', 'value', '100',null,"Core2");
createSetting('MaxMansion', 'Max Mansions', '', 'value', '100',null,"Core2");
createSetting('MaxHotel', 'Max Hotels', '', 'value', '100',null,"Core2");
createSetting('MaxResort', 'Max Resorts', '', 'value', '100',null,"Core2");
createSetting('MaxGateway', 'Max Gateways', 'WARNING: Not recommended to raise above 25', 'value', '25',null,"Core2");
createSetting('MaxWormhole', 'Max Wormholes', 'WARNING: Wormholes cost helium! Values below 0 do nothing.', 'value', '0',null,"Core2");
createSetting('MaxCollector', 'Max Collectors', '', 'value', '-1',null,"Core2");
createSetting('MaxCollector', 'Max Collectors', 'recommend: -1', 'value', '-1',null,"Core2");
createSetting('FirstGigastation', 'First Gigastation', 'How many warpstations to buy before your first gigastation', 'value', '20',null,"Core2");
createSetting('DeltaGigastation', 'Delta Gigastation', 'How many extra warpstations to buy for each gigastation. Supports fractional values. For example 2.5 will buy +2/+3/+2/+3...', 'value', '2',null,"Core2");
createSetting('MaxGym', 'Max Gyms', '', 'value', '-1',null,"Core2");
createSetting('MaxTribute', 'Max Tributes', '', 'value', '-1',null,"Core2");
createSetting('MaxNursery', 'Max Nurseries', '', 'value', '-1',null,"Core2");
createSetting('DeltaGigastation', 'Delta Gigastation', 'How many extra warpstations to buy for each gigastation. Supports decimal values. For example 2.5 will buy +2/+3/+2/+3...', 'value', '2',null,"Core2");
createSetting('MaxGym', 'Max Gyms', 'Advanced. recommend: -1', 'value', '-1',null,"Core2");
createSetting('MaxTribute', 'Max Tributes', 'Advanced. recommend: -1 ', 'value', '-1',null,"Core2");
createSetting('MaxNursery', 'Max Nurseries', 'Advanced. recommend: -1', 'value', '-1',null,"Core2");

//advanced settings
createSetting('LimitEquipment', 'Limit Equipment', 'Limit levels of equipment bought to:(level 11 - the prestige level). At or Above Prestige X (10), your equipment will remain at level 1. In other words, do not level equipment after ~level ~51, and only buy Prestiges. CAUTION: may reduce He/hr performance in many cases.', 'boolean', null, null, 'Core2');
Expand Down

0 comments on commit e6853af

Please sign in to comment.