From b4c0c8de2bc09d626291c8a045b74c577a904277 Mon Sep 17 00:00:00 2001 From: Aktanusa Date: Wed, 27 Jul 2016 23:08:28 -0400 Subject: [PATCH] Fixed Century Egg Stat was wrong (Issue #102 and #103) and Version change --- CookieMonster.js | 6 +++--- src/Disp.js | 2 +- src/Main.js | 2 +- src/Sim.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CookieMonster.js b/CookieMonster.js index 67d97d5..b7e5a63 100644 --- a/CookieMonster.js +++ b/CookieMonster.js @@ -1909,7 +1909,7 @@ CM.Disp.AddMenuStats = function(title) { stats.appendChild(listing(listingQuest('Chocolate Egg Cookies', 'ChoEggTooltipPlaceholder'), document.createTextNode(Beautify(CM.Cache.lastChoEgg)))); } if (centEgg) { - stats.appendChild(listing('Century Egg Multiplier', document.createTextNode((Math.round(CM.Cache.CentEgg * 100) / 100) + '%'))); + stats.appendChild(listing('Century Egg Multiplier', document.createTextNode((Math.round((CM.Cache.CentEgg - 1) * 10000) / 100) + '%'))); } } } @@ -2573,7 +2573,7 @@ CM.ConfigDefault = {BotBar: 1, TimerBar: 1, TimerBarPos: 0, BuildColor: 1, BulkB CM.ConfigPrefix = 'CMConfig'; CM.VersionMajor = '2.002'; -CM.VersionMinor = '1'; +CM.VersionMinor = '2'; /******* * Sim * @@ -2808,7 +2808,7 @@ CM.Sim.CalculateGains = function() { if (CM.Sim.Has('Century egg')) { // The boost increases a little every day, with diminishing returns up to +10% on the 100th day var day = Math.floor((CM.Sim.Date - Game.startDate) / 1000 / 10) * 10 / 60 / 60 / 24; - day = Math.min(day,100); + day = Math.min(day, 100); CM.Cache.CentEgg = 1 + (1 - Math.pow(1 - day / 100, 3)) * 0.1; eggMult *= CM.Cache.CentEgg; } diff --git a/src/Disp.js b/src/Disp.js index da88138..e44b52d 100644 --- a/src/Disp.js +++ b/src/Disp.js @@ -1403,7 +1403,7 @@ CM.Disp.AddMenuStats = function(title) { stats.appendChild(listing(listingQuest('Chocolate Egg Cookies', 'ChoEggTooltipPlaceholder'), document.createTextNode(Beautify(CM.Cache.lastChoEgg)))); } if (centEgg) { - stats.appendChild(listing('Century Egg Multiplier', document.createTextNode((Math.round(CM.Cache.CentEgg * 100) / 100) + '%'))); + stats.appendChild(listing('Century Egg Multiplier', document.createTextNode((Math.round((CM.Cache.CentEgg - 1) * 10000) / 100) + '%'))); } } } diff --git a/src/Main.js b/src/Main.js index 8574b3a..9af66ea 100644 --- a/src/Main.js +++ b/src/Main.js @@ -204,5 +204,5 @@ CM.ConfigDefault = {BotBar: 1, TimerBar: 1, TimerBarPos: 0, BuildColor: 1, BulkB CM.ConfigPrefix = 'CMConfig'; CM.VersionMajor = '2.002'; -CM.VersionMinor = '1'; +CM.VersionMinor = '2'; diff --git a/src/Sim.js b/src/Sim.js index 1d405ff..290678b 100644 --- a/src/Sim.js +++ b/src/Sim.js @@ -231,7 +231,7 @@ CM.Sim.CalculateGains = function() { if (CM.Sim.Has('Century egg')) { // The boost increases a little every day, with diminishing returns up to +10% on the 100th day var day = Math.floor((CM.Sim.Date - Game.startDate) / 1000 / 10) * 10 / 60 / 60 / 24; - day = Math.min(day,100); + day = Math.min(day, 100); CM.Cache.CentEgg = 1 + (1 - Math.pow(1 - day / 100, 3)) * 0.1; eggMult *= CM.Cache.CentEgg; }