Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a920e9e5fb | ||
|
|
fa6b998f67 | ||
|
|
244d0342ec | ||
|
|
9f649d8806 | ||
|
|
2e751e966d | ||
|
|
06ba2ad000 | ||
|
|
cb4b85a594 | ||
|
|
b5eac1ce22 | ||
|
|
431b1e6cd0 | ||
|
|
836804b3f9 | ||
|
|
8af54cfe8c | ||
|
|
8e2777df0e | ||
|
|
3ff3b970a0 | ||
|
|
108a0d836d |
284
CookieMonster.js
284
CookieMonster.js
@@ -39,8 +39,8 @@ CM.Cache.NextNumber = function(base) {
|
|||||||
|
|
||||||
CM.Cache.RemakeBuildingsPrices = function() {
|
CM.Cache.RemakeBuildingsPrices = function() {
|
||||||
for (var i in Game.Objects) {
|
for (var i in Game.Objects) {
|
||||||
CM.Cache.Objects10[i].price = CM.Sim.BuildingGetPrice(Game.Objects[i].basePrice, Game.Objects[i].amount, Game.Objects[i].free, 10);
|
CM.Cache.Objects10[i].price = CM.Sim.BuildingGetPrice(Game.Objects[i], Game.Objects[i].basePrice, Game.Objects[i].amount, Game.Objects[i].free, 10);
|
||||||
CM.Cache.Objects100[i].price = CM.Sim.BuildingGetPrice(Game.Objects[i].basePrice, Game.Objects[i].amount, Game.Objects[i].free, 100);
|
CM.Cache.Objects100[i].price = CM.Sim.BuildingGetPrice(Game.Objects[i], Game.Objects[i].basePrice, Game.Objects[i].amount, Game.Objects[i].free, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -223,11 +223,11 @@ CM.Cache.RemakeSeaSpec = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CM.Cache.RemakeSellForChoEgg = function() {
|
CM.Cache.RemakeSellForChoEgg = function() {
|
||||||
if (Game.hasAura('Earth Shatterer') || Game.dragonLevel < 9) {
|
if (Game.auraMult('Earth Shatterer') == 1.1) {
|
||||||
var sellTotal = 0;
|
var sellTotal = 0;
|
||||||
for (var i in Game.Objects) {
|
for (var i in Game.Objects) {
|
||||||
var me = Game.Objects[i];
|
var me = Game.Objects[i];
|
||||||
sellTotal += CM.Sim.BuildingSell(me.basePrice, me.amount, me.free, me.amount, 0);
|
sellTotal += CM.Sim.BuildingSell(me, me.basePrice, me.amount, me.free, me.amount, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -235,17 +235,29 @@ CM.Cache.RemakeSellForChoEgg = function() {
|
|||||||
for (var i in Game.Objects) {
|
for (var i in Game.Objects) {
|
||||||
if (Game.Objects[i].amount > 0) highestBuilding = i;
|
if (Game.Objects[i].amount > 0) highestBuilding = i;
|
||||||
}
|
}
|
||||||
|
var secondHighBuild = '';
|
||||||
|
if (Game.auraMult('Earth Shatterer') == 0 && highestBuilding != '') {
|
||||||
|
if (Game.Objects[highestBuilding].amount > 1) {
|
||||||
|
secondHighBuild = highestBuilding;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (var i in Game.Objects) {
|
||||||
|
if (i != highestBuilding && Game.Objects[i].amount > 0) secondHighBuild = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var sellTotal = 0;
|
var sellTotal = 0;
|
||||||
for (var i in Game.Objects) {
|
for (var i in Game.Objects) {
|
||||||
var me = Game.Objects[i];
|
var me = Game.Objects[i];
|
||||||
var amount = 0;
|
var amount = me.amount;
|
||||||
if (i == highestBuilding) {
|
if (i == highestBuilding) {
|
||||||
amount = me.amount - 1;
|
amount -= 1;
|
||||||
}
|
}
|
||||||
else {
|
if (i == secondHighBuild) {
|
||||||
amount = me.amount;
|
amount -= 1;
|
||||||
}
|
}
|
||||||
sellTotal += CM.Sim.BuildingSell(me.basePrice, amount, me.free, amount, 1);
|
sellTotal += CM.Sim.BuildingSell(me, me.basePrice, amount, me.free, amount, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CM.Cache.SellForChoEgg = sellTotal;
|
CM.Cache.SellForChoEgg = sellTotal;
|
||||||
@@ -377,7 +389,7 @@ CM.Cache.ChainFrenzyWrathReward = 0;
|
|||||||
CM.Cache.CentEgg = 0;
|
CM.Cache.CentEgg = 0;
|
||||||
CM.Cache.SellForChoEgg = 0;
|
CM.Cache.SellForChoEgg = 0;
|
||||||
CM.Cache.Title = '';
|
CM.Cache.Title = '';
|
||||||
CM.Cache.HadFierHoard = false;
|
CM.Cache.HadBuildAura = false;
|
||||||
CM.Cache.RealCookiesEarned = -1;
|
CM.Cache.RealCookiesEarned = -1;
|
||||||
CM.Cache.lastDate = -1;
|
CM.Cache.lastDate = -1;
|
||||||
CM.Cache.lastCookies = -1;
|
CM.Cache.lastCookies = -1;
|
||||||
@@ -542,6 +554,13 @@ for (var i = 0; i < 101; i++) {
|
|||||||
CM.ConfigData.GCSoundURL = {label: 'Golden Cookie Sound URL:', desc: 'URL of the sound to be played when a Golden Cookie spawns'};
|
CM.ConfigData.GCSoundURL = {label: 'Golden Cookie Sound URL:', desc: 'URL of the sound to be played when a Golden Cookie spawns'};
|
||||||
CM.ConfigData.GCTimer = {label: ['Golden Cookie Timer OFF', 'Golden Cookie Timer ON'], desc: 'A timer on the Golden Cookie when it has been spawned', toggle: true, func: function() {CM.Disp.ToggleGCTimer();}};
|
CM.ConfigData.GCTimer = {label: ['Golden Cookie Timer OFF', 'Golden Cookie Timer ON'], desc: 'A timer on the Golden Cookie when it has been spawned', toggle: true, func: function() {CM.Disp.ToggleGCTimer();}};
|
||||||
CM.ConfigData.Favicon = {label: ['Favicon OFF', 'Favicon ON'], desc: 'Update favicon with Golden/Wrath Cookie', toggle: true, func: function() {CM.Disp.UpdateFavicon();}};
|
CM.ConfigData.Favicon = {label: ['Favicon OFF', 'Favicon ON'], desc: 'Update favicon with Golden/Wrath Cookie', toggle: true, func: function() {CM.Disp.UpdateFavicon();}};
|
||||||
|
CM.ConfigData.FortuneFlash = {label: ['Fortune Cookie Flash OFF', 'Fortune Cookie Flash ON'], desc: 'Flash screen on Fortune Cookie', toggle: true};
|
||||||
|
CM.ConfigData.FortuneSound = {label: ['Fortune Cookie Sound OFF', 'Fortune Cookie Sound ON'], desc: 'Play a sound on Fortune Cookie', toggle: true};
|
||||||
|
CM.ConfigData.FortuneVolume = {label: [], desc: 'Volume of the Fortune Cookie sound'};
|
||||||
|
for (var i = 0; i < 101; i++) {
|
||||||
|
CM.ConfigData.FortuneVolume.label[i] = i + '%';
|
||||||
|
}
|
||||||
|
CM.ConfigData.FortuneSoundURL = {label: 'Fortune Cookie Sound URL:', desc: 'URL of the sound to be played when the Ticker has a Fortune Cookie'};
|
||||||
CM.ConfigData.SeaFlash = {label: ['Season Special Flash OFF', 'Season Special Flash ON'], desc: 'Flash screen on Season Popup', toggle: true};
|
CM.ConfigData.SeaFlash = {label: ['Season Special Flash OFF', 'Season Special Flash ON'], desc: 'Flash screen on Season Popup', toggle: true};
|
||||||
CM.ConfigData.SeaSound = {label: ['Season Special Sound OFF', 'Season Special Sound ON'], desc: 'Play a sound on Season Popup', toggle: true};
|
CM.ConfigData.SeaSound = {label: ['Season Special Sound OFF', 'Season Special Sound ON'], desc: 'Play a sound on Season Popup', toggle: true};
|
||||||
CM.ConfigData.SeaVolume = {label: [], desc: 'Volume of the Season Special sound'};
|
CM.ConfigData.SeaVolume = {label: [], desc: 'Volume of the Season Special sound'};
|
||||||
@@ -574,6 +593,30 @@ CM.ConfigData.Scale = {label: ['Game\'s Setting Scale', 'Metric', 'Short Scale',
|
|||||||
* Data *
|
* Data *
|
||||||
********/
|
********/
|
||||||
|
|
||||||
|
CM.Data.Fortunes = [
|
||||||
|
'Fortune #001',
|
||||||
|
'Fortune #002',
|
||||||
|
'Fortune #003',
|
||||||
|
'Fortune #004',
|
||||||
|
'Fortune #005',
|
||||||
|
'Fortune #006',
|
||||||
|
'Fortune #007',
|
||||||
|
'Fortune #008',
|
||||||
|
'Fortune #009',
|
||||||
|
'Fortune #010',
|
||||||
|
'Fortune #011',
|
||||||
|
'Fortune #012',
|
||||||
|
'Fortune #013',
|
||||||
|
'Fortune #014',
|
||||||
|
'Fortune #015',
|
||||||
|
'Fortune #016',
|
||||||
|
'Fortune #017',
|
||||||
|
'Fortune #100',
|
||||||
|
'Fortune #101',
|
||||||
|
'Fortune #102',
|
||||||
|
'Fortune #103',
|
||||||
|
'Fortune #104'
|
||||||
|
];
|
||||||
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'];
|
||||||
@@ -1449,6 +1492,15 @@ CM.Disp.CheckGoldenCookie = function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CM.Disp.CheckTickerFortune = function() {
|
||||||
|
if (CM.Disp.lastTickerFortuneState != (Game.TickerEffect && Game.TickerEffect.type == 'fortune')) {
|
||||||
|
CM.Disp.lastTickerFortuneState = (Game.TickerEffect && Game.TickerEffect.type == 'fortune');
|
||||||
|
if (CM.Disp.lastTickerFortuneState) {
|
||||||
|
CM.Disp.Flash(3, 'FortuneFlash');
|
||||||
|
CM.Disp.PlaySound(CM.Config.FortuneSoundURL, 'FortuneSound', 'FortuneVolume');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CM.Disp.CheckSeasonPopup = function() {
|
CM.Disp.CheckSeasonPopup = function() {
|
||||||
if (CM.Disp.lastSeasonPopupState != Game.shimmerTypes['reindeer'].spawned) {
|
if (CM.Disp.lastSeasonPopupState != Game.shimmerTypes['reindeer'].spawned) {
|
||||||
@@ -1483,9 +1535,11 @@ CM.Disp.UpdateTitle = function() {
|
|||||||
document.title = CM.Cache.Title;
|
document.title = CM.Cache.Title;
|
||||||
}
|
}
|
||||||
else if (CM.Config.Title == 1) {
|
else if (CM.Config.Title == 1) {
|
||||||
|
var addFC = false;
|
||||||
var addSP = false;
|
var addSP = false;
|
||||||
|
|
||||||
var titleGC;
|
var titleGC;
|
||||||
|
var titleFC;
|
||||||
var titleSP;
|
var titleSP;
|
||||||
if (CM.Disp.lastGoldenCookieState) {
|
if (CM.Disp.lastGoldenCookieState) {
|
||||||
if (CM.Disp.goldenShimmer.wrath) {
|
if (CM.Disp.goldenShimmer.wrath) {
|
||||||
@@ -1501,6 +1555,10 @@ CM.Disp.UpdateTitle = function() {
|
|||||||
else {
|
else {
|
||||||
titleGC = '[GS]'
|
titleGC = '[GS]'
|
||||||
}
|
}
|
||||||
|
if (CM.Disp.lastTickerFortuneState) {
|
||||||
|
addFC = true;
|
||||||
|
titleFC = '[F]';
|
||||||
|
}
|
||||||
if (Game.season == 'christmas') {
|
if (Game.season == 'christmas') {
|
||||||
addSP = true;
|
addSP = true;
|
||||||
if (CM.Disp.lastSeasonPopupState) {
|
if (CM.Disp.lastSeasonPopupState) {
|
||||||
@@ -1516,7 +1574,7 @@ CM.Disp.UpdateTitle = function() {
|
|||||||
str = str.substring(str.lastIndexOf(']') + 1);
|
str = str.substring(str.lastIndexOf(']') + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
document.title = titleGC + (addSP ? titleSP : '') + ' ' + str;
|
document.title = titleGC + (addFC ? titleFC : '') + (addSP ? titleSP : '') + ' ' + str;
|
||||||
}
|
}
|
||||||
else if (CM.Config.Title == 2) {
|
else if (CM.Config.Title == 2) {
|
||||||
var str = '';
|
var str = '';
|
||||||
@@ -1530,6 +1588,10 @@ CM.Disp.UpdateTitle = function() {
|
|||||||
str += '[G ' + Math.ceil(CM.Disp.goldenShimmer.life / Game.fps) + ']';
|
str += '[G ' + Math.ceil(CM.Disp.goldenShimmer.life / Game.fps) + ']';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (CM.Disp.lastTickerFortuneState) {
|
||||||
|
spawn = true;
|
||||||
|
str += '[F]';
|
||||||
|
}
|
||||||
if (Game.season == 'christmas' && CM.Disp.lastSeasonPopupState) {
|
if (Game.season == 'christmas' && CM.Disp.lastSeasonPopupState) {
|
||||||
str += '[R ' + Math.ceil(CM.Disp.seasonPopShimmer.life / Game.fps) + ']';
|
str += '[R ' + Math.ceil(CM.Disp.seasonPopShimmer.life / Game.fps) + ']';
|
||||||
spawn = true;
|
spawn = true;
|
||||||
@@ -1692,6 +1754,10 @@ CM.Disp.AddMenuPref = function(title) {
|
|||||||
frag.appendChild(url('GCSoundURL'));
|
frag.appendChild(url('GCSoundURL'));
|
||||||
frag.appendChild(listing('GCTimer'));
|
frag.appendChild(listing('GCTimer'));
|
||||||
frag.appendChild(listing('Favicon'));
|
frag.appendChild(listing('Favicon'));
|
||||||
|
frag.appendChild(listing('FortuneFlash'));
|
||||||
|
frag.appendChild(listing('FortuneSound'));
|
||||||
|
frag.appendChild(vol('FortuneVolume'));
|
||||||
|
frag.appendChild(url('FortuneSoundURL'));
|
||||||
frag.appendChild(listing('SeaFlash'));
|
frag.appendChild(listing('SeaFlash'));
|
||||||
frag.appendChild(listing('SeaSound'));
|
frag.appendChild(listing('SeaSound'));
|
||||||
frag.appendChild(vol('SeaVolume'));
|
frag.appendChild(vol('SeaVolume'));
|
||||||
@@ -1799,6 +1865,45 @@ CM.Disp.AddMenuStats = function(title) {
|
|||||||
return frag;
|
return frag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var createMissDisp = function(theMissDisp) {
|
||||||
|
var frag = document.createDocumentFragment();
|
||||||
|
frag.appendChild(document.createTextNode(theMissDisp.length + ' '));
|
||||||
|
var 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 theMissDisp) {
|
||||||
|
var div = document.createElement('div');
|
||||||
|
div.style.textAlign = 'center';
|
||||||
|
div.appendChild(document.createTextNode(theMissDisp[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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
stats.appendChild(header('Lucky Cookies', 'Lucky'));
|
stats.appendChild(header('Lucky Cookies', 'Lucky'));
|
||||||
if (CM.Config.StatsPref.Lucky) {
|
if (CM.Config.StatsPref.Lucky) {
|
||||||
var luckyColor = ((Game.cookies + CM.Disp.GetWrinkConfigBank()) < CM.Cache.Lucky) ? CM.Disp.colorRed : CM.Disp.colorGreen;
|
var luckyColor = ((Game.cookies + CM.Disp.GetWrinkConfigBank()) < CM.Cache.Lucky) ? CM.Disp.colorRed : CM.Disp.colorGreen;
|
||||||
@@ -1812,11 +1917,16 @@ CM.Disp.AddMenuStats = function(title) {
|
|||||||
var luckyRewardFrenzyMaxWrath = CM.Cache.LuckyRewardFrenzy;
|
var luckyRewardFrenzyMaxWrath = CM.Cache.LuckyRewardFrenzy;
|
||||||
var luckyCur = luckyCurBase;
|
var luckyCur = luckyCurBase;
|
||||||
var luckyCurWrath = luckyCurBase;
|
var luckyCurWrath = luckyCurBase;
|
||||||
|
// Old way
|
||||||
if (Game.hasAura('Ancestral Metamorphosis')) {
|
if (Game.hasAura('Ancestral Metamorphosis')) {
|
||||||
luckyRewardMax *= 1.1;
|
luckyRewardMax *= 1.1;
|
||||||
luckyRewardFrenzyMax *= 1.1;
|
luckyRewardFrenzyMax *= 1.1;
|
||||||
luckyCur *= 1.1;
|
luckyCur *= 1.1;
|
||||||
}
|
}
|
||||||
|
/*luckyRewardMax *= 1 + Game.auraMult('Ancestral Metamorphosis') * 0.1;
|
||||||
|
luckyRewardFrenzyMax *= 1 + Game.auraMult('Ancestral Metamorphosis') * 0.1;
|
||||||
|
luckyCur *= 1 + Game.auraMult('Ancestral Metamorphosis') * 0.1;*/
|
||||||
|
// Old way
|
||||||
if (Game.hasAura('Unholy Dominion')) {
|
if (Game.hasAura('Unholy Dominion')) {
|
||||||
luckyRewardMaxWrath *= 1.1;
|
luckyRewardMaxWrath *= 1.1;
|
||||||
luckyRewardFrenzyMaxWrath *= 1.1;
|
luckyRewardFrenzyMaxWrath *= 1.1;
|
||||||
@@ -2020,48 +2130,11 @@ CM.Disp.AddMenuStats = function(title) {
|
|||||||
stats.appendChild(header('Season Specials', 'Sea'));
|
stats.appendChild(header('Season Specials', 'Sea'));
|
||||||
if (CM.Config.StatsPref.Sea) {
|
if (CM.Config.StatsPref.Sea) {
|
||||||
if (specDisp) {
|
if (specDisp) {
|
||||||
var createSpecDisp = function(theSpecDisp) {
|
if (halloCook.length != 0) stats.appendChild(listing('Halloween Cookies Left to Buy', createMissDisp(halloCook)));
|
||||||
var frag = document.createDocumentFragment();
|
if (christCook.length != 0) stats.appendChild(listing('Christmas Cookies Left to Buy', createMissDisp(christCook)));
|
||||||
frag.appendChild(document.createTextNode(theSpecDisp.length + ' '));
|
if (valCook.length != 0) stats.appendChild(listing('Valentine Cookies Left to Buy', createMissDisp(valCook)));
|
||||||
var span = document.createElement('span');
|
if (normEggs.length != 0) stats.appendChild(listing('Normal Easter Eggs Left to Unlock', createMissDisp(normEggs)));
|
||||||
span.onmouseout = function() { Game.tooltip.hide(); };
|
if (rareEggs.length != 0) stats.appendChild(listing('Rare Easter Eggs Left to Unlock', createMissDisp(rareEggs)));
|
||||||
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))));
|
if (Game.season == 'christmas') stats.appendChild(listing('Reindeer Reward', document.createTextNode(Beautify(CM.Cache.SeaSpec))));
|
||||||
@@ -2081,6 +2154,15 @@ CM.Disp.AddMenuStats = function(title) {
|
|||||||
document.createTextNode(Beautify(CM.Cache.AvgCPS, 3))
|
document.createTextNode(Beautify(CM.Cache.AvgCPS, 3))
|
||||||
));
|
));
|
||||||
stats.appendChild(listing('Average Cookie Clicks Per Second (Past ' + CM.Disp.clickTimes[CM.Config.AvgClicksHist] + (CM.Config.AvgClicksHist == 0 ? ' second' : ' seconds') + ')', document.createTextNode(Beautify(CM.Cache.AvgClicks, 1))));
|
stats.appendChild(listing('Average Cookie Clicks Per Second (Past ' + CM.Disp.clickTimes[CM.Config.AvgClicksHist] + (CM.Config.AvgClicksHist == 0 ? ' second' : ' seconds') + ')', document.createTextNode(Beautify(CM.Cache.AvgClicks, 1))));
|
||||||
|
if (Game.Has('Fortune cookies')) {
|
||||||
|
var fortunes = [];
|
||||||
|
for (var i in CM.Data.Fortunes) {
|
||||||
|
if (!Game.Has(CM.Data.Fortunes[i])) {
|
||||||
|
fortunes.push(CM.Data.Fortunes[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (fortunes.length != 0) stats.appendChild(listing('Fortune Upgrades Left to Buy', createMissDisp(fortunes)));
|
||||||
|
}
|
||||||
stats.appendChild(listing('Missed Golden Cookies', document.createTextNode(Beautify(Game.missedGoldenClicks))));
|
stats.appendChild(listing('Missed Golden Cookies', document.createTextNode(Beautify(Game.missedGoldenClicks))));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2242,7 +2324,7 @@ CM.Disp.Tooltip = function(type, name) {
|
|||||||
if (type == 'b') {
|
if (type == 'b') {
|
||||||
l('tooltip').innerHTML = Game.Objects[name].tooltip();
|
l('tooltip').innerHTML = Game.Objects[name].tooltip();
|
||||||
if (CM.Config.TooltipAmor == 1) {
|
if (CM.Config.TooltipAmor == 1) {
|
||||||
var buildPrice = CM.Sim.BuildingGetPrice(Game.Objects[name].basePrice, 0, Game.Objects[name].free, Game.Objects[name].amount);
|
var buildPrice = CM.Sim.BuildingGetPrice(Game.Objects[name], Game.Objects[name].basePrice, 0, Game.Objects[name].free, Game.Objects[name].amount);
|
||||||
var amortizeAmount = buildPrice - Game.Objects[name].totalCookies;
|
var amortizeAmount = buildPrice - Game.Objects[name].totalCookies;
|
||||||
if (amortizeAmount > 0) {
|
if (amortizeAmount > 0) {
|
||||||
l('tooltip').innerHTML = l('tooltip').innerHTML
|
l('tooltip').innerHTML = l('tooltip').innerHTML
|
||||||
@@ -2267,10 +2349,10 @@ CM.Disp.Tooltip = function(type, name) {
|
|||||||
}
|
}
|
||||||
else if (Game.buyMode == -1) {
|
else if (Game.buyMode == -1) {
|
||||||
if (Game.buyBulk == -1) {
|
if (Game.buyBulk == -1) {
|
||||||
l('tooltip').innerHTML = l('tooltip').innerHTML.split(Beautify(Game.Objects[name].getPrice())).join('-' + Beautify(CM.Sim.BuildingSell(Game.Objects[name].basePrice, Game.Objects[name].amount, Game.Objects[name].free, Game.Objects[name].amount, 0)));
|
l('tooltip').innerHTML = l('tooltip').innerHTML.split(Beautify(Game.Objects[name].getPrice())).join('-' + Beautify(CM.Sim.BuildingSell(Game.Objects[name], Game.Objects[name].basePrice, Game.Objects[name].amount, Game.Objects[name].free, Game.Objects[name].amount, 0)));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
l('tooltip').innerHTML = l('tooltip').innerHTML.split(Beautify(Game.Objects[name].getPrice())).join('-' + Beautify(CM.Sim.BuildingSell(Game.Objects[name].basePrice, Game.Objects[name].amount, Game.Objects[name].free, Game.buyBulk, 0)));
|
l('tooltip').innerHTML = l('tooltip').innerHTML.split(Beautify(Game.Objects[name].getPrice())).join('-' + Beautify(CM.Sim.BuildingSell(Game.Objects[name], Game.Objects[name].basePrice, Game.Objects[name].amount, Game.Objects[name].free, Game.buyBulk, 0)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2606,6 +2688,7 @@ CM.Disp.colorBrown = 'Brown';
|
|||||||
CM.Disp.colors = [CM.Disp.colorBlue, CM.Disp.colorGreen, CM.Disp.colorYellow, CM.Disp.colorOrange, CM.Disp.colorRed, CM.Disp.colorPurple, CM.Disp.colorGray, CM.Disp.colorPink, CM.Disp.colorBrown];
|
CM.Disp.colors = [CM.Disp.colorBlue, CM.Disp.colorGreen, CM.Disp.colorYellow, CM.Disp.colorOrange, CM.Disp.colorRed, CM.Disp.colorPurple, CM.Disp.colorGray, CM.Disp.colorPink, CM.Disp.colorBrown];
|
||||||
CM.Disp.buffColors = {'Frenzy': CM.Disp.colorYellow, 'Dragon Harvest': CM.Disp.colorBrown, 'Elder frenzy': CM.Disp.colorGreen, 'Clot': CM.Disp.colorRed, 'Click frenzy': CM.Disp.colorBlue, 'Dragonflight': CM.Disp.colorPink};
|
CM.Disp.buffColors = {'Frenzy': CM.Disp.colorYellow, 'Dragon Harvest': CM.Disp.colorBrown, 'Elder frenzy': CM.Disp.colorGreen, 'Clot': CM.Disp.colorRed, 'Click frenzy': CM.Disp.colorBlue, 'Dragonflight': CM.Disp.colorPink};
|
||||||
CM.Disp.lastGoldenCookieState = 0;
|
CM.Disp.lastGoldenCookieState = 0;
|
||||||
|
CM.Disp.lastTickerFortuneState = 0;
|
||||||
CM.Disp.lastSeasonPopupState = 0;
|
CM.Disp.lastSeasonPopupState = 0;
|
||||||
CM.Disp.lastGardenNextStep = 0;
|
CM.Disp.lastGardenNextStep = 0;
|
||||||
CM.Disp.goldenShimmer;
|
CM.Disp.goldenShimmer;
|
||||||
@@ -2627,11 +2710,11 @@ for (var i in Game.wrinklers) {
|
|||||||
|
|
||||||
CM.Disp.TooltipText = [
|
CM.Disp.TooltipText = [
|
||||||
['GoldCookTooltipPlaceholder', 'Calculated with Golden Switch off', '200px'],
|
['GoldCookTooltipPlaceholder', 'Calculated with Golden Switch off', '200px'],
|
||||||
['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', '380px'],
|
['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 and Reality Bending auras, and buying Chocolate egg', '320px'],
|
||||||
['NextPrestTooltipPlaceholder', 'Calculated with cookies gained from wrinklers and Chocolate egg', '200px'],
|
['NextPrestTooltipPlaceholder', 'Calculated with cookies gained from wrinklers and Chocolate egg', '200px'],
|
||||||
['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'],
|
['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 and Reality Bending auras, and buying Chocolate egg', '330px'],
|
||||||
['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'],
|
['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'],
|
||||||
['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', '280px']
|
['ChoEggTooltipPlaceholder', 'The amount of cookies you would get from popping all wrinklers with Skruuia god in Diamond slot, selling all buildings with Earth Shatterer and Reality Bending auras, and then buying Chocolate egg', '300px']
|
||||||
];
|
];
|
||||||
|
|
||||||
/********
|
/********
|
||||||
@@ -2778,13 +2861,13 @@ CM.Loop = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for aura change to recalculate buildings prices
|
// Check for aura change to recalculate buildings prices
|
||||||
var hasFierHoard = Game.hasAura('Fierce Hoarder');
|
var hasBuildAura = Game.auraMult('Fierce Hoarder') > 0;
|
||||||
if (!CM.Cache.HadFierHoard && hasFierHoard) {
|
if (!CM.Cache.HadBuildAura && hasBuildAura) {
|
||||||
CM.Cache.HadFierHoard = true;
|
CM.Cache.HadBuildAura = true;
|
||||||
CM.Cache.DoRemakeBuildPrices = 1;
|
CM.Cache.DoRemakeBuildPrices = 1;
|
||||||
}
|
}
|
||||||
else if (CM.Cache.HadFierHoard && !hasFierHoard) {
|
else if (CM.Cache.HadBuildAura && !hasBuildAura) {
|
||||||
CM.Cache.HadFierHoard = false;
|
CM.Cache.HadBuildAura = false;
|
||||||
CM.Cache.DoRemakeBuildPrices = 1;
|
CM.Cache.DoRemakeBuildPrices = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2822,6 +2905,9 @@ CM.Loop = function() {
|
|||||||
// Check Golden Cookies
|
// Check Golden Cookies
|
||||||
CM.Disp.CheckGoldenCookie();
|
CM.Disp.CheckGoldenCookie();
|
||||||
|
|
||||||
|
// Check Fortune Cookies
|
||||||
|
CM.Disp.CheckTickerFortune();
|
||||||
|
|
||||||
// Check Season Popup
|
// Check Season Popup
|
||||||
CM.Disp.CheckSeasonPopup();
|
CM.Disp.CheckSeasonPopup();
|
||||||
|
|
||||||
@@ -2902,6 +2988,10 @@ CM.ConfigDefault = {
|
|||||||
GCSoundURL: 'https://freesound.org/data/previews/66/66717_931655-lq.mp3',
|
GCSoundURL: 'https://freesound.org/data/previews/66/66717_931655-lq.mp3',
|
||||||
GCTimer: 1,
|
GCTimer: 1,
|
||||||
Favicon: 1,
|
Favicon: 1,
|
||||||
|
FortuneFlash: 1,
|
||||||
|
FortuneSound: 1,
|
||||||
|
FortuneVolume: 100,
|
||||||
|
FortuneSoundURL: 'https://freesound.org/data/previews/174/174027_3242494-lq.mp3',
|
||||||
SeaFlash: 1,
|
SeaFlash: 1,
|
||||||
SeaSound: 1,
|
SeaSound: 1,
|
||||||
SeaVolume: 100,
|
SeaVolume: 100,
|
||||||
@@ -2928,14 +3018,14 @@ CM.ConfigDefault = {
|
|||||||
};
|
};
|
||||||
CM.ConfigPrefix = 'CMConfig';
|
CM.ConfigPrefix = 'CMConfig';
|
||||||
|
|
||||||
CM.VersionMajor = '2.019';
|
CM.VersionMajor = '2.021';
|
||||||
CM.VersionMinor = '1';
|
CM.VersionMinor = '2';
|
||||||
|
|
||||||
/*******
|
/*******
|
||||||
* Sim *
|
* Sim *
|
||||||
*******/
|
*******/
|
||||||
|
|
||||||
CM.Sim.BuildingGetPrice = function(basePrice, start, free, increase) {
|
CM.Sim.BuildingGetPrice = function(build, basePrice, start, free, increase) {
|
||||||
/*var price=0;
|
/*var price=0;
|
||||||
for (var i = Math.max(0 , start); i < Math.max(0, start + increase); i++) {
|
for (var i = Math.max(0 , start); i < Math.max(0, start + increase); i++) {
|
||||||
price += basePrice * Math.pow(Game.priceIncrease, Math.max(0, i - free));
|
price += basePrice * Math.pow(Game.priceIncrease, Math.max(0, i - free));
|
||||||
@@ -2950,7 +3040,7 @@ CM.Sim.BuildingGetPrice = function(basePrice, start, free, increase) {
|
|||||||
var moni = 0;
|
var moni = 0;
|
||||||
for (var i = 0; i < increase; i++) {
|
for (var i = 0; i < increase; i++) {
|
||||||
var price = basePrice * Math.pow(Game.priceIncrease, Math.max(0, start - free));
|
var price = basePrice * Math.pow(Game.priceIncrease, Math.max(0, start - free));
|
||||||
price = Game.modifyBuildingPrice(null, price);
|
price = Game.modifyBuildingPrice(build, price);
|
||||||
price = Math.ceil(price);
|
price = Math.ceil(price);
|
||||||
moni += price;
|
moni += price;
|
||||||
start++;
|
start++;
|
||||||
@@ -2958,7 +3048,7 @@ CM.Sim.BuildingGetPrice = function(basePrice, start, free, increase) {
|
|||||||
return moni;
|
return moni;
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Sim.BuildingSell = function(basePrice, start, free, amount, emuAura) {
|
CM.Sim.BuildingSell = function(build, basePrice, start, free, amount, emuAura) {
|
||||||
/*var price=0;
|
/*var price=0;
|
||||||
for (var i = Math.max(0, start - amount); i < Math.max(0, start); i++) {
|
for (var i = Math.max(0, start - amount); i < Math.max(0, start); i++) {
|
||||||
price += basePrice * Math.pow(Game.priceIncrease, Math.max(0, i - free));
|
price += basePrice * Math.pow(Game.priceIncrease, Math.max(0, i - free));
|
||||||
@@ -2979,10 +3069,15 @@ CM.Sim.BuildingSell = function(basePrice, start, free, amount, emuAura) {
|
|||||||
var moni=0;
|
var moni=0;
|
||||||
for (var i = 0; i < amount; i++) {
|
for (var i = 0; i < amount; i++) {
|
||||||
var price = basePrice * Math.pow(Game.priceIncrease, Math.max(0, start - free));
|
var price = basePrice * Math.pow(Game.priceIncrease, Math.max(0, start - free));
|
||||||
price = Game.modifyBuildingPrice(null, price);
|
price = Game.modifyBuildingPrice(build, price);
|
||||||
price = Math.ceil(price);
|
price = Math.ceil(price);
|
||||||
var giveBack = 0.25;
|
var giveBack = 0.25;
|
||||||
if (Game.hasAura('Earth Shatterer') || emuAura) giveBack = 0.5;
|
if (emuAura) {
|
||||||
|
giveBack = 0.5;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
giveBack *= 1 + Game.auraMult('Earth Shatterer');
|
||||||
|
}
|
||||||
price = Math.floor(price * giveBack);
|
price = Math.floor(price * giveBack);
|
||||||
if (start > 0) {
|
if (start > 0) {
|
||||||
moni += price;
|
moni += price;
|
||||||
@@ -3009,7 +3104,7 @@ CM.Sim.Win = function(what) {
|
|||||||
|
|
||||||
eval('CM.Sim.HasAchiev = ' + Game.HasAchiev.toString().split('Game').join('CM.Sim'));
|
eval('CM.Sim.HasAchiev = ' + Game.HasAchiev.toString().split('Game').join('CM.Sim'));
|
||||||
|
|
||||||
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').split('Game.auraMult').join('CM.Sim.auraMult'));
|
||||||
|
|
||||||
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)
|
||||||
@@ -3018,6 +3113,15 @@ CM.Sim.hasAura = function(what) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CM.Sim.auraMult = function(what) {
|
||||||
|
var n = 0;
|
||||||
|
if (Game.dragonAuras[CM.Sim.dragonAura].name == what || Game.dragonAuras[CM.Sim.dragonAura2].name == what)
|
||||||
|
n = 1;
|
||||||
|
if (Game.dragonAuras[CM.Sim.dragonAura].name == 'Reality Bending' || Game.dragonAuras[CM.Sim.dragonAura2].name == 'Reality Bending')
|
||||||
|
n += 0.1;
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
eval('CM.Sim.GetTieredCpsMult = ' + Game.GetTieredCpsMult.toString()
|
eval('CM.Sim.GetTieredCpsMult = ' + Game.GetTieredCpsMult.toString()
|
||||||
.split('Game.Has').join('CM.Sim.Has')
|
.split('Game.Has').join('CM.Sim.Has')
|
||||||
.split('me.tieredUpgrades').join('Game.Objects[me.name].tieredUpgrades')
|
.split('me.tieredUpgrades').join('Game.Objects[me.name].tieredUpgrades')
|
||||||
@@ -3027,6 +3131,7 @@ eval('CM.Sim.GetTieredCpsMult = ' + Game.GetTieredCpsMult.toString()
|
|||||||
.split('me.grandma').join('Game.Objects[me.name].grandma')
|
.split('me.grandma').join('Game.Objects[me.name].grandma')
|
||||||
.split('me.id').join('Game.Objects[me.name].id')
|
.split('me.id').join('Game.Objects[me.name].id')
|
||||||
.split('Game.Objects[\'Grandma\']').join('CM.Sim.Objects[\'Grandma\']')
|
.split('Game.Objects[\'Grandma\']').join('CM.Sim.Objects[\'Grandma\']')
|
||||||
|
.split('me.fortune').join('Game.Objects[me.name].fortune')
|
||||||
);
|
);
|
||||||
|
|
||||||
CM.Sim.getCPSBuffMult = function() {
|
CM.Sim.getCPSBuffMult = function() {
|
||||||
@@ -3044,7 +3149,13 @@ CM.Sim.InitData = function() {
|
|||||||
CM.Sim.Objects[i] = {};
|
CM.Sim.Objects[i] = {};
|
||||||
var me = Game.Objects[i];
|
var me = Game.Objects[i];
|
||||||
var you = CM.Sim.Objects[i];
|
var you = CM.Sim.Objects[i];
|
||||||
eval('you.cps = ' + me.cps.toString().split('Game.Has').join('CM.Sim.Has').split('Game.hasAura').join('CM.Sim.hasAura').split('Game.Objects').join('CM.Sim.Objects').split('Game.GetTieredCpsMult').join('CM.Sim.GetTieredCpsMult'));
|
eval('you.cps = ' + me.cps.toString()
|
||||||
|
.split('Game.Has').join('CM.Sim.Has')
|
||||||
|
.split('Game.hasAura').join('CM.Sim.hasAura')
|
||||||
|
.split('Game.Objects').join('CM.Sim.Objects')
|
||||||
|
.split('Game.GetTieredCpsMult').join('CM.Sim.GetTieredCpsMult')
|
||||||
|
.split('Game.auraMult').join('CM.Sim.auraMult')
|
||||||
|
);
|
||||||
// Below is needed for above eval!
|
// Below is needed for above eval!
|
||||||
you.baseCps = me.baseCps;
|
you.baseCps = me.baseCps;
|
||||||
you.name = me.name;
|
you.name = me.name;
|
||||||
@@ -3129,6 +3240,9 @@ CM.Sim.CalculateGains = function() {
|
|||||||
if (CM.Sim.Has('An itchy sweater')) mult *= 1.01;
|
if (CM.Sim.Has('An itchy sweater')) mult *= 1.01;
|
||||||
if (CM.Sim.Has('Santa\'s dominion')) mult *= 1.2;
|
if (CM.Sim.Has('Santa\'s dominion')) mult *= 1.2;
|
||||||
|
|
||||||
|
if (CM.Sim.Has('Fortune #100')) mult *= 1.01;
|
||||||
|
if (CM.Sim.Has('Fortune #101')) mult *= 1.07;
|
||||||
|
|
||||||
var buildMult = 1;
|
var buildMult = 1;
|
||||||
if (Game.hasGod) {
|
if (Game.hasGod) {
|
||||||
var godLvl = Game.hasGod('asceticism');
|
var godLvl = Game.hasGod('asceticism');
|
||||||
@@ -3170,7 +3284,8 @@ CM.Sim.CalculateGains = function() {
|
|||||||
|
|
||||||
var milkMult=1;
|
var milkMult=1;
|
||||||
if (CM.Sim.Has('Santa\'s milk and cookies')) milkMult *= 1.05;
|
if (CM.Sim.Has('Santa\'s milk and cookies')) milkMult *= 1.05;
|
||||||
if (CM.Sim.hasAura('Breath of Milk')) milkMult *= 1.05;
|
//if (CM.Sim.hasAura('Breath of Milk')) milkMult *= 1.05;
|
||||||
|
milkMult *= 1 + CM.Sim.auraMult('Breath of Milk') * 0.05;
|
||||||
if (Game.hasGod) {
|
if (Game.hasGod) {
|
||||||
var godLvl = Game.hasGod('mother');
|
var godLvl = Game.hasGod('mother');
|
||||||
if (godLvl == 1) milkMult *= 1.1;
|
if (godLvl == 1) milkMult *= 1.1;
|
||||||
@@ -3194,7 +3309,9 @@ CM.Sim.CalculateGains = function() {
|
|||||||
if (CM.Sim.Has('Kitten assistants to the regional manager')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.175 * milkMult);
|
if (CM.Sim.Has('Kitten assistants to the regional manager')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.175 * milkMult);
|
||||||
if (CM.Sim.Has('Kitten marketeers')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.15 * milkMult);
|
if (CM.Sim.Has('Kitten marketeers')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.15 * milkMult);
|
||||||
if (CM.Sim.Has('Kitten analysts')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.125 * milkMult);
|
if (CM.Sim.Has('Kitten analysts')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.125 * milkMult);
|
||||||
|
if (CM.Sim.Has('Kitten executives')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.115 * milkMult);
|
||||||
if (CM.Sim.Has('Kitten angels')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult);
|
if (CM.Sim.Has('Kitten angels')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult);
|
||||||
|
if (CM.Sim.Has('Fortune #103')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.05 * milkMult);
|
||||||
|
|
||||||
mult *= catMult;
|
mult *= catMult;
|
||||||
|
|
||||||
@@ -3223,12 +3340,14 @@ CM.Sim.CalculateGains = function() {
|
|||||||
// TODO Store lumps?
|
// TODO Store lumps?
|
||||||
if (CM.Sim.Has('Sugar baking')) mult *= (1 + Math.min(100, Game.lumps) * 0.01);
|
if (CM.Sim.Has('Sugar baking')) mult *= (1 + Math.min(100, Game.lumps) * 0.01);
|
||||||
|
|
||||||
if (CM.Sim.hasAura('Radiant Appetite')) mult *= 2;
|
//if (CM.Sim.hasAura('Radiant Appetite')) mult *= 2;
|
||||||
|
mult *= 1 + CM.Sim.auraMult('Radiant Appetite');
|
||||||
|
|
||||||
if (Game.hasAura('Dragon\'s Fortune')) {
|
if (true) { // || CM.Sim.hasAura('Dragon\'s Fortune')) {
|
||||||
var n = Game.shimmerTypes['golden'].n;
|
var n = Game.shimmerTypes['golden'].n;
|
||||||
|
var auraMult = CM.Sim.auraMult('Dragon\'s Fortune');
|
||||||
for (var i = 0; i < n; i++) {
|
for (var i = 0; i < n; i++) {
|
||||||
mult *= 2.23;
|
mult *= 1 + auraMult * 1.23;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3333,6 +3452,15 @@ CM.Sim.CheckOtherAchiev = function() {
|
|||||||
if (!CM.Sim.Has(CM.Data.ChristCookies[i])) hasAllChristCook = false;
|
if (!CM.Sim.Has(CM.Data.ChristCookies[i])) hasAllChristCook = false;
|
||||||
}
|
}
|
||||||
if (hasAllChristCook) CM.Sim.Win('Let it snow');
|
if (hasAllChristCook) CM.Sim.Win('Let it snow');
|
||||||
|
|
||||||
|
if (CM.Sim.Has('Fortune cookies')) {
|
||||||
|
var list = Game.Tiers['fortune'].upgrades;
|
||||||
|
var fortunes = 0;
|
||||||
|
for (var i in list) {
|
||||||
|
if (CM.Sim.Has(list[i].name)) fortunes++;
|
||||||
|
}
|
||||||
|
if (fortunes >= list.length) CM.Sim.Win('O Fortuna');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Sim.BuyBuildings = function(amount, target) {
|
CM.Sim.BuyBuildings = function(amount, target) {
|
||||||
@@ -3465,6 +3593,8 @@ CM.Sim.ResetBonus = function(possiblePresMax) {
|
|||||||
if (CM.Cache.RealCookiesEarned >= 1000000000000000000000000000000000000000000) CM.Sim.Win('The end of the world');
|
if (CM.Cache.RealCookiesEarned >= 1000000000000000000000000000000000000000000) CM.Sim.Win('The end of the world');
|
||||||
if (CM.Cache.RealCookiesEarned >= 1000000000000000000000000000000000000000000000) CM.Sim.Win('Oh, you\'re back');
|
if (CM.Cache.RealCookiesEarned >= 1000000000000000000000000000000000000000000000) CM.Sim.Win('Oh, you\'re back');
|
||||||
if (CM.Cache.RealCookiesEarned >= 1000000000000000000000000000000000000000000000000) CM.Sim.Win('Lazarus');
|
if (CM.Cache.RealCookiesEarned >= 1000000000000000000000000000000000000000000000000) CM.Sim.Win('Lazarus');
|
||||||
|
if (CM.Cache.RealCookiesEarned >= 1000000000000000000000000000000000000000000000000000) CM.Sim.Win('Smurf account');
|
||||||
|
if (CM.Cache.RealCookiesEarned >= 1000000000000000000000000000000000000000000000000000000) CM.Sim.Win('If at first you don\'t succeed');
|
||||||
|
|
||||||
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;
|
||||||
|
|||||||
32
src/Cache.js
32
src/Cache.js
@@ -19,8 +19,8 @@ CM.Cache.NextNumber = function(base) {
|
|||||||
|
|
||||||
CM.Cache.RemakeBuildingsPrices = function() {
|
CM.Cache.RemakeBuildingsPrices = function() {
|
||||||
for (var i in Game.Objects) {
|
for (var i in Game.Objects) {
|
||||||
CM.Cache.Objects10[i].price = CM.Sim.BuildingGetPrice(Game.Objects[i].basePrice, Game.Objects[i].amount, Game.Objects[i].free, 10);
|
CM.Cache.Objects10[i].price = CM.Sim.BuildingGetPrice(Game.Objects[i], Game.Objects[i].basePrice, Game.Objects[i].amount, Game.Objects[i].free, 10);
|
||||||
CM.Cache.Objects100[i].price = CM.Sim.BuildingGetPrice(Game.Objects[i].basePrice, Game.Objects[i].amount, Game.Objects[i].free, 100);
|
CM.Cache.Objects100[i].price = CM.Sim.BuildingGetPrice(Game.Objects[i], Game.Objects[i].basePrice, Game.Objects[i].amount, Game.Objects[i].free, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,11 +203,11 @@ CM.Cache.RemakeSeaSpec = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CM.Cache.RemakeSellForChoEgg = function() {
|
CM.Cache.RemakeSellForChoEgg = function() {
|
||||||
if (Game.hasAura('Earth Shatterer') || Game.dragonLevel < 9) {
|
if (Game.auraMult('Earth Shatterer') == 1.1) {
|
||||||
var sellTotal = 0;
|
var sellTotal = 0;
|
||||||
for (var i in Game.Objects) {
|
for (var i in Game.Objects) {
|
||||||
var me = Game.Objects[i];
|
var me = Game.Objects[i];
|
||||||
sellTotal += CM.Sim.BuildingSell(me.basePrice, me.amount, me.free, me.amount, 0);
|
sellTotal += CM.Sim.BuildingSell(me, me.basePrice, me.amount, me.free, me.amount, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -215,17 +215,29 @@ CM.Cache.RemakeSellForChoEgg = function() {
|
|||||||
for (var i in Game.Objects) {
|
for (var i in Game.Objects) {
|
||||||
if (Game.Objects[i].amount > 0) highestBuilding = i;
|
if (Game.Objects[i].amount > 0) highestBuilding = i;
|
||||||
}
|
}
|
||||||
|
var secondHighBuild = '';
|
||||||
|
if (Game.auraMult('Earth Shatterer') == 0 && highestBuilding != '') {
|
||||||
|
if (Game.Objects[highestBuilding].amount > 1) {
|
||||||
|
secondHighBuild = highestBuilding;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (var i in Game.Objects) {
|
||||||
|
if (i != highestBuilding && Game.Objects[i].amount > 0) secondHighBuild = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var sellTotal = 0;
|
var sellTotal = 0;
|
||||||
for (var i in Game.Objects) {
|
for (var i in Game.Objects) {
|
||||||
var me = Game.Objects[i];
|
var me = Game.Objects[i];
|
||||||
var amount = 0;
|
var amount = me.amount;
|
||||||
if (i == highestBuilding) {
|
if (i == highestBuilding) {
|
||||||
amount = me.amount - 1;
|
amount -= 1;
|
||||||
}
|
}
|
||||||
else {
|
if (i == secondHighBuild) {
|
||||||
amount = me.amount;
|
amount -= 1;
|
||||||
}
|
}
|
||||||
sellTotal += CM.Sim.BuildingSell(me.basePrice, amount, me.free, amount, 1);
|
sellTotal += CM.Sim.BuildingSell(me, me.basePrice, amount, me.free, amount, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CM.Cache.SellForChoEgg = sellTotal;
|
CM.Cache.SellForChoEgg = sellTotal;
|
||||||
@@ -357,7 +369,7 @@ CM.Cache.ChainFrenzyWrathReward = 0;
|
|||||||
CM.Cache.CentEgg = 0;
|
CM.Cache.CentEgg = 0;
|
||||||
CM.Cache.SellForChoEgg = 0;
|
CM.Cache.SellForChoEgg = 0;
|
||||||
CM.Cache.Title = '';
|
CM.Cache.Title = '';
|
||||||
CM.Cache.HadFierHoard = false;
|
CM.Cache.HadBuildAura = false;
|
||||||
CM.Cache.RealCookiesEarned = -1;
|
CM.Cache.RealCookiesEarned = -1;
|
||||||
CM.Cache.lastDate = -1;
|
CM.Cache.lastDate = -1;
|
||||||
CM.Cache.lastCookies = -1;
|
CM.Cache.lastCookies = -1;
|
||||||
|
|||||||
@@ -148,6 +148,13 @@ for (var i = 0; i < 101; i++) {
|
|||||||
CM.ConfigData.GCSoundURL = {label: 'Golden Cookie Sound URL:', desc: 'URL of the sound to be played when a Golden Cookie spawns'};
|
CM.ConfigData.GCSoundURL = {label: 'Golden Cookie Sound URL:', desc: 'URL of the sound to be played when a Golden Cookie spawns'};
|
||||||
CM.ConfigData.GCTimer = {label: ['Golden Cookie Timer OFF', 'Golden Cookie Timer ON'], desc: 'A timer on the Golden Cookie when it has been spawned', toggle: true, func: function() {CM.Disp.ToggleGCTimer();}};
|
CM.ConfigData.GCTimer = {label: ['Golden Cookie Timer OFF', 'Golden Cookie Timer ON'], desc: 'A timer on the Golden Cookie when it has been spawned', toggle: true, func: function() {CM.Disp.ToggleGCTimer();}};
|
||||||
CM.ConfigData.Favicon = {label: ['Favicon OFF', 'Favicon ON'], desc: 'Update favicon with Golden/Wrath Cookie', toggle: true, func: function() {CM.Disp.UpdateFavicon();}};
|
CM.ConfigData.Favicon = {label: ['Favicon OFF', 'Favicon ON'], desc: 'Update favicon with Golden/Wrath Cookie', toggle: true, func: function() {CM.Disp.UpdateFavicon();}};
|
||||||
|
CM.ConfigData.FortuneFlash = {label: ['Fortune Cookie Flash OFF', 'Fortune Cookie Flash ON'], desc: 'Flash screen on Fortune Cookie', toggle: true};
|
||||||
|
CM.ConfigData.FortuneSound = {label: ['Fortune Cookie Sound OFF', 'Fortune Cookie Sound ON'], desc: 'Play a sound on Fortune Cookie', toggle: true};
|
||||||
|
CM.ConfigData.FortuneVolume = {label: [], desc: 'Volume of the Fortune Cookie sound'};
|
||||||
|
for (var i = 0; i < 101; i++) {
|
||||||
|
CM.ConfigData.FortuneVolume.label[i] = i + '%';
|
||||||
|
}
|
||||||
|
CM.ConfigData.FortuneSoundURL = {label: 'Fortune Cookie Sound URL:', desc: 'URL of the sound to be played when the Ticker has a Fortune Cookie'};
|
||||||
CM.ConfigData.SeaFlash = {label: ['Season Special Flash OFF', 'Season Special Flash ON'], desc: 'Flash screen on Season Popup', toggle: true};
|
CM.ConfigData.SeaFlash = {label: ['Season Special Flash OFF', 'Season Special Flash ON'], desc: 'Flash screen on Season Popup', toggle: true};
|
||||||
CM.ConfigData.SeaSound = {label: ['Season Special Sound OFF', 'Season Special Sound ON'], desc: 'Play a sound on Season Popup', toggle: true};
|
CM.ConfigData.SeaSound = {label: ['Season Special Sound OFF', 'Season Special Sound ON'], desc: 'Play a sound on Season Popup', toggle: true};
|
||||||
CM.ConfigData.SeaVolume = {label: [], desc: 'Volume of the Season Special sound'};
|
CM.ConfigData.SeaVolume = {label: [], desc: 'Volume of the Season Special sound'};
|
||||||
|
|||||||
24
src/Data.js
24
src/Data.js
@@ -2,6 +2,30 @@
|
|||||||
* Data *
|
* Data *
|
||||||
********/
|
********/
|
||||||
|
|
||||||
|
CM.Data.Fortunes = [
|
||||||
|
'Fortune #001',
|
||||||
|
'Fortune #002',
|
||||||
|
'Fortune #003',
|
||||||
|
'Fortune #004',
|
||||||
|
'Fortune #005',
|
||||||
|
'Fortune #006',
|
||||||
|
'Fortune #007',
|
||||||
|
'Fortune #008',
|
||||||
|
'Fortune #009',
|
||||||
|
'Fortune #010',
|
||||||
|
'Fortune #011',
|
||||||
|
'Fortune #012',
|
||||||
|
'Fortune #013',
|
||||||
|
'Fortune #014',
|
||||||
|
'Fortune #015',
|
||||||
|
'Fortune #016',
|
||||||
|
'Fortune #017',
|
||||||
|
'Fortune #100',
|
||||||
|
'Fortune #101',
|
||||||
|
'Fortune #102',
|
||||||
|
'Fortune #103',
|
||||||
|
'Fortune #104'
|
||||||
|
];
|
||||||
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'];
|
||||||
|
|||||||
138
src/Disp.js
138
src/Disp.js
@@ -869,6 +869,15 @@ CM.Disp.CheckGoldenCookie = function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CM.Disp.CheckTickerFortune = function() {
|
||||||
|
if (CM.Disp.lastTickerFortuneState != (Game.TickerEffect && Game.TickerEffect.type == 'fortune')) {
|
||||||
|
CM.Disp.lastTickerFortuneState = (Game.TickerEffect && Game.TickerEffect.type == 'fortune');
|
||||||
|
if (CM.Disp.lastTickerFortuneState) {
|
||||||
|
CM.Disp.Flash(3, 'FortuneFlash');
|
||||||
|
CM.Disp.PlaySound(CM.Config.FortuneSoundURL, 'FortuneSound', 'FortuneVolume');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CM.Disp.CheckSeasonPopup = function() {
|
CM.Disp.CheckSeasonPopup = function() {
|
||||||
if (CM.Disp.lastSeasonPopupState != Game.shimmerTypes['reindeer'].spawned) {
|
if (CM.Disp.lastSeasonPopupState != Game.shimmerTypes['reindeer'].spawned) {
|
||||||
@@ -903,9 +912,11 @@ CM.Disp.UpdateTitle = function() {
|
|||||||
document.title = CM.Cache.Title;
|
document.title = CM.Cache.Title;
|
||||||
}
|
}
|
||||||
else if (CM.Config.Title == 1) {
|
else if (CM.Config.Title == 1) {
|
||||||
|
var addFC = false;
|
||||||
var addSP = false;
|
var addSP = false;
|
||||||
|
|
||||||
var titleGC;
|
var titleGC;
|
||||||
|
var titleFC;
|
||||||
var titleSP;
|
var titleSP;
|
||||||
if (CM.Disp.lastGoldenCookieState) {
|
if (CM.Disp.lastGoldenCookieState) {
|
||||||
if (CM.Disp.goldenShimmer.wrath) {
|
if (CM.Disp.goldenShimmer.wrath) {
|
||||||
@@ -921,6 +932,10 @@ CM.Disp.UpdateTitle = function() {
|
|||||||
else {
|
else {
|
||||||
titleGC = '[GS]'
|
titleGC = '[GS]'
|
||||||
}
|
}
|
||||||
|
if (CM.Disp.lastTickerFortuneState) {
|
||||||
|
addFC = true;
|
||||||
|
titleFC = '[F]';
|
||||||
|
}
|
||||||
if (Game.season == 'christmas') {
|
if (Game.season == 'christmas') {
|
||||||
addSP = true;
|
addSP = true;
|
||||||
if (CM.Disp.lastSeasonPopupState) {
|
if (CM.Disp.lastSeasonPopupState) {
|
||||||
@@ -936,7 +951,7 @@ CM.Disp.UpdateTitle = function() {
|
|||||||
str = str.substring(str.lastIndexOf(']') + 1);
|
str = str.substring(str.lastIndexOf(']') + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
document.title = titleGC + (addSP ? titleSP : '') + ' ' + str;
|
document.title = titleGC + (addFC ? titleFC : '') + (addSP ? titleSP : '') + ' ' + str;
|
||||||
}
|
}
|
||||||
else if (CM.Config.Title == 2) {
|
else if (CM.Config.Title == 2) {
|
||||||
var str = '';
|
var str = '';
|
||||||
@@ -950,6 +965,10 @@ CM.Disp.UpdateTitle = function() {
|
|||||||
str += '[G ' + Math.ceil(CM.Disp.goldenShimmer.life / Game.fps) + ']';
|
str += '[G ' + Math.ceil(CM.Disp.goldenShimmer.life / Game.fps) + ']';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (CM.Disp.lastTickerFortuneState) {
|
||||||
|
spawn = true;
|
||||||
|
str += '[F]';
|
||||||
|
}
|
||||||
if (Game.season == 'christmas' && CM.Disp.lastSeasonPopupState) {
|
if (Game.season == 'christmas' && CM.Disp.lastSeasonPopupState) {
|
||||||
str += '[R ' + Math.ceil(CM.Disp.seasonPopShimmer.life / Game.fps) + ']';
|
str += '[R ' + Math.ceil(CM.Disp.seasonPopShimmer.life / Game.fps) + ']';
|
||||||
spawn = true;
|
spawn = true;
|
||||||
@@ -1112,6 +1131,10 @@ CM.Disp.AddMenuPref = function(title) {
|
|||||||
frag.appendChild(url('GCSoundURL'));
|
frag.appendChild(url('GCSoundURL'));
|
||||||
frag.appendChild(listing('GCTimer'));
|
frag.appendChild(listing('GCTimer'));
|
||||||
frag.appendChild(listing('Favicon'));
|
frag.appendChild(listing('Favicon'));
|
||||||
|
frag.appendChild(listing('FortuneFlash'));
|
||||||
|
frag.appendChild(listing('FortuneSound'));
|
||||||
|
frag.appendChild(vol('FortuneVolume'));
|
||||||
|
frag.appendChild(url('FortuneSoundURL'));
|
||||||
frag.appendChild(listing('SeaFlash'));
|
frag.appendChild(listing('SeaFlash'));
|
||||||
frag.appendChild(listing('SeaSound'));
|
frag.appendChild(listing('SeaSound'));
|
||||||
frag.appendChild(vol('SeaVolume'));
|
frag.appendChild(vol('SeaVolume'));
|
||||||
@@ -1219,6 +1242,45 @@ CM.Disp.AddMenuStats = function(title) {
|
|||||||
return frag;
|
return frag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var createMissDisp = function(theMissDisp) {
|
||||||
|
var frag = document.createDocumentFragment();
|
||||||
|
frag.appendChild(document.createTextNode(theMissDisp.length + ' '));
|
||||||
|
var 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 theMissDisp) {
|
||||||
|
var div = document.createElement('div');
|
||||||
|
div.style.textAlign = 'center';
|
||||||
|
div.appendChild(document.createTextNode(theMissDisp[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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
stats.appendChild(header('Lucky Cookies', 'Lucky'));
|
stats.appendChild(header('Lucky Cookies', 'Lucky'));
|
||||||
if (CM.Config.StatsPref.Lucky) {
|
if (CM.Config.StatsPref.Lucky) {
|
||||||
var luckyColor = ((Game.cookies + CM.Disp.GetWrinkConfigBank()) < CM.Cache.Lucky) ? CM.Disp.colorRed : CM.Disp.colorGreen;
|
var luckyColor = ((Game.cookies + CM.Disp.GetWrinkConfigBank()) < CM.Cache.Lucky) ? CM.Disp.colorRed : CM.Disp.colorGreen;
|
||||||
@@ -1232,11 +1294,16 @@ CM.Disp.AddMenuStats = function(title) {
|
|||||||
var luckyRewardFrenzyMaxWrath = CM.Cache.LuckyRewardFrenzy;
|
var luckyRewardFrenzyMaxWrath = CM.Cache.LuckyRewardFrenzy;
|
||||||
var luckyCur = luckyCurBase;
|
var luckyCur = luckyCurBase;
|
||||||
var luckyCurWrath = luckyCurBase;
|
var luckyCurWrath = luckyCurBase;
|
||||||
|
// Old way
|
||||||
if (Game.hasAura('Ancestral Metamorphosis')) {
|
if (Game.hasAura('Ancestral Metamorphosis')) {
|
||||||
luckyRewardMax *= 1.1;
|
luckyRewardMax *= 1.1;
|
||||||
luckyRewardFrenzyMax *= 1.1;
|
luckyRewardFrenzyMax *= 1.1;
|
||||||
luckyCur *= 1.1;
|
luckyCur *= 1.1;
|
||||||
}
|
}
|
||||||
|
/*luckyRewardMax *= 1 + Game.auraMult('Ancestral Metamorphosis') * 0.1;
|
||||||
|
luckyRewardFrenzyMax *= 1 + Game.auraMult('Ancestral Metamorphosis') * 0.1;
|
||||||
|
luckyCur *= 1 + Game.auraMult('Ancestral Metamorphosis') * 0.1;*/
|
||||||
|
// Old way
|
||||||
if (Game.hasAura('Unholy Dominion')) {
|
if (Game.hasAura('Unholy Dominion')) {
|
||||||
luckyRewardMaxWrath *= 1.1;
|
luckyRewardMaxWrath *= 1.1;
|
||||||
luckyRewardFrenzyMaxWrath *= 1.1;
|
luckyRewardFrenzyMaxWrath *= 1.1;
|
||||||
@@ -1440,48 +1507,11 @@ CM.Disp.AddMenuStats = function(title) {
|
|||||||
stats.appendChild(header('Season Specials', 'Sea'));
|
stats.appendChild(header('Season Specials', 'Sea'));
|
||||||
if (CM.Config.StatsPref.Sea) {
|
if (CM.Config.StatsPref.Sea) {
|
||||||
if (specDisp) {
|
if (specDisp) {
|
||||||
var createSpecDisp = function(theSpecDisp) {
|
if (halloCook.length != 0) stats.appendChild(listing('Halloween Cookies Left to Buy', createMissDisp(halloCook)));
|
||||||
var frag = document.createDocumentFragment();
|
if (christCook.length != 0) stats.appendChild(listing('Christmas Cookies Left to Buy', createMissDisp(christCook)));
|
||||||
frag.appendChild(document.createTextNode(theSpecDisp.length + ' '));
|
if (valCook.length != 0) stats.appendChild(listing('Valentine Cookies Left to Buy', createMissDisp(valCook)));
|
||||||
var span = document.createElement('span');
|
if (normEggs.length != 0) stats.appendChild(listing('Normal Easter Eggs Left to Unlock', createMissDisp(normEggs)));
|
||||||
span.onmouseout = function() { Game.tooltip.hide(); };
|
if (rareEggs.length != 0) stats.appendChild(listing('Rare Easter Eggs Left to Unlock', createMissDisp(rareEggs)));
|
||||||
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))));
|
if (Game.season == 'christmas') stats.appendChild(listing('Reindeer Reward', document.createTextNode(Beautify(CM.Cache.SeaSpec))));
|
||||||
@@ -1501,6 +1531,15 @@ CM.Disp.AddMenuStats = function(title) {
|
|||||||
document.createTextNode(Beautify(CM.Cache.AvgCPS, 3))
|
document.createTextNode(Beautify(CM.Cache.AvgCPS, 3))
|
||||||
));
|
));
|
||||||
stats.appendChild(listing('Average Cookie Clicks Per Second (Past ' + CM.Disp.clickTimes[CM.Config.AvgClicksHist] + (CM.Config.AvgClicksHist == 0 ? ' second' : ' seconds') + ')', document.createTextNode(Beautify(CM.Cache.AvgClicks, 1))));
|
stats.appendChild(listing('Average Cookie Clicks Per Second (Past ' + CM.Disp.clickTimes[CM.Config.AvgClicksHist] + (CM.Config.AvgClicksHist == 0 ? ' second' : ' seconds') + ')', document.createTextNode(Beautify(CM.Cache.AvgClicks, 1))));
|
||||||
|
if (Game.Has('Fortune cookies')) {
|
||||||
|
var fortunes = [];
|
||||||
|
for (var i in CM.Data.Fortunes) {
|
||||||
|
if (!Game.Has(CM.Data.Fortunes[i])) {
|
||||||
|
fortunes.push(CM.Data.Fortunes[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (fortunes.length != 0) stats.appendChild(listing('Fortune Upgrades Left to Buy', createMissDisp(fortunes)));
|
||||||
|
}
|
||||||
stats.appendChild(listing('Missed Golden Cookies', document.createTextNode(Beautify(Game.missedGoldenClicks))));
|
stats.appendChild(listing('Missed Golden Cookies', document.createTextNode(Beautify(Game.missedGoldenClicks))));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1662,7 +1701,7 @@ CM.Disp.Tooltip = function(type, name) {
|
|||||||
if (type == 'b') {
|
if (type == 'b') {
|
||||||
l('tooltip').innerHTML = Game.Objects[name].tooltip();
|
l('tooltip').innerHTML = Game.Objects[name].tooltip();
|
||||||
if (CM.Config.TooltipAmor == 1) {
|
if (CM.Config.TooltipAmor == 1) {
|
||||||
var buildPrice = CM.Sim.BuildingGetPrice(Game.Objects[name].basePrice, 0, Game.Objects[name].free, Game.Objects[name].amount);
|
var buildPrice = CM.Sim.BuildingGetPrice(Game.Objects[name], Game.Objects[name].basePrice, 0, Game.Objects[name].free, Game.Objects[name].amount);
|
||||||
var amortizeAmount = buildPrice - Game.Objects[name].totalCookies;
|
var amortizeAmount = buildPrice - Game.Objects[name].totalCookies;
|
||||||
if (amortizeAmount > 0) {
|
if (amortizeAmount > 0) {
|
||||||
l('tooltip').innerHTML = l('tooltip').innerHTML
|
l('tooltip').innerHTML = l('tooltip').innerHTML
|
||||||
@@ -1687,10 +1726,10 @@ CM.Disp.Tooltip = function(type, name) {
|
|||||||
}
|
}
|
||||||
else if (Game.buyMode == -1) {
|
else if (Game.buyMode == -1) {
|
||||||
if (Game.buyBulk == -1) {
|
if (Game.buyBulk == -1) {
|
||||||
l('tooltip').innerHTML = l('tooltip').innerHTML.split(Beautify(Game.Objects[name].getPrice())).join('-' + Beautify(CM.Sim.BuildingSell(Game.Objects[name].basePrice, Game.Objects[name].amount, Game.Objects[name].free, Game.Objects[name].amount, 0)));
|
l('tooltip').innerHTML = l('tooltip').innerHTML.split(Beautify(Game.Objects[name].getPrice())).join('-' + Beautify(CM.Sim.BuildingSell(Game.Objects[name], Game.Objects[name].basePrice, Game.Objects[name].amount, Game.Objects[name].free, Game.Objects[name].amount, 0)));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
l('tooltip').innerHTML = l('tooltip').innerHTML.split(Beautify(Game.Objects[name].getPrice())).join('-' + Beautify(CM.Sim.BuildingSell(Game.Objects[name].basePrice, Game.Objects[name].amount, Game.Objects[name].free, Game.buyBulk, 0)));
|
l('tooltip').innerHTML = l('tooltip').innerHTML.split(Beautify(Game.Objects[name].getPrice())).join('-' + Beautify(CM.Sim.BuildingSell(Game.Objects[name], Game.Objects[name].basePrice, Game.Objects[name].amount, Game.Objects[name].free, Game.buyBulk, 0)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2026,6 +2065,7 @@ CM.Disp.colorBrown = 'Brown';
|
|||||||
CM.Disp.colors = [CM.Disp.colorBlue, CM.Disp.colorGreen, CM.Disp.colorYellow, CM.Disp.colorOrange, CM.Disp.colorRed, CM.Disp.colorPurple, CM.Disp.colorGray, CM.Disp.colorPink, CM.Disp.colorBrown];
|
CM.Disp.colors = [CM.Disp.colorBlue, CM.Disp.colorGreen, CM.Disp.colorYellow, CM.Disp.colorOrange, CM.Disp.colorRed, CM.Disp.colorPurple, CM.Disp.colorGray, CM.Disp.colorPink, CM.Disp.colorBrown];
|
||||||
CM.Disp.buffColors = {'Frenzy': CM.Disp.colorYellow, 'Dragon Harvest': CM.Disp.colorBrown, 'Elder frenzy': CM.Disp.colorGreen, 'Clot': CM.Disp.colorRed, 'Click frenzy': CM.Disp.colorBlue, 'Dragonflight': CM.Disp.colorPink};
|
CM.Disp.buffColors = {'Frenzy': CM.Disp.colorYellow, 'Dragon Harvest': CM.Disp.colorBrown, 'Elder frenzy': CM.Disp.colorGreen, 'Clot': CM.Disp.colorRed, 'Click frenzy': CM.Disp.colorBlue, 'Dragonflight': CM.Disp.colorPink};
|
||||||
CM.Disp.lastGoldenCookieState = 0;
|
CM.Disp.lastGoldenCookieState = 0;
|
||||||
|
CM.Disp.lastTickerFortuneState = 0;
|
||||||
CM.Disp.lastSeasonPopupState = 0;
|
CM.Disp.lastSeasonPopupState = 0;
|
||||||
CM.Disp.lastGardenNextStep = 0;
|
CM.Disp.lastGardenNextStep = 0;
|
||||||
CM.Disp.goldenShimmer;
|
CM.Disp.goldenShimmer;
|
||||||
@@ -2047,10 +2087,10 @@ for (var i in Game.wrinklers) {
|
|||||||
|
|
||||||
CM.Disp.TooltipText = [
|
CM.Disp.TooltipText = [
|
||||||
['GoldCookTooltipPlaceholder', 'Calculated with Golden Switch off', '200px'],
|
['GoldCookTooltipPlaceholder', 'Calculated with Golden Switch off', '200px'],
|
||||||
['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', '380px'],
|
['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 and Reality Bending auras, and buying Chocolate egg', '320px'],
|
||||||
['NextPrestTooltipPlaceholder', 'Calculated with cookies gained from wrinklers and Chocolate egg', '200px'],
|
['NextPrestTooltipPlaceholder', 'Calculated with cookies gained from wrinklers and Chocolate egg', '200px'],
|
||||||
['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'],
|
['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 and Reality Bending auras, and buying Chocolate egg', '330px'],
|
||||||
['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'],
|
['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'],
|
||||||
['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', '280px']
|
['ChoEggTooltipPlaceholder', 'The amount of cookies you would get from popping all wrinklers with Skruuia god in Diamond slot, selling all buildings with Earth Shatterer and Reality Bending auras, and then buying Chocolate egg', '300px']
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
21
src/Main.js
21
src/Main.js
@@ -142,13 +142,13 @@ CM.Loop = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for aura change to recalculate buildings prices
|
// Check for aura change to recalculate buildings prices
|
||||||
var hasFierHoard = Game.hasAura('Fierce Hoarder');
|
var hasBuildAura = Game.auraMult('Fierce Hoarder') > 0;
|
||||||
if (!CM.Cache.HadFierHoard && hasFierHoard) {
|
if (!CM.Cache.HadBuildAura && hasBuildAura) {
|
||||||
CM.Cache.HadFierHoard = true;
|
CM.Cache.HadBuildAura = true;
|
||||||
CM.Cache.DoRemakeBuildPrices = 1;
|
CM.Cache.DoRemakeBuildPrices = 1;
|
||||||
}
|
}
|
||||||
else if (CM.Cache.HadFierHoard && !hasFierHoard) {
|
else if (CM.Cache.HadBuildAura && !hasBuildAura) {
|
||||||
CM.Cache.HadFierHoard = false;
|
CM.Cache.HadBuildAura = false;
|
||||||
CM.Cache.DoRemakeBuildPrices = 1;
|
CM.Cache.DoRemakeBuildPrices = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,6 +186,9 @@ CM.Loop = function() {
|
|||||||
// Check Golden Cookies
|
// Check Golden Cookies
|
||||||
CM.Disp.CheckGoldenCookie();
|
CM.Disp.CheckGoldenCookie();
|
||||||
|
|
||||||
|
// Check Fortune Cookies
|
||||||
|
CM.Disp.CheckTickerFortune();
|
||||||
|
|
||||||
// Check Season Popup
|
// Check Season Popup
|
||||||
CM.Disp.CheckSeasonPopup();
|
CM.Disp.CheckSeasonPopup();
|
||||||
|
|
||||||
@@ -266,6 +269,10 @@ CM.ConfigDefault = {
|
|||||||
GCSoundURL: 'https://freesound.org/data/previews/66/66717_931655-lq.mp3',
|
GCSoundURL: 'https://freesound.org/data/previews/66/66717_931655-lq.mp3',
|
||||||
GCTimer: 1,
|
GCTimer: 1,
|
||||||
Favicon: 1,
|
Favicon: 1,
|
||||||
|
FortuneFlash: 1,
|
||||||
|
FortuneSound: 1,
|
||||||
|
FortuneVolume: 100,
|
||||||
|
FortuneSoundURL: 'https://freesound.org/data/previews/174/174027_3242494-lq.mp3',
|
||||||
SeaFlash: 1,
|
SeaFlash: 1,
|
||||||
SeaSound: 1,
|
SeaSound: 1,
|
||||||
SeaVolume: 100,
|
SeaVolume: 100,
|
||||||
@@ -292,6 +299,6 @@ CM.ConfigDefault = {
|
|||||||
};
|
};
|
||||||
CM.ConfigPrefix = 'CMConfig';
|
CM.ConfigPrefix = 'CMConfig';
|
||||||
|
|
||||||
CM.VersionMajor = '2.019';
|
CM.VersionMajor = '2.021';
|
||||||
CM.VersionMinor = '1';
|
CM.VersionMinor = '2';
|
||||||
|
|
||||||
|
|||||||
62
src/Sim.js
62
src/Sim.js
@@ -2,7 +2,7 @@
|
|||||||
* Sim *
|
* Sim *
|
||||||
*******/
|
*******/
|
||||||
|
|
||||||
CM.Sim.BuildingGetPrice = function(basePrice, start, free, increase) {
|
CM.Sim.BuildingGetPrice = function(build, basePrice, start, free, increase) {
|
||||||
/*var price=0;
|
/*var price=0;
|
||||||
for (var i = Math.max(0 , start); i < Math.max(0, start + increase); i++) {
|
for (var i = Math.max(0 , start); i < Math.max(0, start + increase); i++) {
|
||||||
price += basePrice * Math.pow(Game.priceIncrease, Math.max(0, i - free));
|
price += basePrice * Math.pow(Game.priceIncrease, Math.max(0, i - free));
|
||||||
@@ -17,7 +17,7 @@ CM.Sim.BuildingGetPrice = function(basePrice, start, free, increase) {
|
|||||||
var moni = 0;
|
var moni = 0;
|
||||||
for (var i = 0; i < increase; i++) {
|
for (var i = 0; i < increase; i++) {
|
||||||
var price = basePrice * Math.pow(Game.priceIncrease, Math.max(0, start - free));
|
var price = basePrice * Math.pow(Game.priceIncrease, Math.max(0, start - free));
|
||||||
price = Game.modifyBuildingPrice(null, price);
|
price = Game.modifyBuildingPrice(build, price);
|
||||||
price = Math.ceil(price);
|
price = Math.ceil(price);
|
||||||
moni += price;
|
moni += price;
|
||||||
start++;
|
start++;
|
||||||
@@ -25,7 +25,7 @@ CM.Sim.BuildingGetPrice = function(basePrice, start, free, increase) {
|
|||||||
return moni;
|
return moni;
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Sim.BuildingSell = function(basePrice, start, free, amount, emuAura) {
|
CM.Sim.BuildingSell = function(build, basePrice, start, free, amount, emuAura) {
|
||||||
/*var price=0;
|
/*var price=0;
|
||||||
for (var i = Math.max(0, start - amount); i < Math.max(0, start); i++) {
|
for (var i = Math.max(0, start - amount); i < Math.max(0, start); i++) {
|
||||||
price += basePrice * Math.pow(Game.priceIncrease, Math.max(0, i - free));
|
price += basePrice * Math.pow(Game.priceIncrease, Math.max(0, i - free));
|
||||||
@@ -46,10 +46,15 @@ CM.Sim.BuildingSell = function(basePrice, start, free, amount, emuAura) {
|
|||||||
var moni=0;
|
var moni=0;
|
||||||
for (var i = 0; i < amount; i++) {
|
for (var i = 0; i < amount; i++) {
|
||||||
var price = basePrice * Math.pow(Game.priceIncrease, Math.max(0, start - free));
|
var price = basePrice * Math.pow(Game.priceIncrease, Math.max(0, start - free));
|
||||||
price = Game.modifyBuildingPrice(null, price);
|
price = Game.modifyBuildingPrice(build, price);
|
||||||
price = Math.ceil(price);
|
price = Math.ceil(price);
|
||||||
var giveBack = 0.25;
|
var giveBack = 0.25;
|
||||||
if (Game.hasAura('Earth Shatterer') || emuAura) giveBack = 0.5;
|
if (emuAura) {
|
||||||
|
giveBack = 0.5;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
giveBack *= 1 + Game.auraMult('Earth Shatterer');
|
||||||
|
}
|
||||||
price = Math.floor(price * giveBack);
|
price = Math.floor(price * giveBack);
|
||||||
if (start > 0) {
|
if (start > 0) {
|
||||||
moni += price;
|
moni += price;
|
||||||
@@ -76,7 +81,7 @@ CM.Sim.Win = function(what) {
|
|||||||
|
|
||||||
eval('CM.Sim.HasAchiev = ' + Game.HasAchiev.toString().split('Game').join('CM.Sim'));
|
eval('CM.Sim.HasAchiev = ' + Game.HasAchiev.toString().split('Game').join('CM.Sim'));
|
||||||
|
|
||||||
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').split('Game.auraMult').join('CM.Sim.auraMult'));
|
||||||
|
|
||||||
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)
|
||||||
@@ -85,6 +90,15 @@ CM.Sim.hasAura = function(what) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CM.Sim.auraMult = function(what) {
|
||||||
|
var n = 0;
|
||||||
|
if (Game.dragonAuras[CM.Sim.dragonAura].name == what || Game.dragonAuras[CM.Sim.dragonAura2].name == what)
|
||||||
|
n = 1;
|
||||||
|
if (Game.dragonAuras[CM.Sim.dragonAura].name == 'Reality Bending' || Game.dragonAuras[CM.Sim.dragonAura2].name == 'Reality Bending')
|
||||||
|
n += 0.1;
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
eval('CM.Sim.GetTieredCpsMult = ' + Game.GetTieredCpsMult.toString()
|
eval('CM.Sim.GetTieredCpsMult = ' + Game.GetTieredCpsMult.toString()
|
||||||
.split('Game.Has').join('CM.Sim.Has')
|
.split('Game.Has').join('CM.Sim.Has')
|
||||||
.split('me.tieredUpgrades').join('Game.Objects[me.name].tieredUpgrades')
|
.split('me.tieredUpgrades').join('Game.Objects[me.name].tieredUpgrades')
|
||||||
@@ -94,6 +108,7 @@ eval('CM.Sim.GetTieredCpsMult = ' + Game.GetTieredCpsMult.toString()
|
|||||||
.split('me.grandma').join('Game.Objects[me.name].grandma')
|
.split('me.grandma').join('Game.Objects[me.name].grandma')
|
||||||
.split('me.id').join('Game.Objects[me.name].id')
|
.split('me.id').join('Game.Objects[me.name].id')
|
||||||
.split('Game.Objects[\'Grandma\']').join('CM.Sim.Objects[\'Grandma\']')
|
.split('Game.Objects[\'Grandma\']').join('CM.Sim.Objects[\'Grandma\']')
|
||||||
|
.split('me.fortune').join('Game.Objects[me.name].fortune')
|
||||||
);
|
);
|
||||||
|
|
||||||
CM.Sim.getCPSBuffMult = function() {
|
CM.Sim.getCPSBuffMult = function() {
|
||||||
@@ -111,7 +126,13 @@ CM.Sim.InitData = function() {
|
|||||||
CM.Sim.Objects[i] = {};
|
CM.Sim.Objects[i] = {};
|
||||||
var me = Game.Objects[i];
|
var me = Game.Objects[i];
|
||||||
var you = CM.Sim.Objects[i];
|
var you = CM.Sim.Objects[i];
|
||||||
eval('you.cps = ' + me.cps.toString().split('Game.Has').join('CM.Sim.Has').split('Game.hasAura').join('CM.Sim.hasAura').split('Game.Objects').join('CM.Sim.Objects').split('Game.GetTieredCpsMult').join('CM.Sim.GetTieredCpsMult'));
|
eval('you.cps = ' + me.cps.toString()
|
||||||
|
.split('Game.Has').join('CM.Sim.Has')
|
||||||
|
.split('Game.hasAura').join('CM.Sim.hasAura')
|
||||||
|
.split('Game.Objects').join('CM.Sim.Objects')
|
||||||
|
.split('Game.GetTieredCpsMult').join('CM.Sim.GetTieredCpsMult')
|
||||||
|
.split('Game.auraMult').join('CM.Sim.auraMult')
|
||||||
|
);
|
||||||
// Below is needed for above eval!
|
// Below is needed for above eval!
|
||||||
you.baseCps = me.baseCps;
|
you.baseCps = me.baseCps;
|
||||||
you.name = me.name;
|
you.name = me.name;
|
||||||
@@ -196,6 +217,9 @@ CM.Sim.CalculateGains = function() {
|
|||||||
if (CM.Sim.Has('An itchy sweater')) mult *= 1.01;
|
if (CM.Sim.Has('An itchy sweater')) mult *= 1.01;
|
||||||
if (CM.Sim.Has('Santa\'s dominion')) mult *= 1.2;
|
if (CM.Sim.Has('Santa\'s dominion')) mult *= 1.2;
|
||||||
|
|
||||||
|
if (CM.Sim.Has('Fortune #100')) mult *= 1.01;
|
||||||
|
if (CM.Sim.Has('Fortune #101')) mult *= 1.07;
|
||||||
|
|
||||||
var buildMult = 1;
|
var buildMult = 1;
|
||||||
if (Game.hasGod) {
|
if (Game.hasGod) {
|
||||||
var godLvl = Game.hasGod('asceticism');
|
var godLvl = Game.hasGod('asceticism');
|
||||||
@@ -237,7 +261,8 @@ CM.Sim.CalculateGains = function() {
|
|||||||
|
|
||||||
var milkMult=1;
|
var milkMult=1;
|
||||||
if (CM.Sim.Has('Santa\'s milk and cookies')) milkMult *= 1.05;
|
if (CM.Sim.Has('Santa\'s milk and cookies')) milkMult *= 1.05;
|
||||||
if (CM.Sim.hasAura('Breath of Milk')) milkMult *= 1.05;
|
//if (CM.Sim.hasAura('Breath of Milk')) milkMult *= 1.05;
|
||||||
|
milkMult *= 1 + CM.Sim.auraMult('Breath of Milk') * 0.05;
|
||||||
if (Game.hasGod) {
|
if (Game.hasGod) {
|
||||||
var godLvl = Game.hasGod('mother');
|
var godLvl = Game.hasGod('mother');
|
||||||
if (godLvl == 1) milkMult *= 1.1;
|
if (godLvl == 1) milkMult *= 1.1;
|
||||||
@@ -261,7 +286,9 @@ CM.Sim.CalculateGains = function() {
|
|||||||
if (CM.Sim.Has('Kitten assistants to the regional manager')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.175 * milkMult);
|
if (CM.Sim.Has('Kitten assistants to the regional manager')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.175 * milkMult);
|
||||||
if (CM.Sim.Has('Kitten marketeers')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.15 * milkMult);
|
if (CM.Sim.Has('Kitten marketeers')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.15 * milkMult);
|
||||||
if (CM.Sim.Has('Kitten analysts')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.125 * milkMult);
|
if (CM.Sim.Has('Kitten analysts')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.125 * milkMult);
|
||||||
|
if (CM.Sim.Has('Kitten executives')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.115 * milkMult);
|
||||||
if (CM.Sim.Has('Kitten angels')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult);
|
if (CM.Sim.Has('Kitten angels')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult);
|
||||||
|
if (CM.Sim.Has('Fortune #103')) catMult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.05 * milkMult);
|
||||||
|
|
||||||
mult *= catMult;
|
mult *= catMult;
|
||||||
|
|
||||||
@@ -290,12 +317,14 @@ CM.Sim.CalculateGains = function() {
|
|||||||
// TODO Store lumps?
|
// TODO Store lumps?
|
||||||
if (CM.Sim.Has('Sugar baking')) mult *= (1 + Math.min(100, Game.lumps) * 0.01);
|
if (CM.Sim.Has('Sugar baking')) mult *= (1 + Math.min(100, Game.lumps) * 0.01);
|
||||||
|
|
||||||
if (CM.Sim.hasAura('Radiant Appetite')) mult *= 2;
|
//if (CM.Sim.hasAura('Radiant Appetite')) mult *= 2;
|
||||||
|
mult *= 1 + CM.Sim.auraMult('Radiant Appetite');
|
||||||
|
|
||||||
if (Game.hasAura('Dragon\'s Fortune')) {
|
if (true) { // || CM.Sim.hasAura('Dragon\'s Fortune')) {
|
||||||
var n = Game.shimmerTypes['golden'].n;
|
var n = Game.shimmerTypes['golden'].n;
|
||||||
|
var auraMult = CM.Sim.auraMult('Dragon\'s Fortune');
|
||||||
for (var i = 0; i < n; i++) {
|
for (var i = 0; i < n; i++) {
|
||||||
mult *= 2.23;
|
mult *= 1 + auraMult * 1.23;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -400,6 +429,15 @@ CM.Sim.CheckOtherAchiev = function() {
|
|||||||
if (!CM.Sim.Has(CM.Data.ChristCookies[i])) hasAllChristCook = false;
|
if (!CM.Sim.Has(CM.Data.ChristCookies[i])) hasAllChristCook = false;
|
||||||
}
|
}
|
||||||
if (hasAllChristCook) CM.Sim.Win('Let it snow');
|
if (hasAllChristCook) CM.Sim.Win('Let it snow');
|
||||||
|
|
||||||
|
if (CM.Sim.Has('Fortune cookies')) {
|
||||||
|
var list = Game.Tiers['fortune'].upgrades;
|
||||||
|
var fortunes = 0;
|
||||||
|
for (var i in list) {
|
||||||
|
if (CM.Sim.Has(list[i].name)) fortunes++;
|
||||||
|
}
|
||||||
|
if (fortunes >= list.length) CM.Sim.Win('O Fortuna');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Sim.BuyBuildings = function(amount, target) {
|
CM.Sim.BuyBuildings = function(amount, target) {
|
||||||
@@ -532,6 +570,8 @@ CM.Sim.ResetBonus = function(possiblePresMax) {
|
|||||||
if (CM.Cache.RealCookiesEarned >= 1000000000000000000000000000000000000000000) CM.Sim.Win('The end of the world');
|
if (CM.Cache.RealCookiesEarned >= 1000000000000000000000000000000000000000000) CM.Sim.Win('The end of the world');
|
||||||
if (CM.Cache.RealCookiesEarned >= 1000000000000000000000000000000000000000000000) CM.Sim.Win('Oh, you\'re back');
|
if (CM.Cache.RealCookiesEarned >= 1000000000000000000000000000000000000000000000) CM.Sim.Win('Oh, you\'re back');
|
||||||
if (CM.Cache.RealCookiesEarned >= 1000000000000000000000000000000000000000000000000) CM.Sim.Win('Lazarus');
|
if (CM.Cache.RealCookiesEarned >= 1000000000000000000000000000000000000000000000000) CM.Sim.Win('Lazarus');
|
||||||
|
if (CM.Cache.RealCookiesEarned >= 1000000000000000000000000000000000000000000000000000) CM.Sim.Win('Smurf account');
|
||||||
|
if (CM.Cache.RealCookiesEarned >= 1000000000000000000000000000000000000000000000000000000) CM.Sim.Win('If at first you don\'t succeed');
|
||||||
|
|
||||||
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user