Added back reset bonus income stat

This commit is contained in:
Aktanusa
2014-06-02 16:09:10 -04:00
parent 07907265b9
commit 734ecdae1b
3 changed files with 64 additions and 8 deletions

View File

@@ -836,11 +836,11 @@ CM.Disp.UpdateTitle = function() {
} }
CM.Disp.AddMenu = function() { CM.Disp.AddMenu = function() {
var title = function(text) { var title = function() {
var div = document.createElement('div'); var div = document.createElement('div');
div.className = 'title'; div.className = 'title';
div.style.color = CM.Disp.colorBlue; div.style.color = CM.Disp.colorBlue;
div.textContent = text; div.textContent = 'Cookie Monster Goodies';
return div; return div;
} }
var header = function(text) { var header = function(text) {
@@ -857,7 +857,7 @@ CM.Disp.AddMenu = function() {
if (Game.onMenu == 'prefs') { if (Game.onMenu == 'prefs') {
var frag = document.createDocumentFragment(); var frag = document.createDocumentFragment();
frag.appendChild(title('Cookie Monster Goodies')); frag.appendChild(title());
var listing = function(config) { var listing = function(config) {
var div = document.createElement('div'); var div = document.createElement('div');
@@ -976,7 +976,7 @@ CM.Disp.AddMenu = function() {
div.appendChild(text); div.appendChild(text);
return div; return div;
} }
stats.appendChild(title('Cookie Monster Goodies')); stats.appendChild(title());
stats.appendChild(header('Lucky Cookies')); stats.appendChild(header('Lucky Cookies'));
var luckyReqFrag = document.createDocumentFragment(); var luckyReqFrag = document.createDocumentFragment();
var luckyReqSpan = document.createElement('span'); var luckyReqSpan = document.createElement('span');
@@ -1020,6 +1020,7 @@ CM.Disp.AddMenu = function() {
stats.appendChild(listing('Heavenly Chips (CUR) : ', hcCurFrag)); stats.appendChild(listing('Heavenly Chips (CUR) : ', hcCurFrag));
stats.appendChild(listing('Cookies To Next Chip : ', document.createTextNode(Beautify(neededCook)))); stats.appendChild(listing('Cookies To Next Chip : ', document.createTextNode(Beautify(neededCook))));
stats.appendChild(listing('Time To Next Chip : ', document.createTextNode(CM.Disp.FormatTime(neededCook / (Game.cookiesPs * (1 - Game.cpsSucked)), 1)))); stats.appendChild(listing('Time To Next Chip : ', document.createTextNode(CM.Disp.FormatTime(neededCook / (Game.cookiesPs * (1 - Game.cpsSucked)), 1))));
stats.appendChild(listing('Reset Bonus Income : ', document.createTextNode(Beautify(CM.Sim.ResetBonus()))));
if (Game.cpsSucked > 0) { if (Game.cpsSucked > 0) {
stats.appendChild(header('Wrinklers')); stats.appendChild(header('Wrinklers'));
var sucked = 0; var sucked = 0;
@@ -1788,6 +1789,33 @@ CM.Sim.BuyUpgrades = function() {
} }
} }
CM.Sim.ResetBonus = function() {
CM.Sim.CopyData();
if (Game.cookiesEarned >= 1000000) CM.Sim.Win('Sacrifice');
if (Game.cookiesEarned >= 1000000000) CM.Sim.Win('Oblivion');
if (Game.cookiesEarned >= 1000000000000) CM.Sim.Win('From scratch');
if (Game.cookiesEarned >= 1000000000000000) CM.Sim.Win('Nihilism');
if (Game.cookiesEarned >= 1000000000000000000) CM.Sim.Win('Dematerialize');
if (Game.cookiesEarned >= 1000000000000000000000) CM.Sim.Win('Nil zero zilch');
if (Game.cookiesEarned >= 1000000000000000000000000) CM.Sim.Win('Transcendence');
if (Game.cookiesEarned >= 1000000000000000000000000000) CM.Sim.Win('Obliterate');
if (Game.cookiesEarned >= 1000000000000000000000000000000) CM.Sim.Win('Negative void');
CM.Sim.prestige = Game.HowMuchPrestige(Game.cookiesEarned + Game.cookiesReset);
var lastAchievementsOwned = CM.Sim.AchievementsOwned;
CM.Sim.CalculateGains();
if (lastAchievementsOwned != CM.Sim.AchievementsOwned) {
CM.Sim.CalculateGains();
}
return (CM.Sim.cookiesPs - Game.cookiesPs);
}
/********** /**********
* Footer * * Footer *
**********/ **********/

View File

@@ -646,11 +646,11 @@ CM.Disp.UpdateTitle = function() {
} }
CM.Disp.AddMenu = function() { CM.Disp.AddMenu = function() {
var title = function(text) { var title = function() {
var div = document.createElement('div'); var div = document.createElement('div');
div.className = 'title'; div.className = 'title';
div.style.color = CM.Disp.colorBlue; div.style.color = CM.Disp.colorBlue;
div.textContent = text; div.textContent = 'Cookie Monster Goodies';
return div; return div;
} }
var header = function(text) { var header = function(text) {
@@ -667,7 +667,7 @@ CM.Disp.AddMenu = function() {
if (Game.onMenu == 'prefs') { if (Game.onMenu == 'prefs') {
var frag = document.createDocumentFragment(); var frag = document.createDocumentFragment();
frag.appendChild(title('Cookie Monster Goodies')); frag.appendChild(title());
var listing = function(config) { var listing = function(config) {
var div = document.createElement('div'); var div = document.createElement('div');
@@ -786,7 +786,7 @@ CM.Disp.AddMenu = function() {
div.appendChild(text); div.appendChild(text);
return div; return div;
} }
stats.appendChild(title('Cookie Monster Goodies')); stats.appendChild(title());
stats.appendChild(header('Lucky Cookies')); stats.appendChild(header('Lucky Cookies'));
var luckyReqFrag = document.createDocumentFragment(); var luckyReqFrag = document.createDocumentFragment();
var luckyReqSpan = document.createElement('span'); var luckyReqSpan = document.createElement('span');
@@ -830,6 +830,7 @@ CM.Disp.AddMenu = function() {
stats.appendChild(listing('Heavenly Chips (CUR) : ', hcCurFrag)); stats.appendChild(listing('Heavenly Chips (CUR) : ', hcCurFrag));
stats.appendChild(listing('Cookies To Next Chip : ', document.createTextNode(Beautify(neededCook)))); stats.appendChild(listing('Cookies To Next Chip : ', document.createTextNode(Beautify(neededCook))));
stats.appendChild(listing('Time To Next Chip : ', document.createTextNode(CM.Disp.FormatTime(neededCook / (Game.cookiesPs * (1 - Game.cpsSucked)), 1)))); stats.appendChild(listing('Time To Next Chip : ', document.createTextNode(CM.Disp.FormatTime(neededCook / (Game.cookiesPs * (1 - Game.cpsSucked)), 1))));
stats.appendChild(listing('Reset Bonus Income : ', document.createTextNode(Beautify(CM.Sim.ResetBonus()))));
if (Game.cpsSucked > 0) { if (Game.cpsSucked > 0) {
stats.appendChild(header('Wrinklers')); stats.appendChild(header('Wrinklers'));
var sucked = 0; var sucked = 0;

View File

@@ -350,3 +350,30 @@ CM.Sim.BuyUpgrades = function() {
} }
} }
CM.Sim.ResetBonus = function() {
CM.Sim.CopyData();
if (Game.cookiesEarned >= 1000000) CM.Sim.Win('Sacrifice');
if (Game.cookiesEarned >= 1000000000) CM.Sim.Win('Oblivion');
if (Game.cookiesEarned >= 1000000000000) CM.Sim.Win('From scratch');
if (Game.cookiesEarned >= 1000000000000000) CM.Sim.Win('Nihilism');
if (Game.cookiesEarned >= 1000000000000000000) CM.Sim.Win('Dematerialize');
if (Game.cookiesEarned >= 1000000000000000000000) CM.Sim.Win('Nil zero zilch');
if (Game.cookiesEarned >= 1000000000000000000000000) CM.Sim.Win('Transcendence');
if (Game.cookiesEarned >= 1000000000000000000000000000) CM.Sim.Win('Obliterate');
if (Game.cookiesEarned >= 1000000000000000000000000000000) CM.Sim.Win('Negative void');
CM.Sim.prestige = Game.HowMuchPrestige(Game.cookiesEarned + Game.cookiesReset);
var lastAchievementsOwned = CM.Sim.AchievementsOwned;
CM.Sim.CalculateGains();
if (lastAchievementsOwned != CM.Sim.AchievementsOwned) {
CM.Sim.CalculateGains();
}
return (CM.Sim.cookiesPs - Game.cookiesPs);
}