From 926f286b5fe55b81ee4737a6d2afcec3e16d7b12 Mon Sep 17 00:00:00 2001 From: Amanda Chappell Date: Thu, 28 Jul 2016 12:58:54 -0500 Subject: [PATCH 01/13] Fix for HC times and new golden cookie type , blacklist golden switch --- fc_button.js | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- fc_main.js | 9 ++++++++- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/fc_button.js b/fc_button.js index 761c168d..0124a8a4 100644 --- a/fc_button.js +++ b/fc_button.js @@ -201,13 +201,44 @@ function drawCircles(t_d, x, y) { fillStyle: o_draw.c1, x: x + maxRadius * 2 + maxWidth / 2 + 35, y: y + heightOffset+15*i_tc, text: s_t - }); + }); i_tc++; } i_c++; }); } +function hasBuildingSpecialBuff() { + if(Game.hasBuff('High-five') > 0) { return Game.hasBuff('High-five'); } + if(Game.hasBuff('Slap to the face') > 0) { return Game.hasBuff('Slap to the face'); } + if(Game.hasBuff('Congregation') > 0) { return Game.hasBuff('Congregation'); } + if(Game.hasBuff('Senility') > 0) { return Game.hasBuff('Senility'); } + if(Game.hasBuff('Luxuriant harvest') > 0) { return Game.hasBuff('Luxuriant harvest'); } + if(Game.hasBuff('Locusts') > 0) { return Game.hasBuff('Locusts'); } + if(Game.hasBuff('Ore vein') > 0) { return Game.hasBuff('Ore vein'); } + if(Game.hasBuff('Cave-in') > 0) { return Game.hasBuff('Cave-in'); } + if(Game.hasBuff('Oiled-up') > 0) { return Game.hasBuff('Oiled-up'); } + if(Game.hasBuff('Jammed machinery') > 0) { return Game.hasBuff('Jammed machinery'); } + if(Game.hasBuff('Juicy profits') > 0) { return Game.hasBuff('Juicy profits'); } + if(Game.hasBuff('Recession') > 0) { return Game.hasBuff('Recession'); } + if(Game.hasBuff('Fervent adoration') > 0) { return Game.hasBuff('Fervent adoration'); } + if(Game.hasBuff('Crisis of faith') > 0) { return Game.hasBuff('Crisis of faith'); } + if(Game.hasBuff('Manabloom') > 0) { return Game.hasBuff('Manabloom'); } + if(Game.hasBuff('Magivores') > 0) { return Game.hasBuff('Magivores'); } + if(Game.hasBuff('Delicious lifeforms') > 0) { return Game.hasBuff('Delicious lifeforms'); } + if(Game.hasBuff('Black holes') > 0) { return Game.hasBuff('Black holes'); } + if(Game.hasBuff('Breakthrough') > 0) { return Game.hasBuff('Breakthrough'); } + if(Game.hasBuff('Lab disaster') > 0) { return Game.hasBuff('Lab disaster'); } + if(Game.hasBuff('Righteous cataclysm') > 0) { return Game.hasBuff('Righteous cataclysm'); } + if(Game.hasBuff('Dimensional calamity') > 0) { return Game.hasBuff('Dimensional calamity'); } + if(Game.hasBuff('Golden ages') > 0) { return Game.hasBuff('Golden ages'); } + if(Game.hasBuff('Time jam') > 0) { return Game.hasBuff('Time jam'); } + if(Game.hasBuff('Extra cycles') > 0) { return Game.hasBuff('Extra cycles'); } + if(Game.hasBuff('Predictable tragedy') > 0) { return Game.hasBuff('Predictable tragedy'); } + if(Game.hasBuff('Solar flare') > 0) { return Game.hasBuff('Solar flare'); } + if(Game.hasBuff('Eclipse') > 0) { return Game.hasBuff('Eclipse'); } +} + function updateTimers() { var chainPurchase, bankPercent, purchasePercent, bankMax, actualCps, t_draw, maxColor, height, @@ -216,6 +247,8 @@ function updateTimers() { gc_min_delay = (probabilitySpan('golden', Game.shimmerTypes.golden.time, 0.01) - Game.shimmerTypes.golden.time) / maxCookieTime(), frenzy_delay = Game.hasBuff('Frenzy') / maxCookieTime(), click_frenzy_delay = Game.hasBuff('Click frenzy') / maxCookieTime(), + bulding_special_delay = hasBuildingSpecialBuff() / maxCookieTime(), + cookie_storm_delay = Game.hasBuff('Cookie storm') / maxCookieTime(), decimal_HC_complete = (Game.HowMuchPrestige(Game.cookiesEarned + Game.cookiesReset)%1), bankTotal = delayAmount(), purchaseTotal = nextPurchase().cost, @@ -312,6 +345,22 @@ function updateTimers() { display: timeDisplay(Game.hasBuff('Click frenzy')/Game.fps) }); } + if (bulding_special_delay > 0) { + t_draw.push({ + f_percent: bulding_special_delay, + c1: "rgba(0, 196, 255, 1)", + name: "Building Special Time", + display: timeDisplay(hasBuildingSpecialBuff()/Game.fps) + }); + } + if (cookie_storm_delay > 0) { + t_draw.push({ + f_percent: cookie_storm_delay, + c1: "rgba(0, 196, 255, 1)", + name: "Cookie Storm Time", + display: timeDisplay(Game.hasBuff('Cookie storm')/Game.fps) + }); + } if (decimal_HC_complete>0) { t_draw.push({ f_percent: decimal_HC_complete, diff --git a/fc_main.js b/fc_main.js index 36678a67..af2c83ad 100644 --- a/fc_main.js +++ b/fc_main.js @@ -897,12 +897,18 @@ function upgradeStats(recalculate) { function isUnavailable(upgrade, upgradeBlacklist) { var result = false; + var needed = unfinishedUpgradePrereqs(upgrade); result = result || !upgrade.unlocked && !needed; result = result || (upgradeBlacklist === true); result = result || _.contains(upgradeBlacklist, upgrade.id); result = result || (needed && _.find(needed, function(a){return a.type == "wrinklers"}) != null); result = result || (upgrade.season && !haveAll(Game.season)); + + if (upgrade.id == 331) { + result = true; // blacklist golden switch from being used, until proper logic can be implemented + } + return result; } @@ -1524,7 +1530,8 @@ function autoCookie() { if (!FrozenCookies.processing && !Game.OnAscend && !Game.AscendTimer) { FrozenCookies.processing = true; var currentHCAmount = Game.HowMuchPrestige(Game.cookiesEarned + Game.cookiesReset + Game.wrinklers.reduce(function(s,w){return s + popValue(w.sucked);}, 0)); - if (FrozenCookies.lastHCAmount < currentHCAmount) { + + if (Math.floor(FrozenCookies.lastHCAmount) < Math.floor(currentHCAmount)) { var changeAmount = currentHCAmount - FrozenCookies.lastHCAmount; FrozenCookies.lastHCAmount = currentHCAmount; FrozenCookies.prevLastHCTime = FrozenCookies.lastHCTime; From 061d57735b812ce2f991ad1c6ea70cae682c602b Mon Sep 17 00:00:00 2001 From: Larry Date: Tue, 9 Aug 2016 11:47:41 -0500 Subject: [PATCH 02/13] Correctly handle dragonflight --- fc_main.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/fc_main.js b/fc_main.js index 36678a67..e28811ff 100644 --- a/fc_main.js +++ b/fc_main.js @@ -46,7 +46,7 @@ function setOverrides() { // Set default values for calculations FrozenCookies.hc_gain = 0; FrozenCookies.hc_gain_time = Date.now(); - FrozenCookies.last_gc_state = (Game.hasBuff('Frenzy') ? Game.buffs['Frenzy'].multCpS : 1) * (Game.hasBuff('Click frenzy') ? Game.buffs['Click frenzy'].multClick : 1); + FrozenCookies.last_gc_state = (Game.hasBuff('Frenzy') ? Game.buffs['Frenzy'].multCpS : 1) * hasClickFrenzy(); FrozenCookies.last_gc_time = Date.now(); FrozenCookies.lastCPS = Game.cookiesPs; FrozenCookies.lastCookieCPS = 0; @@ -261,7 +261,7 @@ function fcReset() { } Game.oldReset(); FrozenCookies.frenzyTimes = {}; - FrozenCookies.last_gc_state = (Game.hasBuff('Frenzy') ? Game.buffs['Frenzy'].multCpS : 1) * (Game.hasBuff('Click frenzy') ? Game.buffs['Click frenzy'].multClick : 1); + FrozenCookies.last_gc_state = (Game.hasBuff('Frenzy') ? Game.buffs['Frenzy'].multCpS : 1) * hasClickFrenzy(); FrozenCookies.last_gc_time = Date.now(); FrozenCookies.lastHCAmount = Game.HowMuchPrestige(Game.cookiesEarned + Game.cookiesReset + Game.wrinklers.reduce(function(s,w){return s + popValue(w.sucked);}, 0)); FrozenCookies.lastHCTime = Date.now(); @@ -459,13 +459,16 @@ function probabilitySpan(listType, start, endProbability) { return _.sortedIndex(getProbabilityList(listType), (startProbability + endProbability - startProbability * endProbability)); } +function hasClickFrenzy() { + return (Game.hasBuff('Click frenzy') > 0) ? Game.buffs['Click frenzy'].multiclick : (Game.hasBuff('Dragonflight') > 0) ? Game.buffs['Dragonflight'].multClick : 1; +} function baseCps() { var frenzyMod = (Game.hasBuff('Frenzy') > 0) ? Game.buffs['Frenzy'].multCpS : 1; return Game.cookiesPs / frenzyMod; } function baseClickingCps(clickSpeed) { - var clickFrenzyMod = (Game.hasBuff('Click frenzy') > 0) ? Game.buffs['Click frenzy'].multClick : 1; + var clickFrenzyMod = hasClickFrenzy(); var frenzyMod = (Game.hasBuff('Frenzy') > 0) ? Game.buffs['Frenzy'].multCpS : 1; var cpc = Game.mouseCps() / (clickFrenzyMod * frenzyMod); return clickSpeed * cpc; @@ -542,7 +545,7 @@ function cookieStats(bankAmount, wrathValue, wrinklerCount) { var clickCps = baseClickingCps(FrozenCookies.autoClick * FrozenCookies.cookieClickSpeed); var frenzyCps = FrozenCookies.autoFrenzy ? baseClickingCps(FrozenCookies.autoFrenzy * FrozenCookies.frenzyClickSpeed) : clickCps; var luckyMod = Game.Has('Get lucky') ? 2 : 1; - var clickFrenzyMod = (Game.hasBuff('Click frenzy') > 0) ? Game.buffs['Click frenzy'].multClick : 1 + var clickFrenzyMod = hasClickFrenzy(); wrathValue = wrathValue != null ? wrathValue : Game.elderWrath; wrinklerCount = wrinklerCount != null ? wrinklerCount : (wrathValue ? 10 : 0); var wrinkler = wrinklerMod(wrinklerCount); @@ -1487,13 +1490,13 @@ function shouldPopWrinklers() { } function autoFrenzyClick() { - if (Game.hasBuff('Click frenzy') > 0 && !FrozenCookies.autoFrenzyBot) { + if (hasClickFrenzy() > 1 && !FrozenCookies.autoFrenzyBot) { if (FrozenCookies.autoclickBot) { clearInterval(FrozenCookies.autoclickBot); FrozenCookies.autoclickBot = 0; } FrozenCookies.autoFrenzyBot = setInterval(function(){Game.ClickCookie();}, 1000 / FrozenCookies.frenzyClickSpeed); - } else if (Game.hasBuff('Click frenzy') == 0 && FrozenCookies.autoFrenzyBot) { + } else if (hasClickFrenzy() == 1 && FrozenCookies.autoFrenzyBot) { clearInterval(FrozenCookies.autoFrenzyBot); FrozenCookies.autoFrenzyBot = 0; if (FrozenCookies.autoClick && FrozenCookies.cookieClickSpeed) { @@ -1599,7 +1602,7 @@ function autoCookie() { if (FrozenCookies.autoBlacklistOff) { autoBlacklistOff(); } - var currentFrenzy = (Game.hasBuff('Frenzy') ? Game.buffs['Frenzy'].multCpS : 1) * (Game.hasBuff('Click frenzy') ? Game.buffs['Click frenzy'].multClick : 1); + var currentFrenzy = (Game.hasBuff('Frenzy') ? Game.buffs['Frenzy'].multCpS : 1) * hasClickFrenzy()); if (currentFrenzy != FrozenCookies.last_gc_state) { if (FrozenCookies.last_gc_state != 1 && currentFrenzy == 1) { logEvent('GC', 'Frenzy ended, cookie production x1'); @@ -1617,7 +1620,7 @@ function autoCookie() { FrozenCookies.hc_gain_time = Date.now(); FrozenCookies.hc_gain = 0; } - logEvent('GC', 'Starting ' + (Game.hasBuff('Click frenzy') ? 'Clicking ' : '') + 'Frenzy x' + currentFrenzy); + logEvent('GC', 'Starting ' + ((hasClickFrenzy > 1) ? 'Clicking ' : '') + 'Frenzy x' + currentFrenzy); } if (FrozenCookies.frenzyTimes[FrozenCookies.last_gc_state] == null) { FrozenCookies.frenzyTimes[FrozenCookies.last_gc_state] = 0; From 58b53f8da01b094ec722506bf27b0f64155f9ee5 Mon Sep 17 00:00:00 2001 From: Larry Date: Tue, 9 Aug 2016 12:01:18 -0500 Subject: [PATCH 03/13] Correctly handle dragonflight --- fc_main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fc_main.js b/fc_main.js index e28811ff..309bfff4 100644 --- a/fc_main.js +++ b/fc_main.js @@ -1602,7 +1602,7 @@ function autoCookie() { if (FrozenCookies.autoBlacklistOff) { autoBlacklistOff(); } - var currentFrenzy = (Game.hasBuff('Frenzy') ? Game.buffs['Frenzy'].multCpS : 1) * hasClickFrenzy()); + var currentFrenzy = (Game.hasBuff('Frenzy') ? Game.buffs['Frenzy'].multCpS : 1) * hasClickFrenzy(); if (currentFrenzy != FrozenCookies.last_gc_state) { if (FrozenCookies.last_gc_state != 1 && currentFrenzy == 1) { logEvent('GC', 'Frenzy ended, cookie production x1'); From 928c0939ae7cc9683716adb12a702b0d0e4d98d3 Mon Sep 17 00:00:00 2001 From: Larry Date: Tue, 9 Aug 2016 12:50:34 -0500 Subject: [PATCH 04/13] Correctly handle dragonflight --- fc_main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fc_main.js b/fc_main.js index 309bfff4..fd8d8231 100644 --- a/fc_main.js +++ b/fc_main.js @@ -460,8 +460,13 @@ function probabilitySpan(listType, start, endProbability) { } function hasClickFrenzy() { - return (Game.hasBuff('Click frenzy') > 0) ? Game.buffs['Click frenzy'].multiclick : (Game.hasBuff('Dragonflight') > 0) ? Game.buffs['Dragonflight'].multClick : 1; + var ret = 1 + for (var i in Game.buffs) { + if (typeof Game.buffs[i].multClick != 'undefined') ret*=Game.buffs[i].multClick; + } + return ret; } + function baseCps() { var frenzyMod = (Game.hasBuff('Frenzy') > 0) ? Game.buffs['Frenzy'].multCpS : 1; return Game.cookiesPs / frenzyMod; From 7ca4c7d535a62a582a9c8b0bff734001d7b00bf8 Mon Sep 17 00:00:00 2001 From: Larry Date: Fri, 19 Aug 2016 11:27:47 -0500 Subject: [PATCH 05/13] Lucky is 15m production, not 20 --- fc_main.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/fc_main.js b/fc_main.js index a7016db5..453302c4 100644 --- a/fc_main.js +++ b/fc_main.js @@ -529,11 +529,11 @@ function cookieValue(bankAmount, wrathValue, wrinklerCount) { // Clot + Ruin value -= cookieInfo.clotRuin.odds[wrathValue] * (Math.min(bankAmount * 0.05, cps * 60 * 10 * 0.5) + 13); // Lucky - value += cookieInfo.lucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 20) + 13); + value += cookieInfo.lucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 15) + 13); // Frenzy + Lucky - value += cookieInfo.frenzyLucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 20 * 7) + 13); + value += cookieInfo.frenzyLucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 15 * 7) + 13); // Clot + Lucky - value += cookieInfo.clotLucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 20 * 0.5) + 13); + value += cookieInfo.clotLucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 15 * 0.5) + 13); // Click value += cookieInfo.click.odds[wrathValue] * frenzyCps * luckyMod * 13 * 777; // Frenzy + Click @@ -571,11 +571,11 @@ function cookieStats(bankAmount, wrathValue, wrinklerCount) { // Clot + Ruin result.clotRuin = -1 * cookieInfo.clotRuin.odds[wrathValue] * (Math.min(bankAmount * 0.05, cps * 60 * 10 * 0.5) + 13); // Lucky - result.lucky = cookieInfo.lucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 20) + 13); + result.lucky = cookieInfo.lucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 15) + 13); // Frenzy + Lucky - result.frenzyLucky = cookieInfo.frenzyLucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 20 * 7) + 13); + result.frenzyLucky = cookieInfo.frenzyLucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 15 * 7) + 13); // Clot + Lucky - result.clotLucky = cookieInfo.clotLucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 20 * 0.5) + 13); + result.clotLucky = cookieInfo.clotLucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 15 * 0.5) + 13); // Click result.click = cookieInfo.click.odds[wrathValue] * frenzyCps * luckyMod * 13 * 777; // Frenzy + Click @@ -641,11 +641,11 @@ function estimatedTimeRemaining(cookies) { } function luckyBank() { - return baseCps() * 60 * 20 * 10; + return baseCps() * 60 * 15 * 10; } function luckyFrenzyBank() { - return baseCps() * 60 * 20 * 7 * 10; + return baseCps() * 60 * 15 * 7 * 10; } function chainBank() { @@ -706,7 +706,7 @@ function weightedCookieValue(useCurrent) { } if (useCurrent && Game.cookies < maxLuckyValue() * 10) { if (lucky_mod) { - base_golden -= ((1200 * cps) - Math.min(1200 * cps, Game.cookies * 0.1)) * 0.49 * 0.5 + (maxLuckyValue() - (Game.cookies * 0.1)) * 0.49 * 0.5; + base_golden -= ((900 * cps) - Math.min(900 * cps, Game.cookies * 0.1)) * 0.49 * 0.5 + (maxLuckyValue() - (Game.cookies * 0.1)) * 0.49 * 0.5; } else { base_golden -= (maxLuckyValue() - (Game.cookies * 0.1)) * 0.49; base_wrath -= (maxLuckyValue() - (Game.cookies * 0.1)) * 0.29; @@ -716,7 +716,7 @@ function weightedCookieValue(useCurrent) { } function maxLuckyValue() { - var gcMod = Game.Has('Get lucky') ? 8400 : 1200; + var gcMod = Game.Has('Get lucky') ? 6300 : 900; return baseCps() * gcMod; } From 135bfc29c952a74e7dee71a90d4a18564f736010 Mon Sep 17 00:00:00 2001 From: Larry Date: Fri, 19 Aug 2016 11:36:23 -0500 Subject: [PATCH 06/13] Lucky is max 15% of bank, not 10% --- fc_main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fc_main.js b/fc_main.js index 453302c4..ef7ad404 100644 --- a/fc_main.js +++ b/fc_main.js @@ -641,11 +641,11 @@ function estimatedTimeRemaining(cookies) { } function luckyBank() { - return baseCps() * 60 * 15 * 10; + return baseCps() * 60 * 15 / 0.15; } function luckyFrenzyBank() { - return baseCps() * 60 * 15 * 7 * 10; + return baseCps() * 60 * 15 * 7 / 0.15; } function chainBank() { From 7815bff6673089f5bdd649a3332b8527c8a74d58 Mon Sep 17 00:00:00 2001 From: Larry Date: Fri, 19 Aug 2016 12:11:23 -0500 Subject: [PATCH 07/13] Update Max Lucky Bank in button too --- fc_button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fc_button.js b/fc_button.js index 0124a8a4..50c7cb6b 100644 --- a/fc_button.js +++ b/fc_button.js @@ -435,7 +435,7 @@ function FCMenu() { subsection.append($('
').addClass('listing').html('Max Average Cookie Value: ' + Beautify(cookieValue(maxCookies)))); } subsection.append($('
').addClass('listing').html('Max Lucky Cookie Value: ' + Beautify(maxLuckyValue()))); - subsection.append($('
').addClass('listing').html('Cookie Bank Required for Max Lucky: ' + Beautify(maxLuckyValue() * 10))); + subsection.append($('
').addClass('listing').html('Cookie Bank Required for Max Lucky: ' + Beautify(maxLuckyValue() / 0.15))); subsection.append($('
').addClass('listing').html('Max Chain Cookie Value: ' + Beautify(calculateChainValue(chainBank(), Game.cookiesPs, (7 - (Game.elderWrath / 3)))))); subsection.append($('
').addClass('listing').html('Cookie Bank Required for Max Chain: ' + Beautify(chainBank()))); subsection.append($('
').addClass('listing').html('Estimated Cookie CPS: ' + Beautify(gcPs(cookieValue(currentCookies))))); From e6e4e7dd25dcc5e254558519661c92ccc4c2ea9e Mon Sep 17 00:00:00 2001 From: Jacob Finn Date: Sun, 13 Nov 2016 12:51:10 -0800 Subject: [PATCH 08/13] Fixed auto-buying of Santa levels --- fc_main.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/fc_main.js b/fc_main.js index af2c83ad..070dce4a 100644 --- a/fc_main.js +++ b/fc_main.js @@ -1219,12 +1219,10 @@ function buyFunctionToggle(upgrade) { } function buySanta() { - if (Game.LeftBackground) { - Game.mouseX = 48; - Game.mouseY = Game.LeftBackground.canvas.height-48-24; - Game.Click = 1; - Game.UpdateSanta(); - Game.Click = 0; + Game.specialTab = 'santa'; + Game.UpgradeSanta(); + if (Game.santaLevel + 1 >= Game.santaLevels.length) { + Game.ToggleSpecialMenu(); } } From c75d28e86f27318bda850f6ae8793ea3c83c4a99 Mon Sep 17 00:00:00 2001 From: Jacob Finn Date: Sun, 13 Nov 2016 13:38:03 -0800 Subject: [PATCH 09/13] Updated Lucky calculations for 2.002 --- fc_button.js | 2 +- fc_main.js | 30 +++++++++++++++++------------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/fc_button.js b/fc_button.js index 0124a8a4..6f5704a5 100644 --- a/fc_button.js +++ b/fc_button.js @@ -435,7 +435,7 @@ function FCMenu() { subsection.append($('
').addClass('listing').html('Max Average Cookie Value: ' + Beautify(cookieValue(maxCookies)))); } subsection.append($('
').addClass('listing').html('Max Lucky Cookie Value: ' + Beautify(maxLuckyValue()))); - subsection.append($('
').addClass('listing').html('Cookie Bank Required for Max Lucky: ' + Beautify(maxLuckyValue() * 10))); + subsection.append($('
').addClass('listing').html('Cookie Bank Required for Max Lucky: ' + Beautify(maxLuckyBank()))); subsection.append($('
').addClass('listing').html('Max Chain Cookie Value: ' + Beautify(calculateChainValue(chainBank(), Game.cookiesPs, (7 - (Game.elderWrath / 3)))))); subsection.append($('
').addClass('listing').html('Cookie Bank Required for Max Chain: ' + Beautify(chainBank()))); subsection.append($('
').addClass('listing').html('Estimated Cookie CPS: ' + Beautify(gcPs(cookieValue(currentCookies))))); diff --git a/fc_main.js b/fc_main.js index 070dce4a..33318f67 100644 --- a/fc_main.js +++ b/fc_main.js @@ -521,11 +521,11 @@ function cookieValue(bankAmount, wrathValue, wrinklerCount) { // Clot + Ruin value -= cookieInfo.clotRuin.odds[wrathValue] * (Math.min(bankAmount * 0.05, cps * 60 * 10 * 0.5) + 13); // Lucky - value += cookieInfo.lucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 20) + 13); + value += cookieInfo.lucky.odds[wrathValue] * (Math.min(bankAmount * 0.15, cps * 60 * 15) + 13); // Frenzy + Lucky - value += cookieInfo.frenzyLucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 20 * 7) + 13); + value += cookieInfo.frenzyLucky.odds[wrathValue] * (Math.min(bankAmount * 0.15, cps * 60 * 15 * 7) + 13); // Clot + Lucky - value += cookieInfo.clotLucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 20 * 0.5) + 13); + value += cookieInfo.clotLucky.odds[wrathValue] * (Math.min(bankAmount * 0.15, cps * 60 * 15 * 0.5) + 13); // Click value += cookieInfo.click.odds[wrathValue] * frenzyCps * luckyMod * 13 * 777; // Frenzy + Click @@ -563,11 +563,11 @@ function cookieStats(bankAmount, wrathValue, wrinklerCount) { // Clot + Ruin result.clotRuin = -1 * cookieInfo.clotRuin.odds[wrathValue] * (Math.min(bankAmount * 0.05, cps * 60 * 10 * 0.5) + 13); // Lucky - result.lucky = cookieInfo.lucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 20) + 13); + result.lucky = cookieInfo.lucky.odds[wrathValue] * (Math.min(bankAmount * 0.15, cps * 60 * 15) + 13); // Frenzy + Lucky - result.frenzyLucky = cookieInfo.frenzyLucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 20 * 7) + 13); + result.frenzyLucky = cookieInfo.frenzyLucky.odds[wrathValue] * (Math.min(bankAmount * 0.15, cps * 60 * 15 * 7) + 13); // Clot + Lucky - result.clotLucky = cookieInfo.clotLucky.odds[wrathValue] * (Math.min(bankAmount * 0.1, cps * 60 * 20 * 0.5) + 13); + result.clotLucky = cookieInfo.clotLucky.odds[wrathValue] * (Math.min(bankAmount * 0.15, cps * 60 * 15 * 0.5) + 13); // Click result.click = cookieInfo.click.odds[wrathValue] * frenzyCps * luckyMod * 13 * 777; // Frenzy + Click @@ -633,11 +633,11 @@ function estimatedTimeRemaining(cookies) { } function luckyBank() { - return baseCps() * 60 * 20 * 10; + return baseCps() * 60 * 100; } function luckyFrenzyBank() { - return baseCps() * 60 * 20 * 7 * 10; + return baseCps() * 60 * 100 * 7; } function chainBank() { @@ -696,22 +696,26 @@ function weightedCookieValue(useCurrent) { base_golden += rollingEstimate * 0.0033; base_wrath += rollingEstimate * 0.0595; } - if (useCurrent && Game.cookies < maxLuckyValue() * 10) { + if (useCurrent && Game.cookies < maxLuckyBank()) { if (lucky_mod) { - base_golden -= ((1200 * cps) - Math.min(1200 * cps, Game.cookies * 0.1)) * 0.49 * 0.5 + (maxLuckyValue() - (Game.cookies * 0.1)) * 0.49 * 0.5; + base_golden -= ((900 * cps) - Math.min(900 * cps, Game.cookies * 0.15)) * 0.49 * 0.5 + (maxLuckyValue() - (Game.cookies * 0.15)) * 0.49 * 0.5; } else { - base_golden -= (maxLuckyValue() - (Game.cookies * 0.1)) * 0.49; - base_wrath -= (maxLuckyValue() - (Game.cookies * 0.1)) * 0.29; + base_golden -= (maxLuckyValue() - (Game.cookies * 0.15)) * 0.49; + base_wrath -= (maxLuckyValue() - (Game.cookies * 0.15)) * 0.29; } } return Game.elderWrath / 3.0 * base_wrath + (3 - Game.elderWrath) / 3.0 * base_golden; } function maxLuckyValue() { - var gcMod = Game.Has('Get lucky') ? 8400 : 1200; + var gcMod = Game.Has('Get lucky') ? 6300 : 900; return baseCps() * gcMod; } +function maxLuckyBank() { + return Game.Has('Get lucky') ? luckyFrenzyBank() : luckyBank(); +} + function maxCookieTime() { return Game.shimmerTypes.golden.maxTime } From d5f437aed2c68d32af1510adf56770341f0f66d0 Mon Sep 17 00:00:00 2001 From: Jacob Finn Date: Sun, 13 Nov 2016 15:20:37 -0800 Subject: [PATCH 10/13] Fix base CPS calculation for new (and old) buffs --- fc_main.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/fc_main.js b/fc_main.js index 33318f67..8a4d891a 100644 --- a/fc_main.js +++ b/fc_main.js @@ -49,6 +49,7 @@ function setOverrides() { FrozenCookies.last_gc_state = (Game.hasBuff('Frenzy') ? Game.buffs['Frenzy'].multCpS : 1) * (Game.hasBuff('Click frenzy') ? Game.buffs['Click frenzy'].multClick : 1); FrozenCookies.last_gc_time = Date.now(); FrozenCookies.lastCPS = Game.cookiesPs; + FrozenCookies.lastBaseCPS = Game.cookiesPs; FrozenCookies.lastCookieCPS = 0; FrozenCookies.lastUpgradeCount = 0; FrozenCookies.currentBank = {'cost': 0, 'efficiency' : 0}; @@ -268,6 +269,7 @@ function fcReset() { FrozenCookies.maxHCPercent = 0; FrozenCookies.prevLastHCTime = Date.now(); FrozenCookies.lastCps = 0; + FrozenCookies.lastBaseCps = 0; FrozenCookies.trackedStats = []; updateLocalStorage(); recommendationList(true); @@ -460,8 +462,16 @@ function probabilitySpan(listType, start, endProbability) { } function baseCps() { - var frenzyMod = (Game.hasBuff('Frenzy') > 0) ? Game.buffs['Frenzy'].multCpS : 1; - return Game.cookiesPs / frenzyMod; + var buffMod = 1; + for (var i in Game.buffs) { + if (typeof Game.buffs[i].multCpS != 'undefined') buffMod *= Game.buffs[i].multCpS; + } + if (buffMod === 0) { + return FrozenCookies.lastBaseCPS; + } + var baseCPS = Game.cookiesPs / buffMod; + FrozenCookies.lastBaseCPS = baseCPS; + return baseCPS; } function baseClickingCps(clickSpeed) { From 3f0051ded9ad824d93525e127e10a7bde3ca7389 Mon Sep 17 00:00:00 2001 From: Jacob Finn Date: Sun, 13 Nov 2016 15:21:52 -0800 Subject: [PATCH 11/13] Delta-CPS display for GC Bank targets now compares to current bank, rather than to target bank --- fc_button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fc_button.js b/fc_button.js index 6f5704a5..2136d84f 100644 --- a/fc_button.js +++ b/fc_button.js @@ -533,7 +533,7 @@ function FCMenu() { {name: 'Chain Bank', cost: chainBank(), efficiency: cookieEfficiency(Game.cookies, chainBank())}]; banks.forEach(function(bank) { - var deltaCps = effectiveCps(bank.cost) - effectiveCps(); + var deltaCps = effectiveCps(bank.cost) - effectiveCps(Game.cookies); buildTable.append($('' + bank.name + (bank.deltaCps === 0 ? ' (*)' : '') + '' + Beautify(bank.efficiency) + '' + Beautify(Math.max(0, bank.cost - Game.cookies)) + '' + Beautify(deltaCps) + '')); }); buildTable.append($(' ')); From ea09513296745da73f51ed897b584a6949304a01 Mon Sep 17 00:00:00 2001 From: Jacob Finn Date: Sun, 13 Nov 2016 15:34:17 -0800 Subject: [PATCH 12/13] Autofrenzy setting now activates auto-clicking during Cursed Finger, in addition to Click Frenzy --- fc_main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fc_main.js b/fc_main.js index 8a4d891a..575a0cd8 100644 --- a/fc_main.js +++ b/fc_main.js @@ -1505,7 +1505,7 @@ function shouldPopWrinklers() { } function autoFrenzyClick() { - if (Game.hasBuff('Click frenzy') > 0 && !FrozenCookies.autoFrenzyBot) { + if ((Game.hasBuff('Click frenzy') > 0 || Game.hasBuff('Cursed finger') > 0) && !FrozenCookies.autoFrenzyBot) { if (FrozenCookies.autoclickBot) { clearInterval(FrozenCookies.autoclickBot); FrozenCookies.autoclickBot = 0; From c77302f3881d3257e4960913553d1b6e4e81ccac Mon Sep 17 00:00:00 2001 From: Christian Potemski Date: Mon, 23 Jan 2017 08:34:59 +0100 Subject: [PATCH 13/13] Add Golden Switch to Blacklist Add Golden Switch to Blacklist --- cc_upgrade_prerequisites.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cc_upgrade_prerequisites.js b/cc_upgrade_prerequisites.js index 9eb1b5d4..746bec03 100644 --- a/cc_upgrade_prerequisites.js +++ b/cc_upgrade_prerequisites.js @@ -275,7 +275,7 @@ var blacklist = [ 'buildings': [] }, { - 'upgrades': [129,130,131,132,133], + 'upgrades': [129,130,131,132,133,331,332], 'buildings': [] }, {