Compare commits

..

9 Commits

Author SHA1 Message Date
Aktanusa
687cb9a4c9 Fix heavenly chips multiplier (Issue #129) 2017-07-27 21:13:35 -04:00
Aktanusa
2176b9b436 Change the default of calculate with Wrinkler to be off (Issue #91) 2017-07-27 21:02:02 -04:00
Aktanusa
e061caa2e4 Version changed to 2.0034.3 and changed to a faster method of getting current time 2017-07-19 17:33:54 -04:00
Aktanusa
b4157cdbc5 Fixed current date issue (Issue #124) 2017-07-19 16:21:20 -04:00
Aktanusa
c0cd967cc7 Fixed to work with Version 2.0034 (mostly) (Issue #119, #120, and #121) 2017-07-19 14:45:54 -04:00
Aktanusa
c32a364d82 Version change to 2.0034.1 2017-07-18 22:08:07 -04:00
Aktanusa
d82f782f4b Merge branch 'bryant1410-master' 2017-04-16 21:06:27 -04:00
Santiago Castro
22a00ceef0 Fix broken Markdown headings 2017-04-16 20:50:48 -03:00
Aktanusa
b4c0c8de2b Fixed Century Egg Stat was wrong (Issue #102 and #103) and Version change 2016-07-27 23:08:28 -04:00
6 changed files with 135 additions and 55 deletions

View File

@@ -67,6 +67,12 @@ CM.Cache.RemakeWrinkBank = function() {
if (Game.wrinklers[i].type==1) toSuck *= 3; // Shiny wrinklers if (Game.wrinklers[i].type==1) toSuck *= 3; // Shiny wrinklers
sucked *= toSuck; sucked *= toSuck;
if (Game.Has('Wrinklerspawn')) sucked *= 1.05; if (Game.Has('Wrinklerspawn')) sucked *= 1.05;
if (Game.hasGod) {
var godLvl = Game.hasGod('scorn');
if (godLvl == 1) sucked *= 1.15;
else if (godLvl == 2) sucked *= 1.1;
else if (godLvl == 3) sucked *= 1.05;
}
totalSucked += sucked; totalSucked += sucked;
} }
CM.Cache.WrinkBank = totalSucked; CM.Cache.WrinkBank = totalSucked;
@@ -97,9 +103,9 @@ CM.Cache.RemakeUpgradePP = function() {
for (var i in CM.Cache.Upgrades) { for (var i in CM.Cache.Upgrades) {
//CM.Cache.Upgrades[i].pp = Game.Upgrades[i].getPrice() / CM.Cache.Upgrades[i].bonus; //CM.Cache.Upgrades[i].pp = Game.Upgrades[i].getPrice() / CM.Cache.Upgrades[i].bonus;
CM.Cache.Upgrades[i].pp = (Math.max(Game.Upgrades[i].getPrice() - (Game.cookies + CM.Disp.GetWrinkConfigBank()), 0) / Game.cookiesPs) + (Game.Upgrades[i].getPrice() / CM.Cache.Upgrades[i].bonus); CM.Cache.Upgrades[i].pp = (Math.max(Game.Upgrades[i].getPrice() - (Game.cookies + CM.Disp.GetWrinkConfigBank()), 0) / Game.cookiesPs) + (Game.Upgrades[i].getPrice() / CM.Cache.Upgrades[i].bonus);
if (isNaN(CM.Cache.Upgrades[i].pp)) CM.Cache.Upgrades[i].pp = 'Infinity'; if (isNaN(CM.Cache.Upgrades[i].pp)) CM.Cache.Upgrades[i].pp = Infinity;
var color = ''; var color = '';
if (CM.Cache.Upgrades[i].pp <= 0 || CM.Cache.Upgrades[i].pp == 'Infinity') color = CM.Disp.colorGray; if (CM.Cache.Upgrades[i].pp <= 0 || CM.Cache.Upgrades[i].pp == Infinity) color = CM.Disp.colorGray;
else if (CM.Cache.Upgrades[i].pp < CM.Cache.min) color = CM.Disp.colorBlue; else if (CM.Cache.Upgrades[i].pp < CM.Cache.min) color = CM.Disp.colorBlue;
else if (CM.Cache.Upgrades[i].pp == CM.Cache.min) color = CM.Disp.colorGreen; else if (CM.Cache.Upgrades[i].pp == CM.Cache.min) color = CM.Disp.colorGreen;
else if (CM.Cache.Upgrades[i].pp == CM.Cache.max) color = CM.Disp.colorRed; else if (CM.Cache.Upgrades[i].pp == CM.Cache.max) color = CM.Disp.colorRed;
@@ -115,7 +121,7 @@ CM.Cache.RemakeBuildingsOtherPP = function(amount, target) {
//CM.Cache[target][i].pp = CM.Cache[target][i].price / CM.Cache[target][i].bonus; //CM.Cache[target][i].pp = CM.Cache[target][i].price / CM.Cache[target][i].bonus;
CM.Cache[target][i].pp = (Math.max(CM.Cache[target][i].price - (Game.cookies + CM.Disp.GetWrinkConfigBank()), 0) / Game.cookiesPs) + (CM.Cache[target][i].price / CM.Cache[target][i].bonus); CM.Cache[target][i].pp = (Math.max(CM.Cache[target][i].price - (Game.cookies + CM.Disp.GetWrinkConfigBank()), 0) / Game.cookiesPs) + (CM.Cache[target][i].price / CM.Cache[target][i].bonus);
var color = ''; var color = '';
if (CM.Cache[target][i].pp <= 0 || CM.Cache[target][i].pp == 'Infinity') color = CM.Disp.colorGray; if (CM.Cache[target][i].pp <= 0 || CM.Cache[target][i].pp == Infinity) color = CM.Disp.colorGray;
else if (CM.Cache[target][i].pp < CM.Cache.min) color = CM.Disp.colorBlue; else if (CM.Cache[target][i].pp < CM.Cache.min) color = CM.Disp.colorBlue;
else if (CM.Cache[target][i].pp == CM.Cache.min) color = CM.Disp.colorGreen; else if (CM.Cache[target][i].pp == CM.Cache.min) color = CM.Disp.colorGreen;
else if (CM.Cache[target][i].pp == CM.Cache.max) color = CM.Disp.colorRed; else if (CM.Cache[target][i].pp == CM.Cache.max) color = CM.Disp.colorRed;
@@ -509,7 +515,7 @@ CM.Data.ValCookies = ['Pure heart biscuits', 'Ardent heart biscuits', 'Sour hear
********/ ********/
CM.Disp.FormatTime = function(time, format) { CM.Disp.FormatTime = function(time, format) {
if (time == 'Infinity') return time; if (time == Infinity) return time;
if (CM.Config.TimeFormat) { if (CM.Config.TimeFormat) {
if (time > 3155760000) return 'XX:XX:XX:XX:XX'; if (time > 3155760000) return 'XX:XX:XX:XX:XX';
time = Math.ceil(time); time = Math.ceil(time);
@@ -1909,7 +1915,7 @@ CM.Disp.AddMenuStats = function(title) {
stats.appendChild(listing(listingQuest('Chocolate Egg Cookies', 'ChoEggTooltipPlaceholder'), document.createTextNode(Beautify(CM.Cache.lastChoEgg)))); stats.appendChild(listing(listingQuest('Chocolate Egg Cookies', 'ChoEggTooltipPlaceholder'), document.createTextNode(Beautify(CM.Cache.lastChoEgg))));
} }
if (centEgg) { if (centEgg) {
stats.appendChild(listing('Century Egg Multiplier', document.createTextNode((Math.round(CM.Cache.CentEgg * 100) / 100) + '%'))); stats.appendChild(listing('Century Egg Multiplier', document.createTextNode((Math.round((CM.Cache.CentEgg - 1) * 10000) / 100) + '%')));
} }
} }
} }
@@ -2298,6 +2304,12 @@ CM.Disp.UpdateWrinklerTooltip = function() {
if (Game.wrinklers[CM.Disp.TooltipWrinkler].type == 1) toSuck *= 3; // Shiny wrinklers if (Game.wrinklers[CM.Disp.TooltipWrinkler].type == 1) toSuck *= 3; // Shiny wrinklers
sucked *= toSuck; sucked *= toSuck;
if (Game.Has('Wrinklerspawn')) sucked *= 1.05; if (Game.Has('Wrinklerspawn')) sucked *= 1.05;
if (Game.hasGod) {
var godLvl = Game.hasGod('scorn');
if (godLvl == 1) sucked *= 1.15;
else if (godLvl == 2) sucked *= 1.1;
else if (godLvl == 3) sucked *= 1.05;
}
l('CMTooltipWrinkler').textContent = Beautify(sucked); l('CMTooltipWrinkler').textContent = Beautify(sucked);
} }
} }
@@ -2379,7 +2391,7 @@ CM.ReplaceNative = function() {
Game.CalculateGains = function() { Game.CalculateGains = function() {
CM.Backup.CalculateGains(); CM.Backup.CalculateGains();
CM.Sim.DoSims = 1; CM.Sim.DoSims = 1;
CM.Sim.Date = new Date().getTime(); CM.Sim.Date = Date.now();
} }
CM.Backup.tooltip = {}; CM.Backup.tooltip = {};
@@ -2569,11 +2581,11 @@ CM.DelayInit = function() {
Game.Win('Third-party'); Game.Win('Third-party');
} }
CM.ConfigDefault = {BotBar: 1, TimerBar: 1, TimerBarPos: 0, BuildColor: 1, BulkBuildColor: 0, UpBarColor: 1, CalcWrink: 1, CPSMode: 1, AvgCPSHist: 2, AvgClicksHist: 2, ToolWarnCautBon: 0, Flash: 1, Sound: 1, Volume: 100, GCSoundURL: 'http://freesound.org/data/previews/66/66717_931655-lq.mp3', SeaSoundURL: 'http://www.freesound.org/data/previews/121/121099_2193266-lq.mp3', GCTimer: 1, Title: 1, Favicon: 1, Tooltip: 1, TooltipAmor: 0, ToolWarnCaut: 1, ToolWarnCautPos: 1, ToolWrink: 1, Stats: 1, UpStats: 1, TimeFormat: 0, SayTime: 1, Scale: 2, StatsPref: {Lucky: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1}, Colors : {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'}}; CM.ConfigDefault = {BotBar: 1, TimerBar: 1, TimerBarPos: 0, BuildColor: 1, BulkBuildColor: 0, UpBarColor: 1, CalcWrink: 0, CPSMode: 1, AvgCPSHist: 2, AvgClicksHist: 2, ToolWarnCautBon: 0, Flash: 1, Sound: 1, Volume: 100, GCSoundURL: 'http://freesound.org/data/previews/66/66717_931655-lq.mp3', SeaSoundURL: 'http://www.freesound.org/data/previews/121/121099_2193266-lq.mp3', GCTimer: 1, Title: 1, Favicon: 1, Tooltip: 1, TooltipAmor: 0, ToolWarnCaut: 1, ToolWarnCautPos: 1, ToolWrink: 1, Stats: 1, UpStats: 1, TimeFormat: 0, SayTime: 1, Scale: 2, StatsPref: {Lucky: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1}, Colors : {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'}};
CM.ConfigPrefix = 'CMConfig'; CM.ConfigPrefix = 'CMConfig';
CM.VersionMajor = '2.002'; CM.VersionMajor = '2.0034';
CM.VersionMinor = '1'; CM.VersionMinor = '3';
/******* /*******
* Sim * * Sim *
@@ -2594,14 +2606,9 @@ 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));
if (Game.Has('Season savings')) price *= 0.99; price = Game.modifyBuildingPrice(null, price);
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;
if (Game.hasBuff('Everything must go')) price *= 0.95;
price = Math.ceil(price); price = Math.ceil(price);
moni+=price; moni += price;
start++; start++;
} }
return moni; return moni;
@@ -2628,12 +2635,7 @@ 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));
if (Game.Has('Season savings')) price *= 0.99; price = Game.modifyBuildingPrice(null, price);
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;
if (Game.hasBuff('Everything must go')) price *= 0.95;
price = Math.ceil(price); price = Math.ceil(price);
var giveBack = 0.5; var giveBack = 0.5;
if (Game.hasAura('Earth Shatterer') || emuAura) giveBack=0.85; if (Game.hasAura('Earth Shatterer') || emuAura) giveBack=0.85;
@@ -2663,7 +2665,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').join('CM.Sim')); eval('CM.Sim.GetHeavenlyMultiplier = ' + Game.GetHeavenlyMultiplier.toString().split('Game.Has').join('CM.Sim.Has').split('Game.hasAura').join('CM.Sim.hasAura'));
CM.Sim.hasAura = function(what) { CM.Sim.hasAura = function(what) {
if (Game.dragonAuras[CM.Sim.dragonAura].name == what || Game.dragonAuras[CM.Sim.dragonAura2].name == what) if (Game.dragonAuras[CM.Sim.dragonAura].name == what || Game.dragonAuras[CM.Sim.dragonAura2].name == what)
@@ -2725,6 +2727,7 @@ CM.Sim.CopyData = function() {
var me = Game.Objects[i]; var me = Game.Objects[i];
var you = CM.Sim.Objects[i]; var you = CM.Sim.Objects[i];
you.amount = me.amount; you.amount = me.amount;
you.level = me.level;
} }
// Upgrades // Upgrades
@@ -2770,11 +2773,41 @@ 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;
var buildMult=1;
if (Game.hasGod) {
var godLvl = Game.hasGod('asceticism');
if (godLvl == 1) mult *= 1.15;
else if (godLvl == 2) mult *= 1.1;
else if (godLvl == 3) mult *= 1.05;
var godLvl = Game.hasGod('ages');
if (godLvl == 1) mult *= 1 + 0.15 * Math.sin((CM.Sim.Date / 1000 / (60 * 60 * 3)) * Math.PI * 2);
else if (godLvl == 2) mult *= 1 + 0.15 * Math.sin((CM.Sim.Date / 1000 / (60 * 60 * 12)) * Math.PI*2);
else if (godLvl == 3) mult *= 1 + 0.15 * Math.sin((CM.Sim.Date / 1000 / (60 * 60 * 24)) * Math.PI*2);
var godLvl = Game.hasGod('decadence');
if (godLvl == 1) buildMult *= 0.93;
else if (godLvl == 2) buildMult *= 0.95;
else if (godLvl == 3) buildMult *= 0.98;
var godLvl = Game.hasGod('industry');
if (godLvl == 1) buildMult *= 1.1;
else if (godLvl == 2) buildMult *= 1.05;
else if (godLvl == 3) buildMult *= 1.03;
var godLvl = Game.hasGod('labor');
if (godLvl == 1) buildMult *= 0.97;
else if (godLvl == 2) buildMult *= 0.98;
else if (godLvl == 3) buildMult *= 0.99;
}
if (CM.Sim.Has('Santa\'s legacy')) mult *= 1 + (Game.santaLevel + 1) * 0.03; if (CM.Sim.Has('Santa\'s legacy')) mult *= 1 + (Game.santaLevel + 1) * 0.03;
for (var i in CM.Sim.Objects) { for (var i in CM.Sim.Objects) {
var me = CM.Sim.Objects[i]; var me = CM.Sim.Objects[i];
CM.Sim.cookiesPs += me.amount * (typeof(me.cps) == 'function' ? me.cps(me) : me.cps); var storedCps = (typeof(me.cps) == 'function' ? me.cps(me) : me.cps);
if (Game.ascensionMode != 1) storedCps *= (1 + me.level * 0.01) * buildMult;
CM.Sim.cookiesPs += me.amount * storedCps;
} }
if (CM.Sim.Has('"egg"')) CM.Sim.cookiesPs += 9; // "egg" if (CM.Sim.Has('"egg"')) CM.Sim.cookiesPs += 9; // "egg"
@@ -2782,6 +2815,12 @@ 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;
if (Game.hasGod) {
var godLvl = Game.hasGod('mother');
if (godLvl == 1) milkMult *= 1.1;
else if (godLvl == 2) milkMult *= 1.06;
else if (godLvl == 3) milkMult *= 1.03;
}
if (CM.Sim.Has('Kitten helpers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult); if (CM.Sim.Has('Kitten helpers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult);
if (CM.Sim.Has('Kitten workers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.125 * milkMult); if (CM.Sim.Has('Kitten workers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.125 * milkMult);
if (CM.Sim.Has('Kitten engineers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.15 * milkMult); if (CM.Sim.Has('Kitten engineers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.15 * milkMult);
@@ -2808,7 +2847,7 @@ CM.Sim.CalculateGains = function() {
if (CM.Sim.Has('Century egg')) { if (CM.Sim.Has('Century egg')) {
// The boost increases a little every day, with diminishing returns up to +10% on the 100th day // The boost increases a little every day, with diminishing returns up to +10% on the 100th day
var day = Math.floor((CM.Sim.Date - Game.startDate) / 1000 / 10) * 10 / 60 / 60 / 24; var day = Math.floor((CM.Sim.Date - Game.startDate) / 1000 / 10) * 10 / 60 / 60 / 24;
day = Math.min(day,100); day = Math.min(day, 100);
CM.Cache.CentEgg = 1 + (1 - Math.pow(1 - day / 100, 3)) * 0.1; CM.Cache.CentEgg = 1 + (1 - Math.pow(1 - day / 100, 3)) * 0.1;
eggMult *= CM.Cache.CentEgg; eggMult *= CM.Cache.CentEgg;
} }
@@ -2833,7 +2872,7 @@ CM.Sim.CalculateGains = function() {
if (CM.Sim.Has('Golden switch [off]')) { if (CM.Sim.Has('Golden switch [off]')) {
var goldenSwitchMult = 1.5; var goldenSwitchMult = 1.5;
if (CM.Sim.Has('Residual luck')) { if (CM.Sim.Has('Residual luck')) {
var upgrades = ['Get lucky', 'Lucky day', 'Serendipity', 'Heavenly luck', 'Lasting fortune', 'Decisive fate']; var upgrades = ['Get lucky', 'Lucky day', 'Serendipity', 'Heavenly luck', 'Lasting fortune', 'Decisive fate', 'Lucky digit', 'Lucky number', 'Lucky payout'];
for (var i in upgrades) { for (var i in upgrades) {
if (CM.Sim.Has(upgrades[i])) goldenSwitchMult += 0.1; if (CM.Sim.Has(upgrades[i])) goldenSwitchMult += 0.1;
} }
@@ -2884,11 +2923,12 @@ CM.Sim.CheckOtherAchiev = function() {
if (minAmount >= 150) CM.Sim.Win('Centennial and a half'); if (minAmount >= 150) CM.Sim.Win('Centennial and a half');
if (minAmount >= 200) CM.Sim.Win('Bicentennial'); if (minAmount >= 200) CM.Sim.Win('Bicentennial');
if (minAmount >= 250) CM.Sim.Win('Bicentennial and a half'); if (minAmount >= 250) CM.Sim.Win('Bicentennial and a half');
if (minAmount >= 300) CM.Sim.Win('Tricentennial');
if (buildingsOwned >= 100) CM.Sim.Win('Builder'); if (buildingsOwned >= 100) CM.Sim.Win('Builder');
if (buildingsOwned >= 500) CM.Sim.Win('Architect'); if (buildingsOwned >= 500) CM.Sim.Win('Architect');
if (buildingsOwned >= 1000) CM.Sim.Win('Engineer'); if (buildingsOwned >= 1000) CM.Sim.Win('Engineer');
if (buildingsOwned >= 1500) CM.Sim.Win('Lord of Constructs'); if (buildingsOwned >= 2000) CM.Sim.Win('Lord of Constructs');
if (CM.Sim.UpgradesOwned >= 20) CM.Sim.Win('Enhancer'); if (CM.Sim.UpgradesOwned >= 20) CM.Sim.Win('Enhancer');
if (CM.Sim.UpgradesOwned >= 50) CM.Sim.Win('Augmenter'); if (CM.Sim.UpgradesOwned >= 50) CM.Sim.Win('Augmenter');

View File

@@ -127,7 +127,7 @@ If the bug is still here, you can submit an issue for it.
All suggestions are welcome, even the smallest ones. All suggestions are welcome, even the smallest ones.
#Contributors # Contributors
* **[Raving_Kumquat](http://cookieclicker.wikia.com/wiki/User:Raving_Kumquat)**: Original author * **[Raving_Kumquat](http://cookieclicker.wikia.com/wiki/User:Raving_Kumquat)**: Original author
* **[Maxime Fabre](https://github.com/Anahkiasen)**: Previous maintainer * **[Maxime Fabre](https://github.com/Anahkiasen)**: Previous maintainer

View File

@@ -47,6 +47,12 @@ CM.Cache.RemakeWrinkBank = function() {
if (Game.wrinklers[i].type==1) toSuck *= 3; // Shiny wrinklers if (Game.wrinklers[i].type==1) toSuck *= 3; // Shiny wrinklers
sucked *= toSuck; sucked *= toSuck;
if (Game.Has('Wrinklerspawn')) sucked *= 1.05; if (Game.Has('Wrinklerspawn')) sucked *= 1.05;
if (Game.hasGod) {
var godLvl = Game.hasGod('scorn');
if (godLvl == 1) sucked *= 1.15;
else if (godLvl == 2) sucked *= 1.1;
else if (godLvl == 3) sucked *= 1.05;
}
totalSucked += sucked; totalSucked += sucked;
} }
CM.Cache.WrinkBank = totalSucked; CM.Cache.WrinkBank = totalSucked;
@@ -77,9 +83,9 @@ CM.Cache.RemakeUpgradePP = function() {
for (var i in CM.Cache.Upgrades) { for (var i in CM.Cache.Upgrades) {
//CM.Cache.Upgrades[i].pp = Game.Upgrades[i].getPrice() / CM.Cache.Upgrades[i].bonus; //CM.Cache.Upgrades[i].pp = Game.Upgrades[i].getPrice() / CM.Cache.Upgrades[i].bonus;
CM.Cache.Upgrades[i].pp = (Math.max(Game.Upgrades[i].getPrice() - (Game.cookies + CM.Disp.GetWrinkConfigBank()), 0) / Game.cookiesPs) + (Game.Upgrades[i].getPrice() / CM.Cache.Upgrades[i].bonus); CM.Cache.Upgrades[i].pp = (Math.max(Game.Upgrades[i].getPrice() - (Game.cookies + CM.Disp.GetWrinkConfigBank()), 0) / Game.cookiesPs) + (Game.Upgrades[i].getPrice() / CM.Cache.Upgrades[i].bonus);
if (isNaN(CM.Cache.Upgrades[i].pp)) CM.Cache.Upgrades[i].pp = 'Infinity'; if (isNaN(CM.Cache.Upgrades[i].pp)) CM.Cache.Upgrades[i].pp = Infinity;
var color = ''; var color = '';
if (CM.Cache.Upgrades[i].pp <= 0 || CM.Cache.Upgrades[i].pp == 'Infinity') color = CM.Disp.colorGray; if (CM.Cache.Upgrades[i].pp <= 0 || CM.Cache.Upgrades[i].pp == Infinity) color = CM.Disp.colorGray;
else if (CM.Cache.Upgrades[i].pp < CM.Cache.min) color = CM.Disp.colorBlue; else if (CM.Cache.Upgrades[i].pp < CM.Cache.min) color = CM.Disp.colorBlue;
else if (CM.Cache.Upgrades[i].pp == CM.Cache.min) color = CM.Disp.colorGreen; else if (CM.Cache.Upgrades[i].pp == CM.Cache.min) color = CM.Disp.colorGreen;
else if (CM.Cache.Upgrades[i].pp == CM.Cache.max) color = CM.Disp.colorRed; else if (CM.Cache.Upgrades[i].pp == CM.Cache.max) color = CM.Disp.colorRed;
@@ -95,7 +101,7 @@ CM.Cache.RemakeBuildingsOtherPP = function(amount, target) {
//CM.Cache[target][i].pp = CM.Cache[target][i].price / CM.Cache[target][i].bonus; //CM.Cache[target][i].pp = CM.Cache[target][i].price / CM.Cache[target][i].bonus;
CM.Cache[target][i].pp = (Math.max(CM.Cache[target][i].price - (Game.cookies + CM.Disp.GetWrinkConfigBank()), 0) / Game.cookiesPs) + (CM.Cache[target][i].price / CM.Cache[target][i].bonus); CM.Cache[target][i].pp = (Math.max(CM.Cache[target][i].price - (Game.cookies + CM.Disp.GetWrinkConfigBank()), 0) / Game.cookiesPs) + (CM.Cache[target][i].price / CM.Cache[target][i].bonus);
var color = ''; var color = '';
if (CM.Cache[target][i].pp <= 0 || CM.Cache[target][i].pp == 'Infinity') color = CM.Disp.colorGray; if (CM.Cache[target][i].pp <= 0 || CM.Cache[target][i].pp == Infinity) color = CM.Disp.colorGray;
else if (CM.Cache[target][i].pp < CM.Cache.min) color = CM.Disp.colorBlue; else if (CM.Cache[target][i].pp < CM.Cache.min) color = CM.Disp.colorBlue;
else if (CM.Cache[target][i].pp == CM.Cache.min) color = CM.Disp.colorGreen; else if (CM.Cache[target][i].pp == CM.Cache.min) color = CM.Disp.colorGreen;
else if (CM.Cache[target][i].pp == CM.Cache.max) color = CM.Disp.colorRed; else if (CM.Cache[target][i].pp == CM.Cache.max) color = CM.Disp.colorRed;

View File

@@ -3,7 +3,7 @@
********/ ********/
CM.Disp.FormatTime = function(time, format) { CM.Disp.FormatTime = function(time, format) {
if (time == 'Infinity') return time; if (time == Infinity) return time;
if (CM.Config.TimeFormat) { if (CM.Config.TimeFormat) {
if (time > 3155760000) return 'XX:XX:XX:XX:XX'; if (time > 3155760000) return 'XX:XX:XX:XX:XX';
time = Math.ceil(time); time = Math.ceil(time);
@@ -1403,7 +1403,7 @@ CM.Disp.AddMenuStats = function(title) {
stats.appendChild(listing(listingQuest('Chocolate Egg Cookies', 'ChoEggTooltipPlaceholder'), document.createTextNode(Beautify(CM.Cache.lastChoEgg)))); stats.appendChild(listing(listingQuest('Chocolate Egg Cookies', 'ChoEggTooltipPlaceholder'), document.createTextNode(Beautify(CM.Cache.lastChoEgg))));
} }
if (centEgg) { if (centEgg) {
stats.appendChild(listing('Century Egg Multiplier', document.createTextNode((Math.round(CM.Cache.CentEgg * 100) / 100) + '%'))); stats.appendChild(listing('Century Egg Multiplier', document.createTextNode((Math.round((CM.Cache.CentEgg - 1) * 10000) / 100) + '%')));
} }
} }
} }
@@ -1792,6 +1792,12 @@ CM.Disp.UpdateWrinklerTooltip = function() {
if (Game.wrinklers[CM.Disp.TooltipWrinkler].type == 1) toSuck *= 3; // Shiny wrinklers if (Game.wrinklers[CM.Disp.TooltipWrinkler].type == 1) toSuck *= 3; // Shiny wrinklers
sucked *= toSuck; sucked *= toSuck;
if (Game.Has('Wrinklerspawn')) sucked *= 1.05; if (Game.Has('Wrinklerspawn')) sucked *= 1.05;
if (Game.hasGod) {
var godLvl = Game.hasGod('scorn');
if (godLvl == 1) sucked *= 1.15;
else if (godLvl == 2) sucked *= 1.1;
else if (godLvl == 3) sucked *= 1.05;
}
l('CMTooltipWrinkler').textContent = Beautify(sucked); l('CMTooltipWrinkler').textContent = Beautify(sucked);
} }
} }

View File

@@ -10,7 +10,7 @@ CM.ReplaceNative = function() {
Game.CalculateGains = function() { Game.CalculateGains = function() {
CM.Backup.CalculateGains(); CM.Backup.CalculateGains();
CM.Sim.DoSims = 1; CM.Sim.DoSims = 1;
CM.Sim.Date = new Date().getTime(); CM.Sim.Date = Date.now();
} }
CM.Backup.tooltip = {}; CM.Backup.tooltip = {};
@@ -200,9 +200,9 @@ CM.DelayInit = function() {
Game.Win('Third-party'); Game.Win('Third-party');
} }
CM.ConfigDefault = {BotBar: 1, TimerBar: 1, TimerBarPos: 0, BuildColor: 1, BulkBuildColor: 0, UpBarColor: 1, CalcWrink: 1, CPSMode: 1, AvgCPSHist: 2, AvgClicksHist: 2, ToolWarnCautBon: 0, Flash: 1, Sound: 1, Volume: 100, GCSoundURL: 'http://freesound.org/data/previews/66/66717_931655-lq.mp3', SeaSoundURL: 'http://www.freesound.org/data/previews/121/121099_2193266-lq.mp3', GCTimer: 1, Title: 1, Favicon: 1, Tooltip: 1, TooltipAmor: 0, ToolWarnCaut: 1, ToolWarnCautPos: 1, ToolWrink: 1, Stats: 1, UpStats: 1, TimeFormat: 0, SayTime: 1, Scale: 2, StatsPref: {Lucky: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1}, Colors : {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'}}; CM.ConfigDefault = {BotBar: 1, TimerBar: 1, TimerBarPos: 0, BuildColor: 1, BulkBuildColor: 0, UpBarColor: 1, CalcWrink: 0, CPSMode: 1, AvgCPSHist: 2, AvgClicksHist: 2, ToolWarnCautBon: 0, Flash: 1, Sound: 1, Volume: 100, GCSoundURL: 'http://freesound.org/data/previews/66/66717_931655-lq.mp3', SeaSoundURL: 'http://www.freesound.org/data/previews/121/121099_2193266-lq.mp3', GCTimer: 1, Title: 1, Favicon: 1, Tooltip: 1, TooltipAmor: 0, ToolWarnCaut: 1, ToolWarnCautPos: 1, ToolWrink: 1, Stats: 1, UpStats: 1, TimeFormat: 0, SayTime: 1, Scale: 2, StatsPref: {Lucky: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1}, Colors : {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'}};
CM.ConfigPrefix = 'CMConfig'; CM.ConfigPrefix = 'CMConfig';
CM.VersionMajor = '2.002'; CM.VersionMajor = '2.0034';
CM.VersionMinor = '1'; CM.VersionMinor = '3';

View File

@@ -17,14 +17,9 @@ 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));
if (Game.Has('Season savings')) price *= 0.99; price = Game.modifyBuildingPrice(null, price);
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;
if (Game.hasBuff('Everything must go')) price *= 0.95;
price = Math.ceil(price); price = Math.ceil(price);
moni+=price; moni += price;
start++; start++;
} }
return moni; return moni;
@@ -51,12 +46,7 @@ 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));
if (Game.Has('Season savings')) price *= 0.99; price = Game.modifyBuildingPrice(null, price);
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;
if (Game.hasBuff('Everything must go')) price *= 0.95;
price = Math.ceil(price); price = Math.ceil(price);
var giveBack = 0.5; var giveBack = 0.5;
if (Game.hasAura('Earth Shatterer') || emuAura) giveBack=0.85; if (Game.hasAura('Earth Shatterer') || emuAura) giveBack=0.85;
@@ -86,7 +76,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').join('CM.Sim')); eval('CM.Sim.GetHeavenlyMultiplier = ' + Game.GetHeavenlyMultiplier.toString().split('Game.Has').join('CM.Sim.Has').split('Game.hasAura').join('CM.Sim.hasAura'));
CM.Sim.hasAura = function(what) { CM.Sim.hasAura = function(what) {
if (Game.dragonAuras[CM.Sim.dragonAura].name == what || Game.dragonAuras[CM.Sim.dragonAura2].name == what) if (Game.dragonAuras[CM.Sim.dragonAura].name == what || Game.dragonAuras[CM.Sim.dragonAura2].name == what)
@@ -148,6 +138,7 @@ CM.Sim.CopyData = function() {
var me = Game.Objects[i]; var me = Game.Objects[i];
var you = CM.Sim.Objects[i]; var you = CM.Sim.Objects[i];
you.amount = me.amount; you.amount = me.amount;
you.level = me.level;
} }
// Upgrades // Upgrades
@@ -193,11 +184,41 @@ 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;
var buildMult=1;
if (Game.hasGod) {
var godLvl = Game.hasGod('asceticism');
if (godLvl == 1) mult *= 1.15;
else if (godLvl == 2) mult *= 1.1;
else if (godLvl == 3) mult *= 1.05;
var godLvl = Game.hasGod('ages');
if (godLvl == 1) mult *= 1 + 0.15 * Math.sin((CM.Sim.Date / 1000 / (60 * 60 * 3)) * Math.PI * 2);
else if (godLvl == 2) mult *= 1 + 0.15 * Math.sin((CM.Sim.Date / 1000 / (60 * 60 * 12)) * Math.PI*2);
else if (godLvl == 3) mult *= 1 + 0.15 * Math.sin((CM.Sim.Date / 1000 / (60 * 60 * 24)) * Math.PI*2);
var godLvl = Game.hasGod('decadence');
if (godLvl == 1) buildMult *= 0.93;
else if (godLvl == 2) buildMult *= 0.95;
else if (godLvl == 3) buildMult *= 0.98;
var godLvl = Game.hasGod('industry');
if (godLvl == 1) buildMult *= 1.1;
else if (godLvl == 2) buildMult *= 1.05;
else if (godLvl == 3) buildMult *= 1.03;
var godLvl = Game.hasGod('labor');
if (godLvl == 1) buildMult *= 0.97;
else if (godLvl == 2) buildMult *= 0.98;
else if (godLvl == 3) buildMult *= 0.99;
}
if (CM.Sim.Has('Santa\'s legacy')) mult *= 1 + (Game.santaLevel + 1) * 0.03; if (CM.Sim.Has('Santa\'s legacy')) mult *= 1 + (Game.santaLevel + 1) * 0.03;
for (var i in CM.Sim.Objects) { for (var i in CM.Sim.Objects) {
var me = CM.Sim.Objects[i]; var me = CM.Sim.Objects[i];
CM.Sim.cookiesPs += me.amount * (typeof(me.cps) == 'function' ? me.cps(me) : me.cps); var storedCps = (typeof(me.cps) == 'function' ? me.cps(me) : me.cps);
if (Game.ascensionMode != 1) storedCps *= (1 + me.level * 0.01) * buildMult;
CM.Sim.cookiesPs += me.amount * storedCps;
} }
if (CM.Sim.Has('"egg"')) CM.Sim.cookiesPs += 9; // "egg" if (CM.Sim.Has('"egg"')) CM.Sim.cookiesPs += 9; // "egg"
@@ -205,6 +226,12 @@ 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;
if (Game.hasGod) {
var godLvl = Game.hasGod('mother');
if (godLvl == 1) milkMult *= 1.1;
else if (godLvl == 2) milkMult *= 1.06;
else if (godLvl == 3) milkMult *= 1.03;
}
if (CM.Sim.Has('Kitten helpers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult); if (CM.Sim.Has('Kitten helpers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult);
if (CM.Sim.Has('Kitten workers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.125 * milkMult); if (CM.Sim.Has('Kitten workers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.125 * milkMult);
if (CM.Sim.Has('Kitten engineers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.15 * milkMult); if (CM.Sim.Has('Kitten engineers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.15 * milkMult);
@@ -231,7 +258,7 @@ CM.Sim.CalculateGains = function() {
if (CM.Sim.Has('Century egg')) { if (CM.Sim.Has('Century egg')) {
// The boost increases a little every day, with diminishing returns up to +10% on the 100th day // The boost increases a little every day, with diminishing returns up to +10% on the 100th day
var day = Math.floor((CM.Sim.Date - Game.startDate) / 1000 / 10) * 10 / 60 / 60 / 24; var day = Math.floor((CM.Sim.Date - Game.startDate) / 1000 / 10) * 10 / 60 / 60 / 24;
day = Math.min(day,100); day = Math.min(day, 100);
CM.Cache.CentEgg = 1 + (1 - Math.pow(1 - day / 100, 3)) * 0.1; CM.Cache.CentEgg = 1 + (1 - Math.pow(1 - day / 100, 3)) * 0.1;
eggMult *= CM.Cache.CentEgg; eggMult *= CM.Cache.CentEgg;
} }
@@ -256,7 +283,7 @@ CM.Sim.CalculateGains = function() {
if (CM.Sim.Has('Golden switch [off]')) { if (CM.Sim.Has('Golden switch [off]')) {
var goldenSwitchMult = 1.5; var goldenSwitchMult = 1.5;
if (CM.Sim.Has('Residual luck')) { if (CM.Sim.Has('Residual luck')) {
var upgrades = ['Get lucky', 'Lucky day', 'Serendipity', 'Heavenly luck', 'Lasting fortune', 'Decisive fate']; var upgrades = ['Get lucky', 'Lucky day', 'Serendipity', 'Heavenly luck', 'Lasting fortune', 'Decisive fate', 'Lucky digit', 'Lucky number', 'Lucky payout'];
for (var i in upgrades) { for (var i in upgrades) {
if (CM.Sim.Has(upgrades[i])) goldenSwitchMult += 0.1; if (CM.Sim.Has(upgrades[i])) goldenSwitchMult += 0.1;
} }
@@ -307,11 +334,12 @@ CM.Sim.CheckOtherAchiev = function() {
if (minAmount >= 150) CM.Sim.Win('Centennial and a half'); if (minAmount >= 150) CM.Sim.Win('Centennial and a half');
if (minAmount >= 200) CM.Sim.Win('Bicentennial'); if (minAmount >= 200) CM.Sim.Win('Bicentennial');
if (minAmount >= 250) CM.Sim.Win('Bicentennial and a half'); if (minAmount >= 250) CM.Sim.Win('Bicentennial and a half');
if (minAmount >= 300) CM.Sim.Win('Tricentennial');
if (buildingsOwned >= 100) CM.Sim.Win('Builder'); if (buildingsOwned >= 100) CM.Sim.Win('Builder');
if (buildingsOwned >= 500) CM.Sim.Win('Architect'); if (buildingsOwned >= 500) CM.Sim.Win('Architect');
if (buildingsOwned >= 1000) CM.Sim.Win('Engineer'); if (buildingsOwned >= 1000) CM.Sim.Win('Engineer');
if (buildingsOwned >= 1500) CM.Sim.Win('Lord of Constructs'); if (buildingsOwned >= 2000) CM.Sim.Win('Lord of Constructs');
if (CM.Sim.UpgradesOwned >= 20) CM.Sim.Win('Enhancer'); if (CM.Sim.UpgradesOwned >= 20) CM.Sim.Win('Enhancer');
if (CM.Sim.UpgradesOwned >= 50) CM.Sim.Win('Augmenter'); if (CM.Sim.UpgradesOwned >= 50) CM.Sim.Win('Augmenter');