Skip to content

Commit cdd395b

Browse files
committed
Added season cookies/eggs gotten stats
1 parent 1962335 commit cdd395b

1 file changed

Lines changed: 45 additions & 4 deletions

File tree

CookieMonster.js

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
CM = {};
22

3+
CM.Data = {};
4+
35
CM.Sim = {};
46

57
CM.Cache = {};
@@ -209,10 +211,18 @@ CM.Sim.CheckOtherAchiev = function() {
209211
if (CM.Sim.UpgradesOwned >= 50) CM.Sim.Win('Augmenter');
210212
if (CM.Sim.UpgradesOwned >= 100) CM.Sim.Win('Upgrader');
211213
if (CM.Sim.UpgradesOwned >= 150) CM.Sim.Win('Lord of Progress');
214+
215+
var hasAllHalloCook = true;
216+
for (var i in CM.Data.HalloCookies) {
217+
if (!CM.Sim.Has(CM.Data.HalloCookies[i])) hasAllHalloCook = false;
218+
}
219+
if (hasAllHalloCook) CM.Sim.Win('Spooky cookies');
212220

213-
if (CM.Sim.Has('Skull cookies') && CM.Sim.Has('Ghost cookies') && CM.Sim.Has('Bat cookies') && CM.Sim.Has('Slime cookies') && CM.Sim.Has('Pumpkin cookies') && CM.Sim.Has('Eyeball cookies') && CM.Sim.Has('Spider cookies')) CM.Sim.Win('Spooky cookies');
214-
215-
if (CM.Sim.Has('Christmas tree biscuits') && CM.Sim.Has('Snowflake biscuits') && CM.Sim.Has('Snowman biscuits') && CM.Sim.Has('Holly biscuits') && CM.Sim.Has('Candy cane biscuits') && CM.Sim.Has('Bell biscuits') && CM.Sim.Has('Present biscuits')) CM.Sim.Win('Let it snow');
221+
var hasAllChristCook = true;
222+
for (var i in CM.Data.ChristCookies) {
223+
if (!CM.Sim.Has(CM.Data.ChristCookies[i])) hasAllChristCook = false;
224+
}
225+
if (hasAllChristCook) CM.Sim.Win('Let it snow');
216226
}
217227

218228
CM.Sim.BuyBuildings = function() {
@@ -1015,6 +1025,28 @@ CM.Disp.AddMenu = function() {
10151025
var possibleHC = Game.HowMuchPrestige(Game.cookiesEarned + Game.cookiesReset);
10161026
var neededCook = CM.Sim.CookNeedPrest(possibleHC + 1) - (Game.cookiesEarned + Game.cookiesReset);
10171027

1028+
var halloCook = 0;
1029+
for (var i in CM.Data.HalloCookies) {
1030+
if (Game.Has(CM.Data.HalloCookies[i])) halloCook++;
1031+
}
1032+
var christCook = 0;
1033+
for (var i in CM.Data.ChristCookies) {
1034+
if (Game.Has(CM.Data.ChristCookies[i])) christCook++;
1035+
}
1036+
var valCook = 0;
1037+
for (var i in CM.Data.ValCookies) {
1038+
if (Game.Has(CM.Data.ValCookies[i])) valCook++;
1039+
else break;
1040+
}
1041+
var normEggs = 0;
1042+
for (var i in Game.eggDrops) {
1043+
if (Game.HasUnlocked(Game.eggDrops[i])) normEggs++;
1044+
}
1045+
var rareEggs = 0;
1046+
for (var i in Game.rareEggDrops) {
1047+
if (Game.HasUnlocked(Game.rareEggDrops[i])) rareEggs++;
1048+
}
1049+
10181050
var str = '<div class=\'title\' style=\'color: ' + CM.Disp.colorBlue + '\'>Cookie Monster Goodies</div>';
10191051
str += '<div class=\'listing\' style=\'padding:5px 16px; opacity:0.7; font-size: 17px; font-family: \"Kavoon\", Georgia, serif;\'>Lucky Cookies</div>';
10201052
str += '<div class=\'listing\'><b>\"Lucky!\" Cookies Required :</b> <span style=\'font-weight: bold; color: ' + luckyColor + ';\'>' + Beautify(CM.Cache.Lucky) + '</span>' + luckyTime + '</div>';
@@ -1037,8 +1069,13 @@ CM.Disp.AddMenu = function() {
10371069
if (Game.Has('Wrinklerspawn')) sucked *= 1.05;
10381070
str += '<div class=\'listing\'><b>Rewards of Popping :</b> ' + Beautify(sucked) + '</div>';
10391071
}
1072+
str += '<div class=\'listing\' style=\'padding:5px 16px; opacity:0.7; font-size: 17px; font-family: \"Kavoon\", Georgia, serif;\'>Season Specials</div>';
1073+
str += '<div class=\'listing\'><b>Halloween Cookies Bought :</b> ' + halloCook + ' of ' + CM.Data.HalloCookies.length + '</div>';
1074+
str += '<div class=\'listing\'><b>Christmas Cookies Bought :</b> ' + christCook + ' of ' + CM.Data.ChristCookies.length + '</div>';
1075+
str += '<div class=\'listing\'><b>Valentine Cookies Bought :</b> ' + valCook + ' of ' + CM.Data.ValCookies.length + '</div>';
1076+
str += '<div class=\'listing\'><b>Normal Eggs Unlocked :</b> ' + normEggs + ' of ' + Game.eggDrops.length + '</div>';
1077+
str += '<div class=\'listing\'><b>Rare Eggs Unlocked :</b> ' + rareEggs + ' of ' + Game.rareEggDrops.length + '</div>';
10401078
if (Game.season == 'christmas') {
1041-
str += '<div class=\'listing\' style=\'padding:5px 16px; opacity:0.7; font-size: 17px; font-family: \"Kavoon\", Georgia, serif;\'>Season Specials</div>';
10421079
str += '<div class=\'listing\'><b>Reindeer Reward :</b> ' + Beautify(CM.Cache.SeaSpec) + '</div>';
10431080
}
10441081

@@ -1465,6 +1502,10 @@ CM.Init = function() {
14651502
}
14661503
}
14671504

1505+
CM.Data.HalloCookies = ['Skull cookies', 'Ghost cookies', 'Bat cookies', 'Slime cookies', 'Pumpkin cookies', 'Eyeball cookies', 'Spider cookies'];
1506+
CM.Data.ChristCookies = ['Christmas tree biscuits', 'Snowflake biscuits', 'Snowman biscuits', 'Holly biscuits', 'Candy cane biscuits', 'Bell biscuits', 'Present biscuits'];
1507+
CM.Data.ValCookies = ['Pure heart biscuits', 'Ardent heart biscuits', 'Sour heart biscuits', 'Weeping heart biscuits', 'Golden heart biscuits', 'Eternal heart biscuits'];
1508+
14681509
//CM.Sim.DoSims = 1;
14691510
//CM.Sim.DoUpgradesSim = 1;
14701511

0 commit comments

Comments
 (0)