Fixed a few spelling errors and whitespace (#3)
* linting, spelling errors
This commit is contained in:
180
CookieMonster.js
180
CookieMonster.js
@@ -17,11 +17,10 @@ CM.Data = {};
|
|||||||
CM.Disp = {};
|
CM.Disp = {};
|
||||||
|
|
||||||
CM.Sim = {};
|
CM.Sim = {};
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
* Cache *
|
* Cache *
|
||||||
*********/
|
*********/
|
||||||
|
|
||||||
CM.Cache.AddQueue = function() {
|
CM.Cache.AddQueue = function() {
|
||||||
CM.Cache.Queue = document.createElement('script');
|
CM.Cache.Queue = document.createElement('script');
|
||||||
CM.Cache.Queue.type = 'text/javascript';
|
CM.Cache.Queue.type = 'text/javascript';
|
||||||
@@ -50,10 +49,10 @@ CM.Cache.RemakeIncome = function() {
|
|||||||
|
|
||||||
// Simulate Upgrade Buys
|
// Simulate Upgrade Buys
|
||||||
CM.Sim.BuyUpgrades();
|
CM.Sim.BuyUpgrades();
|
||||||
|
|
||||||
// Simulate Building Buys for 10 amount
|
// Simulate Building Buys for 10 amount
|
||||||
CM.Sim.BuyBuildings(10, 'Objects10');
|
CM.Sim.BuyBuildings(10, 'Objects10');
|
||||||
|
|
||||||
// Simulate Building Buys for 100 amount
|
// Simulate Building Buys for 100 amount
|
||||||
CM.Sim.BuyBuildings(100, 'Objects100');
|
CM.Sim.BuyBuildings(100, 'Objects100');
|
||||||
}
|
}
|
||||||
@@ -142,15 +141,15 @@ CM.Cache.RemakeBuildingsOtherPP = function(amount, target) {
|
|||||||
CM.Cache.RemakePP = function() {
|
CM.Cache.RemakePP = function() {
|
||||||
// Buildings for 1 amount
|
// Buildings for 1 amount
|
||||||
CM.Cache.RemakeBuildingsPP();
|
CM.Cache.RemakeBuildingsPP();
|
||||||
|
|
||||||
// Upgrades
|
// Upgrades
|
||||||
CM.Cache.RemakeUpgradePP();
|
CM.Cache.RemakeUpgradePP();
|
||||||
|
|
||||||
// Buildings for 10 amount
|
// Buildings for 10 amount
|
||||||
CM.Cache.RemakeBuildingsOtherPP(10, 'Objects10');
|
CM.Cache.RemakeBuildingsOtherPP(10, 'Objects10');
|
||||||
|
|
||||||
// Buildings for 100 amount
|
// Buildings for 100 amount
|
||||||
CM.Cache.RemakeBuildingsOtherPP(100, 'Objects100');
|
CM.Cache.RemakeBuildingsOtherPP(100, 'Objects100');
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Cache.RemakeLucky = function() {
|
CM.Cache.RemakeLucky = function() {
|
||||||
@@ -176,11 +175,11 @@ CM.Cache.MaxChainMoni = function(digit, maxPayout) {
|
|||||||
CM.Cache.RemakeChain = function() {
|
CM.Cache.RemakeChain = function() {
|
||||||
var maxPayout = CM.Cache.NoGoldSwitchCookiesPS * 60 * 60 * 6;
|
var maxPayout = CM.Cache.NoGoldSwitchCookiesPS * 60 * 60 * 6;
|
||||||
maxPayout /= CM.Sim.getCPSBuffMult();
|
maxPayout /= CM.Sim.getCPSBuffMult();
|
||||||
|
|
||||||
CM.Cache.ChainReward = CM.Cache.MaxChainMoni(7, maxPayout);
|
CM.Cache.ChainReward = CM.Cache.MaxChainMoni(7, maxPayout);
|
||||||
|
|
||||||
CM.Cache.ChainWrathReward = CM.Cache.MaxChainMoni(6, maxPayout);
|
CM.Cache.ChainWrathReward = CM.Cache.MaxChainMoni(6, maxPayout);
|
||||||
|
|
||||||
if (maxPayout < CM.Cache.ChainReward) {
|
if (maxPayout < CM.Cache.ChainReward) {
|
||||||
CM.Cache.Chain = 0;
|
CM.Cache.Chain = 0;
|
||||||
}
|
}
|
||||||
@@ -193,11 +192,11 @@ CM.Cache.RemakeChain = function() {
|
|||||||
else {
|
else {
|
||||||
CM.Cache.ChainWrath = CM.Cache.NextNumber(CM.Cache.ChainWrathReward) / 0.25;
|
CM.Cache.ChainWrath = CM.Cache.NextNumber(CM.Cache.ChainWrathReward) / 0.25;
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Cache.ChainFrenzyReward = CM.Cache.MaxChainMoni(7, maxPayout * 7);
|
CM.Cache.ChainFrenzyReward = CM.Cache.MaxChainMoni(7, maxPayout * 7);
|
||||||
|
|
||||||
CM.Cache.ChainFrenzyWrathReward = CM.Cache.MaxChainMoni(6, maxPayout * 7);
|
CM.Cache.ChainFrenzyWrathReward = CM.Cache.MaxChainMoni(6, maxPayout * 7);
|
||||||
|
|
||||||
if ((maxPayout * 7) < CM.Cache.ChainFrenzyReward) {
|
if ((maxPayout * 7) < CM.Cache.ChainFrenzyReward) {
|
||||||
CM.Cache.ChainFrenzy = 0;
|
CM.Cache.ChainFrenzy = 0;
|
||||||
}
|
}
|
||||||
@@ -216,7 +215,7 @@ CM.Cache.RemakeSeaSpec = function() {
|
|||||||
if (Game.season == 'christmas') {
|
if (Game.season == 'christmas') {
|
||||||
var val = Game.cookiesPs * 60;
|
var val = Game.cookiesPs * 60;
|
||||||
if (Game.hasBuff('Elder frenzy')) val *= 0.5; // very sorry
|
if (Game.hasBuff('Elder frenzy')) val *= 0.5; // very sorry
|
||||||
if (Game.hasBuff('Frenzy')) val *= 0.75; // I sincerely apologize
|
if (Game.hasBuff('Frenzy')) val *= 0.75; // I sincerely apologize
|
||||||
CM.Cache.SeaSpec = Math.max(25, val);
|
CM.Cache.SeaSpec = Math.max(25, val);
|
||||||
if (Game.Has('Ho ho ho-flavored frosting')) CM.Cache.SeaSpec *= 2;
|
if (Game.Has('Ho ho ho-flavored frosting')) CM.Cache.SeaSpec *= 2;
|
||||||
}
|
}
|
||||||
@@ -260,7 +259,7 @@ CM.Cache.InitCookiesDiff = function() {
|
|||||||
|
|
||||||
CM.Cache.UpdateAvgCPS = function() {
|
CM.Cache.UpdateAvgCPS = function() {
|
||||||
var currDate = Math.floor(Date.now() / 1000);
|
var currDate = Math.floor(Date.now() / 1000);
|
||||||
if (CM.Cache.lastDate != currDate) {
|
if (CM.Cache.lastDate != currDate) {
|
||||||
var choEggTotal = Game.cookies + CM.Cache.SellForChoEgg;
|
var choEggTotal = Game.cookies + CM.Cache.SellForChoEgg;
|
||||||
if (Game.cpsSucked > 0) {
|
if (Game.cpsSucked > 0) {
|
||||||
choEggTotal += CM.Cache.WrinkGodBank;
|
choEggTotal += CM.Cache.WrinkGodBank;
|
||||||
@@ -277,7 +276,7 @@ CM.Cache.UpdateAvgCPS = function() {
|
|||||||
CM.Cache.CookiesDiff.enqueue(bankDiffAvg);
|
CM.Cache.CookiesDiff.enqueue(bankDiffAvg);
|
||||||
CM.Cache.WrinkDiff.enqueue(wrinkDiffAvg);
|
CM.Cache.WrinkDiff.enqueue(wrinkDiffAvg);
|
||||||
CM.Cache.ChoEggDiff.enqueue(choEggDiffAvg);
|
CM.Cache.ChoEggDiff.enqueue(choEggDiffAvg);
|
||||||
CM.Cache.ClicksDiff.enqueue(clicksDiffAvg);
|
CM.Cache.ClicksDiff.enqueue(clicksDiffAvg);
|
||||||
}
|
}
|
||||||
// Assumes the queues are the same length
|
// Assumes the queues are the same length
|
||||||
while (CM.Cache.CookiesDiff.getLength() > 1800) {
|
while (CM.Cache.CookiesDiff.getLength() > 1800) {
|
||||||
@@ -285,7 +284,7 @@ CM.Cache.UpdateAvgCPS = function() {
|
|||||||
CM.Cache.WrinkDiff.dequeue();
|
CM.Cache.WrinkDiff.dequeue();
|
||||||
CM.Cache.ClicksDiff.dequeue();
|
CM.Cache.ClicksDiff.dequeue();
|
||||||
}
|
}
|
||||||
|
|
||||||
while (CM.Cache.ClicksDiff.getLength() > 30) {
|
while (CM.Cache.ClicksDiff.getLength() > 30) {
|
||||||
CM.Cache.ClicksDiff.dequeue();
|
CM.Cache.ClicksDiff.dequeue();
|
||||||
}
|
}
|
||||||
@@ -295,14 +294,14 @@ CM.Cache.UpdateAvgCPS = function() {
|
|||||||
CM.Cache.lastWrinkCookies = CM.Cache.WrinkBank;
|
CM.Cache.lastWrinkCookies = CM.Cache.WrinkBank;
|
||||||
CM.Cache.lastChoEgg = choEggTotal;
|
CM.Cache.lastChoEgg = choEggTotal;
|
||||||
CM.Cache.lastClicks = Game.cookieClicks;
|
CM.Cache.lastClicks = Game.cookieClicks;
|
||||||
|
|
||||||
var sortedGainBank = new Array();
|
var sortedGainBank = new Array();
|
||||||
var sortedGainWrink = new Array();
|
var sortedGainWrink = new Array();
|
||||||
var sortedGainChoEgg = new Array();
|
var sortedGainChoEgg = new Array();
|
||||||
|
|
||||||
var cpsLength = Math.min(CM.Cache.CookiesDiff.getLength(), CM.Disp.times[CM.Config.AvgCPSHist] * 60);
|
var cpsLength = Math.min(CM.Cache.CookiesDiff.getLength(), CM.Disp.times[CM.Config.AvgCPSHist] * 60);
|
||||||
|
|
||||||
// Assumes the queues are the same length
|
// Assumes the queues are the same length
|
||||||
for (var i = CM.Cache.CookiesDiff.getLength() - cpsLength; i < CM.Cache.CookiesDiff.getLength(); i++) {
|
for (var i = CM.Cache.CookiesDiff.getLength() - cpsLength; i < CM.Cache.CookiesDiff.getLength(); i++) {
|
||||||
sortedGainBank.push(CM.Cache.CookiesDiff.get(i));
|
sortedGainBank.push(CM.Cache.CookiesDiff.get(i));
|
||||||
sortedGainWrink.push(CM.Cache.WrinkDiff.get(i));
|
sortedGainWrink.push(CM.Cache.WrinkDiff.get(i));
|
||||||
@@ -312,9 +311,9 @@ CM.Cache.UpdateAvgCPS = function() {
|
|||||||
sortedGainBank.sort(function(a, b) { return a - b; });
|
sortedGainBank.sort(function(a, b) { return a - b; });
|
||||||
sortedGainWrink.sort(function(a, b) { return a - b; });
|
sortedGainWrink.sort(function(a, b) { return a - b; });
|
||||||
sortedGainChoEgg.sort(function(a, b) { return a - b; });
|
sortedGainChoEgg.sort(function(a, b) { return a - b; });
|
||||||
|
|
||||||
var cut = Math.round(sortedGainBank.length / 10);
|
var cut = Math.round(sortedGainBank.length / 10);
|
||||||
|
|
||||||
while (cut > 0) {
|
while (cut > 0) {
|
||||||
sortedGainBank.shift();
|
sortedGainBank.shift();
|
||||||
sortedGainBank.pop();
|
sortedGainBank.pop();
|
||||||
@@ -324,7 +323,7 @@ CM.Cache.UpdateAvgCPS = function() {
|
|||||||
sortedGainChoEgg.pop();
|
sortedGainChoEgg.pop();
|
||||||
cut--;
|
cut--;
|
||||||
}
|
}
|
||||||
|
|
||||||
var totalGainBank = 0;
|
var totalGainBank = 0;
|
||||||
var totalGainWrink = 0;
|
var totalGainWrink = 0;
|
||||||
var totalGainChoEgg = 0;
|
var totalGainChoEgg = 0;
|
||||||
@@ -335,9 +334,9 @@ CM.Cache.UpdateAvgCPS = function() {
|
|||||||
totalGainChoEgg += sortedGainChoEgg[i];
|
totalGainChoEgg += sortedGainChoEgg[i];
|
||||||
}
|
}
|
||||||
CM.Cache.AvgCPS = (totalGainBank + (CM.Config.CalcWrink ? totalGainWrink : 0)) / sortedGainBank.length;
|
CM.Cache.AvgCPS = (totalGainBank + (CM.Config.CalcWrink ? totalGainWrink : 0)) / sortedGainBank.length;
|
||||||
|
|
||||||
var choEgg = (Game.HasUnlocked('Chocolate egg') && !Game.Has('Chocolate egg'));
|
var choEgg = (Game.HasUnlocked('Chocolate egg') && !Game.Has('Chocolate egg'));
|
||||||
|
|
||||||
if (choEgg || CM.Config.CalcWrink == 0) {
|
if (choEgg || CM.Config.CalcWrink == 0) {
|
||||||
CM.Cache.AvgCPSChoEgg = (totalGainBank + totalGainWrink + (choEgg ? totalGainChoEgg : 0)) / sortedGainBank.length;
|
CM.Cache.AvgCPSChoEgg = (totalGainBank + totalGainWrink + (choEgg ? totalGainChoEgg : 0)) / sortedGainBank.length;
|
||||||
}
|
}
|
||||||
@@ -389,7 +388,6 @@ CM.Cache.ClicksDiff;
|
|||||||
CM.Cache.AvgCPS = -1;
|
CM.Cache.AvgCPS = -1;
|
||||||
CM.Cache.AvgCPSChoEgg = -1;
|
CM.Cache.AvgCPSChoEgg = -1;
|
||||||
CM.Cache.AvgClicks = -1;
|
CM.Cache.AvgClicks = -1;
|
||||||
|
|
||||||
/**********
|
/**********
|
||||||
* Config *
|
* Config *
|
||||||
**********/
|
**********/
|
||||||
@@ -401,7 +399,7 @@ CM.SaveConfig = function(config) {
|
|||||||
CM.LoadConfig = function() {
|
CM.LoadConfig = function() {
|
||||||
if (localStorage.getItem(CM.ConfigPrefix) != null) {
|
if (localStorage.getItem(CM.ConfigPrefix) != null) {
|
||||||
CM.Config = JSON.parse(localStorage.getItem(CM.ConfigPrefix));
|
CM.Config = JSON.parse(localStorage.getItem(CM.ConfigPrefix));
|
||||||
|
|
||||||
// Check values
|
// Check values
|
||||||
var mod = false;
|
var mod = false;
|
||||||
for (var i in CM.ConfigDefault) {
|
for (var i in CM.ConfigDefault) {
|
||||||
@@ -448,8 +446,8 @@ CM.LoadConfig = function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // Default values
|
else { // Default values
|
||||||
CM.RestoreDefault();
|
CM.RestoreDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -539,7 +537,6 @@ CM.ConfigData.UpStats = {label: ['Statistics Update Rate (Default)', 'Statistics
|
|||||||
CM.ConfigData.TimeFormat = {label: ['Time XXd, XXh, XXm, XXs', 'Time XX:XX:XX:XX:XX'], desc: 'Change the time format', toggle: false};
|
CM.ConfigData.TimeFormat = {label: ['Time XXd, XXh, XXm, XXs', 'Time XX:XX:XX:XX:XX'], desc: 'Change the time format', toggle: false};
|
||||||
CM.ConfigData.SayTime = {label: ['Format Time OFF', 'Format Time ON'], desc: 'Change how time is displayed in statistics', toggle: true, func: function() {CM.Disp.ToggleSayTime();}};
|
CM.ConfigData.SayTime = {label: ['Format Time OFF', 'Format Time ON'], desc: 'Change how time is displayed in statistics', toggle: true, func: function() {CM.Disp.ToggleSayTime();}};
|
||||||
CM.ConfigData.Scale = {label: ['Game\'s Setting Scale', 'Metric', 'Short Scale', 'Scientific Notation'], desc: 'Change how long numbers are handled', toggle: false, func: function() {CM.Disp.RefreshScale();}};
|
CM.ConfigData.Scale = {label: ['Game\'s Setting Scale', 'Metric', 'Short Scale', 'Scientific Notation'], desc: 'Change how long numbers are handled', toggle: false, func: function() {CM.Disp.RefreshScale();}};
|
||||||
|
|
||||||
/********
|
/********
|
||||||
* Data *
|
* Data *
|
||||||
********/
|
********/
|
||||||
@@ -547,7 +544,6 @@ CM.ConfigData.Scale = {label: ['Game\'s Setting Scale', 'Metric', 'Short Scale',
|
|||||||
CM.Data.HalloCookies = ['Skull cookies', 'Ghost cookies', 'Bat cookies', 'Slime cookies', 'Pumpkin cookies', 'Eyeball cookies', 'Spider cookies'];
|
CM.Data.HalloCookies = ['Skull cookies', 'Ghost cookies', 'Bat cookies', 'Slime cookies', 'Pumpkin cookies', 'Eyeball cookies', 'Spider cookies'];
|
||||||
CM.Data.ChristCookies = ['Christmas tree biscuits', 'Snowflake biscuits', 'Snowman biscuits', 'Holly biscuits', 'Candy cane biscuits', 'Bell biscuits', 'Present biscuits'];
|
CM.Data.ChristCookies = ['Christmas tree biscuits', 'Snowflake biscuits', 'Snowman biscuits', 'Holly biscuits', 'Candy cane biscuits', 'Bell biscuits', 'Present biscuits'];
|
||||||
CM.Data.ValCookies = ['Pure heart biscuits', 'Ardent heart biscuits', 'Sour heart biscuits', 'Weeping heart biscuits', 'Golden heart biscuits', 'Eternal heart biscuits'];
|
CM.Data.ValCookies = ['Pure heart biscuits', 'Ardent heart biscuits', 'Sour heart biscuits', 'Weeping heart biscuits', 'Golden heart biscuits', 'Eternal heart biscuits'];
|
||||||
|
|
||||||
/********
|
/********
|
||||||
* Disp *
|
* Disp *
|
||||||
********/
|
********/
|
||||||
@@ -2500,7 +2496,7 @@ for (var i in Game.wrinklers) {
|
|||||||
/********
|
/********
|
||||||
* Main *
|
* Main *
|
||||||
********/
|
********/
|
||||||
|
|
||||||
CM.ReplaceNative = function() {
|
CM.ReplaceNative = function() {
|
||||||
CM.Backup.Beautify = Beautify;
|
CM.Backup.Beautify = Beautify;
|
||||||
Beautify = CM.Disp.Beautify;
|
Beautify = CM.Disp.Beautify;
|
||||||
@@ -2511,7 +2507,7 @@ CM.ReplaceNative = function() {
|
|||||||
CM.Sim.DoSims = 1;
|
CM.Sim.DoSims = 1;
|
||||||
CM.Sim.Date = Date.now();
|
CM.Sim.Date = Date.now();
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Backup.tooltip = {};
|
CM.Backup.tooltip = {};
|
||||||
CM.Backup.tooltip.draw = Game.tooltip.draw;
|
CM.Backup.tooltip.draw = Game.tooltip.draw;
|
||||||
eval('CM.Backup.tooltip.drawMod = ' + Game.tooltip.draw.toString().split('this').join('Game.tooltip'));
|
eval('CM.Backup.tooltip.drawMod = ' + Game.tooltip.draw.toString().split('this').join('Game.tooltip'));
|
||||||
@@ -2519,7 +2515,7 @@ CM.ReplaceNative = function() {
|
|||||||
CM.Backup.tooltip.drawMod(from, text, origin);
|
CM.Backup.tooltip.drawMod(from, text, origin);
|
||||||
CM.Disp.DrawTooltipWarnCaut();
|
CM.Disp.DrawTooltipWarnCaut();
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Backup.tooltip.update = Game.tooltip.update;
|
CM.Backup.tooltip.update = Game.tooltip.update;
|
||||||
eval('CM.Backup.tooltip.updateMod = ' + Game.tooltip.update.toString().split('this.').join('Game.tooltip.'));
|
eval('CM.Backup.tooltip.updateMod = ' + Game.tooltip.update.toString().split('this.').join('Game.tooltip.'));
|
||||||
Game.tooltip.update = function() {
|
Game.tooltip.update = function() {
|
||||||
@@ -2527,7 +2523,7 @@ CM.ReplaceNative = function() {
|
|||||||
CM.Disp.UpdateTooltipWarnCaut();
|
CM.Disp.UpdateTooltipWarnCaut();
|
||||||
CM.Disp.UpdateTooltipLocation();
|
CM.Disp.UpdateTooltipLocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Backup.UpdateSpecial = Game.UpdateSpecial;
|
CM.Backup.UpdateSpecial = Game.UpdateSpecial;
|
||||||
Game.UpdateSpecial = function() {
|
Game.UpdateSpecial = function() {
|
||||||
if (CM.Config.TimerBar == 1 && CM.Config.TimerBarPos == 0) {
|
if (CM.Config.TimerBar == 1 && CM.Config.TimerBarPos == 0) {
|
||||||
@@ -2555,7 +2551,7 @@ CM.ReplaceNative = function() {
|
|||||||
CM.Disp.AddTooltipUpgrade();
|
CM.Disp.AddTooltipUpgrade();
|
||||||
Game.CalculateGains();
|
Game.CalculateGains();
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Backup.UpdateMenu = Game.UpdateMenu;
|
CM.Backup.UpdateMenu = Game.UpdateMenu;
|
||||||
Game.UpdateMenu = function() {
|
Game.UpdateMenu = function() {
|
||||||
if (typeof jscolor.picker === 'undefined' || typeof jscolor.picker.owner === 'undefined') {
|
if (typeof jscolor.picker === 'undefined' || typeof jscolor.picker.owner === 'undefined') {
|
||||||
@@ -2563,24 +2559,24 @@ CM.ReplaceNative = function() {
|
|||||||
CM.Disp.AddMenu();
|
CM.Disp.AddMenu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Backup.sayTime = Game.sayTime;
|
CM.Backup.sayTime = Game.sayTime;
|
||||||
CM.Disp.sayTime = function(time, detail) {
|
CM.Disp.sayTime = function(time, detail) {
|
||||||
if (isNaN(time) || time <= 0) return CM.Backup.sayTime(time, detail);
|
if (isNaN(time) || time <= 0) return CM.Backup.sayTime(time, detail);
|
||||||
else return CM.Disp.FormatTime(time / Game.fps, 1);
|
else return CM.Disp.FormatTime(time / Game.fps, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Backup.Loop = Game.Loop;
|
CM.Backup.Loop = Game.Loop;
|
||||||
Game.Loop = function() {
|
Game.Loop = function() {
|
||||||
CM.Backup.Loop();
|
CM.Backup.Loop();
|
||||||
CM.Loop();
|
CM.Loop();
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Backup.Logic = Game.Logic;
|
CM.Backup.Logic = Game.Logic;
|
||||||
eval('CM.Backup.LogicMod = ' + Game.Logic.toString().split('document.title').join('CM.Cache.Title'));
|
eval('CM.Backup.LogicMod = ' + Game.Logic.toString().split('document.title').join('CM.Cache.Title'));
|
||||||
Game.Logic = function() {
|
Game.Logic = function() {
|
||||||
CM.Backup.LogicMod();
|
CM.Backup.LogicMod();
|
||||||
|
|
||||||
// Update Title
|
// Update Title
|
||||||
CM.Disp.UpdateTitle();
|
CM.Disp.UpdateTitle();
|
||||||
}
|
}
|
||||||
@@ -2626,19 +2622,19 @@ CM.Loop = function() {
|
|||||||
CM.Disp.UpdateAscendState();
|
CM.Disp.UpdateAscendState();
|
||||||
}
|
}
|
||||||
if (!Game.OnAscend && Game.AscendTimer == 0) {
|
if (!Game.OnAscend && Game.AscendTimer == 0) {
|
||||||
if (CM.Sim.DoSims) {
|
if (CM.Sim.DoSims) {
|
||||||
CM.Cache.RemakeIncome();
|
CM.Cache.RemakeIncome();
|
||||||
|
|
||||||
CM.Sim.NoGoldSwitchCookiesPS(); // Needed first
|
CM.Sim.NoGoldSwitchCookiesPS(); // Needed first
|
||||||
CM.Cache.RemakeLucky();
|
CM.Cache.RemakeLucky();
|
||||||
CM.Cache.RemakeChain();
|
CM.Cache.RemakeChain();
|
||||||
|
|
||||||
CM.Cache.RemakeSeaSpec();
|
CM.Cache.RemakeSeaSpec();
|
||||||
CM.Cache.RemakeSellForChoEgg();
|
CM.Cache.RemakeSellForChoEgg();
|
||||||
|
|
||||||
CM.Sim.DoSims = 0;
|
CM.Sim.DoSims = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for aura change to recalculate buildings prices
|
// Check for aura change to recalculate buildings prices
|
||||||
var hasFierHoard = Game.hasAura('Fierce Hoarder');
|
var hasFierHoard = Game.hasAura('Fierce Hoarder');
|
||||||
if (!CM.Cache.HadFierHoard && hasFierHoard) {
|
if (!CM.Cache.HadFierHoard && hasFierHoard) {
|
||||||
@@ -2649,15 +2645,15 @@ CM.Loop = function() {
|
|||||||
CM.Cache.HadFierHoard = false;
|
CM.Cache.HadFierHoard = false;
|
||||||
CM.Cache.DoRemakeBuildPrices = 1;
|
CM.Cache.DoRemakeBuildPrices = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CM.Cache.DoRemakeBuildPrices) {
|
if (CM.Cache.DoRemakeBuildPrices) {
|
||||||
CM.Cache.RemakeBuildingsPrices();
|
CM.Cache.RemakeBuildingsPrices();
|
||||||
CM.Cache.DoRemakeBuildPrices = 0;
|
CM.Cache.DoRemakeBuildPrices = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update Wrinkler Bank
|
// Update Wrinkler Bank
|
||||||
CM.Cache.RemakeWrinkBank();
|
CM.Cache.RemakeWrinkBank();
|
||||||
|
|
||||||
// Calculate PP
|
// Calculate PP
|
||||||
CM.Cache.RemakePP();
|
CM.Cache.RemakePP();
|
||||||
|
|
||||||
@@ -2665,11 +2661,11 @@ CM.Loop = function() {
|
|||||||
CM.Disp.UpdateBotBarOther();
|
CM.Disp.UpdateBotBarOther();
|
||||||
CM.Disp.UpdateBuildings();
|
CM.Disp.UpdateBuildings();
|
||||||
CM.Disp.UpdateUpgrades();
|
CM.Disp.UpdateUpgrades();
|
||||||
|
|
||||||
// Redraw timers
|
// Redraw timers
|
||||||
CM.Disp.UpdateBotBarTime();
|
CM.Disp.UpdateBotBarTime();
|
||||||
CM.Disp.UpdateTimerBar();
|
CM.Disp.UpdateTimerBar();
|
||||||
|
|
||||||
// Update Tooltip
|
// Update Tooltip
|
||||||
CM.Disp.UpdateTooltip();
|
CM.Disp.UpdateTooltip();
|
||||||
|
|
||||||
@@ -2680,10 +2676,10 @@ CM.Loop = function() {
|
|||||||
// Change menu refresh interval
|
// Change menu refresh interval
|
||||||
CM.Disp.RefreshMenu();
|
CM.Disp.RefreshMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check Golden Cookies
|
// Check Golden Cookies
|
||||||
CM.Disp.CheckGoldenCookie();
|
CM.Disp.CheckGoldenCookie();
|
||||||
|
|
||||||
// Check Season Popup
|
// Check Season Popup
|
||||||
CM.Disp.CheckSeasonPopup();
|
CM.Disp.CheckSeasonPopup();
|
||||||
|
|
||||||
@@ -2699,7 +2695,7 @@ CM.Init = function() {
|
|||||||
if (proceed) {
|
if (proceed) {
|
||||||
CM.Cache.AddQueue();
|
CM.Cache.AddQueue();
|
||||||
CM.Disp.AddJscolor();
|
CM.Disp.AddJscolor();
|
||||||
|
|
||||||
var delay = setInterval(function() {
|
var delay = setInterval(function() {
|
||||||
if (typeof Queue !== 'undefined' && typeof jscolor !== 'undefined') {
|
if (typeof Queue !== 'undefined' && typeof jscolor !== 'undefined') {
|
||||||
CM.DelayInit();
|
CM.DelayInit();
|
||||||
@@ -2719,11 +2715,11 @@ CM.DelayInit = function() {
|
|||||||
CM.Disp.CreateFavicon();
|
CM.Disp.CreateFavicon();
|
||||||
CM.Disp.CreateGCTimer();
|
CM.Disp.CreateGCTimer();
|
||||||
CM.Disp.CreateTooltip('GoldCookTooltipPlaceholder', 'Calculated with Golden Switch off', '200px');
|
CM.Disp.CreateTooltip('GoldCookTooltipPlaceholder', 'Calculated with Golden Switch off', '200px');
|
||||||
CM.Disp.CreateTooltip('PrestMaxTooltipPlaceholder', 'The MAX prestige is calculated with the cookies gained from popping all wrinklers with Skruuia god in Diamind slot, selling all buildings with Earth Shatterer aura, and buying Chocolate egg', '370px');
|
CM.Disp.CreateTooltip('PrestMaxTooltipPlaceholder', 'The MAX prestige is calculated with the cookies gained from popping all wrinklers with Skruuia god in Diamond slot, selling all buildings with Earth Shatterer aura, and buying Chocolate egg', '370px');
|
||||||
CM.Disp.CreateTooltip('NextPrestTooltipPlaceholder', 'Calculated with cookies gained from wrinklers and Chocolate egg', '200px');
|
CM.Disp.CreateTooltip('NextPrestTooltipPlaceholder', 'Calculated with cookies gained from wrinklers and Chocolate egg', '200px');
|
||||||
CM.Disp.CreateTooltip('HeavenChipMaxTooltipPlaceholder', 'The MAX heavenly chips is calculated with the cookies gained from popping all wrinklers with Skruuia god in Diamind slot, selling all buildings with Earth Shatterer aura, and buying Chocolate egg', '390px');
|
CM.Disp.CreateTooltip('HeavenChipMaxTooltipPlaceholder', 'The MAX heavenly chips is calculated with the cookies gained from popping all wrinklers with Skruuia god in Diamond slot, selling all buildings with Earth Shatterer aura, and buying Chocolate egg', '390px');
|
||||||
CM.Disp.CreateTooltip('ResetTooltipPlaceholder', 'The bonus income you would get from new prestige levels unlocked at 100% of its potential and from reset achievements if you have the same buildings/upgrades after reset', '370px');
|
CM.Disp.CreateTooltip('ResetTooltipPlaceholder', 'The bonus income you would get from new prestige levels unlocked at 100% of its potential and from reset achievements if you have the same buildings/upgrades after reset', '370px');
|
||||||
CM.Disp.CreateTooltip('ChoEggTooltipPlaceholder', 'The amount of cookies you would get from popping all wrinklers with Skruuia god in Diamind slot, selling all buildings with Earth Shatterer aura, and then buying Chocolate egg', '360px');
|
CM.Disp.CreateTooltip('ChoEggTooltipPlaceholder', 'The amount of cookies you would get from popping all wrinklers with Skruuia god in Diamond slot, selling all buildings with Earth Shatterer aura, and then buying Chocolate egg', '360px');
|
||||||
CM.Disp.CreateTooltipWarnCaut();
|
CM.Disp.CreateTooltipWarnCaut();
|
||||||
CM.Disp.AddTooltipBuild();
|
CM.Disp.AddTooltipBuild();
|
||||||
CM.Disp.AddTooltipGrimoire();
|
CM.Disp.AddTooltipGrimoire();
|
||||||
@@ -2751,7 +2747,6 @@ CM.ConfigPrefix = 'CMConfig';
|
|||||||
|
|
||||||
CM.VersionMajor = '2.0042';
|
CM.VersionMajor = '2.0042';
|
||||||
CM.VersionMinor = '2';
|
CM.VersionMinor = '2';
|
||||||
|
|
||||||
/*******
|
/*******
|
||||||
* Sim *
|
* Sim *
|
||||||
*******/
|
*******/
|
||||||
@@ -2833,8 +2828,8 @@ eval('CM.Sim.HasAchiev = ' + Game.HasAchiev.toString().split('Game').join('CM.Si
|
|||||||
eval('CM.Sim.GetHeavenlyMultiplier = ' + Game.GetHeavenlyMultiplier.toString().split('Game.Has').join('CM.Sim.Has').split('Game.hasAura').join('CM.Sim.hasAura'));
|
eval('CM.Sim.GetHeavenlyMultiplier = ' + Game.GetHeavenlyMultiplier.toString().split('Game.Has').join('CM.Sim.Has').split('Game.hasAura').join('CM.Sim.hasAura'));
|
||||||
|
|
||||||
CM.Sim.hasAura = function(what) {
|
CM.Sim.hasAura = function(what) {
|
||||||
if (Game.dragonAuras[CM.Sim.dragonAura].name == what || Game.dragonAuras[CM.Sim.dragonAura2].name == what)
|
if (Game.dragonAuras[CM.Sim.dragonAura].name == what || Game.dragonAuras[CM.Sim.dragonAura2].name == what)
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -2886,7 +2881,7 @@ CM.Sim.CopyData = function() {
|
|||||||
CM.Sim.prestige = Game.prestige;
|
CM.Sim.prestige = Game.prestige;
|
||||||
CM.Sim.dragonAura = Game.dragonAura;
|
CM.Sim.dragonAura = Game.dragonAura;
|
||||||
CM.Sim.dragonAura2 = Game.dragonAura2;
|
CM.Sim.dragonAura2 = Game.dragonAura2;
|
||||||
|
|
||||||
// Buildings
|
// Buildings
|
||||||
for (var i in Game.Objects) {
|
for (var i in Game.Objects) {
|
||||||
var me = Game.Objects[i];
|
var me = Game.Objects[i];
|
||||||
@@ -2995,7 +2990,7 @@ CM.Sim.CalculateGains = function() {
|
|||||||
if (CM.Sim.Has('Kitten specialists')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
if (CM.Sim.Has('Kitten specialists')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
||||||
if (CM.Sim.Has('Kitten experts')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
if (CM.Sim.Has('Kitten experts')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
||||||
if (CM.Sim.Has('Kitten consultants')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
if (CM.Sim.Has('Kitten consultants')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
||||||
if (CM.Sim.Has('Kitten assistants to the regional manager')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
if (CM.Sim.Has('Kitten assistants to the regional manager')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
||||||
if (CM.Sim.Has('Kitten angels')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult);
|
if (CM.Sim.Has('Kitten angels')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult);
|
||||||
|
|
||||||
var eggMult = 1;
|
var eggMult = 1;
|
||||||
@@ -3019,7 +3014,7 @@ CM.Sim.CalculateGains = function() {
|
|||||||
eggMult *= CM.Cache.CentEgg;
|
eggMult *= CM.Cache.CentEgg;
|
||||||
}
|
}
|
||||||
mult *= eggMult;
|
mult *= eggMult;
|
||||||
|
|
||||||
if (CM.Sim.hasAura('Radiant Appetite')) mult *= 2;
|
if (CM.Sim.hasAura('Radiant Appetite')) mult *= 2;
|
||||||
|
|
||||||
if (Game.hasAura('Dragon\'s Fortune')) {
|
if (Game.hasAura('Dragon\'s Fortune')) {
|
||||||
@@ -3030,7 +3025,7 @@ CM.Sim.CalculateGains = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var rawCookiesPs = CM.Sim.cookiesPs * mult;
|
var rawCookiesPs = CM.Sim.cookiesPs * mult;
|
||||||
|
|
||||||
for (var i in Game.CpsAchievements) {
|
for (var i in Game.CpsAchievements) {
|
||||||
if (rawCookiesPs >= Game.CpsAchievements[i].threshold) CM.Sim.Win(Game.CpsAchievements[i].name);
|
if (rawCookiesPs >= Game.CpsAchievements[i].threshold) CM.Sim.Win(Game.CpsAchievements[i].name);
|
||||||
}
|
}
|
||||||
@@ -3105,16 +3100,16 @@ CM.Sim.CheckOtherAchiev = function() {
|
|||||||
if (buildingsOwned >= 500) CM.Sim.Win('Architect');
|
if (buildingsOwned >= 500) CM.Sim.Win('Architect');
|
||||||
if (buildingsOwned >= 1000) CM.Sim.Win('Engineer');
|
if (buildingsOwned >= 1000) CM.Sim.Win('Engineer');
|
||||||
if (buildingsOwned >= 2000) CM.Sim.Win('Lord of Constructs');
|
if (buildingsOwned >= 2000) CM.Sim.Win('Lord of Constructs');
|
||||||
|
|
||||||
if (CM.Sim.UpgradesOwned >= 20) CM.Sim.Win('Enhancer');
|
if (CM.Sim.UpgradesOwned >= 20) CM.Sim.Win('Enhancer');
|
||||||
if (CM.Sim.UpgradesOwned >= 50) CM.Sim.Win('Augmenter');
|
if (CM.Sim.UpgradesOwned >= 50) CM.Sim.Win('Augmenter');
|
||||||
if (CM.Sim.UpgradesOwned >= 100) CM.Sim.Win('Upgrader');
|
if (CM.Sim.UpgradesOwned >= 100) CM.Sim.Win('Upgrader');
|
||||||
if (CM.Sim.UpgradesOwned >= 200) CM.Sim.Win('Lord of Progress');
|
if (CM.Sim.UpgradesOwned >= 200) CM.Sim.Win('Lord of Progress');
|
||||||
|
|
||||||
if (buildingsOwned >= 3000 && CM.Sim.UpgradesOwned >= 300) CM.Sim.Win('Polymath');
|
if (buildingsOwned >= 3000 && CM.Sim.UpgradesOwned >= 300) CM.Sim.Win('Polymath');
|
||||||
|
|
||||||
if (CM.Sim.Objects['Cursor'].amount + CM.Sim.Objects['Grandma'].amount >= 777) CM.Sim.Win('The elder scrolls');
|
if (CM.Sim.Objects['Cursor'].amount + CM.Sim.Objects['Grandma'].amount >= 777) CM.Sim.Win('The elder scrolls');
|
||||||
|
|
||||||
var hasAllHalloCook = true;
|
var hasAllHalloCook = true;
|
||||||
for (var i in CM.Data.HalloCookies) {
|
for (var i in CM.Data.HalloCookies) {
|
||||||
if (!CM.Sim.Has(CM.Data.HalloCookies[i])) hasAllHalloCook = false;
|
if (!CM.Sim.Has(CM.Data.HalloCookies[i])) hasAllHalloCook = false;
|
||||||
@@ -3128,13 +3123,13 @@ CM.Sim.CheckOtherAchiev = function() {
|
|||||||
if (hasAllChristCook) CM.Sim.Win('Let it snow');
|
if (hasAllChristCook) CM.Sim.Win('Let it snow');
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Sim.BuyBuildings = function(amount, target) {
|
CM.Sim.BuyBuildings = function(amount, target) {
|
||||||
CM.Cache[target] = [];
|
CM.Cache[target] = [];
|
||||||
for (var i in Game.Objects) {
|
for (var i in Game.Objects) {
|
||||||
CM.Sim.CopyData();
|
CM.Sim.CopyData();
|
||||||
var me = CM.Sim.Objects[i];
|
var me = CM.Sim.Objects[i];
|
||||||
me.amount += amount;
|
me.amount += amount;
|
||||||
|
|
||||||
if (i == 'Cursor') {
|
if (i == 'Cursor') {
|
||||||
if (me.amount >= 1) CM.Sim.Win('Click');
|
if (me.amount >= 1) CM.Sim.Win('Click');
|
||||||
if (me.amount >= 2) CM.Sim.Win('Double-click');
|
if (me.amount >= 2) CM.Sim.Win('Double-click');
|
||||||
@@ -3147,21 +3142,21 @@ CM.Sim.BuyBuildings = function(amount, target) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (var j in Game.Objects[me.name].tieredAchievs) {
|
for (var j in Game.Objects[me.name].tieredAchievs) {
|
||||||
if (me.amount >= Game.Tiers[Game.Objects[me.name].tieredAchievs[j].tier].achievUnlock)
|
if (me.amount >= Game.Tiers[Game.Objects[me.name].tieredAchievs[j].tier].achievUnlock)
|
||||||
CM.Sim.Win(Game.Objects[me.name].tieredAchievs[j].name);
|
CM.Sim.Win(Game.Objects[me.name].tieredAchievs[j].name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var lastAchievementsOwned = CM.Sim.AchievementsOwned;
|
var lastAchievementsOwned = CM.Sim.AchievementsOwned;
|
||||||
|
|
||||||
CM.Sim.CalculateGains();
|
CM.Sim.CalculateGains();
|
||||||
|
|
||||||
CM.Sim.CheckOtherAchiev();
|
CM.Sim.CheckOtherAchiev();
|
||||||
|
|
||||||
if (lastAchievementsOwned != CM.Sim.AchievementsOwned) {
|
if (lastAchievementsOwned != CM.Sim.AchievementsOwned) {
|
||||||
CM.Sim.CalculateGains();
|
CM.Sim.CalculateGains();
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Cache[target][i] = {};
|
CM.Cache[target][i] = {};
|
||||||
CM.Cache[target][i].bonus = CM.Sim.cookiesPs - Game.cookiesPs;
|
CM.Cache[target][i].bonus = CM.Sim.cookiesPs - Game.cookiesPs;
|
||||||
if (amount != 1) {
|
if (amount != 1) {
|
||||||
@@ -3193,17 +3188,17 @@ CM.Sim.BuyUpgrades = function() {
|
|||||||
else if (i == 'Heavenly key') {
|
else if (i == 'Heavenly key') {
|
||||||
CM.Sim.Win('Wholesome');
|
CM.Sim.Win('Wholesome');
|
||||||
}
|
}
|
||||||
|
|
||||||
var lastAchievementsOwned = CM.Sim.AchievementsOwned;
|
var lastAchievementsOwned = CM.Sim.AchievementsOwned;
|
||||||
|
|
||||||
CM.Sim.CalculateGains();
|
CM.Sim.CalculateGains();
|
||||||
|
|
||||||
CM.Sim.CheckOtherAchiev();
|
CM.Sim.CheckOtherAchiev();
|
||||||
|
|
||||||
if (lastAchievementsOwned != CM.Sim.AchievementsOwned) {
|
if (lastAchievementsOwned != CM.Sim.AchievementsOwned) {
|
||||||
CM.Sim.CalculateGains();
|
CM.Sim.CalculateGains();
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Cache.Upgrades[i] = {};
|
CM.Cache.Upgrades[i] = {};
|
||||||
CM.Cache.Upgrades[i].bonus = CM.Sim.cookiesPs - Game.cookiesPs;
|
CM.Cache.Upgrades[i].bonus = CM.Sim.cookiesPs - Game.cookiesPs;
|
||||||
}
|
}
|
||||||
@@ -3222,12 +3217,12 @@ CM.Sim.NoGoldSwitchCookiesPS = function() {
|
|||||||
|
|
||||||
CM.Sim.ResetBonus = function(possiblePresMax) {
|
CM.Sim.ResetBonus = function(possiblePresMax) {
|
||||||
var lastAchievementsOwned = -1;
|
var lastAchievementsOwned = -1;
|
||||||
|
|
||||||
// Calculate CPS with all Heavenly upgrades
|
// Calculate CPS with all Heavenly upgrades
|
||||||
var curCPS = Game.cookiesPs;
|
var curCPS = Game.cookiesPs;
|
||||||
|
|
||||||
CM.Sim.CopyData();
|
CM.Sim.CopyData();
|
||||||
|
|
||||||
if (CM.Sim.Upgrades['Heavenly key'].bought == 0) {
|
if (CM.Sim.Upgrades['Heavenly key'].bought == 0) {
|
||||||
CM.Sim.Upgrades['Heavenly chip secret'].bought = 1;
|
CM.Sim.Upgrades['Heavenly chip secret'].bought = 1;
|
||||||
CM.Sim.Upgrades['Heavenly cookie stand'].bought = 1;
|
CM.Sim.Upgrades['Heavenly cookie stand'].bought = 1;
|
||||||
@@ -3238,10 +3233,10 @@ CM.Sim.ResetBonus = function(possiblePresMax) {
|
|||||||
CM.Sim.CalculateGains();
|
CM.Sim.CalculateGains();
|
||||||
|
|
||||||
curCPS = CM.Sim.cookiesPs;
|
curCPS = CM.Sim.cookiesPs;
|
||||||
|
|
||||||
CM.Sim.CopyData();
|
CM.Sim.CopyData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Game.cookiesEarned >= 1000000) CM.Sim.Win('Sacrifice');
|
if (Game.cookiesEarned >= 1000000) CM.Sim.Win('Sacrifice');
|
||||||
if (Game.cookiesEarned >= 1000000000) CM.Sim.Win('Oblivion');
|
if (Game.cookiesEarned >= 1000000000) CM.Sim.Win('Oblivion');
|
||||||
if (Game.cookiesEarned >= 1000000000000) CM.Sim.Win('From scratch');
|
if (Game.cookiesEarned >= 1000000000000) CM.Sim.Win('From scratch');
|
||||||
@@ -3252,28 +3247,27 @@ CM.Sim.ResetBonus = function(possiblePresMax) {
|
|||||||
if (Game.cookiesEarned >= 1000000000000000000000000000) CM.Sim.Win('Obliterate');
|
if (Game.cookiesEarned >= 1000000000000000000000000000) CM.Sim.Win('Obliterate');
|
||||||
if (Game.cookiesEarned >= 1000000000000000000000000000000) CM.Sim.Win('Negative void');
|
if (Game.cookiesEarned >= 1000000000000000000000000000000) CM.Sim.Win('Negative void');
|
||||||
if (Game.cookiesEarned >= 1000000000000000000000000000000000) CM.Sim.Win('To crumbs, you say?');
|
if (Game.cookiesEarned >= 1000000000000000000000000000000000) CM.Sim.Win('To crumbs, you say?');
|
||||||
|
|
||||||
CM.Sim.Upgrades['Heavenly chip secret'].bought = 1;
|
CM.Sim.Upgrades['Heavenly chip secret'].bought = 1;
|
||||||
CM.Sim.Upgrades['Heavenly cookie stand'].bought = 1;
|
CM.Sim.Upgrades['Heavenly cookie stand'].bought = 1;
|
||||||
CM.Sim.Upgrades['Heavenly bakery'].bought = 1;
|
CM.Sim.Upgrades['Heavenly bakery'].bought = 1;
|
||||||
CM.Sim.Upgrades['Heavenly confectionery'].bought = 1;
|
CM.Sim.Upgrades['Heavenly confectionery'].bought = 1;
|
||||||
CM.Sim.Upgrades['Heavenly key'].bought = 1;
|
CM.Sim.Upgrades['Heavenly key'].bought = 1;
|
||||||
|
|
||||||
CM.Sim.prestige = possiblePresMax;
|
CM.Sim.prestige = possiblePresMax;
|
||||||
|
|
||||||
lastAchievementsOwned = CM.Sim.AchievementsOwned;
|
lastAchievementsOwned = CM.Sim.AchievementsOwned;
|
||||||
|
|
||||||
CM.Sim.CalculateGains();
|
CM.Sim.CalculateGains();
|
||||||
|
|
||||||
CM.Sim.CheckOtherAchiev();
|
CM.Sim.CheckOtherAchiev();
|
||||||
|
|
||||||
if (lastAchievementsOwned != CM.Sim.AchievementsOwned) {
|
if (lastAchievementsOwned != CM.Sim.AchievementsOwned) {
|
||||||
CM.Sim.CalculateGains();
|
CM.Sim.CalculateGains();
|
||||||
}
|
}
|
||||||
|
|
||||||
return (CM.Sim.cookiesPs - curCPS);
|
return (CM.Sim.cookiesPs - curCPS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********
|
/**********
|
||||||
* Footer *
|
* Footer *
|
||||||
**********/
|
**********/
|
||||||
|
|||||||
51
src/Cache.js
51
src/Cache.js
@@ -1,7 +1,7 @@
|
|||||||
/*********
|
/*********
|
||||||
* Cache *
|
* Cache *
|
||||||
*********/
|
*********/
|
||||||
|
|
||||||
CM.Cache.AddQueue = function() {
|
CM.Cache.AddQueue = function() {
|
||||||
CM.Cache.Queue = document.createElement('script');
|
CM.Cache.Queue = document.createElement('script');
|
||||||
CM.Cache.Queue.type = 'text/javascript';
|
CM.Cache.Queue.type = 'text/javascript';
|
||||||
@@ -30,10 +30,10 @@ CM.Cache.RemakeIncome = function() {
|
|||||||
|
|
||||||
// Simulate Upgrade Buys
|
// Simulate Upgrade Buys
|
||||||
CM.Sim.BuyUpgrades();
|
CM.Sim.BuyUpgrades();
|
||||||
|
|
||||||
// Simulate Building Buys for 10 amount
|
// Simulate Building Buys for 10 amount
|
||||||
CM.Sim.BuyBuildings(10, 'Objects10');
|
CM.Sim.BuyBuildings(10, 'Objects10');
|
||||||
|
|
||||||
// Simulate Building Buys for 100 amount
|
// Simulate Building Buys for 100 amount
|
||||||
CM.Sim.BuyBuildings(100, 'Objects100');
|
CM.Sim.BuyBuildings(100, 'Objects100');
|
||||||
}
|
}
|
||||||
@@ -122,15 +122,15 @@ CM.Cache.RemakeBuildingsOtherPP = function(amount, target) {
|
|||||||
CM.Cache.RemakePP = function() {
|
CM.Cache.RemakePP = function() {
|
||||||
// Buildings for 1 amount
|
// Buildings for 1 amount
|
||||||
CM.Cache.RemakeBuildingsPP();
|
CM.Cache.RemakeBuildingsPP();
|
||||||
|
|
||||||
// Upgrades
|
// Upgrades
|
||||||
CM.Cache.RemakeUpgradePP();
|
CM.Cache.RemakeUpgradePP();
|
||||||
|
|
||||||
// Buildings for 10 amount
|
// Buildings for 10 amount
|
||||||
CM.Cache.RemakeBuildingsOtherPP(10, 'Objects10');
|
CM.Cache.RemakeBuildingsOtherPP(10, 'Objects10');
|
||||||
|
|
||||||
// Buildings for 100 amount
|
// Buildings for 100 amount
|
||||||
CM.Cache.RemakeBuildingsOtherPP(100, 'Objects100');
|
CM.Cache.RemakeBuildingsOtherPP(100, 'Objects100');
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Cache.RemakeLucky = function() {
|
CM.Cache.RemakeLucky = function() {
|
||||||
@@ -156,11 +156,11 @@ CM.Cache.MaxChainMoni = function(digit, maxPayout) {
|
|||||||
CM.Cache.RemakeChain = function() {
|
CM.Cache.RemakeChain = function() {
|
||||||
var maxPayout = CM.Cache.NoGoldSwitchCookiesPS * 60 * 60 * 6;
|
var maxPayout = CM.Cache.NoGoldSwitchCookiesPS * 60 * 60 * 6;
|
||||||
maxPayout /= CM.Sim.getCPSBuffMult();
|
maxPayout /= CM.Sim.getCPSBuffMult();
|
||||||
|
|
||||||
CM.Cache.ChainReward = CM.Cache.MaxChainMoni(7, maxPayout);
|
CM.Cache.ChainReward = CM.Cache.MaxChainMoni(7, maxPayout);
|
||||||
|
|
||||||
CM.Cache.ChainWrathReward = CM.Cache.MaxChainMoni(6, maxPayout);
|
CM.Cache.ChainWrathReward = CM.Cache.MaxChainMoni(6, maxPayout);
|
||||||
|
|
||||||
if (maxPayout < CM.Cache.ChainReward) {
|
if (maxPayout < CM.Cache.ChainReward) {
|
||||||
CM.Cache.Chain = 0;
|
CM.Cache.Chain = 0;
|
||||||
}
|
}
|
||||||
@@ -173,11 +173,11 @@ CM.Cache.RemakeChain = function() {
|
|||||||
else {
|
else {
|
||||||
CM.Cache.ChainWrath = CM.Cache.NextNumber(CM.Cache.ChainWrathReward) / 0.25;
|
CM.Cache.ChainWrath = CM.Cache.NextNumber(CM.Cache.ChainWrathReward) / 0.25;
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Cache.ChainFrenzyReward = CM.Cache.MaxChainMoni(7, maxPayout * 7);
|
CM.Cache.ChainFrenzyReward = CM.Cache.MaxChainMoni(7, maxPayout * 7);
|
||||||
|
|
||||||
CM.Cache.ChainFrenzyWrathReward = CM.Cache.MaxChainMoni(6, maxPayout * 7);
|
CM.Cache.ChainFrenzyWrathReward = CM.Cache.MaxChainMoni(6, maxPayout * 7);
|
||||||
|
|
||||||
if ((maxPayout * 7) < CM.Cache.ChainFrenzyReward) {
|
if ((maxPayout * 7) < CM.Cache.ChainFrenzyReward) {
|
||||||
CM.Cache.ChainFrenzy = 0;
|
CM.Cache.ChainFrenzy = 0;
|
||||||
}
|
}
|
||||||
@@ -196,7 +196,7 @@ CM.Cache.RemakeSeaSpec = function() {
|
|||||||
if (Game.season == 'christmas') {
|
if (Game.season == 'christmas') {
|
||||||
var val = Game.cookiesPs * 60;
|
var val = Game.cookiesPs * 60;
|
||||||
if (Game.hasBuff('Elder frenzy')) val *= 0.5; // very sorry
|
if (Game.hasBuff('Elder frenzy')) val *= 0.5; // very sorry
|
||||||
if (Game.hasBuff('Frenzy')) val *= 0.75; // I sincerely apologize
|
if (Game.hasBuff('Frenzy')) val *= 0.75; // I sincerely apologize
|
||||||
CM.Cache.SeaSpec = Math.max(25, val);
|
CM.Cache.SeaSpec = Math.max(25, val);
|
||||||
if (Game.Has('Ho ho ho-flavored frosting')) CM.Cache.SeaSpec *= 2;
|
if (Game.Has('Ho ho ho-flavored frosting')) CM.Cache.SeaSpec *= 2;
|
||||||
}
|
}
|
||||||
@@ -240,7 +240,7 @@ CM.Cache.InitCookiesDiff = function() {
|
|||||||
|
|
||||||
CM.Cache.UpdateAvgCPS = function() {
|
CM.Cache.UpdateAvgCPS = function() {
|
||||||
var currDate = Math.floor(Date.now() / 1000);
|
var currDate = Math.floor(Date.now() / 1000);
|
||||||
if (CM.Cache.lastDate != currDate) {
|
if (CM.Cache.lastDate != currDate) {
|
||||||
var choEggTotal = Game.cookies + CM.Cache.SellForChoEgg;
|
var choEggTotal = Game.cookies + CM.Cache.SellForChoEgg;
|
||||||
if (Game.cpsSucked > 0) {
|
if (Game.cpsSucked > 0) {
|
||||||
choEggTotal += CM.Cache.WrinkGodBank;
|
choEggTotal += CM.Cache.WrinkGodBank;
|
||||||
@@ -257,7 +257,7 @@ CM.Cache.UpdateAvgCPS = function() {
|
|||||||
CM.Cache.CookiesDiff.enqueue(bankDiffAvg);
|
CM.Cache.CookiesDiff.enqueue(bankDiffAvg);
|
||||||
CM.Cache.WrinkDiff.enqueue(wrinkDiffAvg);
|
CM.Cache.WrinkDiff.enqueue(wrinkDiffAvg);
|
||||||
CM.Cache.ChoEggDiff.enqueue(choEggDiffAvg);
|
CM.Cache.ChoEggDiff.enqueue(choEggDiffAvg);
|
||||||
CM.Cache.ClicksDiff.enqueue(clicksDiffAvg);
|
CM.Cache.ClicksDiff.enqueue(clicksDiffAvg);
|
||||||
}
|
}
|
||||||
// Assumes the queues are the same length
|
// Assumes the queues are the same length
|
||||||
while (CM.Cache.CookiesDiff.getLength() > 1800) {
|
while (CM.Cache.CookiesDiff.getLength() > 1800) {
|
||||||
@@ -265,7 +265,7 @@ CM.Cache.UpdateAvgCPS = function() {
|
|||||||
CM.Cache.WrinkDiff.dequeue();
|
CM.Cache.WrinkDiff.dequeue();
|
||||||
CM.Cache.ClicksDiff.dequeue();
|
CM.Cache.ClicksDiff.dequeue();
|
||||||
}
|
}
|
||||||
|
|
||||||
while (CM.Cache.ClicksDiff.getLength() > 30) {
|
while (CM.Cache.ClicksDiff.getLength() > 30) {
|
||||||
CM.Cache.ClicksDiff.dequeue();
|
CM.Cache.ClicksDiff.dequeue();
|
||||||
}
|
}
|
||||||
@@ -275,14 +275,14 @@ CM.Cache.UpdateAvgCPS = function() {
|
|||||||
CM.Cache.lastWrinkCookies = CM.Cache.WrinkBank;
|
CM.Cache.lastWrinkCookies = CM.Cache.WrinkBank;
|
||||||
CM.Cache.lastChoEgg = choEggTotal;
|
CM.Cache.lastChoEgg = choEggTotal;
|
||||||
CM.Cache.lastClicks = Game.cookieClicks;
|
CM.Cache.lastClicks = Game.cookieClicks;
|
||||||
|
|
||||||
var sortedGainBank = new Array();
|
var sortedGainBank = new Array();
|
||||||
var sortedGainWrink = new Array();
|
var sortedGainWrink = new Array();
|
||||||
var sortedGainChoEgg = new Array();
|
var sortedGainChoEgg = new Array();
|
||||||
|
|
||||||
var cpsLength = Math.min(CM.Cache.CookiesDiff.getLength(), CM.Disp.times[CM.Config.AvgCPSHist] * 60);
|
var cpsLength = Math.min(CM.Cache.CookiesDiff.getLength(), CM.Disp.times[CM.Config.AvgCPSHist] * 60);
|
||||||
|
|
||||||
// Assumes the queues are the same length
|
// Assumes the queues are the same length
|
||||||
for (var i = CM.Cache.CookiesDiff.getLength() - cpsLength; i < CM.Cache.CookiesDiff.getLength(); i++) {
|
for (var i = CM.Cache.CookiesDiff.getLength() - cpsLength; i < CM.Cache.CookiesDiff.getLength(); i++) {
|
||||||
sortedGainBank.push(CM.Cache.CookiesDiff.get(i));
|
sortedGainBank.push(CM.Cache.CookiesDiff.get(i));
|
||||||
sortedGainWrink.push(CM.Cache.WrinkDiff.get(i));
|
sortedGainWrink.push(CM.Cache.WrinkDiff.get(i));
|
||||||
@@ -292,9 +292,9 @@ CM.Cache.UpdateAvgCPS = function() {
|
|||||||
sortedGainBank.sort(function(a, b) { return a - b; });
|
sortedGainBank.sort(function(a, b) { return a - b; });
|
||||||
sortedGainWrink.sort(function(a, b) { return a - b; });
|
sortedGainWrink.sort(function(a, b) { return a - b; });
|
||||||
sortedGainChoEgg.sort(function(a, b) { return a - b; });
|
sortedGainChoEgg.sort(function(a, b) { return a - b; });
|
||||||
|
|
||||||
var cut = Math.round(sortedGainBank.length / 10);
|
var cut = Math.round(sortedGainBank.length / 10);
|
||||||
|
|
||||||
while (cut > 0) {
|
while (cut > 0) {
|
||||||
sortedGainBank.shift();
|
sortedGainBank.shift();
|
||||||
sortedGainBank.pop();
|
sortedGainBank.pop();
|
||||||
@@ -304,7 +304,7 @@ CM.Cache.UpdateAvgCPS = function() {
|
|||||||
sortedGainChoEgg.pop();
|
sortedGainChoEgg.pop();
|
||||||
cut--;
|
cut--;
|
||||||
}
|
}
|
||||||
|
|
||||||
var totalGainBank = 0;
|
var totalGainBank = 0;
|
||||||
var totalGainWrink = 0;
|
var totalGainWrink = 0;
|
||||||
var totalGainChoEgg = 0;
|
var totalGainChoEgg = 0;
|
||||||
@@ -315,9 +315,9 @@ CM.Cache.UpdateAvgCPS = function() {
|
|||||||
totalGainChoEgg += sortedGainChoEgg[i];
|
totalGainChoEgg += sortedGainChoEgg[i];
|
||||||
}
|
}
|
||||||
CM.Cache.AvgCPS = (totalGainBank + (CM.Config.CalcWrink ? totalGainWrink : 0)) / sortedGainBank.length;
|
CM.Cache.AvgCPS = (totalGainBank + (CM.Config.CalcWrink ? totalGainWrink : 0)) / sortedGainBank.length;
|
||||||
|
|
||||||
var choEgg = (Game.HasUnlocked('Chocolate egg') && !Game.Has('Chocolate egg'));
|
var choEgg = (Game.HasUnlocked('Chocolate egg') && !Game.Has('Chocolate egg'));
|
||||||
|
|
||||||
if (choEgg || CM.Config.CalcWrink == 0) {
|
if (choEgg || CM.Config.CalcWrink == 0) {
|
||||||
CM.Cache.AvgCPSChoEgg = (totalGainBank + totalGainWrink + (choEgg ? totalGainChoEgg : 0)) / sortedGainBank.length;
|
CM.Cache.AvgCPSChoEgg = (totalGainBank + totalGainWrink + (choEgg ? totalGainChoEgg : 0)) / sortedGainBank.length;
|
||||||
}
|
}
|
||||||
@@ -369,4 +369,3 @@ CM.Cache.ClicksDiff;
|
|||||||
CM.Cache.AvgCPS = -1;
|
CM.Cache.AvgCPS = -1;
|
||||||
CM.Cache.AvgCPSChoEgg = -1;
|
CM.Cache.AvgCPSChoEgg = -1;
|
||||||
CM.Cache.AvgClicks = -1;
|
CM.Cache.AvgClicks = -1;
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ CM.SaveConfig = function(config) {
|
|||||||
CM.LoadConfig = function() {
|
CM.LoadConfig = function() {
|
||||||
if (localStorage.getItem(CM.ConfigPrefix) != null) {
|
if (localStorage.getItem(CM.ConfigPrefix) != null) {
|
||||||
CM.Config = JSON.parse(localStorage.getItem(CM.ConfigPrefix));
|
CM.Config = JSON.parse(localStorage.getItem(CM.ConfigPrefix));
|
||||||
|
|
||||||
// Check values
|
// Check values
|
||||||
var mod = false;
|
var mod = false;
|
||||||
for (var i in CM.ConfigDefault) {
|
for (var i in CM.ConfigDefault) {
|
||||||
@@ -56,8 +56,8 @@ CM.LoadConfig = function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // Default values
|
else { // Default values
|
||||||
CM.RestoreDefault();
|
CM.RestoreDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,4 +147,3 @@ CM.ConfigData.UpStats = {label: ['Statistics Update Rate (Default)', 'Statistics
|
|||||||
CM.ConfigData.TimeFormat = {label: ['Time XXd, XXh, XXm, XXs', 'Time XX:XX:XX:XX:XX'], desc: 'Change the time format', toggle: false};
|
CM.ConfigData.TimeFormat = {label: ['Time XXd, XXh, XXm, XXs', 'Time XX:XX:XX:XX:XX'], desc: 'Change the time format', toggle: false};
|
||||||
CM.ConfigData.SayTime = {label: ['Format Time OFF', 'Format Time ON'], desc: 'Change how time is displayed in statistics', toggle: true, func: function() {CM.Disp.ToggleSayTime();}};
|
CM.ConfigData.SayTime = {label: ['Format Time OFF', 'Format Time ON'], desc: 'Change how time is displayed in statistics', toggle: true, func: function() {CM.Disp.ToggleSayTime();}};
|
||||||
CM.ConfigData.Scale = {label: ['Game\'s Setting Scale', 'Metric', 'Short Scale', 'Scientific Notation'], desc: 'Change how long numbers are handled', toggle: false, func: function() {CM.Disp.RefreshScale();}};
|
CM.ConfigData.Scale = {label: ['Game\'s Setting Scale', 'Metric', 'Short Scale', 'Scientific Notation'], desc: 'Change how long numbers are handled', toggle: false, func: function() {CM.Disp.RefreshScale();}};
|
||||||
|
|
||||||
|
|||||||
@@ -5,4 +5,3 @@
|
|||||||
CM.Data.HalloCookies = ['Skull cookies', 'Ghost cookies', 'Bat cookies', 'Slime cookies', 'Pumpkin cookies', 'Eyeball cookies', 'Spider cookies'];
|
CM.Data.HalloCookies = ['Skull cookies', 'Ghost cookies', 'Bat cookies', 'Slime cookies', 'Pumpkin cookies', 'Eyeball cookies', 'Spider cookies'];
|
||||||
CM.Data.ChristCookies = ['Christmas tree biscuits', 'Snowflake biscuits', 'Snowman biscuits', 'Holly biscuits', 'Candy cane biscuits', 'Bell biscuits', 'Present biscuits'];
|
CM.Data.ChristCookies = ['Christmas tree biscuits', 'Snowflake biscuits', 'Snowman biscuits', 'Holly biscuits', 'Candy cane biscuits', 'Bell biscuits', 'Present biscuits'];
|
||||||
CM.Data.ValCookies = ['Pure heart biscuits', 'Ardent heart biscuits', 'Sour heart biscuits', 'Weeping heart biscuits', 'Golden heart biscuits', 'Eternal heart biscuits'];
|
CM.Data.ValCookies = ['Pure heart biscuits', 'Ardent heart biscuits', 'Sour heart biscuits', 'Weeping heart biscuits', 'Golden heart biscuits', 'Eternal heart biscuits'];
|
||||||
|
|
||||||
|
|||||||
@@ -17,4 +17,3 @@ CM.Data = {};
|
|||||||
CM.Disp = {};
|
CM.Disp = {};
|
||||||
|
|
||||||
CM.Sim = {};
|
CM.Sim = {};
|
||||||
|
|
||||||
|
|||||||
53
src/Main.js
53
src/Main.js
@@ -1,7 +1,7 @@
|
|||||||
/********
|
/********
|
||||||
* Main *
|
* Main *
|
||||||
********/
|
********/
|
||||||
|
|
||||||
CM.ReplaceNative = function() {
|
CM.ReplaceNative = function() {
|
||||||
CM.Backup.Beautify = Beautify;
|
CM.Backup.Beautify = Beautify;
|
||||||
Beautify = CM.Disp.Beautify;
|
Beautify = CM.Disp.Beautify;
|
||||||
@@ -12,7 +12,7 @@ CM.ReplaceNative = function() {
|
|||||||
CM.Sim.DoSims = 1;
|
CM.Sim.DoSims = 1;
|
||||||
CM.Sim.Date = Date.now();
|
CM.Sim.Date = Date.now();
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Backup.tooltip = {};
|
CM.Backup.tooltip = {};
|
||||||
CM.Backup.tooltip.draw = Game.tooltip.draw;
|
CM.Backup.tooltip.draw = Game.tooltip.draw;
|
||||||
eval('CM.Backup.tooltip.drawMod = ' + Game.tooltip.draw.toString().split('this').join('Game.tooltip'));
|
eval('CM.Backup.tooltip.drawMod = ' + Game.tooltip.draw.toString().split('this').join('Game.tooltip'));
|
||||||
@@ -20,7 +20,7 @@ CM.ReplaceNative = function() {
|
|||||||
CM.Backup.tooltip.drawMod(from, text, origin);
|
CM.Backup.tooltip.drawMod(from, text, origin);
|
||||||
CM.Disp.DrawTooltipWarnCaut();
|
CM.Disp.DrawTooltipWarnCaut();
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Backup.tooltip.update = Game.tooltip.update;
|
CM.Backup.tooltip.update = Game.tooltip.update;
|
||||||
eval('CM.Backup.tooltip.updateMod = ' + Game.tooltip.update.toString().split('this.').join('Game.tooltip.'));
|
eval('CM.Backup.tooltip.updateMod = ' + Game.tooltip.update.toString().split('this.').join('Game.tooltip.'));
|
||||||
Game.tooltip.update = function() {
|
Game.tooltip.update = function() {
|
||||||
@@ -28,7 +28,7 @@ CM.ReplaceNative = function() {
|
|||||||
CM.Disp.UpdateTooltipWarnCaut();
|
CM.Disp.UpdateTooltipWarnCaut();
|
||||||
CM.Disp.UpdateTooltipLocation();
|
CM.Disp.UpdateTooltipLocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Backup.UpdateSpecial = Game.UpdateSpecial;
|
CM.Backup.UpdateSpecial = Game.UpdateSpecial;
|
||||||
Game.UpdateSpecial = function() {
|
Game.UpdateSpecial = function() {
|
||||||
if (CM.Config.TimerBar == 1 && CM.Config.TimerBarPos == 0) {
|
if (CM.Config.TimerBar == 1 && CM.Config.TimerBarPos == 0) {
|
||||||
@@ -56,7 +56,7 @@ CM.ReplaceNative = function() {
|
|||||||
CM.Disp.AddTooltipUpgrade();
|
CM.Disp.AddTooltipUpgrade();
|
||||||
Game.CalculateGains();
|
Game.CalculateGains();
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Backup.UpdateMenu = Game.UpdateMenu;
|
CM.Backup.UpdateMenu = Game.UpdateMenu;
|
||||||
Game.UpdateMenu = function() {
|
Game.UpdateMenu = function() {
|
||||||
if (typeof jscolor.picker === 'undefined' || typeof jscolor.picker.owner === 'undefined') {
|
if (typeof jscolor.picker === 'undefined' || typeof jscolor.picker.owner === 'undefined') {
|
||||||
@@ -64,24 +64,24 @@ CM.ReplaceNative = function() {
|
|||||||
CM.Disp.AddMenu();
|
CM.Disp.AddMenu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Backup.sayTime = Game.sayTime;
|
CM.Backup.sayTime = Game.sayTime;
|
||||||
CM.Disp.sayTime = function(time, detail) {
|
CM.Disp.sayTime = function(time, detail) {
|
||||||
if (isNaN(time) || time <= 0) return CM.Backup.sayTime(time, detail);
|
if (isNaN(time) || time <= 0) return CM.Backup.sayTime(time, detail);
|
||||||
else return CM.Disp.FormatTime(time / Game.fps, 1);
|
else return CM.Disp.FormatTime(time / Game.fps, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Backup.Loop = Game.Loop;
|
CM.Backup.Loop = Game.Loop;
|
||||||
Game.Loop = function() {
|
Game.Loop = function() {
|
||||||
CM.Backup.Loop();
|
CM.Backup.Loop();
|
||||||
CM.Loop();
|
CM.Loop();
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Backup.Logic = Game.Logic;
|
CM.Backup.Logic = Game.Logic;
|
||||||
eval('CM.Backup.LogicMod = ' + Game.Logic.toString().split('document.title').join('CM.Cache.Title'));
|
eval('CM.Backup.LogicMod = ' + Game.Logic.toString().split('document.title').join('CM.Cache.Title'));
|
||||||
Game.Logic = function() {
|
Game.Logic = function() {
|
||||||
CM.Backup.LogicMod();
|
CM.Backup.LogicMod();
|
||||||
|
|
||||||
// Update Title
|
// Update Title
|
||||||
CM.Disp.UpdateTitle();
|
CM.Disp.UpdateTitle();
|
||||||
}
|
}
|
||||||
@@ -127,19 +127,19 @@ CM.Loop = function() {
|
|||||||
CM.Disp.UpdateAscendState();
|
CM.Disp.UpdateAscendState();
|
||||||
}
|
}
|
||||||
if (!Game.OnAscend && Game.AscendTimer == 0) {
|
if (!Game.OnAscend && Game.AscendTimer == 0) {
|
||||||
if (CM.Sim.DoSims) {
|
if (CM.Sim.DoSims) {
|
||||||
CM.Cache.RemakeIncome();
|
CM.Cache.RemakeIncome();
|
||||||
|
|
||||||
CM.Sim.NoGoldSwitchCookiesPS(); // Needed first
|
CM.Sim.NoGoldSwitchCookiesPS(); // Needed first
|
||||||
CM.Cache.RemakeLucky();
|
CM.Cache.RemakeLucky();
|
||||||
CM.Cache.RemakeChain();
|
CM.Cache.RemakeChain();
|
||||||
|
|
||||||
CM.Cache.RemakeSeaSpec();
|
CM.Cache.RemakeSeaSpec();
|
||||||
CM.Cache.RemakeSellForChoEgg();
|
CM.Cache.RemakeSellForChoEgg();
|
||||||
|
|
||||||
CM.Sim.DoSims = 0;
|
CM.Sim.DoSims = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for aura change to recalculate buildings prices
|
// Check for aura change to recalculate buildings prices
|
||||||
var hasFierHoard = Game.hasAura('Fierce Hoarder');
|
var hasFierHoard = Game.hasAura('Fierce Hoarder');
|
||||||
if (!CM.Cache.HadFierHoard && hasFierHoard) {
|
if (!CM.Cache.HadFierHoard && hasFierHoard) {
|
||||||
@@ -150,15 +150,15 @@ CM.Loop = function() {
|
|||||||
CM.Cache.HadFierHoard = false;
|
CM.Cache.HadFierHoard = false;
|
||||||
CM.Cache.DoRemakeBuildPrices = 1;
|
CM.Cache.DoRemakeBuildPrices = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CM.Cache.DoRemakeBuildPrices) {
|
if (CM.Cache.DoRemakeBuildPrices) {
|
||||||
CM.Cache.RemakeBuildingsPrices();
|
CM.Cache.RemakeBuildingsPrices();
|
||||||
CM.Cache.DoRemakeBuildPrices = 0;
|
CM.Cache.DoRemakeBuildPrices = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update Wrinkler Bank
|
// Update Wrinkler Bank
|
||||||
CM.Cache.RemakeWrinkBank();
|
CM.Cache.RemakeWrinkBank();
|
||||||
|
|
||||||
// Calculate PP
|
// Calculate PP
|
||||||
CM.Cache.RemakePP();
|
CM.Cache.RemakePP();
|
||||||
|
|
||||||
@@ -166,11 +166,11 @@ CM.Loop = function() {
|
|||||||
CM.Disp.UpdateBotBarOther();
|
CM.Disp.UpdateBotBarOther();
|
||||||
CM.Disp.UpdateBuildings();
|
CM.Disp.UpdateBuildings();
|
||||||
CM.Disp.UpdateUpgrades();
|
CM.Disp.UpdateUpgrades();
|
||||||
|
|
||||||
// Redraw timers
|
// Redraw timers
|
||||||
CM.Disp.UpdateBotBarTime();
|
CM.Disp.UpdateBotBarTime();
|
||||||
CM.Disp.UpdateTimerBar();
|
CM.Disp.UpdateTimerBar();
|
||||||
|
|
||||||
// Update Tooltip
|
// Update Tooltip
|
||||||
CM.Disp.UpdateTooltip();
|
CM.Disp.UpdateTooltip();
|
||||||
|
|
||||||
@@ -181,10 +181,10 @@ CM.Loop = function() {
|
|||||||
// Change menu refresh interval
|
// Change menu refresh interval
|
||||||
CM.Disp.RefreshMenu();
|
CM.Disp.RefreshMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check Golden Cookies
|
// Check Golden Cookies
|
||||||
CM.Disp.CheckGoldenCookie();
|
CM.Disp.CheckGoldenCookie();
|
||||||
|
|
||||||
// Check Season Popup
|
// Check Season Popup
|
||||||
CM.Disp.CheckSeasonPopup();
|
CM.Disp.CheckSeasonPopup();
|
||||||
|
|
||||||
@@ -200,7 +200,7 @@ CM.Init = function() {
|
|||||||
if (proceed) {
|
if (proceed) {
|
||||||
CM.Cache.AddQueue();
|
CM.Cache.AddQueue();
|
||||||
CM.Disp.AddJscolor();
|
CM.Disp.AddJscolor();
|
||||||
|
|
||||||
var delay = setInterval(function() {
|
var delay = setInterval(function() {
|
||||||
if (typeof Queue !== 'undefined' && typeof jscolor !== 'undefined') {
|
if (typeof Queue !== 'undefined' && typeof jscolor !== 'undefined') {
|
||||||
CM.DelayInit();
|
CM.DelayInit();
|
||||||
@@ -220,11 +220,11 @@ CM.DelayInit = function() {
|
|||||||
CM.Disp.CreateFavicon();
|
CM.Disp.CreateFavicon();
|
||||||
CM.Disp.CreateGCTimer();
|
CM.Disp.CreateGCTimer();
|
||||||
CM.Disp.CreateTooltip('GoldCookTooltipPlaceholder', 'Calculated with Golden Switch off', '200px');
|
CM.Disp.CreateTooltip('GoldCookTooltipPlaceholder', 'Calculated with Golden Switch off', '200px');
|
||||||
CM.Disp.CreateTooltip('PrestMaxTooltipPlaceholder', 'The MAX prestige is calculated with the cookies gained from popping all wrinklers with Skruuia god in Diamind slot, selling all buildings with Earth Shatterer aura, and buying Chocolate egg', '370px');
|
CM.Disp.CreateTooltip('PrestMaxTooltipPlaceholder', 'The MAX prestige is calculated with the cookies gained from popping all wrinklers with Skruuia god in Diamond slot, selling all buildings with Earth Shatterer aura, and buying Chocolate egg', '370px');
|
||||||
CM.Disp.CreateTooltip('NextPrestTooltipPlaceholder', 'Calculated with cookies gained from wrinklers and Chocolate egg', '200px');
|
CM.Disp.CreateTooltip('NextPrestTooltipPlaceholder', 'Calculated with cookies gained from wrinklers and Chocolate egg', '200px');
|
||||||
CM.Disp.CreateTooltip('HeavenChipMaxTooltipPlaceholder', 'The MAX heavenly chips is calculated with the cookies gained from popping all wrinklers with Skruuia god in Diamind slot, selling all buildings with Earth Shatterer aura, and buying Chocolate egg', '390px');
|
CM.Disp.CreateTooltip('HeavenChipMaxTooltipPlaceholder', 'The MAX heavenly chips is calculated with the cookies gained from popping all wrinklers with Skruuia god in Diamond slot, selling all buildings with Earth Shatterer aura, and buying Chocolate egg', '390px');
|
||||||
CM.Disp.CreateTooltip('ResetTooltipPlaceholder', 'The bonus income you would get from new prestige levels unlocked at 100% of its potential and from reset achievements if you have the same buildings/upgrades after reset', '370px');
|
CM.Disp.CreateTooltip('ResetTooltipPlaceholder', 'The bonus income you would get from new prestige levels unlocked at 100% of its potential and from reset achievements if you have the same buildings/upgrades after reset', '370px');
|
||||||
CM.Disp.CreateTooltip('ChoEggTooltipPlaceholder', 'The amount of cookies you would get from popping all wrinklers with Skruuia god in Diamind slot, selling all buildings with Earth Shatterer aura, and then buying Chocolate egg', '360px');
|
CM.Disp.CreateTooltip('ChoEggTooltipPlaceholder', 'The amount of cookies you would get from popping all wrinklers with Skruuia god in Diamond slot, selling all buildings with Earth Shatterer aura, and then buying Chocolate egg', '360px');
|
||||||
CM.Disp.CreateTooltipWarnCaut();
|
CM.Disp.CreateTooltipWarnCaut();
|
||||||
CM.Disp.AddTooltipBuild();
|
CM.Disp.AddTooltipBuild();
|
||||||
CM.Disp.AddTooltipGrimoire();
|
CM.Disp.AddTooltipGrimoire();
|
||||||
@@ -252,4 +252,3 @@ CM.ConfigPrefix = 'CMConfig';
|
|||||||
|
|
||||||
CM.VersionMajor = '2.0042';
|
CM.VersionMajor = '2.0042';
|
||||||
CM.VersionMinor = '2';
|
CM.VersionMinor = '2';
|
||||||
|
|
||||||
|
|||||||
67
src/Sim.js
67
src/Sim.js
@@ -79,8 +79,8 @@ eval('CM.Sim.HasAchiev = ' + Game.HasAchiev.toString().split('Game').join('CM.Si
|
|||||||
eval('CM.Sim.GetHeavenlyMultiplier = ' + Game.GetHeavenlyMultiplier.toString().split('Game.Has').join('CM.Sim.Has').split('Game.hasAura').join('CM.Sim.hasAura'));
|
eval('CM.Sim.GetHeavenlyMultiplier = ' + Game.GetHeavenlyMultiplier.toString().split('Game.Has').join('CM.Sim.Has').split('Game.hasAura').join('CM.Sim.hasAura'));
|
||||||
|
|
||||||
CM.Sim.hasAura = function(what) {
|
CM.Sim.hasAura = function(what) {
|
||||||
if (Game.dragonAuras[CM.Sim.dragonAura].name == what || Game.dragonAuras[CM.Sim.dragonAura2].name == what)
|
if (Game.dragonAuras[CM.Sim.dragonAura].name == what || Game.dragonAuras[CM.Sim.dragonAura2].name == what)
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -132,7 +132,7 @@ CM.Sim.CopyData = function() {
|
|||||||
CM.Sim.prestige = Game.prestige;
|
CM.Sim.prestige = Game.prestige;
|
||||||
CM.Sim.dragonAura = Game.dragonAura;
|
CM.Sim.dragonAura = Game.dragonAura;
|
||||||
CM.Sim.dragonAura2 = Game.dragonAura2;
|
CM.Sim.dragonAura2 = Game.dragonAura2;
|
||||||
|
|
||||||
// Buildings
|
// Buildings
|
||||||
for (var i in Game.Objects) {
|
for (var i in Game.Objects) {
|
||||||
var me = Game.Objects[i];
|
var me = Game.Objects[i];
|
||||||
@@ -241,7 +241,7 @@ CM.Sim.CalculateGains = function() {
|
|||||||
if (CM.Sim.Has('Kitten specialists')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
if (CM.Sim.Has('Kitten specialists')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
||||||
if (CM.Sim.Has('Kitten experts')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
if (CM.Sim.Has('Kitten experts')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
||||||
if (CM.Sim.Has('Kitten consultants')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
if (CM.Sim.Has('Kitten consultants')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
||||||
if (CM.Sim.Has('Kitten assistants to the regional manager')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
if (CM.Sim.Has('Kitten assistants to the regional manager')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
||||||
if (CM.Sim.Has('Kitten angels')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult);
|
if (CM.Sim.Has('Kitten angels')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult);
|
||||||
|
|
||||||
var eggMult = 1;
|
var eggMult = 1;
|
||||||
@@ -265,7 +265,7 @@ CM.Sim.CalculateGains = function() {
|
|||||||
eggMult *= CM.Cache.CentEgg;
|
eggMult *= CM.Cache.CentEgg;
|
||||||
}
|
}
|
||||||
mult *= eggMult;
|
mult *= eggMult;
|
||||||
|
|
||||||
if (CM.Sim.hasAura('Radiant Appetite')) mult *= 2;
|
if (CM.Sim.hasAura('Radiant Appetite')) mult *= 2;
|
||||||
|
|
||||||
if (Game.hasAura('Dragon\'s Fortune')) {
|
if (Game.hasAura('Dragon\'s Fortune')) {
|
||||||
@@ -276,7 +276,7 @@ CM.Sim.CalculateGains = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var rawCookiesPs = CM.Sim.cookiesPs * mult;
|
var rawCookiesPs = CM.Sim.cookiesPs * mult;
|
||||||
|
|
||||||
for (var i in Game.CpsAchievements) {
|
for (var i in Game.CpsAchievements) {
|
||||||
if (rawCookiesPs >= Game.CpsAchievements[i].threshold) CM.Sim.Win(Game.CpsAchievements[i].name);
|
if (rawCookiesPs >= Game.CpsAchievements[i].threshold) CM.Sim.Win(Game.CpsAchievements[i].name);
|
||||||
}
|
}
|
||||||
@@ -351,16 +351,16 @@ CM.Sim.CheckOtherAchiev = function() {
|
|||||||
if (buildingsOwned >= 500) CM.Sim.Win('Architect');
|
if (buildingsOwned >= 500) CM.Sim.Win('Architect');
|
||||||
if (buildingsOwned >= 1000) CM.Sim.Win('Engineer');
|
if (buildingsOwned >= 1000) CM.Sim.Win('Engineer');
|
||||||
if (buildingsOwned >= 2000) CM.Sim.Win('Lord of Constructs');
|
if (buildingsOwned >= 2000) CM.Sim.Win('Lord of Constructs');
|
||||||
|
|
||||||
if (CM.Sim.UpgradesOwned >= 20) CM.Sim.Win('Enhancer');
|
if (CM.Sim.UpgradesOwned >= 20) CM.Sim.Win('Enhancer');
|
||||||
if (CM.Sim.UpgradesOwned >= 50) CM.Sim.Win('Augmenter');
|
if (CM.Sim.UpgradesOwned >= 50) CM.Sim.Win('Augmenter');
|
||||||
if (CM.Sim.UpgradesOwned >= 100) CM.Sim.Win('Upgrader');
|
if (CM.Sim.UpgradesOwned >= 100) CM.Sim.Win('Upgrader');
|
||||||
if (CM.Sim.UpgradesOwned >= 200) CM.Sim.Win('Lord of Progress');
|
if (CM.Sim.UpgradesOwned >= 200) CM.Sim.Win('Lord of Progress');
|
||||||
|
|
||||||
if (buildingsOwned >= 3000 && CM.Sim.UpgradesOwned >= 300) CM.Sim.Win('Polymath');
|
if (buildingsOwned >= 3000 && CM.Sim.UpgradesOwned >= 300) CM.Sim.Win('Polymath');
|
||||||
|
|
||||||
if (CM.Sim.Objects['Cursor'].amount + CM.Sim.Objects['Grandma'].amount >= 777) CM.Sim.Win('The elder scrolls');
|
if (CM.Sim.Objects['Cursor'].amount + CM.Sim.Objects['Grandma'].amount >= 777) CM.Sim.Win('The elder scrolls');
|
||||||
|
|
||||||
var hasAllHalloCook = true;
|
var hasAllHalloCook = true;
|
||||||
for (var i in CM.Data.HalloCookies) {
|
for (var i in CM.Data.HalloCookies) {
|
||||||
if (!CM.Sim.Has(CM.Data.HalloCookies[i])) hasAllHalloCook = false;
|
if (!CM.Sim.Has(CM.Data.HalloCookies[i])) hasAllHalloCook = false;
|
||||||
@@ -374,13 +374,13 @@ CM.Sim.CheckOtherAchiev = function() {
|
|||||||
if (hasAllChristCook) CM.Sim.Win('Let it snow');
|
if (hasAllChristCook) CM.Sim.Win('Let it snow');
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Sim.BuyBuildings = function(amount, target) {
|
CM.Sim.BuyBuildings = function(amount, target) {
|
||||||
CM.Cache[target] = [];
|
CM.Cache[target] = [];
|
||||||
for (var i in Game.Objects) {
|
for (var i in Game.Objects) {
|
||||||
CM.Sim.CopyData();
|
CM.Sim.CopyData();
|
||||||
var me = CM.Sim.Objects[i];
|
var me = CM.Sim.Objects[i];
|
||||||
me.amount += amount;
|
me.amount += amount;
|
||||||
|
|
||||||
if (i == 'Cursor') {
|
if (i == 'Cursor') {
|
||||||
if (me.amount >= 1) CM.Sim.Win('Click');
|
if (me.amount >= 1) CM.Sim.Win('Click');
|
||||||
if (me.amount >= 2) CM.Sim.Win('Double-click');
|
if (me.amount >= 2) CM.Sim.Win('Double-click');
|
||||||
@@ -393,21 +393,21 @@ CM.Sim.BuyBuildings = function(amount, target) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (var j in Game.Objects[me.name].tieredAchievs) {
|
for (var j in Game.Objects[me.name].tieredAchievs) {
|
||||||
if (me.amount >= Game.Tiers[Game.Objects[me.name].tieredAchievs[j].tier].achievUnlock)
|
if (me.amount >= Game.Tiers[Game.Objects[me.name].tieredAchievs[j].tier].achievUnlock)
|
||||||
CM.Sim.Win(Game.Objects[me.name].tieredAchievs[j].name);
|
CM.Sim.Win(Game.Objects[me.name].tieredAchievs[j].name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var lastAchievementsOwned = CM.Sim.AchievementsOwned;
|
var lastAchievementsOwned = CM.Sim.AchievementsOwned;
|
||||||
|
|
||||||
CM.Sim.CalculateGains();
|
CM.Sim.CalculateGains();
|
||||||
|
|
||||||
CM.Sim.CheckOtherAchiev();
|
CM.Sim.CheckOtherAchiev();
|
||||||
|
|
||||||
if (lastAchievementsOwned != CM.Sim.AchievementsOwned) {
|
if (lastAchievementsOwned != CM.Sim.AchievementsOwned) {
|
||||||
CM.Sim.CalculateGains();
|
CM.Sim.CalculateGains();
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Cache[target][i] = {};
|
CM.Cache[target][i] = {};
|
||||||
CM.Cache[target][i].bonus = CM.Sim.cookiesPs - Game.cookiesPs;
|
CM.Cache[target][i].bonus = CM.Sim.cookiesPs - Game.cookiesPs;
|
||||||
if (amount != 1) {
|
if (amount != 1) {
|
||||||
@@ -439,17 +439,17 @@ CM.Sim.BuyUpgrades = function() {
|
|||||||
else if (i == 'Heavenly key') {
|
else if (i == 'Heavenly key') {
|
||||||
CM.Sim.Win('Wholesome');
|
CM.Sim.Win('Wholesome');
|
||||||
}
|
}
|
||||||
|
|
||||||
var lastAchievementsOwned = CM.Sim.AchievementsOwned;
|
var lastAchievementsOwned = CM.Sim.AchievementsOwned;
|
||||||
|
|
||||||
CM.Sim.CalculateGains();
|
CM.Sim.CalculateGains();
|
||||||
|
|
||||||
CM.Sim.CheckOtherAchiev();
|
CM.Sim.CheckOtherAchiev();
|
||||||
|
|
||||||
if (lastAchievementsOwned != CM.Sim.AchievementsOwned) {
|
if (lastAchievementsOwned != CM.Sim.AchievementsOwned) {
|
||||||
CM.Sim.CalculateGains();
|
CM.Sim.CalculateGains();
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Cache.Upgrades[i] = {};
|
CM.Cache.Upgrades[i] = {};
|
||||||
CM.Cache.Upgrades[i].bonus = CM.Sim.cookiesPs - Game.cookiesPs;
|
CM.Cache.Upgrades[i].bonus = CM.Sim.cookiesPs - Game.cookiesPs;
|
||||||
}
|
}
|
||||||
@@ -468,12 +468,12 @@ CM.Sim.NoGoldSwitchCookiesPS = function() {
|
|||||||
|
|
||||||
CM.Sim.ResetBonus = function(possiblePresMax) {
|
CM.Sim.ResetBonus = function(possiblePresMax) {
|
||||||
var lastAchievementsOwned = -1;
|
var lastAchievementsOwned = -1;
|
||||||
|
|
||||||
// Calculate CPS with all Heavenly upgrades
|
// Calculate CPS with all Heavenly upgrades
|
||||||
var curCPS = Game.cookiesPs;
|
var curCPS = Game.cookiesPs;
|
||||||
|
|
||||||
CM.Sim.CopyData();
|
CM.Sim.CopyData();
|
||||||
|
|
||||||
if (CM.Sim.Upgrades['Heavenly key'].bought == 0) {
|
if (CM.Sim.Upgrades['Heavenly key'].bought == 0) {
|
||||||
CM.Sim.Upgrades['Heavenly chip secret'].bought = 1;
|
CM.Sim.Upgrades['Heavenly chip secret'].bought = 1;
|
||||||
CM.Sim.Upgrades['Heavenly cookie stand'].bought = 1;
|
CM.Sim.Upgrades['Heavenly cookie stand'].bought = 1;
|
||||||
@@ -484,10 +484,10 @@ CM.Sim.ResetBonus = function(possiblePresMax) {
|
|||||||
CM.Sim.CalculateGains();
|
CM.Sim.CalculateGains();
|
||||||
|
|
||||||
curCPS = CM.Sim.cookiesPs;
|
curCPS = CM.Sim.cookiesPs;
|
||||||
|
|
||||||
CM.Sim.CopyData();
|
CM.Sim.CopyData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Game.cookiesEarned >= 1000000) CM.Sim.Win('Sacrifice');
|
if (Game.cookiesEarned >= 1000000) CM.Sim.Win('Sacrifice');
|
||||||
if (Game.cookiesEarned >= 1000000000) CM.Sim.Win('Oblivion');
|
if (Game.cookiesEarned >= 1000000000) CM.Sim.Win('Oblivion');
|
||||||
if (Game.cookiesEarned >= 1000000000000) CM.Sim.Win('From scratch');
|
if (Game.cookiesEarned >= 1000000000000) CM.Sim.Win('From scratch');
|
||||||
@@ -498,25 +498,24 @@ CM.Sim.ResetBonus = function(possiblePresMax) {
|
|||||||
if (Game.cookiesEarned >= 1000000000000000000000000000) CM.Sim.Win('Obliterate');
|
if (Game.cookiesEarned >= 1000000000000000000000000000) CM.Sim.Win('Obliterate');
|
||||||
if (Game.cookiesEarned >= 1000000000000000000000000000000) CM.Sim.Win('Negative void');
|
if (Game.cookiesEarned >= 1000000000000000000000000000000) CM.Sim.Win('Negative void');
|
||||||
if (Game.cookiesEarned >= 1000000000000000000000000000000000) CM.Sim.Win('To crumbs, you say?');
|
if (Game.cookiesEarned >= 1000000000000000000000000000000000) CM.Sim.Win('To crumbs, you say?');
|
||||||
|
|
||||||
CM.Sim.Upgrades['Heavenly chip secret'].bought = 1;
|
CM.Sim.Upgrades['Heavenly chip secret'].bought = 1;
|
||||||
CM.Sim.Upgrades['Heavenly cookie stand'].bought = 1;
|
CM.Sim.Upgrades['Heavenly cookie stand'].bought = 1;
|
||||||
CM.Sim.Upgrades['Heavenly bakery'].bought = 1;
|
CM.Sim.Upgrades['Heavenly bakery'].bought = 1;
|
||||||
CM.Sim.Upgrades['Heavenly confectionery'].bought = 1;
|
CM.Sim.Upgrades['Heavenly confectionery'].bought = 1;
|
||||||
CM.Sim.Upgrades['Heavenly key'].bought = 1;
|
CM.Sim.Upgrades['Heavenly key'].bought = 1;
|
||||||
|
|
||||||
CM.Sim.prestige = possiblePresMax;
|
CM.Sim.prestige = possiblePresMax;
|
||||||
|
|
||||||
lastAchievementsOwned = CM.Sim.AchievementsOwned;
|
lastAchievementsOwned = CM.Sim.AchievementsOwned;
|
||||||
|
|
||||||
CM.Sim.CalculateGains();
|
CM.Sim.CalculateGains();
|
||||||
|
|
||||||
CM.Sim.CheckOtherAchiev();
|
CM.Sim.CheckOtherAchiev();
|
||||||
|
|
||||||
if (lastAchievementsOwned != CM.Sim.AchievementsOwned) {
|
if (lastAchievementsOwned != CM.Sim.AchievementsOwned) {
|
||||||
CM.Sim.CalculateGains();
|
CM.Sim.CalculateGains();
|
||||||
}
|
}
|
||||||
|
|
||||||
return (CM.Sim.cookiesPs - curCPS);
|
return (CM.Sim.cookiesPs - curCPS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user