diff --git a/CookieMonsterBeta.js b/CookieMonsterBeta.js index b320937..7c4a6fe 100644 --- a/CookieMonsterBeta.js +++ b/CookieMonsterBeta.js @@ -201,7 +201,10 @@ CM.Cache.RemakeChain = function() { CM.Cache.RemakeSeaSpec = function() { if (Game.season == 'christmas') { - CM.Cache.SeaSpec = Math.max(25, Game.cookiesPs * 60 * 1); + var val = Game.cookiesPs * 60; + if (Game.hasBuff('Elder frenzy')) val *= 0.5; // very sorry + if (Game.hasBuff('Frenzy')) val *= 0.75; // I sincerely apologize + CM.Cache.SeaSpec = Math.max(25, val); if (Game.Has('Ho ho ho-flavored frosting')) CM.Cache.SeaSpec *= 2; } } @@ -2532,7 +2535,7 @@ CM.DelayInit = function() { 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, 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.VersionMajor = '2.001'; +CM.VersionMajor = '2.002'; CM.VersionMinor = '1'; /******* @@ -2638,12 +2641,8 @@ eval('CM.Sim.getGrandmaSynergyUpgradeMultiplier = ' + Game.getGrandmaSynergyUpgr CM.Sim.getCPSBuffMult = function() { var mult = 1; - var buffs = ['Frenzy', 'Elder frenzy', 'Clot', 'Dragon Harvest']; - for (var i in Game.goldenCookieBuildingBuffs) { - buffs.push(Game.goldenCookieBuildingBuffs[i][0], Game.goldenCookieBuildingBuffs[i][1]); - } - for (var i in buffs) { - if (Game.hasBuff(buffs[i]) && Game.buffs[buffs[i]].power) mult *= Game.buffs[buffs[i]].power; + for (var i in Game.buffs) { + if (typeof Game.buffs[i].multCpS != 'undefined') mult *= Game.buffs[i].multCpS; } return mult; } @@ -2714,10 +2713,10 @@ CM.Sim.CalculateGains = function() { if (Game.ascensionMode != 1) mult += parseFloat(CM.Sim.prestige) * 0.01 * CM.Sim.heavenlyPower * CM.Sim.GetHeavenlyMultiplier(); 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); + for (var i in Game.cookieUpgrades) { + var me = Game.cookieUpgrades[i]; + if (CM.Sim.Has(me.name)) { + mult *= (1 + (typeof(me.power) == 'function' ? me.power(me) : me.power) * 0.01); } } @@ -2756,27 +2755,27 @@ CM.Sim.CalculateGains = function() { 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; - if (CM.Sim.Has('Chicken egg')) eggMult++; - if (CM.Sim.Has('Duck egg')) eggMult++; - if (CM.Sim.Has('Turkey egg')) eggMult++; - if (CM.Sim.Has('Quail egg')) eggMult++; - if (CM.Sim.Has('Robin egg')) eggMult++; - if (CM.Sim.Has('Ostrich egg')) eggMult++; - if (CM.Sim.Has('Cassowary egg')) eggMult++; - if (CM.Sim.Has('Salmon roe')) eggMult++; - if (CM.Sim.Has('Frogspawn')) eggMult++; - if (CM.Sim.Has('Shark egg')) eggMult++; - if (CM.Sim.Has('Turtle egg')) eggMult++; - if (CM.Sim.Has('Ant larva')) eggMult++; + var eggMult = 1; + if (CM.Sim.Has('Chicken egg')) eggMult *= 1.01; + if (CM.Sim.Has('Duck egg')) eggMult *= 1.01; + if (CM.Sim.Has('Turkey egg')) eggMult *= 1.01; + if (CM.Sim.Has('Quail egg')) eggMult *= 1.01; + if (CM.Sim.Has('Robin egg')) eggMult *= 1.01; + if (CM.Sim.Has('Ostrich egg')) eggMult *= 1.01; + if (CM.Sim.Has('Cassowary egg')) eggMult *= 1.01; + if (CM.Sim.Has('Salmon roe')) eggMult *= 1.01; + if (CM.Sim.Has('Frogspawn')) eggMult *= 1.01; + if (CM.Sim.Has('Shark egg')) eggMult *= 1.01; + if (CM.Sim.Has('Turtle egg')) eggMult *= 1.01; + if (CM.Sim.Has('Ant larva')) eggMult *= 1.01; if (CM.Sim.Has('Century egg')) { // 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; day = Math.min(day,100); - CM.Cache.CentEgg = (1 - Math.pow(1 - day / 100, 3)) * 10; - eggMult += CM.Cache.CentEgg; + CM.Cache.CentEgg = 1 + (1 - Math.pow(1 - day / 100, 3)) * 0.1; + eggMult *= CM.Cache.CentEgg; } - mult *= (1 + 0.01 * eggMult); + mult *= eggMult; if (CM.Sim.hasAura('Radiant Appetite')) mult *= 2; @@ -2807,7 +2806,8 @@ CM.Sim.CalculateGains = function() { CM.Sim.cookiesPs *= mult; - if (Game.hasBuff('Cursed finger')) Game.cookiesPs = 0; + // TODO remove? + // if (Game.hasBuff('Cursed finger')) Game.cookiesPs = 0; }; CM.Sim.CheckOtherAchiev = function() {