Change how chain and missing cookies/eggs stats work

This commit is contained in:
Aktanusa
2014-06-09 21:22:37 -04:00
parent ddf70d1aaa
commit 93f87913b4
3 changed files with 266 additions and 78 deletions

View File

@@ -83,12 +83,8 @@ CM.Cache.RemakeLucky = function() {
CM.Cache.LuckyRewardFrenzy = (CM.Cache.LuckyFrenzy * 0.1) + 13; CM.Cache.LuckyRewardFrenzy = (CM.Cache.LuckyFrenzy * 0.1) + 13;
} }
CM.Cache.RemakeChain = function() { CM.Cache.MaxChainMoni = function(digit, maxPayout) {
CM.Cache.Chain = Game.cookiesPs * 60 * 60 * 3 / 0.25;
var digit = 7;
var chain = 1 + Math.max(0, Math.ceil(Math.log(Game.cookies) / Math.LN10) - 10); var chain = 1 + Math.max(0, Math.ceil(Math.log(Game.cookies) / Math.LN10) - 10);
var maxPayout = Game.cookiesPs * 60 * 60 * 3;
var moni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain) * digit), maxPayout)); var moni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain) * digit), maxPayout));
var nextMoni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain + 1) * digit), maxPayout)); var nextMoni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain + 1) * digit), maxPayout));
while (nextMoni < maxPayout) { while (nextMoni < maxPayout) {
@@ -96,18 +92,39 @@ CM.Cache.RemakeChain = function() {
moni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain) * digit), maxPayout)); moni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain) * digit), maxPayout));
nextMoni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain + 1) * digit), maxPayout)); nextMoni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain + 1) * digit), maxPayout));
} }
CM.Cache.ChainReward = moni; return moni;
}
digit = 6;
chain = 1 + Math.max(0, Math.ceil(Math.log(Game.cookies) / Math.LN10) - 10); CM.Cache.RemakeChain = function() {
moni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain) * digit), maxPayout)); var maxPayout = Game.cookiesPs * 60 * 60 * 3;
nextMoni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain + 1) * digit), maxPayout)); if (Game.frenzy > 0) {
while (nextMoni < maxPayout) { maxPayout /= Game.frenzyPower;
chain++;
moni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain) * digit), maxPayout));
nextMoni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain + 1) * digit), maxPayout));
} }
CM.Cache.ChainWrathReward = moni;
CM.Cache.ChainReward = CM.Cache.MaxChainMoni(7, maxPayout);
CM.Cache.ChainWrathReward = CM.Cache.MaxChainMoni(6, maxPayout);
var base = 0;
if (CM.Cache.ChainReward > CM.Cache.ChainWrathReward) {
base = CM.Cache.ChainReward;
}
else {
base = CM.Cache.ChainWrathReward;
}
var count = 1;
while (base == base + count) {
count++;
}
CM.Cache.Chain = (base + count) / 0.25;
CM.Cache.ChainFrenzyReward = CM.Cache.MaxChainMoni(7, maxPayout * 7);
count = 1;
while(CM.Cache.ChainFrenzyReward == CM.Cache.ChainFrenzyReward + count) {
count++;
}
CM.Cache.ChainFrenzy = (CM.Cache.ChainFrenzyReward + count) / 0.25;
} }
CM.Cache.RemakeSeaSpec = function() { CM.Cache.RemakeSeaSpec = function() {
@@ -125,6 +142,8 @@ CM.Cache.SeaSpec = 0;
CM.Cache.Chain = 0; CM.Cache.Chain = 0;
CM.Cache.ChainReward = 0; CM.Cache.ChainReward = 0;
CM.Cache.ChainWrathReward = 0; CM.Cache.ChainWrathReward = 0;
CM.Cache.ChainFrenzy = 0;
CM.Cache.ChainFrenzyReward = 0;
/********** /**********
* Config * * Config *
**********/ **********/
@@ -973,31 +992,50 @@ CM.Disp.AddMenu = function() {
var chainColor = (Game.cookies < CM.Cache.Chain) ? CM.Disp.colorRed : CM.Disp.colorGreen; var chainColor = (Game.cookies < CM.Cache.Chain) ? CM.Disp.colorRed : CM.Disp.colorGreen;
var chainTime = (Game.cookies < CM.Cache.Chain) ? CM.Disp.FormatTime((CM.Cache.Chain - Game.cookies) / (Game.cookiesPs * (1 - Game.cpsSucked))) : ''; var chainTime = (Game.cookies < CM.Cache.Chain) ? CM.Disp.FormatTime((CM.Cache.Chain - Game.cookies) / (Game.cookiesPs * (1 - Game.cpsSucked))) : '';
var chainColorFrenzy = (Game.cookies < CM.Cache.ChainFrenzy) ? CM.Disp.colorRed : CM.Disp.colorGreen;
var chainTimeFrenzy = (Game.cookies < CM.Cache.ChainFrenzy) ? CM.Disp.FormatTime((CM.Cache.ChainFrenzy - Game.cookies) / (Game.cookiesPs * (1 - Game.cpsSucked))) : '';
var chainCurMax = Math.min(Game.cookiesPs * 60 * 60 * 3, Game.cookies * 0.25);
var chainCur = CM.Cache.MaxChainMoni(7, chainCurMax);
var chainCurWrath = CM.Cache.MaxChainMoni(6, chainCurMax);
var possibleHC = Game.HowMuchPrestige(Game.cookiesEarned + Game.cookiesReset); var possibleHC = Game.HowMuchPrestige(Game.cookiesEarned + Game.cookiesReset);
var neededCook = CM.Sim.CookNeedPrest(possibleHC + 1) - (Game.cookiesEarned + Game.cookiesReset); var neededCook = CM.Sim.CookNeedPrest(possibleHC + 1) - (Game.cookiesEarned + Game.cookiesReset);
var halloCook = 0; var specDisp = false;
var halloCook = [];
for (var i in CM.Data.HalloCookies) { for (var i in CM.Data.HalloCookies) {
if (Game.Has(CM.Data.HalloCookies[i])) halloCook++; if (!Game.Has(CM.Data.HalloCookies[i])) {
halloCook.push(CM.Data.HalloCookies[i]);
specDisp = true;
}
} }
var christCook = 0; var christCook = [];
for (var i in CM.Data.ChristCookies) { for (var i in CM.Data.ChristCookies) {
if (Game.Has(CM.Data.ChristCookies[i])) christCook++; if (!Game.Has(CM.Data.ChristCookies[i])) {
christCook.push(CM.Data.ChristCookies[i]);
specDisp = true;
}
} }
var valCook = 0; var valCook = [];
for (var i in CM.Data.ValCookies) { for (var i in CM.Data.ValCookies) {
if (Game.Has(CM.Data.ValCookies[i])) valCook++; if (!Game.Has(CM.Data.ValCookies[i])) {
else break; valCook.push(CM.Data.ValCookies[i]);
specDisp = true;
}
} }
var normEggs = 0; var normEggs = [];
for (var i in Game.eggDrops) { for (var i in Game.eggDrops) {
if (Game.HasUnlocked(Game.eggDrops[i])) normEggs++; if (!Game.HasUnlocked(Game.eggDrops[i])) {
normEggs.push(Game.eggDrops[i]);
specDisp = true;
}
} }
var rareEggs = 0; var rareEggs = [];
for (var i in Game.rareEggDrops) { for (var i in Game.rareEggDrops) {
if (Game.HasUnlocked(Game.rareEggDrops[i])) rareEggs++; if (!Game.HasUnlocked(Game.rareEggDrops[i])) {
rareEggs.push(Game.rareEggDrops[i]);
specDisp = true;
}
} }
var listing = function(name, text) { var listing = function(name, text) {
@@ -1050,9 +1088,24 @@ CM.Disp.AddMenu = function() {
chainReqSmall.textContent = ' (' + chainTime + ')'; chainReqSmall.textContent = ' (' + chainTime + ')';
chainReqFrag.appendChild(chainReqSmall); chainReqFrag.appendChild(chainReqSmall);
} }
stats.appendChild(listing('Chain Cookies Required', chainReqFrag)); stats.appendChild(listing('\"Chain\" Cookies Required', chainReqFrag));
stats.appendChild(listing('Chain Reward (MAX)', document.createTextNode(Beautify(CM.Cache.ChainReward)))); var chainReqFrenFrag = document.createDocumentFragment();
stats.appendChild(listing('Chain Reward (MAX) (Wrath)', document.createTextNode(Beautify(CM.Cache.ChainWrathReward)))); var chainReqFrenSpan = document.createElement('span');
chainReqFrenSpan.style.fontWeight = 'bold';
chainReqFrenSpan.style.color = chainColorFrenzy;
chainReqFrenSpan.textContent = Beautify(CM.Cache.ChainFrenzy);
chainReqFrenFrag.appendChild(chainReqFrenSpan);
if (chainTimeFrenzy != '') {
var chainReqFrenSmall = document.createElement('small');
chainReqFrenSmall.textContent = ' (' + chainTimeFrenzy + ')';
chainReqFrenFrag.appendChild(chainReqFrenSmall);
}
stats.appendChild(listing('\"Chain\" Cookies Required (Frenzy)', chainReqFrenFrag));
stats.appendChild(listing('\"Chain\" Reward (MAX)', document.createTextNode(Beautify(CM.Cache.ChainReward))));
stats.appendChild(listing('\"Chain\" Reward (MAX) (Wrath)', document.createTextNode(Beautify(CM.Cache.ChainWrathReward))));
stats.appendChild(listing('\"Chain\" Reward (MAX) (Frenzy)', document.createTextNode(Beautify(CM.Cache.ChainFrenzyReward))));
stats.appendChild(listing('\"Chain\" Reward (CUR)', document.createTextNode(Beautify(chainCur))));
stats.appendChild(listing('\"Chain\" Reward (CUR) (Wrath)', document.createTextNode(Beautify(chainCurWrath))));
stats.appendChild(header('Heavenly Chips')); stats.appendChild(header('Heavenly Chips'));
var hcMaxFrag = document.createDocumentFragment(); var hcMaxFrag = document.createDocumentFragment();
hcMaxFrag.appendChild(document.createTextNode(Beautify(possibleHC))); hcMaxFrag.appendChild(document.createTextNode(Beautify(possibleHC)));
@@ -1079,14 +1132,55 @@ CM.Disp.AddMenu = function() {
if (Game.Has('Wrinklerspawn')) sucked *= 1.05; if (Game.Has('Wrinklerspawn')) sucked *= 1.05;
stats.appendChild(listing('Rewards of Popping', document.createTextNode(Beautify(sucked)))); stats.appendChild(listing('Rewards of Popping', document.createTextNode(Beautify(sucked))));
} }
stats.appendChild(header('Season Specials')); if (Game.season == 'christmas' || specDisp) {
stats.appendChild(listing('Halloween Cookies Bought', document.createTextNode(halloCook + ' of ' + CM.Data.HalloCookies.length))); stats.appendChild(header('Season Specials'));
stats.appendChild(listing('Christmas Cookies Bought', document.createTextNode(christCook + ' of ' + CM.Data.ChristCookies.length)));
stats.appendChild(listing('Valentine Cookies Bought', document.createTextNode(valCook + ' of ' + CM.Data.ValCookies.length))); if (specDisp) {
stats.appendChild(listing('Normal Easter Eggs Unlocked', document.createTextNode(normEggs + ' of ' + Game.eggDrops.length))); var createSpecDisp = function(theSpecDisp) {
stats.appendChild(listing('Rare Easter Eggs Unlocked', document.createTextNode(rareEggs + ' of ' + Game.rareEggDrops.length))); var frag = document.createDocumentFragment();
if (Game.season == 'christmas') { frag.appendChild(document.createTextNode(theSpecDisp.length + ' '));
stats.appendChild(listing('Reindeer Reward', document.createTextNode(Beautify(CM.Cache.SeaSpec)))); span = document.createElement('span');
span.onmouseout = function() { Game.tooltip.hide(); };
var placeholder = document.createElement('div');
var missing = document.createElement('div');
missing.style.minWidth = '140px';
missing.style.marginBottom = '4px';
var title = document.createElement('div');
title.className = 'name';
title.style.marginBottom = '4px';
title.style.textAlign = 'center';
title.textContent = 'Missing';
missing.appendChild(title);
for (var i in theSpecDisp) {
var div = document.createElement('div');
div.style.textAlign = 'center';
div.appendChild(document.createTextNode(theSpecDisp[i]));
missing.appendChild(div);
}
placeholder.appendChild(missing);
span.onmouseover = function() {Game.tooltip.draw(this, escape(placeholder.innerHTML));};
span.style.cursor = 'default';
span.style.display = 'inline-block';
span.style.height = '10px';
span.style.width = '10px';
span.style.borderRadius = '5px';
span.style.textAlign = 'center';
span.style.backgroundColor = '#C0C0C0';
span.style.color = 'black';
span.style.fontSize = '9px';
span.style.verticalAlign = 'bottom';
span.textContent = '?';
frag.appendChild(span);
return frag;
}
if (halloCook.length != 0) stats.appendChild(listing('Halloween Cookies Left to Buy', createSpecDisp(halloCook)));
if (christCook.length != 0) stats.appendChild(listing('Christmas Cookies Left to Buy', createSpecDisp(christCook)));
if (valCook.length != 0) stats.appendChild(listing('Valentine Cookies Left to Buy', createSpecDisp(valCook)));
if (normEggs.length != 0) stats.appendChild(listing('Normal Easter Eggs Left to Unlock', createSpecDisp(normEggs)));
if (rareEggs.length != 0) stats.appendChild(listing('Rare Easter Eggs Left to Unlock', createSpecDisp(rareEggs)));
}
if (Game.season == 'christmas') stats.appendChild(listing('Reindeer Reward', document.createTextNode(Beautify(CM.Cache.SeaSpec))));
} }
l('menu').insertBefore(stats, l('menu').childNodes[2]); l('menu').insertBefore(stats, l('menu').childNodes[2]);

View File

@@ -63,12 +63,8 @@ CM.Cache.RemakeLucky = function() {
CM.Cache.LuckyRewardFrenzy = (CM.Cache.LuckyFrenzy * 0.1) + 13; CM.Cache.LuckyRewardFrenzy = (CM.Cache.LuckyFrenzy * 0.1) + 13;
} }
CM.Cache.RemakeChain = function() { CM.Cache.MaxChainMoni = function(digit, maxPayout) {
CM.Cache.Chain = Game.cookiesPs * 60 * 60 * 3 / 0.25;
var digit = 7;
var chain = 1 + Math.max(0, Math.ceil(Math.log(Game.cookies) / Math.LN10) - 10); var chain = 1 + Math.max(0, Math.ceil(Math.log(Game.cookies) / Math.LN10) - 10);
var maxPayout = Game.cookiesPs * 60 * 60 * 3;
var moni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain) * digit), maxPayout)); var moni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain) * digit), maxPayout));
var nextMoni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain + 1) * digit), maxPayout)); var nextMoni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain + 1) * digit), maxPayout));
while (nextMoni < maxPayout) { while (nextMoni < maxPayout) {
@@ -76,18 +72,39 @@ CM.Cache.RemakeChain = function() {
moni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain) * digit), maxPayout)); moni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain) * digit), maxPayout));
nextMoni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain + 1) * digit), maxPayout)); nextMoni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain + 1) * digit), maxPayout));
} }
CM.Cache.ChainReward = moni; return moni;
}
digit = 6;
chain = 1 + Math.max(0, Math.ceil(Math.log(Game.cookies) / Math.LN10) - 10); CM.Cache.RemakeChain = function() {
moni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain) * digit), maxPayout)); var maxPayout = Game.cookiesPs * 60 * 60 * 3;
nextMoni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain + 1) * digit), maxPayout)); if (Game.frenzy > 0) {
while (nextMoni < maxPayout) { maxPayout /= Game.frenzyPower;
chain++;
moni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain) * digit), maxPayout));
nextMoni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, chain + 1) * digit), maxPayout));
} }
CM.Cache.ChainWrathReward = moni;
CM.Cache.ChainReward = CM.Cache.MaxChainMoni(7, maxPayout);
CM.Cache.ChainWrathReward = CM.Cache.MaxChainMoni(6, maxPayout);
var base = 0;
if (CM.Cache.ChainReward > CM.Cache.ChainWrathReward) {
base = CM.Cache.ChainReward;
}
else {
base = CM.Cache.ChainWrathReward;
}
var count = 1;
while (base == base + count) {
count++;
}
CM.Cache.Chain = (base + count) / 0.25;
CM.Cache.ChainFrenzyReward = CM.Cache.MaxChainMoni(7, maxPayout * 7);
count = 1;
while(CM.Cache.ChainFrenzyReward == CM.Cache.ChainFrenzyReward + count) {
count++;
}
CM.Cache.ChainFrenzy = (CM.Cache.ChainFrenzyReward + count) / 0.25;
} }
CM.Cache.RemakeSeaSpec = function() { CM.Cache.RemakeSeaSpec = function() {
@@ -105,3 +122,5 @@ CM.Cache.SeaSpec = 0;
CM.Cache.Chain = 0; CM.Cache.Chain = 0;
CM.Cache.ChainReward = 0; CM.Cache.ChainReward = 0;
CM.Cache.ChainWrathReward = 0; CM.Cache.ChainWrathReward = 0;
CM.Cache.ChainFrenzy = 0;
CM.Cache.ChainFrenzyReward = 0;

View File

@@ -754,31 +754,50 @@ CM.Disp.AddMenu = function() {
var chainColor = (Game.cookies < CM.Cache.Chain) ? CM.Disp.colorRed : CM.Disp.colorGreen; var chainColor = (Game.cookies < CM.Cache.Chain) ? CM.Disp.colorRed : CM.Disp.colorGreen;
var chainTime = (Game.cookies < CM.Cache.Chain) ? CM.Disp.FormatTime((CM.Cache.Chain - Game.cookies) / (Game.cookiesPs * (1 - Game.cpsSucked))) : ''; var chainTime = (Game.cookies < CM.Cache.Chain) ? CM.Disp.FormatTime((CM.Cache.Chain - Game.cookies) / (Game.cookiesPs * (1 - Game.cpsSucked))) : '';
var chainColorFrenzy = (Game.cookies < CM.Cache.ChainFrenzy) ? CM.Disp.colorRed : CM.Disp.colorGreen;
var chainTimeFrenzy = (Game.cookies < CM.Cache.ChainFrenzy) ? CM.Disp.FormatTime((CM.Cache.ChainFrenzy - Game.cookies) / (Game.cookiesPs * (1 - Game.cpsSucked))) : '';
var chainCurMax = Math.min(Game.cookiesPs * 60 * 60 * 3, Game.cookies * 0.25);
var chainCur = CM.Cache.MaxChainMoni(7, chainCurMax);
var chainCurWrath = CM.Cache.MaxChainMoni(6, chainCurMax);
var possibleHC = Game.HowMuchPrestige(Game.cookiesEarned + Game.cookiesReset); var possibleHC = Game.HowMuchPrestige(Game.cookiesEarned + Game.cookiesReset);
var neededCook = CM.Sim.CookNeedPrest(possibleHC + 1) - (Game.cookiesEarned + Game.cookiesReset); var neededCook = CM.Sim.CookNeedPrest(possibleHC + 1) - (Game.cookiesEarned + Game.cookiesReset);
var halloCook = 0; var specDisp = false;
var halloCook = [];
for (var i in CM.Data.HalloCookies) { for (var i in CM.Data.HalloCookies) {
if (Game.Has(CM.Data.HalloCookies[i])) halloCook++; if (!Game.Has(CM.Data.HalloCookies[i])) {
halloCook.push(CM.Data.HalloCookies[i]);
specDisp = true;
}
} }
var christCook = 0; var christCook = [];
for (var i in CM.Data.ChristCookies) { for (var i in CM.Data.ChristCookies) {
if (Game.Has(CM.Data.ChristCookies[i])) christCook++; if (!Game.Has(CM.Data.ChristCookies[i])) {
christCook.push(CM.Data.ChristCookies[i]);
specDisp = true;
}
} }
var valCook = 0; var valCook = [];
for (var i in CM.Data.ValCookies) { for (var i in CM.Data.ValCookies) {
if (Game.Has(CM.Data.ValCookies[i])) valCook++; if (!Game.Has(CM.Data.ValCookies[i])) {
else break; valCook.push(CM.Data.ValCookies[i]);
specDisp = true;
}
} }
var normEggs = 0; var normEggs = [];
for (var i in Game.eggDrops) { for (var i in Game.eggDrops) {
if (Game.HasUnlocked(Game.eggDrops[i])) normEggs++; if (!Game.HasUnlocked(Game.eggDrops[i])) {
normEggs.push(Game.eggDrops[i]);
specDisp = true;
}
} }
var rareEggs = 0; var rareEggs = [];
for (var i in Game.rareEggDrops) { for (var i in Game.rareEggDrops) {
if (Game.HasUnlocked(Game.rareEggDrops[i])) rareEggs++; if (!Game.HasUnlocked(Game.rareEggDrops[i])) {
rareEggs.push(Game.rareEggDrops[i]);
specDisp = true;
}
} }
var listing = function(name, text) { var listing = function(name, text) {
@@ -831,9 +850,24 @@ CM.Disp.AddMenu = function() {
chainReqSmall.textContent = ' (' + chainTime + ')'; chainReqSmall.textContent = ' (' + chainTime + ')';
chainReqFrag.appendChild(chainReqSmall); chainReqFrag.appendChild(chainReqSmall);
} }
stats.appendChild(listing('Chain Cookies Required', chainReqFrag)); stats.appendChild(listing('\"Chain\" Cookies Required', chainReqFrag));
stats.appendChild(listing('Chain Reward (MAX)', document.createTextNode(Beautify(CM.Cache.ChainReward)))); var chainReqFrenFrag = document.createDocumentFragment();
stats.appendChild(listing('Chain Reward (MAX) (Wrath)', document.createTextNode(Beautify(CM.Cache.ChainWrathReward)))); var chainReqFrenSpan = document.createElement('span');
chainReqFrenSpan.style.fontWeight = 'bold';
chainReqFrenSpan.style.color = chainColorFrenzy;
chainReqFrenSpan.textContent = Beautify(CM.Cache.ChainFrenzy);
chainReqFrenFrag.appendChild(chainReqFrenSpan);
if (chainTimeFrenzy != '') {
var chainReqFrenSmall = document.createElement('small');
chainReqFrenSmall.textContent = ' (' + chainTimeFrenzy + ')';
chainReqFrenFrag.appendChild(chainReqFrenSmall);
}
stats.appendChild(listing('\"Chain\" Cookies Required (Frenzy)', chainReqFrenFrag));
stats.appendChild(listing('\"Chain\" Reward (MAX)', document.createTextNode(Beautify(CM.Cache.ChainReward))));
stats.appendChild(listing('\"Chain\" Reward (MAX) (Wrath)', document.createTextNode(Beautify(CM.Cache.ChainWrathReward))));
stats.appendChild(listing('\"Chain\" Reward (MAX) (Frenzy)', document.createTextNode(Beautify(CM.Cache.ChainFrenzyReward))));
stats.appendChild(listing('\"Chain\" Reward (CUR)', document.createTextNode(Beautify(chainCur))));
stats.appendChild(listing('\"Chain\" Reward (CUR) (Wrath)', document.createTextNode(Beautify(chainCurWrath))));
stats.appendChild(header('Heavenly Chips')); stats.appendChild(header('Heavenly Chips'));
var hcMaxFrag = document.createDocumentFragment(); var hcMaxFrag = document.createDocumentFragment();
hcMaxFrag.appendChild(document.createTextNode(Beautify(possibleHC))); hcMaxFrag.appendChild(document.createTextNode(Beautify(possibleHC)));
@@ -860,14 +894,55 @@ CM.Disp.AddMenu = function() {
if (Game.Has('Wrinklerspawn')) sucked *= 1.05; if (Game.Has('Wrinklerspawn')) sucked *= 1.05;
stats.appendChild(listing('Rewards of Popping', document.createTextNode(Beautify(sucked)))); stats.appendChild(listing('Rewards of Popping', document.createTextNode(Beautify(sucked))));
} }
stats.appendChild(header('Season Specials')); if (Game.season == 'christmas' || specDisp) {
stats.appendChild(listing('Halloween Cookies Bought', document.createTextNode(halloCook + ' of ' + CM.Data.HalloCookies.length))); stats.appendChild(header('Season Specials'));
stats.appendChild(listing('Christmas Cookies Bought', document.createTextNode(christCook + ' of ' + CM.Data.ChristCookies.length)));
stats.appendChild(listing('Valentine Cookies Bought', document.createTextNode(valCook + ' of ' + CM.Data.ValCookies.length))); if (specDisp) {
stats.appendChild(listing('Normal Easter Eggs Unlocked', document.createTextNode(normEggs + ' of ' + Game.eggDrops.length))); var createSpecDisp = function(theSpecDisp) {
stats.appendChild(listing('Rare Easter Eggs Unlocked', document.createTextNode(rareEggs + ' of ' + Game.rareEggDrops.length))); var frag = document.createDocumentFragment();
if (Game.season == 'christmas') { frag.appendChild(document.createTextNode(theSpecDisp.length + ' '));
stats.appendChild(listing('Reindeer Reward', document.createTextNode(Beautify(CM.Cache.SeaSpec)))); span = document.createElement('span');
span.onmouseout = function() { Game.tooltip.hide(); };
var placeholder = document.createElement('div');
var missing = document.createElement('div');
missing.style.minWidth = '140px';
missing.style.marginBottom = '4px';
var title = document.createElement('div');
title.className = 'name';
title.style.marginBottom = '4px';
title.style.textAlign = 'center';
title.textContent = 'Missing';
missing.appendChild(title);
for (var i in theSpecDisp) {
var div = document.createElement('div');
div.style.textAlign = 'center';
div.appendChild(document.createTextNode(theSpecDisp[i]));
missing.appendChild(div);
}
placeholder.appendChild(missing);
span.onmouseover = function() {Game.tooltip.draw(this, escape(placeholder.innerHTML));};
span.style.cursor = 'default';
span.style.display = 'inline-block';
span.style.height = '10px';
span.style.width = '10px';
span.style.borderRadius = '5px';
span.style.textAlign = 'center';
span.style.backgroundColor = '#C0C0C0';
span.style.color = 'black';
span.style.fontSize = '9px';
span.style.verticalAlign = 'bottom';
span.textContent = '?';
frag.appendChild(span);
return frag;
}
if (halloCook.length != 0) stats.appendChild(listing('Halloween Cookies Left to Buy', createSpecDisp(halloCook)));
if (christCook.length != 0) stats.appendChild(listing('Christmas Cookies Left to Buy', createSpecDisp(christCook)));
if (valCook.length != 0) stats.appendChild(listing('Valentine Cookies Left to Buy', createSpecDisp(valCook)));
if (normEggs.length != 0) stats.appendChild(listing('Normal Easter Eggs Left to Unlock', createSpecDisp(normEggs)));
if (rareEggs.length != 0) stats.appendChild(listing('Rare Easter Eggs Left to Unlock', createSpecDisp(rareEggs)));
}
if (Game.season == 'christmas') stats.appendChild(listing('Reindeer Reward', document.createTextNode(Beautify(CM.Cache.SeaSpec))));
} }
l('menu').insertBefore(stats, l('menu').childNodes[2]); l('menu').insertBefore(stats, l('menu').childNodes[2]);