Skip to content

Commit

Permalink
Fixed Century Egg Stat was wrong (Issue #102 and #103) and Version ch…
Browse files Browse the repository at this point in the history
…ange
  • Loading branch information
Aktanusa committed Jul 28, 2016
1 parent 991c80d commit b4c0c8d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions CookieMonster.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) + '%')));
}
}
}
Expand Down Expand Up @@ -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 *
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Disp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) + '%')));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

2 changes: 1 addition & 1 deletion src/Sim.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b4c0c8d

Please sign in to comment.