Fix to work with 1.9 beta mostly
This commit is contained in:
302
CookieMonster.js
302
CookieMonster.js
@@ -633,7 +633,8 @@ CM.Disp.CreateTimerBar = function() {
|
||||
CM.Disp.TimerBarCF.style.height = '12px';
|
||||
CM.Disp.TimerBarCF.style.margin = '0px 10px';
|
||||
CM.Disp.TimerBarCF.style.position = 'relative';
|
||||
CM.Disp.TimerBarCF.appendChild(bar('Click Frenzy', [{id: 'CMTimerBarCFBar', color: CM.Disp.colorBlue}], 'CMTimerBarCFTime'));
|
||||
CM.Disp.TimerBarCF.appendChild(bar('', [{id: 'CMTimerBarCFBar'}], 'CMTimerBarCFTime'));
|
||||
CM.Disp.TimerBarCF.firstChild.firstChild.id = 'CMTimerBarCFType';
|
||||
CM.Disp.TimerBar.appendChild(CM.Disp.TimerBarCF);
|
||||
|
||||
l('wrapper').appendChild(CM.Disp.TimerBar);
|
||||
@@ -709,6 +710,10 @@ CM.Disp.UpdateTimerBar = function() {
|
||||
l('CMTimerBarFrenType').textContent = 'Clot';
|
||||
l('CMTimerBarFrenBar').className = CM.Disp.colorBackPre + CM.Disp.colorRed;
|
||||
}
|
||||
else if (Game.frenzyPower == 15) {
|
||||
l('CMTimerBarFrenType').textContent = 'Dragon Harvest';
|
||||
l('CMTimerBarFrenBar').className = CM.Disp.colorBackPre + CM.Disp.colorPurple;
|
||||
}
|
||||
else {
|
||||
l('CMTimerBarFrenType').textContent = 'Blood Frenzy';
|
||||
l('CMTimerBarFrenBar').className = CM.Disp.colorBackPre + CM.Disp.colorGreen;
|
||||
@@ -723,6 +728,14 @@ CM.Disp.UpdateTimerBar = function() {
|
||||
|
||||
if (Game.clickFrenzy > 0) {
|
||||
CM.Disp.TimerBarCF.style.display = '';
|
||||
if (Game.clickFrenzyPower == 777) {
|
||||
l('CMTimerBarCFType').textContent = 'Click Frenzy';
|
||||
l('CMTimerBarCFBar').className = CM.Disp.colorBackPre + CM.Disp.colorBlue;
|
||||
}
|
||||
else {
|
||||
l('CMTimerBarCFType').textContent = 'Dragonflight';
|
||||
l('CMTimerBarCFBar').className = CM.Disp.colorBackPre + CM.Disp.colorPurple;
|
||||
}
|
||||
l('CMTimerBarCFBar').style.width = Math.round(Game.clickFrenzy * maxWidth / Game.clickFrenzyMax) + 'px';
|
||||
l('CMTimerBarCFTime').textContent = Math.ceil(Game.clickFrenzy / Game.fps);
|
||||
count++;
|
||||
@@ -744,8 +757,13 @@ CM.Disp.UpdateTimerBar = function() {
|
||||
CM.Disp.UpdateBotTimerBarDisplay = function() {
|
||||
if (Game.OnAscend) {
|
||||
l('game').style.bottom = '0px';
|
||||
CM.Disp.BotBar.style.display = 'none';
|
||||
CM.Disp.TimerBar.style.display = 'none';
|
||||
CM.Disp.GCTimer.style.display = 'none';
|
||||
}
|
||||
else {
|
||||
CM.Disp.BotBar.style.display = '';
|
||||
CM.Disp.TimerBar.style.display = '';
|
||||
if (CM.Config.BotBar == 1 && CM.Config.TimerBar == 1 && CM.Config.TimerBarPos == 1) {
|
||||
CM.Disp.BotBar.style.bottom = '48px';
|
||||
l('game').style.bottom = '104px';
|
||||
@@ -1210,7 +1228,7 @@ CM.Disp.AddMenuPref = function(title) {
|
||||
l('menu').childNodes[2].insertBefore(frag, l('menu').childNodes[2].childNodes[l('menu').childNodes[2].childNodes.length - 1]);
|
||||
|
||||
CM.Disp.FormatButtonOnClickBak = l('formatButton').onclick;
|
||||
l('formatButton').onclick = function() {Game.Toggle('format', 'formatButton', 'Short numbers OFF', 'Short numbers ON'); CM.Disp.RefreshScale();};
|
||||
l('formatButton').onclick = function() {Game.Toggle('format', 'formatButton', 'Short numbers OFF', 'Short numbers ON', '1'); PlaySound('snd/tick.mp3'); CM.Disp.RefreshScale();};
|
||||
}
|
||||
|
||||
CM.Disp.AddMenuStats = function(title) {
|
||||
@@ -1344,8 +1362,9 @@ CM.Disp.AddMenuStats = function(title) {
|
||||
hcMaxFrag.appendChild(document.createTextNode(Beautify(possibleHC)));
|
||||
stats.appendChild(listing('Heavenly Chips (MAX)', hcMaxFrag));
|
||||
var hcCurFrag = document.createDocumentFragment();
|
||||
hcCurFrag.appendChild(document.createTextNode(Beautify(Game.heavenlyChipsEarned)));
|
||||
stats.appendChild(listing('Heavenly Chips (CUR)', hcCurFrag));
|
||||
// Remove all chip stats?
|
||||
//hcCurFrag.appendChild(document.createTextNode(Beautify(Game.heavenlyChipsEarned)));
|
||||
//stats.appendChild(listing('Heavenly Chips (CUR)', hcCurFrag));
|
||||
stats.appendChild(listing('Cookies To Next Chip', document.createTextNode(Beautify(neededCook))));
|
||||
stats.appendChild(listing('Time To Next Chip', document.createTextNode(CM.Disp.FormatTime(neededCook / (Game.cookiesPs * (1 - Game.cpsSucked)), 1))));
|
||||
// Unneeded?
|
||||
@@ -1383,18 +1402,20 @@ CM.Disp.AddMenuStats = function(title) {
|
||||
if (Game.cpsSucked > 0) {
|
||||
stats.appendChild(header('Wrinklers', 'Wrink'));
|
||||
if (CM.Config.StatsPref.Wrink || (CM.Config.StatsPref.Sea && choEgg)) {
|
||||
var sucked = 0;
|
||||
var totalSucked = 0;
|
||||
for (var i in Game.wrinklers) {
|
||||
sucked += Game.wrinklers[i].sucked;
|
||||
var sucked = Game.wrinklers[i].sucked;
|
||||
var toSuck = 1.1;
|
||||
if (Game.Has('Sacrilegious corruption')) toSuck *= 1.05;
|
||||
if (Game.wrinklers[i].type==1) toSuck *= 3; //shiny wrinklers are an elusive, profitable breed
|
||||
sucked *= toSuck;
|
||||
if (Game.Has('Wrinklerspawn')) sucked *= 1.05;
|
||||
totalSucked += sucked;
|
||||
}
|
||||
var toSuck = 1.1;
|
||||
if (Game.Has('Sacrilegious corruption')) toSuck *= 1.05;
|
||||
sucked *= toSuck;
|
||||
if (Game.Has('Wrinklerspawn')) sucked *= 1.05;
|
||||
|
||||
if (CM.Config.StatsPref.Wrink) {
|
||||
var popAllFrag = document.createDocumentFragment();
|
||||
popAllFrag.appendChild(document.createTextNode(Beautify(sucked) + ' '));
|
||||
popAllFrag.appendChild(document.createTextNode(Beautify(totalSucked) + ' '));
|
||||
var popAllA = document.createElement('a');
|
||||
popAllA.textContent = 'Pop All';
|
||||
popAllA.className = 'option';
|
||||
@@ -1543,7 +1564,7 @@ CM.Disp.RefreshMenu = function() {
|
||||
}
|
||||
|
||||
CM.Disp.UpdateTooltipLocation = function() {
|
||||
Game.tooltip.tta.style.top = Math.max(0, Math.min((l('game').clientHeight + l('topBar').clientHeight) - Game.tooltip.tt.clientHeight - CM.Disp.TooltipWarnCaut.clientHeight - 64, Game.mouseY - 48)) + 'px';
|
||||
Game.tooltip.tta.style.top = Math.max(0, Math.min((l('game').clientHeight + l('topBar').clientHeight) - Game.tooltip.tt.clientHeight - CM.Disp.TooltipWarnCaut.clientHeight - 38, Game.mouseY - 48)) + 'px';
|
||||
if (Game.tooltip.origin == 'wrink') {
|
||||
Game.tooltip.tta.style.left = (Game.mouseX + l('tooltip').offsetWidth + 25) + 'px';
|
||||
Game.tooltip.tta.style.right = 'auto';
|
||||
@@ -1618,7 +1639,7 @@ CM.Disp.AddTooltipBuild = function() {
|
||||
var me = Game.Objects[i];
|
||||
if (l('product' + me.id).onmouseover != null) {
|
||||
CM.Disp.TooltipBuildBack[i] = l('product' + me.id).onmouseover;
|
||||
eval('l(\'product\' + me.id).onmouseover = function() {Game.tooltip.draw(this, function() {return CM.Disp.Tooltip(\'b\', \'' + i + '\');}, \'store\');}');
|
||||
eval('l(\'product\' + me.id).onmouseover = function() {Game.tooltip.dynamic = 1; Game.tooltip.draw(this, function() {return CM.Disp.Tooltip(\'b\', \'' + i + '\');}, \'store\'); Game.tooltip.wobble();}');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1629,7 +1650,7 @@ CM.Disp.AddTooltipUpgrade = function() {
|
||||
var me = Game.UpgradesInStore[i];
|
||||
if (l('upgrade' + i).onmouseover != null) {
|
||||
CM.Disp.TooltipUpgradeBack[i] = l('upgrade' + i).onmouseover;
|
||||
eval('l(\'upgrade\' + i).onmouseover = function() {CM.Disp.Tooltip(\'u\', \'' + i + '\');}');
|
||||
eval('l(\'upgrade\' + i).onmouseover = function() {if (!Game.mouseDown) {Game.setOnCrate(this); Game.tooltip.dynamic = 1; Game.tooltip.draw(this, function() {return CM.Disp.Tooltip(\'u\', \'' + i + '\');}, \'store\'); Game.tooltip.wobble();}}');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1667,7 +1688,7 @@ CM.Disp.Tooltip = function(type, name) {
|
||||
}
|
||||
}
|
||||
else { // Upgrades
|
||||
CM.Disp.TooltipUpgradeBack[name]();
|
||||
l('tooltip').innerHTML = Game.crate(Game.UpgradesInStore[name], 'store', undefined, undefined, 1)();
|
||||
}
|
||||
|
||||
var area = document.createElement('div');
|
||||
@@ -1713,9 +1734,9 @@ CM.Disp.Tooltip = function(type, name) {
|
||||
|
||||
CM.Disp.UpdateTooltip();
|
||||
|
||||
if (type == 'b') {
|
||||
// if (type == 'b') {
|
||||
return l('tooltip').innerHTML;
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
CM.Disp.UpdateTooltip = function() {
|
||||
@@ -1882,6 +1903,7 @@ CM.Disp.UpdateWrinklerTooltip = function() {
|
||||
var sucked = Game.wrinklers[CM.Disp.TooltipWrinkler].sucked;
|
||||
var toSuck = 1.1;
|
||||
if (Game.Has('Sacrilegious corruption')) toSuck *= 1.05;
|
||||
if (Game.wrinklers[CM.Disp.TooltipWrinkler].type == 1) toSuck *= 3; //shiny wrinklers are an elusive, profitable breed
|
||||
sucked *= toSuck;
|
||||
if (Game.Has('Wrinklerspawn')) sucked *= 1.05;
|
||||
l('CMTooltipWrinkler').textContent = Beautify(sucked);
|
||||
@@ -2065,6 +2087,7 @@ CM.Init = function() {
|
||||
}
|
||||
|
||||
CM.DelayInit = function() {
|
||||
CM.Sim.InitData();
|
||||
CM.Disp.CreateCssArea();
|
||||
CM.Disp.CreateBotBar();
|
||||
CM.Disp.CreateTimerBar();
|
||||
@@ -2083,7 +2106,7 @@ CM.DelayInit = function() {
|
||||
CM.Disp.lastAscendState = Game.OnAscend;
|
||||
|
||||
if (Game.prefs.popups) Game.Popup('Cookie Monster version ' + CM.VersionMajor + '.' + CM.VersionMinor + ' loaded!');
|
||||
else Game.Notify('Cookie Monster version ' + CM.VersionMajor + '.' + CM.VersionMinor + ' loaded!','','',1);
|
||||
else Game.Notify('Cookie Monster version ' + CM.VersionMajor + '.' + CM.VersionMinor + ' loaded!','','',1, 1);
|
||||
|
||||
Game.Win('Third-party');
|
||||
}
|
||||
@@ -2107,6 +2130,7 @@ CM.Sim.BuildingGetPrice = function(basePrice, start, increase) {
|
||||
if (Game.Has('Santa\'s dominion')) price *= 0.99;
|
||||
if (Game.Has('Faberge egg')) price *= 0.99;
|
||||
if (Game.Has('Divine discount')) price *= 0.99;
|
||||
if (Game.hasAura('Fierce Hoarder')) price *= 0.98;
|
||||
totalPrice += Math.ceil(price);
|
||||
count++;
|
||||
}
|
||||
@@ -2116,7 +2140,9 @@ CM.Sim.BuildingGetPrice = function(basePrice, start, increase) {
|
||||
CM.Sim.BuildingSell = function(basePrice, start, amount) {
|
||||
var totalMoni = 0;
|
||||
while (amount > 0) {
|
||||
totalMoni += Math.floor(CM.Sim.BuildingGetPrice(basePrice, start, 1) * 0.5);
|
||||
var giveBack = 0.5;
|
||||
if (Game.hasAura('Earth Shatterer')) giveBack = 0.85;
|
||||
totalMoni += Math.floor(CM.Sim.BuildingGetPrice(basePrice, start, 1) * giveBack);
|
||||
start--;
|
||||
amount--;
|
||||
}
|
||||
@@ -2129,27 +2155,34 @@ CM.Sim.Win = function(what) {
|
||||
if (CM.Sim.Achievements[what]) {
|
||||
if (CM.Sim.Achievements[what].won == 0) {
|
||||
CM.Sim.Achievements[what].won = 1;
|
||||
if (Game.Achievements[what].hide != 3) CM.Sim.AchievementsOwned++;
|
||||
if (Game.Achievements[what].pool != 'shadow') CM.Sim.AchievementsOwned++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eval('CM.Sim.HasAchiev = ' + Game.HasAchiev.toString().split('Game').join('CM.Sim'));
|
||||
|
||||
CM.Sim.CopyData = function() {
|
||||
// Other variables
|
||||
CM.Sim.UpgradesOwned = Game.UpgradesOwned;
|
||||
CM.Sim.pledges = Game.pledges;
|
||||
CM.Sim.AchievementsOwned = Game.AchievementsOwned;
|
||||
|
||||
eval('CM.Sim.GetHeavenlyMultiplier = ' + Game.GetHeavenlyMultiplier.toString().split('Game').join('CM.Sim'));
|
||||
|
||||
CM.Sim.hasAura = function(what) {
|
||||
if (Game.dragonAuras[CM.Sim.dragonAura].name == what || Game.dragonAuras[CM.Sim.dragonAura2].name == what)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
eval('CM.Sim.GetTieredCpsMult = ' + Game.GetTieredCpsMult.toString().split('Game.Has').join('CM.Sim.Has').split('me.tieredUpgrades').join('Game.Objects[me.name].tieredUpgrades').split('me.synergies').join('Game.Objects[me.name].synergies').split('syn.buildingTie1.amount').join('CM.Sim.Objects[syn.buildingTie1.name].amount').split('syn.buildingTie2.amount').join('CM.Sim.Objects[syn.buildingTie2.name].amount'));
|
||||
|
||||
eval('CM.Sim.getGrandmaSynergyUpgradeMultiplier = ' + Game.getGrandmaSynergyUpgradeMultiplier.toString().split('Game.Objects[\'Grandma\']').join('CM.Sim.Objects[\'Grandma\']'));
|
||||
|
||||
CM.Sim.InitData = function() {
|
||||
// Buildings
|
||||
CM.Sim.Objects = [];
|
||||
for (var i in Game.Objects) {
|
||||
CM.Sim.Objects[i] = {};
|
||||
var me = Game.Objects[i];
|
||||
var you = CM.Sim.Objects[i];
|
||||
you.amount = me.amount;
|
||||
eval('you.cps = ' + me.cps.toString().split('Game.Has').join('CM.Sim.Has').split('Game.Objects').join('CM.Sim.Objects'));
|
||||
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.getGrandmaSynergyUpgradeMultiplier').join('CM.Sim.getGrandmaSynergyUpgradeMultiplier'));
|
||||
// Below is needed for above eval!
|
||||
you.baseCps = me.baseCps;
|
||||
you.name = me.name;
|
||||
@@ -2159,15 +2192,41 @@ CM.Sim.CopyData = function() {
|
||||
CM.Sim.Upgrades = [];
|
||||
for (var i in Game.Upgrades) {
|
||||
CM.Sim.Upgrades[i] = {};
|
||||
var me = Game.Upgrades[i];
|
||||
var you = CM.Sim.Upgrades[i];
|
||||
you.bought = me.bought;
|
||||
}
|
||||
|
||||
// Achievements
|
||||
CM.Sim.Achievements = [];
|
||||
for (var i in Game.Achievements) {
|
||||
CM.Sim.Achievements[i] = {};
|
||||
}
|
||||
}
|
||||
|
||||
CM.Sim.CopyData = function() {
|
||||
// Other variables
|
||||
CM.Sim.UpgradesOwned = Game.UpgradesOwned;
|
||||
CM.Sim.pledges = Game.pledges;
|
||||
CM.Sim.AchievementsOwned = Game.AchievementsOwned;
|
||||
CM.Sim.heavenlyPower = Game.heavenlyPower;
|
||||
CM.Sim.prestige = Game.prestige;
|
||||
CM.Sim.dragonAura = Game.dragonAura;
|
||||
CM.Sim.dragonAura2 = Game.dragonAura2;
|
||||
|
||||
// Buildings
|
||||
for (var i in Game.Objects) {
|
||||
var me = Game.Objects[i];
|
||||
var you = CM.Sim.Objects[i];
|
||||
you.amount = me.amount;
|
||||
}
|
||||
|
||||
// Upgrades
|
||||
for (var i in Game.Upgrades) {
|
||||
var me = Game.Upgrades[i];
|
||||
var you = CM.Sim.Upgrades[i];
|
||||
you.bought = me.bought;
|
||||
}
|
||||
|
||||
// Achievements
|
||||
for (var i in Game.Achievements) {
|
||||
var me = Game.Achievements[i];
|
||||
var you = CM.Sim.Achievements[i];
|
||||
you.won = me.won;
|
||||
@@ -2179,20 +2238,18 @@ CM.Sim.CalculateGains = function() {
|
||||
CM.Sim.cookiesPs = 0;
|
||||
var mult = 1;
|
||||
|
||||
var heavenlyMult = 0;
|
||||
if (CM.Sim.Has('Heavenly chip secret')) heavenlyMult += 0.05;
|
||||
if (CM.Sim.Has('Heavenly cookie stand')) heavenlyMult += 0.20;
|
||||
if (CM.Sim.Has('Heavenly bakery')) heavenlyMult += 0.25;
|
||||
if (CM.Sim.Has('Heavenly confectionery')) heavenlyMult += 0.25;
|
||||
if (CM.Sim.Has('Heavenly key')) heavenlyMult += 0.25;
|
||||
mult += parseFloat(Game.heavenlyCookies) *0.1 * heavenlyMult;
|
||||
var heavenlyMult = CM.Sim.GetHeavenlyMultiplier();
|
||||
mult += parseFloat(CM.Sim.prestige) * 0.01 * CM.Sim.heavenlyPower * heavenlyMult;
|
||||
|
||||
var cookieMult = 0;
|
||||
for (var i in CM.Sim.Upgrades) {
|
||||
var me = CM.Sim.Upgrades[i];
|
||||
if (me.bought > 0) {
|
||||
if (Game.Upgrades[i].pool == 'cookie' && CM.Sim.Has(Game.Upgrades[i].name)) mult *= (1 + (typeof(Game.Upgrades[i].power) == 'function' ? Game.Upgrades[i].power(Game.Upgrades[i]) : Game.Upgrades[i].power) * 0.01);
|
||||
if (Game.Upgrades[i].pool == 'cookie' && CM.Sim.Has(Game.Upgrades[i].name)) cookieMult += (typeof(Game.Upgrades[i].power) == 'function' ? Game.Upgrades[i].power(Game.Upgrades[i]) : Game.Upgrades[i].power);
|
||||
}
|
||||
}
|
||||
|
||||
mult *= (1 + 0.01 * cookieMult);
|
||||
if (CM.Sim.Has('Specialized chocolate chips')) mult *= 1.01;
|
||||
if (CM.Sim.Has('Designer cocoa beans')) mult *= 1.02;
|
||||
if (CM.Sim.Has('Underworld ovens')) mult *= 1.03;
|
||||
@@ -2205,7 +2262,7 @@ CM.Sim.CalculateGains = function() {
|
||||
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 legacy')) mult *= (Game.santaLevel + 1) * 0.05;
|
||||
if (CM.Sim.Has('Santa\'s legacy')) mult *= 1 + (Game.santaLevel + 1) * 0.05;
|
||||
|
||||
for (var i in CM.Sim.Objects) {
|
||||
var me = CM.Sim.Objects[i];
|
||||
@@ -2213,14 +2270,18 @@ CM.Sim.CalculateGains = function() {
|
||||
}
|
||||
|
||||
if (CM.Sim.Has('"egg"')) CM.Sim.cookiesPs += 9; // "egg"
|
||||
if (CM.Sim.Has('"god"')) CM.Sim.cookiesPs += 9;// "god"
|
||||
|
||||
var milkMult = CM.Sim.Has('Santa\'s milk and cookies') ? 1.05 : 1;
|
||||
var milkMult=1;
|
||||
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.Has('Kitten helpers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.05 * milkMult);
|
||||
if (CM.Sim.Has('Kitten workers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult);
|
||||
if (CM.Sim.Has('Kitten engineers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
||||
if (CM.Sim.Has('Kitten overseers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
||||
if (CM.Sim.Has('Kitten managers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
|
||||
if (CM.Sim.Has('Kitten accountants')) 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 angels')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult);
|
||||
|
||||
var eggMult = 0;
|
||||
@@ -2243,16 +2304,29 @@ CM.Sim.CalculateGains = function() {
|
||||
eggMult += (1 - Math.pow(1 - day / 100, 3)) * 10;
|
||||
}
|
||||
mult *= (1 + 0.01 * eggMult);
|
||||
|
||||
|
||||
if (CM.Sim.hasAura('Radiant Appetite')) mult *= 2;
|
||||
|
||||
var rawCookiesPs = CM.Sim.cookiesPs * mult;
|
||||
for (var i = 0; i < Game.cpsAchievs.length / 2; i++) {
|
||||
if (rawCookiesPs >= Game.cpsAchievs[i * 2 + 1]) CM.Sim.Win(Game.cpsAchievs[i * 2]);
|
||||
for (var i in Game.CpsAchievements) {
|
||||
if (rawCookiesPs >= Game.CpsAchievements[i].threshold) CM.Sim.Win(Game.CpsAchievements[i].name);
|
||||
}
|
||||
|
||||
if (Game.frenzy > 0) mult *= Game.frenzyPower;
|
||||
|
||||
if (CM.Sim.Has('Elder Covenant')) mult *= 0.95;
|
||||
|
||||
if (CM.Sim.Has('Golden switch [off]')) {
|
||||
var goldenSwitchMult = 1.25;
|
||||
if (CM.Sim.Has('Residual luck')) {
|
||||
var upgrades = ['Get lucky', 'Lucky day', 'Serendipity', 'Heavenly luck', 'Lasting fortune', 'Decisive fate'];
|
||||
for (var i in upgrades) {
|
||||
if (CM.Sim.Has(upgrades[i])) goldenSwitchMult += 0.01;
|
||||
}
|
||||
}
|
||||
mult *= goldenSwitchMult;
|
||||
}
|
||||
|
||||
CM.Sim.cookiesPs *= mult;
|
||||
};
|
||||
|
||||
@@ -2269,40 +2343,28 @@ CM.Sim.CheckOtherAchiev = function() {
|
||||
if (CM.Sim.Has('Rainbow grandmas')) grandmas++;
|
||||
if (!CM.Sim.HasAchiev('Elder') && grandmas >= 7) CM.Sim.Win('Elder');
|
||||
|
||||
// Redo?
|
||||
var buildingsOwned = 0;
|
||||
var oneOfEach = 1;
|
||||
var mathematician = 1;
|
||||
var base10 = 1;
|
||||
var centennial = 1;
|
||||
var centennialhalf = 1;
|
||||
var bicentennial = 1;
|
||||
var minAmount = 100000;
|
||||
for (var i in CM.Sim.Objects) {
|
||||
buildingsOwned += CM.Sim.Objects[i].amount;
|
||||
if (!CM.Sim.HasAchiev('One with everything')) {
|
||||
if (CM.Sim.Objects[i].amount == 0) oneOfEach = 0;
|
||||
}
|
||||
minAmount = Math.min(CM.Sim.Objects[i].amount, minAmount);
|
||||
if (!CM.Sim.HasAchiev('Mathematician')) {
|
||||
if (CM.Sim.Objects[i].amount < Math.min(128, Math.pow(2, (Game.ObjectsById.length - Game.Objects[i].id) - 1))) mathematician = 0;
|
||||
}
|
||||
if (!CM.Sim.HasAchiev('Base 10')) {
|
||||
if (CM.Sim.Objects[i].amount < (Game.ObjectsById.length - Game.Objects[i].id)*10) base10 = 0;
|
||||
}
|
||||
if (!CM.Sim.HasAchiev('Centennial')) {
|
||||
if (CM.Sim.Objects[i].amount < 100) centennial = 0;
|
||||
}
|
||||
if (!CM.Sim.HasAchiev('Centennial and a half')) {
|
||||
if (CM.Sim.Objects[i].amount < 150) centennialhalf = 0;
|
||||
}
|
||||
if (!CM.Sim.HasAchiev('Bicentennial')) {
|
||||
if (CM.Sim.Objects[i].amount < 200) bicentennial = 0;
|
||||
}
|
||||
}
|
||||
if (oneOfEach == 1) CM.Sim.Win('One with everything');
|
||||
if (minAmount >= 1) CM.Sim.Win('One with everything');
|
||||
if (mathematician == 1) CM.Sim.Win('Mathematician');
|
||||
if (base10 == 1) CM.Sim.Win('Base 10');
|
||||
if (centennial == 1) CM.Sim.Win('Centennial');
|
||||
if (centennialhalf == 1) CM.Sim.Win('Centennial and a half');
|
||||
if (bicentennial == 1) CM.Sim.Win('Bicentennial');
|
||||
if (minAmount >= 100) CM.Sim.Win('Centennial');
|
||||
if (minAmount >= 150) CM.Sim.Win('Centennial and a half');
|
||||
if (minAmount >= 200) CM.Sim.Win('Bicentennial');
|
||||
if (minAmount >= 250) CM.Sim.Win('Bicentennial and a half');
|
||||
|
||||
if (buildingsOwned >= 100) CM.Sim.Win('Builder');
|
||||
if (buildingsOwned >= 500) CM.Sim.Win('Architect');
|
||||
@@ -2312,7 +2374,11 @@ CM.Sim.CheckOtherAchiev = function() {
|
||||
if (CM.Sim.UpgradesOwned >= 20) CM.Sim.Win('Enhancer');
|
||||
if (CM.Sim.UpgradesOwned >= 50) CM.Sim.Win('Augmenter');
|
||||
if (CM.Sim.UpgradesOwned >= 100) CM.Sim.Win('Upgrader');
|
||||
if (CM.Sim.UpgradesOwned >= 150) 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 (CM.Sim.Objects['Cursor'].amount + CM.Sim.Objects['Grandma'].amount >= 777) CM.Sim.Win('The elder scrolls');
|
||||
|
||||
var hasAllHalloCook = true;
|
||||
for (var i in CM.Data.HalloCookies) {
|
||||
@@ -2342,98 +2408,13 @@ CM.Sim.BuyBuildings = function(amount, target) {
|
||||
if (me.amount >= 200) CM.Sim.Win('The Digital');
|
||||
if (me.amount >= 300) CM.Sim.Win('Extreme polydactyly');
|
||||
if (me.amount >= 400) CM.Sim.Win('Dr. T');
|
||||
if (me.amount >= 500) CM.Sim.Win('Thumbs, phalanges, metacarpals');
|
||||
}
|
||||
else if (i == 'Grandma') {
|
||||
if (me.amount >= 1) CM.Sim.Win('Grandma\'s cookies');
|
||||
if (me.amount >= 50) CM.Sim.Win('Sloppy kisses');
|
||||
if (me.amount >= 100) CM.Sim.Win('Retirement home');
|
||||
if (me.amount >= 150) CM.Sim.Win('Friend of the ancients');
|
||||
if (me.amount >= 200) CM.Sim.Win('Ruler of the ancients');
|
||||
if (me.amount >= 250) CM.Sim.Win('The old never bothered me anyway');
|
||||
}
|
||||
else if (i == 'Farm') {
|
||||
if (me.amount >= 1) CM.Sim.Win('My first farm');
|
||||
if (me.amount >= 50) CM.Sim.Win('Reap what you sow');
|
||||
if (me.amount >= 100) CM.Sim.Win('Farm ill');
|
||||
if (me.amount >= 150) CM.Sim.Win('Perfected agriculture');
|
||||
if (me.amount >= 200) CM.Sim.Win('Homegrown');
|
||||
}
|
||||
else if (i == 'Mine') {
|
||||
if (me.amount >= 1) CM.Sim.Win('You know the drill');
|
||||
if (me.amount >= 50) CM.Sim.Win('Excavation site');
|
||||
if (me.amount >= 100) CM.Sim.Win('Hollow the planet');
|
||||
if (me.amount >= 150) CM.Sim.Win('Can you dig it');
|
||||
if (me.amount >= 200) CM.Sim.Win('The center of the Earth');
|
||||
}
|
||||
else if (i == 'Factory') {
|
||||
if (me.amount >= 1) CM.Sim.Win('Production chain');
|
||||
if (me.amount >= 50) CM.Sim.Win('Industrial revolution');
|
||||
if (me.amount >= 100) CM.Sim.Win('Global warming');
|
||||
if (me.amount >= 150) CM.Sim.Win('Ultimate automation');
|
||||
if (me.amount >= 200) CM.Sim.Win('Technocracy');
|
||||
}
|
||||
else if (i == 'Bank') {
|
||||
if (me.amount >= 1) CM.Sim.Win('Pretty penny');
|
||||
if (me.amount >= 50) CM.Sim.Win('Fit the bill');
|
||||
if (me.amount >= 100) CM.Sim.Win('A loan in the dark');
|
||||
if (me.amount >= 150) CM.Sim.Win('Need for greed');
|
||||
if (me.amount >= 200) CM.Sim.Win('It\'s the economy, stupid');
|
||||
}
|
||||
else if (i == 'Temple') {
|
||||
if (me.amount >= 1) CM.Sim.Win('Your time to shrine');
|
||||
if (me.amount >= 50) CM.Sim.Win('Shady sect');
|
||||
if (me.amount >= 100) CM.Sim.Win('New-age cult');
|
||||
if (me.amount >= 150) CM.Sim.Win('Organized religion');
|
||||
if (me.amount >= 200) CM.Sim.Win('Fanaticism');
|
||||
}
|
||||
else if (i == 'Wizard tower') {
|
||||
if (me.amount >= 1) CM.Sim.Win('Bewitched');
|
||||
if (me.amount >= 50) CM.Sim.Win('The sorcerer\'s apprentice');
|
||||
if (me.amount >= 100) CM.Sim.Win('Charms and enchantments');
|
||||
if (me.amount >= 150) CM.Sim.Win('Curses and maledictions');
|
||||
if (me.amount >= 200) CM.Sim.Win('Magic kingdom');
|
||||
}
|
||||
else if (i == 'Shipment') {
|
||||
if (me.amount >= 1) CM.Sim.Win('Expedition');
|
||||
if (me.amount >= 50) CM.Sim.Win('Galactic highway');
|
||||
if (me.amount >= 100) CM.Sim.Win('Far far away');
|
||||
if (me.amount >= 150) CM.Sim.Win('Type II civilization');
|
||||
if (me.amount >= 200) CM.Sim.Win('We come in peace');
|
||||
}
|
||||
else if (i == 'Alchemy lab') {
|
||||
if (me.amount >= 1) CM.Sim.Win('Transmutation');
|
||||
if (me.amount >= 50) CM.Sim.Win('Transmogrification');
|
||||
if (me.amount >= 100) CM.Sim.Win('Gold member');
|
||||
if (me.amount >= 150) CM.Sim.Win('Gild wars');
|
||||
if (me.amount >= 200) CM.Sim.Win('The secrets of the universe');
|
||||
}
|
||||
else if (i == 'Portal') {
|
||||
if (me.amount >= 1) CM.Sim.Win('A whole new world');
|
||||
if (me.amount >= 50) CM.Sim.Win('Now you\'re thinking');
|
||||
if (me.amount >= 100) CM.Sim.Win('Dimensional shift');
|
||||
if (me.amount >= 150) CM.Sim.Win('Brain-split');
|
||||
if (me.amount >= 200) CM.Sim.Win('Realm of the Mad God');
|
||||
}
|
||||
else if (i == 'Time machine') {
|
||||
if (me.amount >= 1) CM.Sim.Win('Time warp');
|
||||
if (me.amount >= 50) CM.Sim.Win('Alternate timeline');
|
||||
if (me.amount >= 100) CM.Sim.Win('Rewriting history');
|
||||
if (me.amount >= 150) CM.Sim.Win('Time duke');
|
||||
if (me.amount >= 200) CM.Sim.Win('Forever and ever');
|
||||
}
|
||||
else if (i == 'Antimatter condenser') {
|
||||
if (me.amount >= 1) CM.Sim.Win('Antibatter');
|
||||
if (me.amount >= 50) CM.Sim.Win('Quirky quarks');
|
||||
if (me.amount >= 100) CM.Sim.Win('It does matter!');
|
||||
if (me.amount >= 150) CM.Sim.Win('Molecular maestro');
|
||||
if (me.amount >= 200) CM.Sim.Win('Walk the planck');
|
||||
}
|
||||
else if (i == 'Prism') {
|
||||
if (me.amount >= 1) CM.Sim.Win('Lone photon');
|
||||
if (me.amount >= 50) CM.Sim.Win('Dazzling glimmer');
|
||||
if (me.amount >= 100) CM.Sim.Win('Blinding flash');
|
||||
if (me.amount >= 150) CM.Sim.Win('Unending glow');
|
||||
if (me.amount >= 200) CM.Sim.Win('Rise and shine');
|
||||
else {
|
||||
for (var j in Game.Objects[me.name].tieredAchievs) {
|
||||
if (me.amount >= Game.Tiers[Game.Objects[me.name].tieredAchievs[j].tier].achievUnlock)
|
||||
CM.Sim.Win(Game.Objects[me.name].tieredAchievs[j].name);
|
||||
}
|
||||
}
|
||||
|
||||
var lastAchievementsOwned = CM.Sim.AchievementsOwned;
|
||||
@@ -2454,11 +2435,11 @@ CM.Sim.BuyBuildings = function(amount, target) {
|
||||
CM.Sim.BuyUpgrades = function() {
|
||||
CM.Cache.Upgrades = [];
|
||||
for (var i in Game.Upgrades) {
|
||||
if (Game.Upgrades[i].bought == 0 && Game.Upgrades[i].unlocked && Game.Upgrades[i].pool != 'prestige') {
|
||||
if (Game.Upgrades[i].pool == 'toggle' || (Game.Upgrades[i].bought == 0 && Game.Upgrades[i].unlocked && Game.Upgrades[i].pool != 'prestige')) {
|
||||
CM.Sim.CopyData();
|
||||
var me = CM.Sim.Upgrades[i];
|
||||
me.bought = 1;
|
||||
if (Game.Upgrades[i].pool == '' || Game.Upgrades[i].pool == 'cookie') CM.Sim.UpgradesOwned++;
|
||||
if (Game.Upgrades[i].pool == '' || Game.Upgrades[i].pool == 'cookie' || Game.Upgrades[i].pool == 'tech') CM.Sim.UpgradesOwned++;
|
||||
|
||||
if (i == 'Elder Pledge') {
|
||||
CM.Sim.pledges++;
|
||||
@@ -2502,7 +2483,8 @@ CM.Sim.ResetBonus = function() {
|
||||
if (Game.cookiesEarned >= 1000000000000000000000) CM.Sim.Win('Nil zero zilch');
|
||||
if (Game.cookiesEarned >= 1000000000000000000000000) CM.Sim.Win('Transcendence');
|
||||
if (Game.cookiesEarned >= 1000000000000000000000000000) CM.Sim.Win('Obliterate');
|
||||
if (Game.cookiesEarned >= 1000000000000000000000000000000) CM.Sim.Win('Negative void');
|
||||
if (Game.cookiesEarned >= 1000000000000000000000000000000) CM.Sim.Win('Negative void');
|
||||
if (Game.cookiesEarned >= 1000000000000000000000000000000000) CM.Sim.Win('To crumbs, you say?');
|
||||
|
||||
var lastAchievementsOwned = CM.Sim.AchievementsOwned;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user