From 6d2656e9c61e8e39a97e5c602318c707a8073bb7 Mon Sep 17 00:00:00 2001 From: Trixter9994 Date: Mon, 20 Sep 2021 12:15:14 -0400 Subject: [PATCH] v2.021 beta --- main.js | 3555 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 2238 insertions(+), 1317 deletions(-) diff --git a/main.js b/main.js index 574c66d..ff3fe7e 100644 --- a/main.js +++ b/main.js @@ -11410,1364 +11410,2285 @@ Game.Launch=function() { var x=me.x+(Math.sin(me.r*Math.PI/180)*90); var y=me.y+(Math.cos(me.r*Math.PI/180)*90); - for (vradeCookie({name:'Stroopwafels',desc:'If it ain\'t dutch, it ain\'t much.',icon:[3,4],power: 2, price: 9999999999999}); - Game.NewUpgradeCookie({name:'Macaroons',desc:'Not to be confused with macarons.
These have coconut, okay?',icon:[4,4],power: 2, price: 9999999999999*5}); - - order=40000; - new Game.Upgrade('Neuromancy','Can toggle upgrades on and off at will in the stats menu.Can also come in handy to unsee things that can\'t be unseen.',7,[4,9]);//debug purposes only - Game.last.pool='debug'; - - order=10020; - Game.NewUpgradeCookie({name:'Empire biscuits',desc:'For your growing cookie empire, of course!',icon:[5,4],power: 2, price: 99999999999999}); - order=10031; - Game.NewUpgradeCookie({name:'British tea biscuits',desc:'Quite.',icon:[6,4],require:'Tin of british tea biscuits',power: 2, price: 99999999999999}); - Game.NewUpgradeCookie({name:'Chocolate british tea biscuits',desc:'Yes, quite.',icon:[7,4],require:Game.last.name,power: 2, price: 99999999999999}); - Game.NewUpgradeCookie({name:'Round british tea biscuits',desc:'Yes, quite riveting.',icon:[8,4],require:Game.last.name,power: 2, price: 99999999999999}); - Game.NewUpgradeCookie({name:'Round chocolate british tea biscuits',desc:'Yes, quite riveting indeed.',icon:[9,4],require:Game.last.name,power: 2, price: 99999999999999}); - Game.NewUpgradeCookie({name:'Round british tea biscuits with heart motif',desc:'Yes, quite riveting indeed, old chap.',icon:[10,4],require:Game.last.name,power: 2, price: 99999999999999}); - Game.NewUpgradeCookie({name:'Round chocolate british tea biscuits with heart motif',desc:'I like cookies.',icon:[11,4],require:Game.last.name,power: 2, price: 99999999999999}); - - order=1000; - new Game.TieredUpgrade('Sugar bosons','Antimatter condensers are twice as efficient.Sweet firm bosons.','Antimatter condenser',1); - new Game.TieredUpgrade('String theory','Antimatter condensers are twice as efficient.Reveals new insight about the true meaning of baking cookies (and, as a bonus, the structure of the universe).','Antimatter condenser',2); - new Game.TieredUpgrade('Large macaron collider','Antimatter condensers are twice as efficient.How singular!','Antimatter condenser',3); - new Game.TieredUpgrade('Big bang bake','Antimatter condensers are twice as efficient.And that\'s how it all began.','Antimatter condenser',4); - - order=255; - Game.GrandmaSynergy('Antigrandmas','A mean antigrandma to vomit more cookies.','Antimatter condenser'); - - order=10020; - Game.NewUpgradeCookie({name:'Madeleines',desc:'Unforgettable!',icon:[12,3],power: 2, price: 99999999999999*5}); - Game.NewUpgradeCookie({name:'Palmiers',desc:'Palmier than you!',icon:[13,3],power: 2, price: 99999999999999*5}); - Game.NewUpgradeCookie({name:'Palets',desc:'You could probably play hockey with these.
I mean, you\'re welcome to try.',icon:[12,4],power: 2, price: 999999999999999}); - Game.NewUpgradeCookie({name:'Sablés',desc:'The name implies they\'re made of sand. But you know better, don\'t you?',icon:[13,4],power: 2, price: 999999999999999}); - - order=20000; - new Game.Upgrade('Kitten overseers','You gain more CpS the more milk you have.my purrpose is to serve you, sir',90000000000000000,Game.GetIcon('Kitten',4));Game.last.kitten=1;Game.MakeTiered(Game.last,4,18); - - - order=100; - new Game.Upgrade('Sextillion fingers','Multiplies the gain from Thousand fingers by 20.sometimes
things just
click
',10000000000000000,[0,19]);Game.MakeTiered(Game.last,10,0); - - order=200;new Game.TieredUpgrade('Double-thick glasses','Grandmas are twice as efficient.Oh... so THAT\'s what I\'ve been baking.','Grandma',5); - order=300;new Game.TieredUpgrade('Gingerbread scarecrows','Farms are twice as efficient.Staring at your crops with mischievous glee.','Farm',5); - order=500;new Game.TieredUpgrade('Recombobulators','Factories are twice as efficient.A major part of cookie recombobulation.','Factory',5); - order=400;new Game.TieredUpgrade('H-bomb mining','Mines are twice as efficient.Questionable efficiency, but spectacular nonetheless.','Mine',5); - order=600;new Game.TieredUpgrade('Chocolate monoliths','Shipments are twice as efficient.My god. It\'s full of chocolate bars.','Shipment',5); - order=700;new Game.TieredUpgrade('Aqua crustulae','Alchemy labs are twice as efficient.Careful with the dosing - one drop too much and you get muffins.
And nobody likes muffins.
','Alchemy lab',5); - order=800;new Game.TieredUpgrade('Brane transplant','Portals are twice as efficient.This refers to the practice of merging higher dimensional universes, or "branes", with our own, in order to facilitate transit (and harvesting of precious cookie dough).','Portal',5); - order=900;new Game.TieredUpgrade('Yestermorrow comparators','Time machines are twice as efficient.Fortnights into milleniums.','Time machine',5); - order=1000;new Game.TieredUpgrade('Reverse cyclotrons','Antimatter condensers are twice as efficient.These can uncollision particles and unspin atoms. For... uh... better flavor, and stuff.','Antimatter condenser',5); - - order=150; - new Game.Upgrade('Unobtainium mouse','Clicking gains +1% of your CpS.These nice mice should suffice.',5000000000000,[11,14]);Game.MakeTiered(Game.last,5,11); - - order=10030; - Game.NewUpgradeCookie({name:'Caramoas',desc:'Yeah. That\'s got a nice ring to it.',icon:[14,4],require:'Box of brand biscuits',power: 3, price: 9999999999999999}); - Game.NewUpgradeCookie({name:'Sagalongs',desc:'Grandma\'s favorite?',icon:[15,3],require:'Box of brand biscuits',power: 3, price: 9999999999999999}); - Game.NewUpgradeCookie({name:'Shortfoils',desc:'Foiled again!',icon:[15,4],require:'Box of brand biscuits',power: 3, price: 9999999999999999}); - Game.NewUpgradeCookie({name:'Win mints',desc:'They\'re the luckiest cookies you\'ve ever tasted!',icon:[14,3],require:'Box of brand biscuits',power: 3, price: 9999999999999999}); - - order=40000; - new Game.Upgrade('Perfect idling','You keep producing cookies even while the game is closed.It\'s the most beautiful thing I\'ve ever seen.',7,[10,0]);//debug purposes only - Game.last.pool='debug'; - - order=10030; - Game.NewUpgradeCookie({name:'Fig gluttons',desc:'Got it all figured out.',icon:[17,4],require:'Box of brand biscuits',power: 2, price: 999999999999999*5}); - Game.NewUpgradeCookie({name:'Loreols',desc:'Because, uh... they\'re worth it?',icon:[16,3],require:'Box of brand biscuits',power: 2, price: 999999999999999*5}); - Game.NewUpgradeCookie({name:'Jaffa cakes',desc:'If you want to bake a cookie from scratch, you must first build a factory.',icon:[17,3],require:'Box of brand biscuits',power: 2, price: 999999999999999*5}); - Game.NewUpgradeCookie({name:'Grease\'s cups',desc:'Extra-greasy peanut butter.',icon:[16,4],require:'Box of brand biscuits',power: 2, price: 999999999999999*5}); - - order=30000; - new Game.Upgrade('Heavenly chip secret','Unlocks 5% of the potential of your prestige level.Grants the knowledge of heavenly chips, and how to use them to make baking more efficient.
It\'s a secret to everyone.
',11,[19,7]);Game.last.noPerm=1; - new Game.Upgrade('Heavenly cookie stand','Unlocks 25% of the potential of your prestige level.Don\'t forget to visit the heavenly lemonade stand afterwards. When afterlife gives you lemons...',1111,[18,7]);Game.last.noPerm=1; - new Game.Upgrade('Heavenly bakery','Unlocks 50% of the potential of your prestige level.Also sells godly cakes and divine pastries. The pretzels aren\'t too bad either.',111111,[17,7]);Game.last.noPerm=1; - new Game.Upgrade('Heavenly confectionery','Unlocks 75% of the potential of your prestige level.They say angel bakers work there. They take angel lunch breaks and sometimes go on angel strikes.',11111111,[16,7]);Game.last.noPerm=1; - new Game.Upgrade('Heavenly key','Unlocks 100% of the potential of your prestige level.This is the key to the pearly (and tasty) gates of pastry heaven, granting you access to your entire stockpile of heavenly chips for baking purposes.
May you use them wisely.
',1111111111,[15,7]);Game.last.noPerm=1; - - order=10100; - Game.NewUpgradeCookie({name:'Skull cookies',desc:'Wanna know something spooky? You\'ve got one of these inside your head RIGHT NOW.',locked:1,icon:[12,8],power: 2, price: 444444444444}); - Game.NewUpgradeCookie({name:'Ghost cookies',desc:'They\'re something strange, but they look pretty good!',locked:1,icon:[13,8],power: 2, price: 444444444444}); - Game.NewUpgradeCookie({name:'Bat cookies',desc:'The cookies this town deserves.',locked:1,icon:[14,8],power: 2, price: 444444444444}); - Game.NewUpgradeCookie({name:'Slime cookies',desc:'The incredible melting cookies!',locked:1,icon:[15,8],power: 2, price: 444444444444}); - Game.NewUpgradeCookie({name:'Pumpkin cookies',desc:'Not even pumpkin-flavored. Tastes like glazing. Yeugh.',locked:1,icon:[16,8],power: 2, price: 444444444444}); - Game.NewUpgradeCookie({name:'Eyeball cookies',desc:'When you stare into the cookie, the cookie stares back at you.',locked:1,icon:[17,8],power: 2, price: 444444444444}); - Game.NewUpgradeCookie({name:'Spider cookies',desc:'You found the recipe on the web. They do whatever a cookie can.',locked:1,icon:[18,8],power: 2, price: 444444444444}); - - Game.halloweenDrops=['Skull cookies','Ghost cookies','Bat cookies','Slime cookies','Pumpkin cookies','Eyeball cookies','Spider cookies']; - - Game.GetHowManyHalloweenDrops=function() - { - var num=0; - for (var i in Game.halloweenDrops) {if (Game.Has(Game.halloweenDrops[i])) num++;} - return num; - } - /*for (var i in Game.halloweenDrops) - { - Game.Upgrades[Game.halloweenDrops[i]].descFunc=function(){return '
You currently own '+Game.GetHowManyHalloweenDrops()+'/'+Game.halloweenDrops.length+' halloween cookies.
'+this.desc;}; - }*/ - - order=0; - new Game.Upgrade('Persistent memory','Subsequent research will be 10 times as fast.It\'s all making sense!
Again!
',500,[9,2]);Game.last.pool='prestige'; - - order=40000; - new Game.Upgrade('Wrinkler doormat','Wrinklers spawn much more frequently.You\'re such a pushover.',7,[19,8]);//debug purposes only - Game.last.pool='debug'; - - order=10200; - Game.NewUpgradeCookie({name:'Christmas tree biscuits',desc:'Whose pine is it anyway?',locked:1,icon:[12,10],power:2,price: 252525252525}); - Game.NewUpgradeCookie({name:'Snowflake biscuits',desc:'Mass-produced to be unique in every way.',locked:1,icon:[13,10],power:2,price: 252525252525}); - Game.NewUpgradeCookie({name:'Snowman biscuits',desc:'It\'s frosted. Doubly so.',locked:1,icon:[14,10],power:2,price: 252525252525}); - Game.NewUpgradeCookie({name:'Holly biscuits',desc:'You don\'t smooch under these ones. That would be the mistletoe (which, botanically, is a smellier variant of the mistlefinger).',locked:1,icon:[15,10],power:2,price: 252525252525}); - Game.NewUpgradeCookie({name:'Candy cane biscuits',desc:'It\'s two treats in one!
(Further inspection reveals the frosting does not actually taste like peppermint, but like mundane sugary frosting.)',locked:1,icon:[16,10],power:2,price: 252525252525}); - Game.NewUpgradeCookie({name:'Bell biscuits',desc:'What do these even have to do with christmas? Who cares, ring them in!',locked:1,icon:[17,10],power:2,price: 252525252525}); - Game.NewUpgradeCookie({name:'Present biscuits',desc:'The prequel to future biscuits. Watch out!',locked:1,icon:[18,10],power:2,price: 252525252525}); - - order=10020; - Game.NewUpgradeCookie({name:'Gingerbread men',desc:'You like to bite the legs off first, right? How about tearing off the arms? You sick monster.',icon:[18,4],power: 2,price: 9999999999999999}); - Game.NewUpgradeCookie({name:'Gingerbread trees',desc:'Evergreens in pastry form. Yule be surprised what you can come up with.',icon:[18,3],power: 2,price: 9999999999999999}); - - order=25000; - new Game.Upgrade('A festive hat','Unlocks... something.Not a creature was stirring, not even a mouse.',25,[19,9],function() - { - var drop=choose(Game.santaDrops); - Game.Unlock(drop); - if (Game.prefs.popups) Game.Popup('In the festive hat, you find...
a festive test tube
and '+drop+'.'); - else Game.Notify('In the festive hat, you find...','a festive test tube
and '+drop+'.',Game.Upgrades[drop].icon); - }); - - new Game.Upgrade('Increased merriness','Cookie production multiplier +15%.
Cost scales with Santa level.It turns out that the key to increased merriness, strangely enough, happens to be a good campfire and some s\'mores.
You know what they say, after all; the s\'more, the merrier.
',2525,[17,9]); - new Game.Upgrade('Improved jolliness','Cookie production multiplier +15%.
Cost scales with Santa level.A nice wobbly belly goes a long way.
You jolly?
',2525,[17,9]); - new Game.Upgrade('A lump of coal','Cookie production multiplier +1%.
Cost scales with Santa level.Some of the world\'s worst stocking stuffing.
I guess you could try starting your own little industrial revolution, or something?...
',2525,[13,9]); - new Game.Upgrade('An itchy sweater','Cookie production multiplier +1%.
Cost scales with Santa level.You don\'t know what\'s worse : the embarrassingly quaint "elf on reindeer" motif, or the fact that wearing it makes you feel like you\'re wrapped in a dead sasquatch.',2525,[14,9]); - new Game.Upgrade('Reindeer baking grounds','Reindeer appear twice as frequently.
Cost scales with Santa level.Male reindeer are from Mars; female reindeer are from venison.',2525,[12,9]); - new Game.Upgrade('Weighted sleighs','Reindeer are twice as slow.
Cost scales with Santa level.Hope it was worth the weight.
(Something something forced into cervidude)
',2525,[12,9]); - new Game.Upgrade('Ho ho ho-flavored frosting','Reindeer give twice as much.
Cost scales with Santa level.It\'s time to up the antler.',2525,[12,9]); - new Game.Upgrade('Season savings','All buildings are 1% cheaper.
Cost scales with Santa level.By Santa\'s beard, what savings!
But who will save us?
',2525,[16,9],function(){Game.storeToRefresh=1;}); - new Game.Upgrade('Toy workshop','All upgrades are 5% cheaper.
Cost scales with Santa level.Watch yours-elf around elvesdroppers who might steal our production secrets.
Or elven worse!
',2525,[16,9],function(){Game.upgradesToRebuild=1;}); - new Game.Upgrade('Naughty list','Grandmas are twice as productive.
Cost scales with Santa level.This list contains every unholy deed perpetuated by grandmakind.
He won\'t be checking this one twice.
Once. Once is enough.
',2525,[15,9]); - new Game.Upgrade('Santa\'s bottomless bag','Random drops are 10% more common.
Cost scales with Santa level.This is one bottom you can\'t check out.',2525,[19,9]); - new Game.Upgrade('Santa\'s helpers','Clicking is 10% more powerful.
Cost scales with Santa level.Some choose to help hamburger; some choose to help you.
To each their own, I guess.
',2525,[19,9]); - new Game.Upgrade('Santa\'s legacy','Cookie production multiplier +3% per Santa\'s levels.
Cost scales with Santa level.In the north pole, you gotta get the elves first. Then when you get the elves, you start making the toys. Then when you get the toys... then you get the cookies.',2525,[19,9]); - new Game.Upgrade('Santa\'s milk and cookies','Milk is 5% more powerful.
Cost scales with Santa level.Part of Santa\'s dreadfully unbalanced diet.',2525,[19,9]); - - order=40000; - new Game.Upgrade('Reindeer season','Reindeer spawn much more frequently.Go, Cheater! Go, Hacker and Faker!',7,[12,9]);//debug purposes only - Game.last.pool='debug'; - - order=25000; - new Game.Upgrade('Santa\'s dominion','Cookie production multiplier +20%.
All buildings are 1% cheaper.
All upgrades are 2% cheaper.My name is Claus, king of kings;
Look on my toys, ye Mighty, and despair!
',2525252525252525,[19,10],function(){Game.storeToRefresh=1;}); - - order=10300; - var heartPower=function(){ - var pow=2; - if (Game.Has('Starlove')) pow=3; - if (Game.hasGod) - { - var godLvl=Game.hasGod('seasons'); - if (godLvl==1) pow*=1.3; - else if (godLvl==2) pow*=1.2; - else if (godLvl==3) pow*=1.1; - } - return pow; - }; - Game.NewUpgradeCookie({name:'Pure heart biscuits',desc:'Melty white chocolate
that says "I *like* like you".',season:'valentines',icon:[19,3], power:heartPower,price: 1000000}); - Game.NewUpgradeCookie({name:'Ardent heart biscuits',desc:'A red hot cherry biscuit that will nudge the target of your affection in interesting directions.',require:Game.last.name,season:'valentines',icon:[20,3], power:heartPower,price: 1000000000}); - Game.NewUpgradeCookie({name:'Sour heart biscuits',desc:'A bitter lime biscuit for the lonely and the heart-broken.',require:Game.last.name,season:'valentines',icon:[20,4], power:heartPower,price: 1000000000000}); - Game.NewUpgradeCookie({name:'Weeping heart biscuits',desc:'An ice-cold blueberry biscuit, symbol of a mending heart.',require:Game.last.name,season:'valentines',icon:[21,3], power:heartPower,price: 1000000000000000}); - Game.NewUpgradeCookie({name:'Golden heart biscuits',desc:'A beautiful biscuit to symbolize kindness, true love, and sincerity.',require:Game.last.name,season:'valentines',icon:[21,4], power:heartPower,price: 1000000000000000000}); - Game.NewUpgradeCookie({name:'Eternal heart biscuits',desc:'Silver icing for a very special someone you\'ve liked for a long, long time.',require:Game.last.name,season:'valentines',icon:[19,4], power:heartPower,price: 1000000000000000000000}); - - Game.heartDrops=['Pure heart biscuits','Ardent heart biscuits','Sour heart biscuits','Weeping heart biscuits','Golden heart biscuits','Eternal heart biscuits','Prism heart biscuits']; - - Game.GetHowManyHeartDrops=function() - { - var num=0; - for (var i in Game.heartDrops) {if (Game.Has(Game.heartDrops[i])) num++;} - return num; - } - /*for (var i in Game.heartDrops) - { - Game.Upgrades[Game.heartDrops[i]].descFunc=function(){return '
You currently own '+Game.GetHowManyHeartDrops()+'/'+Game.heartDrops.length+' heart biscuits.
'+this.desc;}; - }*/ - - order=1100; - new Game.TieredUpgrade('Gem polish','Prisms are twice as efficient.Get rid of the grime and let more light in.
Truly, truly outrageous.
','Prism',1); - new Game.TieredUpgrade('9th color','Prisms are twice as efficient.Delve into untouched optical depths where even the mantis shrimp hasn\'t set an eye!','Prism',2); - new Game.TieredUpgrade('Chocolate light','Prisms are twice as efficient.Bask into its cocoalescence.
(Warning : may cause various interesting albeit deadly skin conditions.)
','Prism',3); - new Game.TieredUpgrade('Grainbow','Prisms are twice as efficient.Remember the different grains using the handy Roy G. Biv mnemonic : R is for rice, O is for oats... uh, B for barley?...','Prism',4); - new Game.TieredUpgrade('Pure cosmic light','Prisms are twice as efficient.Your prisms now receive pristine, unadulterated photons from the other end of the universe.','Prism',5); - - order=255; - Game.GrandmaSynergy('Rainbow grandmas','A luminous grandma to sparkle into cookies.','Prism'); - - order=24000; - Game.seasonTriggerBasePrice=1000000000;//1111111111; - new Game.Upgrade('Season switcher','Allows you to trigger seasonal events at will, for a price.There will always be time.',1111,[16,6],function(){for (var i in Game.seasons){Game.Unlock(Game.seasons[i].trigger);}});Game.last.pool='prestige';Game.last.parents=['Heralds']; - new Game.Upgrade('Festive biscuit','Triggers Christmas season for the next 24 hours.
Triggering another season will cancel this one.
Cost scales with unbuffed CpS and increases with every season switch.\'Twas the night before Christmas- or was it?',Game.seasonTriggerBasePrice,[12,10]);Game.last.season='christmas';Game.last.pool='toggle'; - new Game.Upgrade('Ghostly biscuit','Triggers Halloween season for the next 24 hours.
Triggering another season will cancel this one.
Cost scales with unbuffed CpS and increases with every season switch.spooky scary skeletons
will wake you with a boo
',Game.seasonTriggerBasePrice,[13,8]);Game.last.season='halloween';Game.last.pool='toggle'; - new Game.Upgrade('Lovesick biscuit','Triggers Valentine\'s Day season for the next 24 hours.
Triggering another season will cancel this one.
Cost scales with unbuffed CpS and increases with every season switch.Romance never goes out of fashion.',Game.seasonTriggerBasePrice,[20,3]);Game.last.season='valentines';Game.last.pool='toggle'; - new Game.Upgrade('Fool\'s biscuit','Triggers Business Day season for the next 24 hours.
Triggering another season will cancel this one.
Cost scales with unbuffed CpS and increases with every season switch.Business. Serious business. This is absolutely all of your business.',Game.seasonTriggerBasePrice,[17,6]);Game.last.season='fools';Game.last.pool='toggle'; - - - order=40000; - new Game.Upgrade('Eternal seasons','Seasons now last forever.Season to taste.',7,[16,6],function(){for (var i in Game.seasons){Game.Unlock(Game.seasons[i].trigger);}});//debug purposes only - Game.last.pool='debug'; - - - order=20000; - new Game.Upgrade('Kitten managers','You gain more CpS the more milk you have.that\'s not gonna paws any problem, sir',900000000000000000000,Game.GetIcon('Kitten',5));Game.last.kitten=1;Game.MakeTiered(Game.last,5,18); - - order=100; - new Game.Upgrade('Septillion fingers','Multiplies the gain from Thousand fingers by 20.[cursory flavor text]',10000000000000000000,[12,20]);Game.MakeTiered(Game.last,11,0); - new Game.Upgrade('Octillion fingers','Multiplies the gain from Thousand fingers by 20.Turns out you can quite put your finger on it.',10000000000000000000000,[12,19]);Game.MakeTiered(Game.last,12,0); - - order=150;new Game.Upgrade('Eludium mouse','Clicking gains +1% of your CpS.I rodent do that if I were you.',500000000000000,[11,15]);Game.MakeTiered(Game.last,6,11); - new Game.Upgrade('Wishalloy mouse','Clicking gains +1% of your CpS.Clicking is fine and dandy, but don\'t smash your mouse over it. Get your game on. Go play.',50000000000000000,[11,16]);Game.MakeTiered(Game.last,7,11); - order=200;new Game.TieredUpgrade('Aging agents','Grandmas are twice as efficient.Counter-intuitively, grandmas have the uncanny ability to become more powerful the older they get.','Grandma',6); - order=300;new Game.TieredUpgrade('Pulsar sprinklers','Farms are twice as efficient.There\'s no such thing as over-watering. The moistest is the bestest.','Farm',6); - order=500;new Game.TieredUpgrade('Deep-bake process','Factories are twice as efficient.A patented process increasing cookie yield two-fold for the same amount of ingredients. Don\'t ask how, don\'t take pictures, and be sure to wear your protective suit.','Factory',6); - order=400;new Game.TieredUpgrade('Coreforge','Mines are twice as efficient.You\'ve finally dug a tunnel down to the Earth\'s core. It\'s pretty warm down here.','Mine',6); - order=600;new Game.TieredUpgrade('Generation ship','Shipments are twice as efficient.Built to last, this humongous spacecraft will surely deliver your cookies to the deep ends of space, one day.','Shipment',6); - order=700;new Game.TieredUpgrade('Origin crucible','Alchemy labs are twice as efficient.Built from the rarest of earths and located at the very deepest of the largest mountain, this legendary crucible is said to retain properties from the big-bang itself.','Alchemy lab',6); - order=800;new Game.TieredUpgrade('Deity-sized portals','Portals are twice as efficient.It\'s almost like, say, an elder god could fit through this thing now. Hypothetically.','Portal',6); - order=900;new Game.TieredUpgrade('Far future enactment','Time machines are twice as efficient.The far future enactment authorizes you to delve deep into the future - where civilization has fallen and risen again, and cookies are plentiful.','Time machine',6); - order=1000;new Game.TieredUpgrade('Nanocosmics','Antimatter condensers are twice as efficient.The theory of nanocosmics posits that each subatomic particle is in fact its own self-contained universe, holding unfathomable amounts of energy.
This somehow stacks with the nested universe theory, because physics.
','Antimatter condenser',6); - order=1100; - new Game.TieredUpgrade('Glow-in-the-dark','Prisms are twice as efficient.Your prisms now glow in the dark, effectively doubling their output!','Prism',6); - - order=10032; - Game.NewUpgradeCookie({name:'Rose macarons',desc:'Although an odd flavor, these pastries recently rose in popularity.',icon:[22,3],require:'Box of macarons', power:3,price: 9999}); - Game.NewUpgradeCookie({name:'Lemon macarons',desc:'Tastefully sour, delightful treats.',icon:[23,3],require:'Box of macarons', power:3,price: 9999999}); - Game.NewUpgradeCookie({name:'Chocolate macarons',desc:'They\'re like tiny sugary burgers!',icon:[24,3],require:'Box of macarons', power:3,price: 9999999999}); - Game.NewUpgradeCookie({name:'Pistachio macarons',desc:'Pistachio shells now removed after multiple complaints.',icon:[22,4],require:'Box of macarons', power:3,price: 9999999999999}); - Game.NewUpgradeCookie({name:'Hazelnut macarons',desc:'These go especially well with coffee.',icon:[23,4],require:'Box of macarons', power:3,price: 9999999999999999}); - Game.NewUpgradeCookie({name:'Violet macarons',desc:'It\'s like spraying perfume into your mouth!',icon:[24,4],require:'Box of macarons', power:3,price: 9999999999999999999}); - - order=40000; - new Game.Upgrade('Magic shenanigans','Cookie production multiplied by 1,000.It\'s magic. I ain\'t gotta explain sh
t.
',7,[17,5]);//debug purposes only - Game.last.pool='debug'; - - - order=24000; - new Game.Upgrade('Bunny biscuit','Triggers Easter season for the next 24 hours.
Triggering another season will cancel this one.
Cost scales with unbuffed CpS and increases with every season switch.All the world will be your enemy
and when they catch you,
they will kill you...
but first they must catch you.
',Game.seasonTriggerBasePrice,[0,12]);Game.last.season='easter';Game.last.pool='toggle'; - - var eggPrice=999999999999; - var eggPrice2=99999999999999; - new Game.Upgrade('Chicken egg','Cookie production multiplier +1%.
Cost scales with how many eggs you own.The egg. The egg came first. Get over it.',eggPrice,[1,12]); - new Game.Upgrade('Duck egg','Cookie production multiplier +1%.
Cost scales with how many eggs you own.Then he waddled away.',eggPrice,[2,12]); - new Game.Upgrade('Turkey egg','Cookie production multiplier +1%.
Cost scales with how many eggs you own.These hatch into strange, hand-shaped creatures.',eggPrice,[3,12]); - new Game.Upgrade('Quail egg','Cookie production multiplier +1%.
Cost scales with how many eggs you own.These eggs are positively tiny. I mean look at them. How does this happen? Whose idea was that?',eggPrice,[4,12]); - new Game.Upgrade('Robin egg','Cookie production multiplier +1%.
Cost scales with how many eggs you own.Holy azure-hued shelled embryos!',eggPrice,[5,12]); - new Game.Upgrade('Ostrich egg','Cookie production multiplier +1%.
Cost scales with how many eggs you own.One of the largest eggs in the world. More like ostrouch, am I right?
Guys?
',eggPrice,[6,12]); - new Game.Upgrade('Cassowary egg','Cookie production multiplier +1%.
Cost scales with how many eggs you own.The cassowary is taller than you, possesses murderous claws and can easily outrun you.
You\'d do well to be casso-wary of them.
',eggPrice,[7,12]); - new Game.Upgrade('Salmon roe','Cookie production multiplier +1%.
Cost scales with how many eggs you own.Do the impossible, see the invisible.
Roe roe, fight the power?
',eggPrice,[8,12]); - new Game.Upgrade('Frogspawn','Cookie production multiplier +1%.
Cost scales with how many eggs you own.I was going to make a pun about how these "toadally look like eyeballs", but froget it.',eggPrice,[9,12]); - new Game.Upgrade('Shark egg','Cookie production multiplier +1%.
Cost scales with how many eggs you own.HELLO IS THIS FOOD?
LET ME TELL YOU ABOUT FOOD.
WHY DO I KEEP EATING MY FRIENDS
',eggPrice,[10,12]); - new Game.Upgrade('Turtle egg','Cookie production multiplier +1%.
Cost scales with how many eggs you own.Turtles, right? Hatch from shells. Grow into shells. What\'s up with that?
Now for my skit about airplane food.
',eggPrice,[11,12]); - new Game.Upgrade('Ant larva','Cookie production multiplier +1%.
Cost scales with how many eggs you own.These are a delicacy in some countries, I swear. You will let these invade your digestive tract, and you will derive great pleasure from it.
And all will be well.
',eggPrice,[12,12]); - new Game.Upgrade('Golden goose egg','Golden cookies appear 5% more often.
Cost scales with how many eggs you own.The sole vestige of a tragic tale involving misguided investments.',eggPrice2,[13,12]); - new Game.Upgrade('Faberge egg','All buildings and upgrades are 1% cheaper.
Cost scales with how many eggs you own.This outrageous egg is definitely fab.',eggPrice2,[14,12],function(){Game.storeToRefresh=1;}); - new Game.Upgrade('Wrinklerspawn','Wrinklers explode into 5% more cookies.
Cost scales with how many eggs you own.Look at this little guy! It\'s gonna be a big boy someday! Yes it is!',eggPrice2,[15,12]); - new Game.Upgrade('Cookie egg','Clicking is 10% more powerful.
Cost scales with how many eggs you own.The shell appears to be chipped.
I wonder what\'s inside this one!
',eggPrice2,[16,12]); - new Game.Upgrade('Omelette','Other eggs appear 10% more frequently.
Cost scales with how many eggs you own.Fromage not included.',eggPrice2,[17,12]); - new Game.Upgrade('Chocolate egg','Contains a lot of cookies.
Cost scales with how many eggs you own.Laid by the elusive cocoa bird. There\'s a surprise inside!',eggPrice2,[18,12],function() - { - var cookies=Game.cookies*0.05; - if (Game.prefs.popups) Game.Popup('The chocolate egg bursts into
'+Beautify(cookies)+'!'); - else Game.Notify('Chocolate egg','The egg bursts into '+Beautify(cookies)+' cookies!',Game.Upgrades['Chocolate egg'].icon); - Game.Earn(cookies); - }); - new Game.Upgrade('Century egg','You continually gain more CpS the longer you\'ve played in the current ascension.
Cost scales with how many eggs you own.Actually not centuries-old. This one isn\'t a day over 86!',eggPrice2,[19,12]); - Game.last.descFunc=function(){ - var day=Math.floor((Date.now()-Game.startDate)/1000/10)*10/60/60/24; - day=Math.min(day,100); - var n=(1-Math.pow(1-day/100,3))*0.1; - return '
Current boost : +'+Beautify(n*100,1)+'%
'+this.desc; - }; - new Game.Upgrade('"egg"','+9 CpShey it\'s "egg"',eggPrice2,[20,12]); - - Game.easterEggs=['Chicken egg','Duck egg','Turkey egg','Quail egg','Robin egg','Ostrich egg','Cassowary egg','Salmon roe','Frogspawn','Shark egg','Turtle egg','Ant larva','Golden goose egg','Faberge egg','Wrinklerspawn','Cookie egg','Omelette','Chocolate egg','Century egg','"egg"']; - Game.eggDrops=['Chicken egg','Duck egg','Turkey egg','Quail egg','Robin egg','Ostrich egg','Cassowary egg','Salmon roe','Frogspawn','Shark egg','Turtle egg','Ant larva']; - Game.rareEggDrops=['Golden goose egg','Faberge egg','Wrinklerspawn','Cookie egg','Omelette','Chocolate egg','Century egg','"egg"']; - - Game.GetHowManyEggs=function() - { - var num=0; - for (var i in Game.easterEggs) {if (Game.Has(Game.easterEggs[i])) num++;} - return num; - } - for (var i in Game.eggDrops)//scale egg prices to how many eggs you have - {Game.Upgrades[Game.eggDrops[i]].priceFunc=function(){return Math.pow(2,Game.GetHowManyEggs())*999;}} - //{Game.Upgrades[Game.eggDrops[i]].priceFunc=function(){return Math.pow(Game.GetHowManyEggs()+1,2)*Game.cookiesPs*60*5;}} - for (var i in Game.rareEggDrops) - {Game.Upgrades[Game.rareEggDrops[i]].priceFunc=function(){return Math.pow(3,Game.GetHowManyEggs())*999;}} - //{Game.Upgrades[Game.rareEggDrops[i]].priceFunc=function(){return Math.pow(Game.GetHowManyEggs()+1,3)*Game.cookiesPs*60*5;}} - - /*for (var i in Game.easterEggs) - { - Game.Upgrades[Game.easterEggs[i]].descFunc=function(){return '
You currently own '+Game.GetHowManyEggs()+'/'+Game.easterEggs.length+' eggs.
'+this.desc;}; - }*/ - - Game.DropEgg=function(failRate) - { - failRate*=1/Game.dropRateMult(); - if (Game.season!='easter') return; - if (Game.HasAchiev('Hide & seek champion')) failRate*=0.7; - if (Game.Has('Omelette')) failRate*=0.9; - if (Game.Has('Starspawn')) failRate*=0.9; - if (Game.hasGod) - { - var godLvl=Game.hasGod('seasons'); - if (godLvl==1) failRate*=0.9; - else if (godLvl==2) failRate*=0.95; - else if (godLvl==3) failRate*=0.97; - } - if (Math.random()>=failRate) - { - var drop=''; - if (Math.random()<0.1) drop=choose(Game.rareEggDrops); - else drop=choose(Game.eggDrops); - if (Game.Has(drop) || Game.HasUnlocked(drop))//reroll if we have it - { - if (Math.random()<0.1) drop=choose(Game.rareEggDrops); - else drop=choose(Game.eggDrops); + for (var ii=0;ii<3;ii++) + { + //Game.particleAdd(x+Math.random()*50-25,y+Math.random()*50-25,Math.random()*4-2,Math.random()*-2-2,1,1,2,'wrinklerBits.png'); + var part=Game.particleAdd(x,y,Math.random()*4-2,Math.random()*-2-2,1,1,2,me.type==1?'shinyWrinklerBits.png':'wrinklerBits.png'); + part.r=-me.r; + } + } + } + Game.Click=0; + } + onWrinkler=1; + } + } + + if (me.hurt>0) + { + me.hurt-=5/Game.fps; + //me.close-=me.hurt*0.05; + //me.x+=Math.random()*2-1; + //me.y+=Math.random()*2-1; + me.r+=(Math.sin(Game.T*1)*me.hurt)*18;//Math.random()*2-1; + } + if (me.hp<=0.5 && me.phase>0) + { + Game.playWrinklerSquishSound(); + PlaySound('snd/pop'+Math.floor(Math.random()*3+1)+'.mp3',0.75); + Game.wrinklersPopped++; + Game.recalculateGains=1; + me.phase=0; + me.close=0; + me.hurt=0; + me.hp=3; + var toSuck=1.1; + if (Game.Has('Sacrilegious corruption')) toSuck*=1.05; + if (me.type==1) toSuck*=3;//shiny wrinklers are an elusive, profitable breed + me.sucked*=toSuck;//cookie dough does weird things inside wrinkler digestive tracts + if (Game.Has('Wrinklerspawn')) me.sucked*=1.05; + if (Game.hasGod) + { + var godLvl=Game.hasGod('scorn'); + if (godLvl==1) me.sucked*=1.15; + else if (godLvl==2) me.sucked*=1.1; + else if (godLvl==3) me.sucked*=1.05; + } + if (me.sucked>0.5) + { + if (Game.prefs.popups) Game.Popup('Exploded a '+(me.type==1?'shiny ':'')+'wrinkler : found '+Beautify(me.sucked)+' cookies!'); + else Game.Notify('Exploded a '+(me.type==1?'shiny ':'')+'wrinkler','Found '+Beautify(me.sucked)+' cookies!',[19,8],6); + Game.Popup('
+'+Beautify(me.sucked)+' cookies
',Game.mouseX,Game.mouseY); + + if (Game.season=='halloween') + { + //if (Math.random()<(Game.HasAchiev('Spooky cookies')?0.2:0.05))//halloween cookie drops + var failRate=0.95; + if (Game.HasAchiev('Spooky cookies')) failRate=0.8; + if (Game.Has('Starterror')) failRate*=0.9; + failRate*=1/Game.dropRateMult(); + if (Game.hasGod) + { + var godLvl=Game.hasGod('seasons'); + if (godLvl==1) failRate*=0.9; + else if (godLvl==2) failRate*=0.95; + else if (godLvl==3) failRate*=0.97; + } + if (me.type==1) failRate*=0.9; + if (Math.random()>failRate)//halloween cookie drops + { + var cookie=choose(['Skull cookies','Ghost cookies','Bat cookies','Slime cookies','Pumpkin cookies','Eyeball cookies','Spider cookies']); + if (!Game.HasUnlocked(cookie) && !Game.Has(cookie)) + { + Game.Unlock(cookie); + if (Game.prefs.popups) Game.Popup('Found : '+cookie+'!'); + else Game.Notify(cookie,'You also found '+cookie+'!',Game.Upgrades[cookie].icon); + } + } + } + Game.DropEgg(0.98); + } + if (me.type==1) Game.Win('Last Chance to See'); + Game.Earn(me.sucked); + /*if (Game.prefs.particles) + { + var x=me.x+(Math.sin(me.r*Math.PI/180)*100); + var y=me.y+(Math.cos(me.r*Math.PI/180)*100); + for (var ii=0;ii<6;ii++) + { + Game.particleAdd(x+Math.random()*50-25,y+Math.random()*50-25,Math.random()*4-2,Math.random()*-2-2,1,1,2,'wrinklerBits.png'); + } + }*/ + if (Game.prefs.particles) + { + var x=me.x+(Math.sin(me.r*Math.PI/180)*90); + var y=me.y+(Math.cos(me.r*Math.PI/180)*90); + if (me.sucked>0) + { + for (var ii=0;ii<5;ii++) + { + Game.particleAdd(Game.mouseX,Game.mouseY,Math.random()*4-2,Math.random()*-2-2,Math.random()*0.5+0.75,1.5,2); + } + } + for (var ii=0;ii<8;ii++) + { + var part=Game.particleAdd(x,y,Math.random()*4-2,Math.random()*-2-2,1,1,2,me.type==1?'shinyWrinklerBits.png':'wrinklerBits.png'); + part.r=-me.r; + } + } + me.sucked=0; + } + } + if (onWrinkler) + { + Game.mousePointer=1; + } + } + Game.DrawWrinklers=function() + { + var ctx=Game.LeftBackground; + var selected=0; + for (var i in Game.wrinklers) + { + var me=Game.wrinklers[i]; + if (me.phase>0) + { + ctx.globalAlpha=me.close; + ctx.save(); + ctx.translate(me.x,me.y); + ctx.rotate(-(me.r)*Math.PI/180); + //var s=Math.min(1,me.sucked/(Game.cookiesPs*60))*0.75+0.25;//scale wrinklers as they eat + //ctx.scale(Math.pow(s,1.5)*1.25,s); + //ctx.fillRect(-50,-10,100,200); + if (me.type==1) ctx.drawImage(Pic('shinyWrinkler.png'),-50,-10); + else if (Game.season=='christmas') ctx.drawImage(Pic('winterWrinkler.png'),-50,-10); + else ctx.drawImage(Pic('wrinkler.png'),-50,-10); + //ctx.fillText(me.id+' : '+me.sucked,0,0); + if (me.type==1 && Math.random()<0.3 && Game.prefs.particles)//sparkle + { + ctx.globalAlpha=Math.random()*0.65+0.1; + var s=Math.random()*30+5; + ctx.globalCompositeOperation='lighter'; + ctx.drawImage(Pic('glint.jpg'),-s/2+Math.random()*50-25,-s/2+Math.random()*200,s,s); + } + ctx.restore(); + + if (me.phase==2 && Math.random()<0.03 && Game.prefs.particles) + { + Game.particleAdd(me.x,me.y,Math.random()*4-2,Math.random()*-2-2,Math.random()*0.5+0.5,1,2); + } + + if (me.selected) selected=me; + } + } + if (selected && Game.Has('Eye of the wrinkler')) + { + var x=Game.cookieOriginX; + var y=Game.cookieOriginY; + ctx.font='14px Merriweather'; + ctx.textAlign='center'; + var width=Math.max(ctx.measureText('Swallowed :').width,ctx.measureText(Beautify(selected.sucked)).width); + ctx.fillStyle='#000'; + ctx.strokeStyle='#000'; + ctx.lineWidth=8; + ctx.globalAlpha=0.5; + ctx.beginPath(); + ctx.moveTo(x,y); + ctx.lineTo(Math.floor(selected.x),Math.floor(selected.y)); + ctx.stroke(); + ctx.fillRect(x-width/2-8-14,y-23,width+16+28,38); + ctx.globalAlpha=1; + ctx.fillStyle='#fff'; + ctx.fillText('Swallowed :',x+14,y-8); + ctx.fillText(Beautify(selected.sucked),x+14,y+8); + ctx.drawImage(Pic('icons.png'),27*48,26*48,48,48,x-width/2-8-22,y-4-24,48,48); + } + } + Game.SaveWrinklers=function() + { + var amount=0; + var amountShinies=0; + var number=0; + var shinies=0; + for (var i in Game.wrinklers) + { + if (Game.wrinklers[i].sucked>0.5) + { + number++; + if (Game.wrinklers[i].type==1) + { + shinies++; + amountShinies+=Game.wrinklers[i].sucked; + } + else amount+=Game.wrinklers[i].sucked; + } + } + return {amount:amount,number:number,shinies:shinies,amountShinies:amountShinies}; + } + Game.LoadWrinklers=function(amount,number,shinies,amountShinies) + { + if (number>0 && (amount>0 || amountShinies>0)) + { + var fullNumber=number-shinies; + var fullNumberShinies=shinies; + for (var i in Game.wrinklers) + { + if (number>0) + { + Game.wrinklers[i].phase=2; + Game.wrinklers[i].close=1; + Game.wrinklers[i].hp=3; + if (shinies>0) {Game.wrinklers[i].type=1;Game.wrinklers[i].sucked=amountShinies/fullNumberShinies;shinies--;} + else Game.wrinklers[i].sucked=amount/fullNumber; + number--; + }//respawn + } + } + } + + /*===================================================================================== + SPECIAL THINGS AND STUFF + =======================================================================================*/ + + + Game.specialTab=''; + Game.specialTabHovered=''; + Game.specialTabs=[]; + + Game.UpdateSpecial=function() + { + Game.specialTabs=[]; + if (Game.Has('A festive hat')) Game.specialTabs.push('santa'); + if (Game.Has('A crumbly egg')) Game.specialTabs.push('dragon'); + if (Game.specialTabs.length==0) {Game.ToggleSpecialMenu(0);return;} + + if (Game.LeftBackground) + { + Game.specialTabHovered=''; + var len=Game.specialTabs.length; + if (len==0) return; + var y=Game.LeftBackground.canvas.height-24-48*len; + for (var i in Game.specialTabs) + { + var selected=0; + if (Game.specialTab==Game.specialTabs[i]) selected=1; + var x=24; + var s=1; + if (selected) {s=2;x+=24;} + + if (Math.abs(Game.mouseX-x)<=24*s && Math.abs(Game.mouseY-y)<=24*s) + { + Game.specialTabHovered=Game.specialTabs[i]; + Game.mousePointer=1; + Game.CanClick=0; + if (Game.Click) + { + if (Game.specialTab!=Game.specialTabs[i]) {Game.specialTab=Game.specialTabs[i];Game.ToggleSpecialMenu(1);PlaySound('snd/press.mp3');} + else {Game.ToggleSpecialMenu(0);PlaySound('snd/press.mp3');} + //PlaySound('snd/tick.mp3'); + } + } + + y+=48; + } + } + } + + Game.santaLevels=['Festive test tube','Festive ornament','Festive wreath','Festive tree','Festive present','Festive elf fetus','Elf toddler','Elfling','Young elf','Bulky elf','Nick','Santa Claus','Elder Santa','True Santa','Final Claus']; + for (var i in Game.santaDrops)//scale christmas upgrade prices with santa level + {Game.Upgrades[Game.santaDrops[i]].priceFunc=function(){return Math.pow(3,Game.santaLevel)*2525;}} + + + Game.UpgradeSanta=function() + { + var moni=Math.pow(Game.santaLevel+1,Game.santaLevel+1); + if (Game.cookies>moni && Game.santaLevel<14) + { + PlaySound('snd/shimmerClick.mp3'); + + Game.Spend(moni); + Game.santaLevel=(Game.santaLevel+1)%15; + if (Game.santaLevel==14) + { + Game.Unlock('Santa\'s dominion'); + if (Game.prefs.popups) Game.Popup('You are granted
Santa\'s dominion.'); + else Game.Notify('You are granted Santa\'s dominion.','',Game.Upgrades['Santa\'s dominion'].icon); + } + var drops=[]; + for (var i in Game.santaDrops) {if (!Game.HasUnlocked(Game.santaDrops[i])) drops.push(Game.santaDrops[i]);} + var drop=choose(drops); + if (drop) + { + Game.Unlock(drop); + if (Game.prefs.popups) Game.Popup('You find a present which contains...
'+drop+'!'); + else Game.Notify('Found a present!','You find a present which contains...
'+drop+'!',Game.Upgrades[drop].icon); + } + + Game.ToggleSpecialMenu(1); + + if (l('specialPic')){var rect=l('specialPic').getBoundingClientRect();Game.SparkleAt((rect.left+rect.right)/2,(rect.top+rect.bottom)/2);} + + if (Game.santaLevel>=6) Game.Win('Coming to town'); + if (Game.santaLevel>=14) Game.Win('All hail Santa'); + Game.recalculateGains=1; + Game.upgradesToRebuild=1; + } + } + + Game.dragonLevels=[ + {name:'Dragon egg',action:'Chip it',pic:0, + cost:function(){return Game.cookies>=1000000;}, + buy:function(){Game.Spend(1000000);}, + costStr:function(){return Beautify(1000000)+' cookies';}}, + {name:'Dragon egg',action:'Chip it',pic:1, + cost:function(){return Game.cookies>=1000000*2;}, + buy:function(){Game.Spend(1000000*2);}, + costStr:function(){return Beautify(1000000*2)+' cookies';}}, + {name:'Dragon egg',action:'Chip it',pic:2, + cost:function(){return Game.cookies>=1000000*4;}, + buy:function(){Game.Spend(1000000*4);}, + costStr:function(){return Beautify(1000000*4)+' cookies';}}, + {name:'Shivering dragon egg',action:'Hatch it',pic:3, + cost:function(){return Game.cookies>=1000000*8;}, + buy:function(){Game.Spend(1000000*8);}, + costStr:function(){return Beautify(1000000*8)+' cookies';}}, + {name:'Krumblor, cookie hatchling',action:'Train Breath of Milk
Aura : kittens are 5% more effective',pic:4, + cost:function(){return Game.cookies>=1000000*16;}, + buy:function(){Game.Spend(1000000*16);}, + costStr:function(){return Beautify(1000000*16)+' cookies';}}, + {name:'Krumblor, cookie hatchling',action:'Train Dragon Cursor
Aura : clicking is 5% more effective',pic:4, + cost:function(){return Game.Objects['Cursor'].amount>=100;}, + buy:function(){Game.Objects['Cursor'].sacrifice(100);}, + costStr:function(){return '100 cursors';}}, + {name:'Krumblor, cookie hatchling',action:'Train Elder Battalion
Aura : grandmas gain +1% CpS for every non-grandma building',pic:4, + cost:function(){return Game.Objects['Grandma'].amount>=100;}, + buy:function(){Game.Objects['Grandma'].sacrifice(100);}, + costStr:function(){return '100 grandmas';}}, + {name:'Krumblor, cookie hatchling',action:'Train Reaper of Fields
Aura : golden cookies may trigger a Dragon Harvest',pic:4, + cost:function(){return Game.Objects['Farm'].amount>=100;}, + buy:function(){Game.Objects['Farm'].sacrifice(100);}, + costStr:function(){return '100 farms';}}, + {name:'Krumblor, cookie dragon',action:'Train Earth Shatterer
Aura : buildings sell back for 50% instead of 25%',pic:5, + cost:function(){return Game.Objects['Mine'].amount>=100;}, + buy:function(){Game.Objects['Mine'].sacrifice(100);}, + costStr:function(){return '100 mines';}}, + {name:'Krumblor, cookie dragon',action:'Train Master of the Armory
Aura : all upgrades are 2% cheaper',pic:5, + cost:function(){return Game.Objects['Factory'].amount>=100;}, + buy:function(){Game.Objects['Factory'].sacrifice(100);}, + costStr:function(){return '100 factories';}}, + {name:'Krumblor, cookie dragon',action:'Train Fierce Hoarder
Aura : all buildings are 2% cheaper',pic:5, + cost:function(){return Game.Objects['Bank'].amount>=100;}, + buy:function(){Game.Objects['Bank'].sacrifice(100);}, + costStr:function(){return '100 banks';}}, + {name:'Krumblor, cookie dragon',action:'Train Dragon God
Aura : prestige CpS bonus +5%',pic:5, + cost:function(){return Game.Objects['Temple'].amount>=100;}, + buy:function(){Game.Objects['Temple'].sacrifice(100);}, + costStr:function(){return '100 temples';}}, + {name:'Krumblor, cookie dragon',action:'Train Arcane Aura
Aura : golden cookies appear 5% more often',pic:5, + cost:function(){return Game.Objects['Wizard tower'].amount>=100;}, + buy:function(){Game.Objects['Wizard tower'].sacrifice(100);}, + costStr:function(){return '100 wizard towers';}}, + {name:'Krumblor, cookie dragon',action:'Train Dragonflight
Aura : golden cookies may trigger a Dragonflight',pic:5, + cost:function(){return Game.Objects['Shipment'].amount>=100;}, + buy:function(){Game.Objects['Shipment'].sacrifice(100);}, + costStr:function(){return '100 shipments';}}, + {name:'Krumblor, cookie dragon',action:'Train Ancestral Metamorphosis
Aura : golden cookies give 10% more cookies',pic:5, + cost:function(){return Game.Objects['Alchemy lab'].amount>=100;}, + buy:function(){Game.Objects['Alchemy lab'].sacrifice(100);}, + costStr:function(){return '100 alchemy labs';}}, + {name:'Krumblor, cookie dragon',action:'Train Unholy Dominion
Aura : wrath cookies give 10% more cookies',pic:5, + cost:function(){return Game.Objects['Portal'].amount>=100;}, + buy:function(){Game.Objects['Portal'].sacrifice(100);}, + costStr:function(){return '100 portals';}}, + {name:'Krumblor, cookie dragon',action:'Train Epoch Manipulator
Aura : golden cookie effects last 5% longer',pic:5, + cost:function(){return Game.Objects['Time machine'].amount>=100;}, + buy:function(){Game.Objects['Time machine'].sacrifice(100);}, + costStr:function(){return '100 time machines';}}, + {name:'Krumblor, cookie dragon',action:'Train Mind Over Matter
Aura : +25% random drops',pic:5, + cost:function(){return Game.Objects['Antimatter condenser'].amount>=100;}, + buy:function(){Game.Objects['Antimatter condenser'].sacrifice(100);}, + costStr:function(){return '100 antimatter condensers';}}, + {name:'Krumblor, cookie dragon',action:'Train Radiant Appetite
Aura : all cookie production multiplied by 2',pic:5, + cost:function(){return Game.Objects['Prism'].amount>=100;}, + buy:function(){Game.Objects['Prism'].sacrifice(100);}, + costStr:function(){return '100 prisms';}}, + {name:'Krumblor, cookie dragon',action:'Train Dragon\'s Fortune
Aura : +123% CpS per golden cookie on-screen',pic:5, + cost:function(){return Game.Objects['Chancemaker'].amount>=100;}, + buy:function(){Game.Objects['Chancemaker'].sacrifice(100);}, + costStr:function(){return '100 chancemakers';}}, + {name:'Krumblor, cookie dragon',action:'Train Dragon\'s Curve
Aura : sugar lumps grow 5% faster, 50% weirder',pic:5, + cost:function(){return Game.Objects['Fractal engine'].amount>=100;}, + buy:function(){Game.Objects['Fractal engine'].sacrifice(100);}, + costStr:function(){return '100 fractal engines';}}, + {name:'Krumblor, cookie dragon',action:'Train Reality Bending
Aura : 10% of every other aura, combined',pic:5, + cost:function(){return Game.Objects['Javascript console'].amount>=100;}, + buy:function(){Game.Objects['Javascript console'].sacrifice(100);}, + costStr:function(){return '100 javascript consoles';}}, + {name:'Krumblor, cookie dragon',action:'Bake dragon cookie
Delicious!',pic:6, + cost:function(){var fail=0;for (var i in Game.Objects){if (Game.Objects[i].amount<50) fail=1;}return (fail==0);}, + buy:function(){for (var i in Game.Objects){Game.Objects[i].sacrifice(50);}Game.Unlock('Dragon cookie');}, + costStr:function(){return '50 of every building';}}, + {name:'Krumblor, cookie dragon',action:'Train secondary aura
Lets you use two dragon auras simultaneously',pic:7, + cost:function(){var fail=0;for (var i in Game.Objects){if (Game.Objects[i].amount<200) fail=1;}return (fail==0);}, + buy:function(){for (var i in Game.Objects){Game.Objects[i].sacrifice(200);}}, + costStr:function(){return '200 of every building';}}, + {name:'Krumblor, cookie dragon',action:'Your dragon is fully trained.',pic:8} + ]; + + Game.dragonAuras={ + 0:{name:'No aura',pic:[0,7],desc:'Select an aura from those your dragon knows.'}, + 1:{name:'Breath of Milk',pic:[18,25],desc:'Kittens are 5% more effective.'}, + 2:{name:'Dragon Cursor',pic:[0,25],desc:'Clicking is 5% more effective.'}, + 3:{name:'Elder Battalion',pic:[1,25],desc:'Grandmas gain +1% CpS for every non-grandma building.'}, + 4:{name:'Reaper of Fields',pic:[2,25],desc:'Golden cookies may trigger a Dragon Harvest.'}, + 5:{name:'Earth Shatterer',pic:[3,25],desc:'Buildings sell back for 50% instead of 25%.'}, + 6:{name:'Master of the Armory',pic:[4,25],desc:'All upgrades are 2% cheaper.'}, + 7:{name:'Fierce Hoarder',pic:[15,25],desc:'All buildings are 2% cheaper.'}, + 8:{name:'Dragon God',pic:[16,25],desc:'Prestige CpS bonus +5%.'}, + 9:{name:'Arcane Aura',pic:[17,25],desc:'Golden cookies appear +5% more often.'}, + 10:{name:'Dragonflight',pic:[5,25],desc:'Golden cookies may trigger a Dragonflight.'}, + 11:{name:'Ancestral Metamorphosis',pic:[6,25],desc:'Golden cookies give 10% more cookies.'}, + 12:{name:'Unholy Dominion',pic:[7,25],desc:'Wrath cookies give 10% more cookies.'}, + 13:{name:'Epoch Manipulator',pic:[8,25],desc:'Golden cookies last 5% longer.'}, + 14:{name:'Mind Over Matter',pic:[13,25],desc:'Random drops are 25% more common.'}, + 15:{name:'Radiant Appetite',pic:[14,25],desc:'All cookie production multiplied by 2.'}, + 16:{name:'Dragon\'s Fortune',pic:[19,25],desc:'+123% CpS per golden cookie on-screen, multiplicative.'}, + 17:{name:'Dragon\'s Curve',pic:[20,25],desc:'+5% sugar lump growth and sugar lumps are twice as likely to be unusual.'}, + 18:{name:'Reality Bending',pic:[32,25],desc:'One tenth of every other dragon aura, combined.'}, + }; + + Game.hasAura=function(what) + { + if (Game.dragonAuras[Game.dragonAura].name==what || Game.dragonAuras[Game.dragonAura2].name==what) return true; else return false; + } + Game.auraMult=function(what) + { + var n=0; + if (Game.dragonAuras[Game.dragonAura].name==what || Game.dragonAuras[Game.dragonAura2].name==what) n=1; + if (Game.dragonAuras[Game.dragonAura].name=='Reality Bending' || Game.dragonAuras[Game.dragonAura2].name=='Reality Bending') n+=0.1; + return n; + } + + Game.SelectDragonAura=function(slot,update) + { + var currentAura=0; + var otherAura=0; + if (slot==0) currentAura=Game.dragonAura; else currentAura=Game.dragonAura2; + if (slot==0) otherAura=Game.dragonAura2; else otherAura=Game.dragonAura; + if (!update) Game.SelectingDragonAura=currentAura; + + var str=''; + for (var i in Game.dragonAuras) + { + if (Game.dragonLevel>=parseInt(i)+4) + { + var icon=Game.dragonAuras[i].pic; + if (i==0 || i!=otherAura) str+='
'; + } + } + + var highestBuilding=0; + for (var i in Game.Objects) {if (Game.Objects[i].amount>0) highestBuilding=Game.Objects[i];} + + Game.Prompt('

Set your dragon\'s '+(slot==1?'secondary ':'')+'aura

'+ + '
'+ + '
'+ + '
'+str+'
'+ + '
'+ + '
'+(highestBuilding==0?'Switching your aura is free because you own no buildings.':'The cost of switching your aura is 1 '+highestBuilding.name+'.
This will affect your CpS!')+'
' + ,[['Confirm',(slot==0?'Game.dragonAura':'Game.dragonAura2')+'=Game.SelectingDragonAura;'+(highestBuilding==0 || currentAura==Game.SelectingDragonAura?'':'Game.ObjectsById['+highestBuilding.id+'].sacrifice(1);')+'Game.ToggleSpecialMenu(1);Game.ClosePrompt();'],'Cancel'],0,'widePrompt'); + Game.DescribeDragonAura(Game.SelectingDragonAura); + } + Game.SelectingDragonAura=-1; + Game.SetDragonAura=function(aura,slot) + { + Game.SelectingDragonAura=aura; + Game.SelectDragonAura(slot,1); + } + Game.DescribeDragonAura=function(aura) + { + l('dragonAuraInfo').innerHTML= + '

'+Game.dragonAuras[aura].name+'

'+ + '
'+ + Game.dragonAuras[aura].desc+ + '
'; + } + + Game.UpgradeDragon=function() + { + if (Game.dragonLevel=Game.dragonLevels.length-1) Game.Win('Here be dragon'); + Game.ToggleSpecialMenu(1); + if (l('specialPic')){var rect=l('specialPic').getBoundingClientRect();Game.SparkleAt((rect.left+rect.right)/2,(rect.top+rect.bottom)/2);} + Game.recalculateGains=1; + Game.upgradesToRebuild=1; + } + } + + Game.ToggleSpecialMenu=function(on) + { + if (on) + { + var pic=''; + var frame=0; + if (Game.specialTab=='santa') {pic='santa.png';frame=Game.santaLevel;} + else if (Game.specialTab=='dragon') {pic='dragon.png?v='+Game.version;frame=Game.dragonLevels[Game.dragonLevel].pic;} + else {pic='dragon.png?v='+Game.version;frame=4;} + + var str='
'; + str+='
x
'; + + if (Game.specialTab=='santa') + { + var moni=Math.pow(Game.santaLevel+1,Game.santaLevel+1); + + str+='

'+Game.santaLevels[Game.santaLevel]+'

'; + if (Game.santaLevel<14) + { + str+='
'+ + ''+ + ''; + } + } + else if (Game.specialTab=='dragon') + { + var level=Game.dragonLevels[Game.dragonLevel]; + + str+='

'+level.name+'

'; + + if (Game.dragonLevel>=5) + { + var icon=Game.dragonAuras[Game.dragonAura].pic; + str+='

'+Game.dragonAuras[Game.dragonAura].name+'

'+ + '
'+ + Game.dragonAuras[Game.dragonAura].desc+ + '
' + ,'top')+ + '>'; + } + if (Game.dragonLevel>=24)//2nd aura slot; increased with last building (javascript consoles) + { + var icon=Game.dragonAuras[Game.dragonAura2].pic; + str+='

'+Game.dragonAuras[Game.dragonAura2].name+'

'+ + '
'+ + Game.dragonAuras[Game.dragonAura2].desc+ + '
' + ,'top')+ + '>'; + } + + if (Game.dragonLevel'+ + '
'+level.action+'
'+ + '
|
'+ + '
sacrifice'+level.costStr()+'
'+ + '
'; + } + else + { + str+='
'+ + '
'+level.action+'
'; + } + } + + l('specialPopup').innerHTML=str; + + l('specialPopup').className='framed prompt onScreen'; + } + else + { + if (Game.specialTab!='') + { + Game.specialTab=''; + l('specialPopup').className='framed prompt offScreen'; + setTimeout(function(){if (Game.specialTab=='') {/*l('specialPopup').style.display='none';*/l('specialPopup').innerHTML='';}},1000*0.2); + } + } + } + Game.DrawSpecial=function() + { + var len=Game.specialTabs.length; + if (len==0) return; + Game.LeftBackground.globalAlpha=1; + var y=Game.LeftBackground.canvas.height-24-48*len; + var tabI=0; + + for (var i in Game.specialTabs) + { + var selected=0; + var hovered=0; + if (Game.specialTab==Game.specialTabs[i]) selected=1; + if (Game.specialTabHovered==Game.specialTabs[i]) hovered=1; + var x=24; + var s=1; + var pic=''; + var frame=0; + if (hovered) {s=1;x=24;} + if (selected) {s=1;x=48;} + + if (Game.specialTabs[i]=='santa') {pic='santa.png';frame=Game.santaLevel;} + else if (Game.specialTabs[i]=='dragon') {pic='dragon.png?v='+Game.version;frame=Game.dragonLevels[Game.dragonLevel].pic;} + else {pic='dragon.png?v='+Game.version;frame=4;} + + if (hovered || selected) + { + var ss=s*64; + var r=Math.floor((Game.T*0.5)%360); + Game.LeftBackground.save(); + Game.LeftBackground.translate(x,y); + if (Game.prefs.fancy) Game.LeftBackground.rotate((r/360)*Math.PI*2); + Game.LeftBackground.globalAlpha=0.75; + Game.LeftBackground.drawImage(Pic('shine.png'),-ss/2,-ss/2,ss,ss); + Game.LeftBackground.restore(); + } + + if (Game.prefs.fancy) Game.LeftBackground.drawImage(Pic(pic),96*frame,0,96,96,(x+(selected?0:Math.sin(Game.T*0.2+tabI)*3)-24*s),(y-(selected?6:Math.abs(Math.cos(Game.T*0.2+tabI))*6)-24*s),48*s,48*s); + else Game.LeftBackground.drawImage(Pic(pic),96*frame,0,96,96,(x-24*s),(y-24*s),48*s,48*s); + + tabI++; + y+=48; + } + + } + + /*===================================================================================== + VISUAL EFFECTS + =======================================================================================*/ + + Game.Milks=[ + {name:'Rank I - Plain milk',pic:'milkPlain',icon:[1,8]}, + {name:'Rank II - Chocolate milk',pic:'milkChocolate',icon:[2,8]}, + {name:'Rank III - Raspberry milk',pic:'milkRaspberry',icon:[3,8]}, + {name:'Rank IV - Orange milk',pic:'milkOrange',icon:[4,8]}, + {name:'Rank V - Caramel milk',pic:'milkCaramel',icon:[5,8]}, + {name:'Rank VI - Banana milk',pic:'milkBanana',icon:[6,8]}, + {name:'Rank VII - Lime milk',pic:'milkLime',icon:[7,8]}, + {name:'Rank VIII - Blueberry milk',pic:'milkBlueberry',icon:[8,8]}, + {name:'Rank IX - Strawberry milk',pic:'milkStrawberry',icon:[9,8]}, + {name:'Rank X - Vanilla milk',pic:'milkVanilla',icon:[10,8]}, + {name:'Rank XI - Honey milk',pic:'milkHoney',icon:[21,23]}, + {name:'Rank XII - Coffee milk',pic:'milkCoffee',icon:[22,23]}, + {name:'Rank XIII - Tea with a spot of milk',pic:'milkTea',icon:[23,23]}, + {name:'Rank XIV - Coconut milk',pic:'milkCoconut',icon:[24,23]}, + {name:'Rank XV - Cherry milk',pic:'milkCherry',icon:[25,23]}, + {name:'Rank XVI - Spiced milk',pic:'milkSpiced',icon:[26,23]}, + {name:'Rank XVII - Maple milk',pic:'milkMaple',icon:[28,23]}, + {name:'Rank XVIII - Mint milk',pic:'milkMint',icon:[29,23]}, + ]; + Game.Milk=Game.Milks[0]; + + Game.mousePointer=0;//when 1, draw the mouse as a pointer on the left screen + + Game.cookieOriginX=0; + Game.cookieOriginY=0; + Game.DrawBackground=function() + { + + Timer.clean(); + //background + if (!Game.Background)//init some stuff + { + Game.Background=l('backgroundCanvas').getContext('2d'); + Game.Background.canvas.width=Game.Background.canvas.parentNode.offsetWidth; + Game.Background.canvas.height=Game.Background.canvas.parentNode.offsetHeight; + Game.LeftBackground=l('backgroundLeftCanvas').getContext('2d'); + Game.LeftBackground.canvas.width=Game.LeftBackground.canvas.parentNode.offsetWidth; + Game.LeftBackground.canvas.height=Game.LeftBackground.canvas.parentNode.offsetHeight; + //preload ascend animation bits so they show up instantly + Game.LeftBackground.globalAlpha=0; + Game.LeftBackground.drawImage(Pic('brokenCookie.png'),0,0); + Game.LeftBackground.drawImage(Pic('brokenCookieHalo.png'),0,0); + Game.LeftBackground.drawImage(Pic('starbg.jpg'),0,0); + + window.addEventListener('resize', function(event) + { + Game.Background.canvas.width=Game.Background.canvas.parentNode.offsetWidth; + Game.Background.canvas.height=Game.Background.canvas.parentNode.offsetHeight; + Game.LeftBackground.canvas.width=Game.LeftBackground.canvas.parentNode.offsetWidth; + Game.LeftBackground.canvas.height=Game.LeftBackground.canvas.parentNode.offsetHeight; + }); + } + + var ctx=Game.LeftBackground; + + if (Game.OnAscend) + { + Timer.clean(); + //starry background on ascend screen + var w=Game.Background.canvas.width; + var h=Game.Background.canvas.height; + var b=Game.ascendl.getBoundingClientRect(); + var x=(b.left+b.right)/2; + var y=(b.top+b.bottom)/2; + Game.Background.globalAlpha=0.5; + var s=1*Game.AscendZoom*(1+Math.cos(Game.T*0.0027)*0.05); + Game.Background.fillPattern(Pic('starbg.jpg'),0,0,w,h,1024*s,1024*s,x+Game.AscendOffX*0.25*s,y+Game.AscendOffY*0.25*s); + Timer.track('star layer 1'); + if (Game.prefs.fancy) + { + //additional star layer + Game.Background.globalAlpha=0.5*(0.5+Math.sin(Game.T*0.02)*0.3); + var s=2*Game.AscendZoom*(1+Math.sin(Game.T*0.002)*0.07); + //Game.Background.globalCompositeOperation='lighter'; + Game.Background.fillPattern(Pic('starbg.jpg'),0,0,w,h,1024*s,1024*s,x+Game.AscendOffX*0.25*s,y+Game.AscendOffY*0.25*s); + //Game.Background.globalCompositeOperation='source-over'; + Timer.track('star layer 2'); + + x=x+Game.AscendOffX*Game.AscendZoom; + y=y+Game.AscendOffY*Game.AscendZoom; + //wispy nebula around the center + Game.Background.save(); + Game.Background.globalAlpha=0.5; + Game.Background.translate(x,y); + Game.Background.globalCompositeOperation='lighter'; + Game.Background.rotate(Game.T*0.001); + s=(600+150*Math.sin(Game.T*0.007))*Game.AscendZoom; + Game.Background.drawImage(Pic('heavenRing1.jpg'),-s/2,-s/2,s,s); + Game.Background.rotate(-Game.T*0.0017); + s=(600+150*Math.sin(Game.T*0.0037))*Game.AscendZoom; + Game.Background.drawImage(Pic('heavenRing2.jpg'),-s/2,-s/2,s,s); + Game.Background.restore(); + Timer.track('nebula'); + + /* + //links between upgrades + //not in because I am bad at this + Game.Background.globalAlpha=1; + Game.Background.save(); + Game.Background.translate(x,y); + s=(32)*Game.AscendZoom; + + for (var i in Game.PrestigeUpgrades) + { + var me=Game.PrestigeUpgrades[i]; + var ghosted=0; + if (me.canBePurchased || Game.Has('Neuromancy')){} + else + { + for (var ii in me.parents){if (me.parents[ii]!=-1 && me.parents[ii].canBePurchased) ghosted=1;} + } + for (var ii in me.parents)//create pulsing links + { + if (me.parents[ii]!=-1 && (me.canBePurchased || ghosted)) + { + var origX=0; + var origY=0; + var targX=me.posX+28; + var targY=me.posY+28; + if (me.parents[ii]!=-1) {origX=me.parents[ii].posX+28;origY=me.parents[ii].posY+28;} + var rot=-Math.atan((targY-origY)/(origX-targX)); + if (targX<=origX) rot+=180; + var dist=Math.floor(Math.sqrt((targX-origX)*(targX-origX)+(targY-origY)*(targY-origY))); + origX+=2; + origY-=18; + //rot=-(Math.PI/2)*(me.id%4); + Game.Background.translate(origX,origY); + Game.Background.rotate(rot); + //Game.Background.drawImage(Pic('linkPulse.png'),-s/2,-s/2,s,s); + Game.Background.fillPattern(Pic('linkPulse.png'),0,-4,dist,8,32,8); + Game.Background.rotate(-rot); + Game.Background.translate(-origX,-origY); + } + } + } + Game.Background.restore(); + Timer.track('links'); + */ + + //Game.Background.drawImage(Pic('shadedBorders.png'),0,0,w,h); + //Timer.track('border'); + } + } + else + { + + var goodBuff=0; + var badBuff=0; + for (var i in Game.buffs) + { + if (Game.buffs[i].aura==1) goodBuff=1; + if (Game.buffs[i].aura==2) badBuff=1; + } + + if (Game.drawT%5==0) + { + Game.defaultBg='bgBlue'; + Game.bgR=0; + + if (Game.season=='fools') Game.defaultBg='bgMoney'; + if (Game.elderWrathD<1) + { + Game.bgR=0; + Game.bg=Game.defaultBg; + Game.bgFade=Game.defaultBg; + } + else if (Game.elderWrathD>=1 && Game.elderWrathD<2) + { + Game.bgR=(Game.elderWrathD-1)/1; + Game.bg=Game.defaultBg; + Game.bgFade='grandmas1'; + } + else if (Game.elderWrathD>=2 && Game.elderWrathD<3) + { + Game.bgR=(Game.elderWrathD-2)/1; + Game.bg='grandmas1'; + Game.bgFade='grandmas2'; + } + else if (Game.elderWrathD>=3)// && Game.elderWrathD<4) + { + Game.bgR=(Game.elderWrathD-3)/1; + Game.bg='grandmas2'; + Game.bgFade='grandmas3'; + } + + if (Game.bgType!=0 && Game.ascensionMode!=1) + { + Game.bgR=0; + Game.bg=Game.BGsByChoice[Game.bgType].pic; + Game.bgFade=Game.bg; + } + + Game.Background.fillPattern(Pic(Game.bg+'.jpg'),0,0,Game.Background.canvas.width,Game.Background.canvas.height,512,512,0,0); + if (Game.bgR>0) + { + Game.Background.globalAlpha=Game.bgR; + Game.Background.fillPattern(Pic(Game.bgFade+'.jpg'),0,0,Game.Background.canvas.width,Game.Background.canvas.height,512,512,0,0); + } + Game.Background.globalAlpha=1; + Game.Background.drawImage(Pic('shadedBordersSoft.png'),0,0,Game.Background.canvas.width,Game.Background.canvas.height); + + } + Timer.track('window background'); + + //clear + ctx.clearRect(0,0,ctx.canvas.width,ctx.canvas.height); + /*if (Game.AscendTimer=1000) pic='cookieShower3.png'; + else if (Game.cookiesPs>=500) pic='cookieShower2.png'; + else if (Game.cookiesPs>=50) pic='cookieShower1.png'; + else pic=''; + } + if (pic!='') + { + if (Game.elderWrathD>=1) opacity=1-((Math.min(Game.elderWrathD,1.5)-1)/0.5); + ctx.globalAlpha=opacity; + var y=(Math.floor(Game.T*2)%512); + ctx.fillPattern(Pic(pic),0,0,ctx.canvas.width,ctx.canvas.height+512,512,512,0,y); + ctx.globalAlpha=1; + } + //snow + if (Game.season=='christmas') + { + var y=(Math.floor(Game.T*2.5)%512); + ctx.globalAlpha=0.75; + ctx.globalCompositeOperation='lighter'; + ctx.fillPattern(Pic('snow2.jpg'),0,0,ctx.canvas.width,ctx.canvas.height+512,512,512,0,y); + ctx.globalCompositeOperation='source-over'; + ctx.globalAlpha=1; + } + //hearts + if (Game.season=='valentines') + { + var y=(Math.floor(Game.T*2.5)%512); + ctx.globalAlpha=1; + ctx.fillPattern(Pic('heartStorm.png'),0,0,ctx.canvas.width,ctx.canvas.height+512,512,512,0,y); + ctx.globalAlpha=1; + } + Timer.track('left background'); + + Game.particlesDraw(0); + ctx.globalAlpha=1; + Timer.track('particles'); + + //big cookie shine + var s=512; + + var x=Game.cookieOriginX; + var y=Game.cookieOriginY; + + var r=Math.floor((Game.T*0.5)%360); + ctx.save(); + ctx.translate(x,y); + ctx.rotate((r/360)*Math.PI*2); + var alphaMult=1; + if (Game.bgType==2 || Game.bgType==4) alphaMult=0.5; + var pic='shine.png'; + if (goodBuff) {pic='shineGold.png';alphaMult=1;} + else if (badBuff) {pic='shineRed.png';alphaMult=1;} + if (goodBuff && Game.prefs.fancy) ctx.globalCompositeOperation='lighter'; + ctx.globalAlpha=0.5*alphaMult; + ctx.drawImage(Pic(pic),-s/2,-s/2,s,s); + ctx.rotate((-r*2/360)*Math.PI*2); + ctx.globalAlpha=0.25*alphaMult; + ctx.drawImage(Pic(pic),-s/2,-s/2,s,s); + ctx.restore(); + Timer.track('shine'); + + if (Game.ReincarnateTimer>0) + { + ctx.globalAlpha=1-Game.ReincarnateTimer/Game.ReincarnateDuration; + ctx.fillStyle='#000'; + ctx.fillRect(0,0,ctx.canvas.width,ctx.canvas.height); + ctx.globalAlpha=1; + } + + if (showDragon) + { + //big dragon + var s=300*2*(1+Math.sin(Game.T*0.013)*0.1); + var x=Game.cookieOriginX-s/2; + var y=Game.cookieOriginY-s/(1.4+0.2*Math.sin(Game.T*0.01)); + ctx.drawImage(Pic('dragonBG.png'),x,y,s,s); + } + + //big cookie + if (false)//don't do that + { + ctx.globalAlpha=1; + var amount=Math.floor(Game.cookies).toString(); + var digits=amount.length; + var space=0; + for (var i=0;i0) space-=s*(1-num/10)/2; + if (i==0 && num>1) space+=s*0.1; + for (var ii=0;ii0.997) w=1.5; + else if (w>0.994) w=0.5; + else w=0; + w*=-4; + if (fancy) w+=Math.sin((n+Game.T*0.01)*Math.PI/2)*4; + var x=0; + var y=(140/* *Game.BigCookieSize*/+n*16+w)-16; + + var rot=7.2;//(1/50)*360 + if (i==0 && fancy) rot-=Game.T*0.1; + if (i%50==0) rot+=7.2/2; + ctx.rotate((rot/360)*Math.PI*2); + ctx.drawImage(pic,0,0,32,32,x,y,32,32); + //ctx.drawImage(pic,32*(i==spe),0,32,32,x,y,32,32); + + /*if (i==spe) + { + y+=16; + x=Game.cookieOriginX+Math.sin(-((r-5)/360)*Math.PI*2)*y; + y=Game.cookieOriginY+Math.cos(-((r-5)/360)*Math.PI*2)*y; + if (Game.CanClick && ctx && Math.abs(Game.mouseX-x)<16 && Math.abs(Game.mouseY-y)<16) Game.mousePointer=1; + }*/ + } + ctx.restore(); + Timer.track('cursors'); + } + } + else + { + var tBase=Math.max(0,(Game.AscendTimer-Game.AscendBreakpoint)/(Game.AscendDuration-Game.AscendBreakpoint)); + //big crumbling cookie + //var t=(3*Math.pow(tBase,2)-2*Math.pow(tBase,3));//S curve + var t=Math.pow(tBase,0.5); + + var shake=0; + if (Game.AscendTimer0) + { + ctx.save(); + ctx.globalAlpha=1-Math.pow(t,0.5); + ctx.translate(x,y); + ctx.globalCompositeOperation='lighter'; + ctx.rotate(Game.T*0.007); + s=0.5+Math.pow(tBase,0.6)*1; + var s2=(600)*s; + ctx.drawImage(Pic('heavenRing1.jpg'),-s2/2,-s2/2,s2,s2); + ctx.rotate(-Game.T*0.002); + s=0.5+Math.pow(1-tBase,0.4)*1; + s2=(600)*s; + ctx.drawImage(Pic('heavenRing2.jpg'),-s2/2,-s2/2,s2,s2); + ctx.restore(); + } + + s=256;//*Game.BigCookieSize; + + ctx.save(); + ctx.translate(x,y); + ctx.rotate((t*(-0.1))*Math.PI*2); + + var chunks={0:7,1:6,2:3,3:2,4:8,5:1,6:9,7:5,8:0,9:4}; + s*=t/2+1; + /*ctx.globalAlpha=(1-t)*0.33; + for (var i=0;i<10;i++) + { + var d=(t-0.2)*(80+((i+2)%3)*40); + ctx.drawImage(Pic('brokenCookie.png'),256*(chunks[i]),0,256,256,-s/2+Math.sin(-(((chunks[i]+4)%10)/10)*Math.PI*2)*d,-s/2+Math.cos(-(((chunks[i]+4)%10)/10)*Math.PI*2)*d,s,s); + } + ctx.globalAlpha=(1-t)*0.66; + for (var i=0;i<10;i++) + { + var d=(t-0.1)*(80+((i+2)%3)*40); + ctx.drawImage(Pic('brokenCookie.png'),256*(chunks[i]),0,256,256,-s/2+Math.sin(-(((chunks[i]+4)%10)/10)*Math.PI*2)*d,-s/2+Math.cos(-(((chunks[i]+4)%10)/10)*Math.PI*2)*d,s,s); + }*/ + ctx.globalAlpha=1-t; + for (var i=0;i<10;i++) + { + var d=(t)*(80+((i+2)%3)*40); + var x2=(Math.random()*2-1)*5*shake; + var y2=(Math.random()*2-1)*5*shake; + ctx.drawImage(Pic('brokenCookie.png'),256*(chunks[i]),0,256,256,-s/2+Math.sin(-(((chunks[i]+4)%10)/10)*Math.PI*2)*d+x2,-s/2+Math.cos(-(((chunks[i]+4)%10)/10)*Math.PI*2)*d+y2,s,s); + } + var brokenHalo=1-Math.min(t/(1/3),1/3)*3; + if (Game.AscendTimer0) + { + ctx.globalAlpha=1-tBase/0.1; + ctx.fillStyle='#fff'; + ctx.fillRect(0,0,ctx.canvas.width,ctx.canvas.height); + ctx.globalAlpha=1; + } + if (tBase>0.8) + { + ctx.globalAlpha=(tBase-0.8)/0.2; + ctx.fillStyle='#000'; + ctx.fillRect(0,0,ctx.canvas.width,ctx.canvas.height); + ctx.globalAlpha=1; + } + } + + //milk and milk accessories + if (Game.prefs.milk) + { + var width=ctx.canvas.width; + var height=ctx.canvas.height; + var x=Math.floor((Game.T*2-(Game.milkH-Game.milkHd)*2000+480*2)%480);//Math.floor((Game.T*2+Math.sin(Game.T*0.1)*2+Math.sin(Game.T*0.03)*2-(Game.milkH-Game.milkHd)*2000+480*2)%480); + var y=(Game.milkHd)*height;//(((Game.milkHd)*ctx.canvas.height)*(1+0.05*(Math.sin(Game.T*0.017)/2+0.5))); + var a=1; + if (Game.AscendTimer>0) + { + y*=1-Math.pow((Game.AscendTimer/Game.AscendBreakpoint),2)*2; + a*=1-Math.pow((Game.AscendTimer/Game.AscendBreakpoint),2)*2; + } + else if (Game.ReincarnateTimer>0) + { + y*=1-Math.pow(1-(Game.ReincarnateTimer/Game.ReincarnateDuration),2)*2; + a*=1-Math.pow(1-(Game.ReincarnateTimer/Game.ReincarnateDuration),2)*2; + } + + if (Game.TOYS) + { + //golly + if (!Game.Toy) + { + Game.toys=[]; + Game.toysType=choose([1,2]); + Game.Toy=function(x,y) + { + this.id=Game.toys.length; + this.x=x; + this.y=y; + this.xd=Math.random()*10-5; + this.yd=Math.random()*10-5; + this.r=Math.random()*Math.PI*2; + this.rd=Math.random()*0.1-0.05; + var v=Math.random();var a=0.5;var b=0.5; + if (v<=a) v=b-b*Math.pow(1-v/a,3); else v=b+(1-b)*Math.pow((v-a)/(1-a),3); + this.s=(Game.toysType==1?64:48)*(0.1+v*1.9); + if (Game.toysType==2) this.s=(this.id%10==1)?96:48; + this.st=this.s;this.s=0; + var cookies=[[10,0]]; + for (var i in Game.Upgrades) + { + var cookie=Game.Upgrades[i]; + if (cookie.bought>0 && cookie.pool=='cookie') cookies.push(cookie.icon); + } + this.icon=choose(cookies); + this.dragged=false; + this.l=document.createElement('div'); + this.l.innerHTML=this.id; + this.l.style.cssText='cursor:pointer;border-radius:'+(this.s/2)+'px;opacity:0;width:'+this.s+'px;height:'+this.s+'px;background:#999;position:absolute;left:0px;top:0px;z-index:10000000;transform:translate(-1000px,-1000px);'; + l('sectionLeft').appendChild(this.l); + AddEvent(this.l,'mousedown',function(what){return function(){what.dragged=true;};}(this)); + AddEvent(this.l,'mouseup',function(what){return function(){what.dragged=false;};}(this)); + Game.toys.push(this); + return this; + } + for (var i=0;i=height-(Game.milkHd)*height+8) + { + me.xd*=0.85; + me.yd*=0.85; + me.rd*=0.85; + me.yd-=1; + me.xd+=(Math.random()*1-0.5)*0.3; + me.yd+=(Math.random()*1-0.5)*0.05; + me.rd+=(Math.random()*1-0.5)*0.02; + } + else + { + me.xd*=0.99; + me.rd*=0.99; + me.yd+=1; + } + me.yd*=(Math.min(1,Math.abs(me.y-(height-(Game.milkHd)*height)/16))); + me.rd+=me.xd*0.01/(me.s/(Game.toysType==1?64:48)); + if (me.xwidth-me.s/2 && me.xd>0) me.xd=Math.min(-0.1,-me.xd*0.6); else if (me.x>width-me.s/2) {me.xd=0;me.x=width-me.s/2;} + me.xd=Math.min(Math.max(me.xd,-30),30); + me.yd=Math.min(Math.max(me.yd,-30),30); + me.rd=Math.min(Math.max(me.rd,-0.5),0.5); + me.x+=me.xd; + me.y+=me.yd; + me.r+=me.rd; + me.r=me.r%(Math.PI*2); + me.s+=(me.st-me.s)*0.5; + if (Game.toysType==2 && !me.dragged && Math.random()<0.003) me.st=choose([48,48,48,48,96]); + if (me.dragged) + { + me.x=Game.mouseX; + me.y=Game.mouseY; + me.xd+=((Game.mouseX-Game.mouseX2)*3-me.xd)*0.5; + me.yd+=((Game.mouseY-Game.mouseY2)*3-me.yd)*0.5 + me.l.style.transform='translate('+(me.x-me.s/2)+'px,'+(me.y-me.s/2)+'px) scale(50)'; + } + else me.l.style.transform='translate('+(me.x-me.s/2)+'px,'+(me.y-me.s/2)+'px)'; + me.l.style.width=me.s+'px'; + me.l.style.height=me.s+'px'; + ctx.save(); + ctx.translate(me.x,me.y); + ctx.rotate(me.r); + if (Game.toysType==1) ctx.drawImage(Pic('smallCookies.png'),(me.id%8)*64,0,64,64,-me.s/2,-me.s/2,me.s,me.s); + else ctx.drawImage(Pic('icons.png'),me.icon[0]*48,me.icon[1]*48,48,48,-me.s/2,-me.s/2,me.s,me.s); + ctx.restore(); + } + } + + var pic=Game.Milk.pic; + if (Game.milkType!=0 && Game.ascensionMode!=1) pic=Game.MilksByChoice[Game.milkType].pic; + ctx.globalAlpha=0.9*a; + ctx.fillPattern(Pic(pic+'.png'),0,height-y,width+480,1,480,480,x,0); + + ctx.fillStyle='#000'; + ctx.fillRect(0,height-y+480,width,Math.max(0,(y-480))); + ctx.globalAlpha=1; + + Timer.track('milk'); + } + + if (Game.AscendTimer>0) + { + ctx.drawImage(Pic('shadedBordersSoft.png'),0,0,ctx.canvas.width,ctx.canvas.height); + } + + if (Game.AscendTimer==0) + { + Game.DrawWrinklers();Timer.track('wrinklers'); + Game.DrawSpecial();Timer.track('evolvables'); + + Game.particlesDraw(2);Timer.track('text particles'); + + //shiny border during frenzies etc + ctx.globalAlpha=1; + var borders='shadedBordersSoft.png'; + if (goodBuff) borders='shadedBordersGold.png'; + else if (badBuff) borders='shadedBordersRed.png'; + if (goodBuff && Game.prefs.fancy) ctx.globalCompositeOperation='lighter'; + ctx.drawImage(Pic(borders),0,0,ctx.canvas.width,ctx.canvas.height); + if (goodBuff && Game.prefs.fancy) ctx.globalCompositeOperation='source-over'; } - if (Game.Has(drop) || Game.HasUnlocked(drop)) return; - Game.Unlock(drop); - if (Game.prefs.popups) Game.Popup('You find :
'+drop+'!'); - else Game.Notify('You found an egg!',''+drop+'',Game.Upgrades[drop].icon); } }; - order=10032; - Game.NewUpgradeCookie({name:'Caramel macarons',desc:'The saltiest, chewiest of them all.',icon:[25,3],require:'Box of macarons', power:3,price: 9999999999999999999999}); - Game.NewUpgradeCookie({name:'Licorice macarons',desc:'Also known as "blackarons".',icon:[25,4],require:'Box of macarons', power:3,price: 9999999999999999999999999}); + /*===================================================================================== + INITIALIZATION END; GAME READY TO LAUNCH + =======================================================================================*/ - order=525; - new Game.TieredUpgrade('Taller tellers','Banks are twice as efficient.Able to process a higher amount of transactions. Careful though, as taller tellers tell tall tales.','Bank',1); - new Game.TieredUpgrade('Scissor-resistant credit cards','Banks are twice as efficient.For those truly valued customers.','Bank',2); - new Game.TieredUpgrade('Acid-proof vaults','Banks are twice as efficient.You know what they say : better safe than sorry.','Bank',3); - new Game.TieredUpgrade('Chocolate coins','Banks are twice as efficient.This revolutionary currency is much easier to melt from and into ingots - and tastes much better, for a change.','Bank',4); - new Game.TieredUpgrade('Exponential interest rates','Banks are twice as efficient.Can\'t argue with mathematics! Now fork it over.','Bank',5); - new Game.TieredUpgrade('Financial zen','Banks are twice as efficient.The ultimate grail of economic thought; the feng shui of big money, the stock market yoga - the Heimlich maneuver of dimes and nickels.','Bank',6); + Game.killShimmers(); - order=550; - new Game.TieredUpgrade('Golden idols','Temples are twice as efficient.Lure even greedier adventurers to retrieve your cookies. Now that\'s a real idol game!','Temple',1); - new Game.TieredUpgrade('Sacrifices','Temples are twice as efficient.What\'s a life to a gigaton of cookies?','Temple',2); - new Game.TieredUpgrade('Delicious blessing','Temples are twice as efficient.And lo, the Baker\'s almighty spoon came down and distributed holy gifts unto the believers - shimmering sugar, and chocolate dark as night, and all manner of wheats. And boy let me tell you, that party was mighty gnarly.','Temple',3); - new Game.TieredUpgrade('Sun festival','Temples are twice as efficient.Free the primordial powers of your temples with these annual celebrations involving fire-breathers, traditional dancing, ritual beheadings and other merriments!','Temple',4); - new Game.TieredUpgrade('Enlarged pantheon','Temples are twice as efficient.Enough spiritual inadequacy! More divinities than you\'ll ever need, or your money back! 100% guaranteed!','Temple',5); - new Game.TieredUpgrade('Great Baker in the sky','Temples are twice as efficient.This is it. The ultimate deity has finally cast Their sublimely divine eye upon your operation; whether this is a good thing or possibly the end of days is something you should find out very soon.','Temple',6); - - order=575; - new Game.TieredUpgrade('Pointier hats','Wizard towers are twice as efficient.Tests have shown increased thaumic receptivity relative to the geometric proportions of wizardly conic implements.','Wizard tower',1); - new Game.TieredUpgrade('Beardlier beards','Wizard towers are twice as efficient.Haven\'t you heard? The beard is the word.','Wizard tower',2); - new Game.TieredUpgrade('Ancient grimoires','Wizard towers are twice as efficient.Contain interesting spells such as "Turn Water To Drool", "Grow Eyebrows On Furniture" and "Summon Politician".','Wizard tower',3); - new Game.TieredUpgrade('Kitchen curses','Wizard towers are twice as efficient.Exotic magic involved in all things pastry-related. Hexcellent!','Wizard tower',4); - new Game.TieredUpgrade('School of sorcery','Wizard towers are twice as efficient.This cookie-funded academy of witchcraft is home to the 4 prestigious houses of magic : the Jocks, the Nerds, the Preps, and the Deathmunchers.','Wizard tower',5); - new Game.TieredUpgrade('Dark formulas','Wizard towers are twice as efficient.Eldritch forces are at work behind these spells - you get the feeling you really shouldn\'t be messing with those. But I mean, free cookies, right?','Wizard tower',6); - - order=250; - Game.GrandmaSynergy('Banker grandmas','A nice banker to cash in more cookies.','Bank'); - Game.GrandmaSynergy('Priestess grandmas','A nice priestess to praise the one true Baker in the sky.','Temple'); - Game.GrandmaSynergy('Witch grandmas','A nice witch to cast a zip, and a zoop, and poof! Cookies.','Wizard tower'); - - - - order=0; - new Game.Upgrade('Tin of british tea biscuits','Contains an assortment of fancy biscuits.Every time is tea time.',25,[21,8]);Game.last.pool='prestige';Game.last.parents=['Heavenly cookies']; - new Game.Upgrade('Box of macarons','Contains an assortment of macarons.Multicolored delicacies filled with various kinds of jam.
Not to be confused with macaroons, macaroni, macarena or any of that nonsense.
',25,[20,8]);Game.last.pool='prestige';Game.last.parents=['Heavenly cookies']; - new Game.Upgrade('Box of brand biscuits','Contains an assortment of popular biscuits.They\'re brand new!',25,[20,9]);Game.last.pool='prestige';Game.last.parents=['Heavenly cookies']; - - order=10020; - Game.NewUpgradeCookie({name:'Pure black chocolate cookies',desc:'Dipped in a lab-made substance darker than the darkest cocoa (dubbed "chocoalate").',icon:[26,3],power: 5,price: 9999999999999999*5}); - Game.NewUpgradeCookie({name:'Pure white chocolate cookies',desc:'Elaborated on the nano-scale, the coating on this biscuit is able to refract light even in a pitch-black environment.',icon:[26,4],power: 5,price: 9999999999999999*5}); - Game.NewUpgradeCookie({name:'Ladyfingers',desc:'Cleaned and sanitized so well you\'d swear they\'re actual biscuits.',icon:[27,3],power: 3,price: 99999999999999999}); - Game.NewUpgradeCookie({name:'Tuiles',desc:'These never go out of tile.',icon:[27,4],power: 3,price: 99999999999999999*5}); - Game.NewUpgradeCookie({name:'Chocolate-stuffed biscuits',desc:'A princely snack!
The holes are so the chocolate stuffing can breathe.',icon:[28,3],power: 3,price: 999999999999999999}); - Game.NewUpgradeCookie({name:'Checker cookies',desc:'A square cookie? This solves so many storage and packaging problems! You\'re a genius!',icon:[28,4],power: 3,price: 999999999999999999*5}); - Game.NewUpgradeCookie({name:'Butter cookies',desc:'These melt right off your mouth and into your heart. (Let\'s face it, they\'re rather fattening.)',icon:[29,3],power: 3,price: 9999999999999999999}); - Game.NewUpgradeCookie({name:'Cream cookies',desc:'It\'s like two chocolate chip cookies! But brought together with the magic of cream! It\'s fiendishly perfect!',icon:[29,4],power: 3,price: 9999999999999999999*5}); - - order=0; - var desc='Placing an upgrade in this slot will make its effects permanent across all playthroughs.'; - new Game.Upgrade('Permanent upgrade slot I',desc, 100,[0,10]);Game.last.pool='prestige';Game.last.iconFunction=function(){return Game.PermanentSlotIcon(0);};Game.last.activateFunction=function(){Game.AssignPermanentSlot(0);}; - new Game.Upgrade('Permanent upgrade slot II',desc, 20000,[1,10]);Game.last.pool='prestige';Game.last.parents=['Permanent upgrade slot I'];Game.last.iconFunction=function(){return Game.PermanentSlotIcon(1);};Game.last.activateFunction=function(){Game.AssignPermanentSlot(1);}; - new Game.Upgrade('Permanent upgrade slot III',desc, 3000000,[2,10]);Game.last.pool='prestige';Game.last.parents=['Permanent upgrade slot II'];Game.last.iconFunction=function(){return Game.PermanentSlotIcon(2);};Game.last.activateFunction=function(){Game.AssignPermanentSlot(2);}; - new Game.Upgrade('Permanent upgrade slot IV',desc, 400000000,[3,10]);Game.last.pool='prestige';Game.last.parents=['Permanent upgrade slot III'];Game.last.iconFunction=function(){return Game.PermanentSlotIcon(3);};Game.last.activateFunction=function(){Game.AssignPermanentSlot(3);}; - new Game.Upgrade('Permanent upgrade slot V',desc, 50000000000,[4,10]);Game.last.pool='prestige';Game.last.parents=['Permanent upgrade slot IV'];Game.last.iconFunction=function(){return Game.PermanentSlotIcon(4);};Game.last.activateFunction=function(){Game.AssignPermanentSlot(4);}; - - var slots=['Permanent upgrade slot I','Permanent upgrade slot II','Permanent upgrade slot III','Permanent upgrade slot IV','Permanent upgrade slot V']; - for (var i=0;iClick to activate.'); - var upgrade=Game.UpgradesById[Game.permanentUpgrades[i]]; - return '
'+'Current :
'+upgrade.name+'
'+this.desc+(context=='stats'?'':'
Click to activate.'); - };}(i); + Game.popups=0; + Game.SetAllUpgrades(1); + Game.SetAllAchievs(1); + Game.popups=0; + Game.Earn(999999999999999999999999999999); + Game.MaxSpecials(); + Game.nextResearch=0; + Game.researchT=-1; + Game.upgradesToRebuild=1; + Game.recalculateGains=1; + Game.popups=1; + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + if (me.minigame && me.minigame.onRuinTheFun) me.minigame.onRuinTheFun(); + } + if (!silent) + { + if (Game.prefs.popups) Game.Popup('Thou doth ruineth the fun!'); + else Game.Notify('Thou doth ruineth the fun!','You\'re free. Free at last.',[11,5]); + } + return 'You feel a bitter taste in your mouth...'; } - Game.PermanentSlotIcon=function(slot) + Game.SetAllUpgrades=function(on) { - if (Game.permanentUpgrades[slot]==-1) return [slot,10]; - return Game.UpgradesById[Game.permanentUpgrades[slot]].icon; + Game.popups=0; + var leftout=['Magic shenanigans','Occult obstruction','Glucose-charged air']; + for (var i in Game.Upgrades) + { + if (on && (Game.Upgrades[i].pool=='toggle' || leftout.indexOf(Game.Upgrades[i].name)!=-1)) {} + else if (on) Game.Upgrades[i].earn(); + else if (!on) Game.Upgrades[i].lose(); + } + Game.upgradesToRebuild=1; + Game.recalculateGains=1; + Game.popups=1; } - Game.AssignPermanentSlot=function(slot) + Game.SetAllAchievs=function(on) { - PlaySound('cookieclicker/snd/tick.mp3'); - Game.tooltip.hide(); - var list=[]; + Game.popups=0; + for (var i in Game.Achievements) + { + if (on && Game.Achievements[i].pool!='dungeon') Game.Win(Game.Achievements[i].name); + else if (!on) Game.RemoveAchiev(Game.Achievements[i].name); + } + Game.recalculateGains=1; + Game.popups=1; + } + Game.GetAllDebugs=function() + { + Game.popups=0; + for (var i in Game.Upgrades) + { + if (Game.Upgrades[i].pool=='debug') Game.Upgrades[i].earn(); + } + Game.upgradesToRebuild=1; + Game.recalculateGains=1; + Game.popups=1; + } + Game.MaxSpecials=function() + { + Game.dragonLevel=Game.dragonLevels.length-1; + Game.santaLevel=Game.santaLevels.length-1; + } + + Game.SesameReset=function() + { + var name=Game.bakeryName; + Game.HardReset(2); + Game.bakeryName=name; + Game.bakeryNameRefresh(); + Game.Achievements['Cheated cookies taste awful'].won=1; + } + + Game.debugTimersOn=0; + Game.sesame=0; + Game.OpenSesame=function() + { + var str=''; + str+='
'; + str+='
'; + + str+='
'; + str+='
Dev tools
'; + + str+='Ascend'; + str+='
'; + str+='x10'; + str+='/10
'; + str+='x1k'; + str+='/1k
'; + str+='Buy 100 of all';//for (var n=0;n<100;n++){for (var i in Game.Objects){Game.Objects[i].buy(1);}} + str+='Sell 100 of all
'; + str+='+10 lumps'; + str+='Reset levels'; + str+='
'; + str+='Ruin The Fun'; + str+='Wipe'; + str+='All debugs'; + str+='Timers '+(Game.debugTimersOn?'On':'Off')+'
'; + str+='No upgrades'; + str+='All upgrades
'; + str+='No achievs'; + str+='All achievs
'; + str+='Reset specials'; + str+='Max specials
'; + str+='Reset refills'; + str+=''+(Game.DebuggingPrestige?'Exit Ascend Edit':'Ascend Edit')+''; + str+='Debug upgrades CpS'; + str+='Re-seed'; + str+='Max heralds'; + str+='
'; + for (var i=0;i'+Game.goldenCookieChoices[i*2]+''; + //str+=''+Game.goldenCookie.choices[i*2]+''; + //str+=''+Game.goldenCookie.choices[i*2]+''; + } + str+='
'; + + l('devConsole').innerHTML=str; + + if (!l('fpsGraph')) + { + var div=document.createElement('canvas'); + div.id='fpsGraph'; + div.width=128; + div.height=64; + div.style.opacity=0.5; + div.style.pointerEvents='none'; + div.style.transformOrigin='0% 0%'; + div.style.transform='scale(0.75)'; + //l('devConsole').appendChild(div); + l('devConsole').parentNode.insertBefore(div,l('devConsole').nextSibling); + Game.fpsGraph=div; + Game.fpsGraphCtx=Game.fpsGraph.getContext('2d',{alpha:false}); + var ctx=Game.fpsGraphCtx; + ctx.fillStyle='#000'; + ctx.fillRect(0,0,128,64); + } + + l('debug').style.display='block'; + Game.sesame=1; + Game.Achievements['Cheated cookies taste awful'].won=1; + } + + Game.EditAscend=function() + { + if (!Game.DebuggingPrestige) + { + Game.DebuggingPrestige=true; + Game.AscendTimer=0; + Game.OnAscend=1; + Game.removeClass('ascendIntro'); + Game.addClass('ascending'); + } + else + { + Game.DebuggingPrestige=false; + } + Game.BuildAscendTree(); + Game.OpenSesame(); + } + + //experimental debugging function that cycles through every owned upgrade, turns it off and on, and lists how much each upgrade is participating to CpS + Game.debuggedUpgradeCpS=[]; + Game.debuggedUpgradeCpClick=[]; + Game.debugColors=['#322','#411','#600','#900','#f30','#f90','#ff0','#9f0','#0f9','#09f','#90f']; + Game.DebugUpgradeCpS=function() + { + Game.CalculateGains(); + Game.debuggedUpgradeCpS=[]; + Game.debuggedUpgradeCpClick=[]; + var CpS=Game.cookiesPs; + var CpClick=Game.computedMouseCps; for (var i in Game.Upgrades) { var me=Game.Upgrades[i]; - if (me.bought && me.unlocked && !me.noPerm && (me.pool=='' || me.pool=='cookie')) + if (me.bought) { - var fail=0; - for (var ii in Game.permanentUpgrades) {if (Game.permanentUpgrades[ii]==me.id) fail=1;}//check if not already in another permaslot - if (!fail) list.push(me); + me.bought=0; + Game.CalculateGains(); + //Game.debuggedUpgradeCpS[me.name]=CpS-Game.cookiesPs; + Game.debuggedUpgradeCpS[me.name]=(CpS/(Game.cookiesPs||1)-1); + Game.debuggedUpgradeCpClick[me.name]=(CpClick/(Game.computedMouseCps||1)-1); + me.bought=1; } } - - var sortMap=function(a,b) - { - if (a.order>b.order) return 1; - else if (a.orderPick an upgrade to make permanent'+ - - '
'+(Game.crate(Game.UpgradesById[upgrade==-1?0:upgrade],'','','upgradeToSlot'))+'
'+ - '
'+upgrades+'
'+ - '
Here are all the upgrades you\'ve purchased last playthrough.
Pick one to permanently gain its effects!
You can reassign this slot anytime you ascend.
' - ,[['Confirm','Game.permanentUpgrades['+slot+']=Game.SelectingPermanentUpgrade;Game.BuildAscendTree();Game.ClosePrompt();'],'Cancel'],0,'widePrompt'); - } - Game.SelectingPermanentUpgrade=-1; - Game.PutUpgradeInPermanentSlot=function(upgrade,slot) - { - Game.SelectingPermanentUpgrade=upgrade; - l('upgradeToSlotWrap').innerHTML=''; - l('upgradeToSlotWrap').style.display=(upgrade==-1?'none':'block'); - l('upgradeToSlotNone').style.display=(upgrade!=-1?'none':'block'); - l('upgradeToSlotWrap').innerHTML=(Game.crate(Game.UpgradesById[upgrade==-1?0:upgrade],'','','upgradeToSlot')); + Game.CalculateGains(); } - new Game.Upgrade('Starspawn','Eggs drop 10% more often.
Golden cookies appear 2% more often during Easter.',111111,[0,12]);Game.last.pool='prestige';Game.last.parents=['Season switcher']; - new Game.Upgrade('Starsnow','Christmas cookies drop 5% more often.
Reindeer appear 5% more often.',111111,[12,9]);Game.last.pool='prestige';Game.last.parents=['Season switcher']; - new Game.Upgrade('Starterror','Spooky cookies drop 10% more often.
Golden cookies appear 2% more often during Halloween.',111111,[13,8]);Game.last.pool='prestige';Game.last.parents=['Season switcher']; - new Game.Upgrade('Starlove','Heart cookies are 50% more powerful.
Golden cookies appear 2% more often during Valentines.',111111,[20,3]);Game.last.pool='prestige';Game.last.parents=['Season switcher']; - new Game.Upgrade('Startrade','Golden cookies appear 5% more often during Business day.',111111,[17,6]);Game.last.pool='prestige';Game.last.parents=['Season switcher']; - - var angelPriceFactor=7; - var desc=function(percent,total){return 'You gain another +'+percent+'% of your regular CpS while the game is closed, for a total of '+total+'%.';} - new Game.Upgrade('Angels',desc(10,15)+'Lowest-ranking at the first sphere of pastry heaven, angels are tasked with delivering new recipes to the mortals they deem worthy.',Math.pow(angelPriceFactor,1),[0,11]);Game.last.pool='prestige';Game.last.parents=['Twin Gates of Transcendence']; - new Game.Upgrade('Archangels',desc(10,25)+'Members of the first sphere of pastry heaven, archangels are responsible for the smooth functioning of the world\'s largest bakeries.',Math.pow(angelPriceFactor,2),[1,11]);Game.last.pool='prestige';Game.last.parents=['Angels']; - new Game.Upgrade('Virtues',desc(10,35)+'Found at the second sphere of pastry heaven, virtues make use of their heavenly strength to push and drag the stars of the cosmos.',Math.pow(angelPriceFactor,3),[2,11]);Game.last.pool='prestige';Game.last.parents=['Archangels']; - new Game.Upgrade('Dominions',desc(10,45)+'Ruling over the second sphere of pastry heaven, dominions hold a managerial position and are in charge of accounting and regulating schedules.',Math.pow(angelPriceFactor,4),[3,11]);Game.last.pool='prestige';Game.last.parents=['Virtues']; - new Game.Upgrade('Cherubim',desc(10,55)+'Sieging at the first sphere of pastry heaven, the four-faced cherubim serve as heavenly bouncers and bodyguards.',Math.pow(angelPriceFactor,5),[4,11]);Game.last.pool='prestige';Game.last.parents=['Dominions']; - new Game.Upgrade('Seraphim',desc(10,65)+'Leading the first sphere of pastry heaven, seraphim possess ultimate knowledge of everything pertaining to baking.',Math.pow(angelPriceFactor,6),[5,11]);Game.last.pool='prestige';Game.last.parents=['Cherubim']; - new Game.Upgrade('God',desc(10,75)+'Like Santa, but less fun.',Math.pow(angelPriceFactor,7),[6,11]);Game.last.pool='prestige';Game.last.parents=['Seraphim']; - - new Game.Upgrade('Twin Gates of Transcendence','You now keep making cookies while the game is closed, at the rate of 5% of your regular CpS and up to 1 hour after the game is closed.
(Beyond 1 hour, this is reduced by a further 90% - your rate goes down to 0.5% of your CpS.)This is one occasion you\'re always underdressed for. Don\'t worry, just rush in past the bouncer and pretend you know people.',1,[15,11]);Game.last.pool='prestige'; - - new Game.Upgrade('Heavenly luck','Golden cookies appear 5% more often.Someone up there likes you.',77,[22,6]);Game.last.pool='prestige'; - new Game.Upgrade('Lasting fortune','Golden cookies effects last 10% longer.This isn\'t your average everyday luck. This is... advanced luck.',777,[23,6]);Game.last.pool='prestige';Game.last.parents=['Heavenly luck']; - new Game.Upgrade('Decisive fate','Golden cookies stay 5% longer.Life just got a bit more intense.',7777,[10,14]);Game.last.pool='prestige';Game.last.parents=['Lasting fortune']; - - new Game.Upgrade('Divine discount','Buildings are 1% cheaper.Someone special deserves a special price.',99999,[21,7]);Game.last.pool='prestige';Game.last.parents=['Decisive fate']; - new Game.Upgrade('Divine sales','Upgrades are 1% cheaper.Everything must go!',99999,[18,7]);Game.last.pool='prestige';Game.last.parents=['Decisive fate']; - new Game.Upgrade('Divine bakeries','Cookie upgrades are 5 times cheaper.They sure know what they\'re doing.',399999,[17,7]);Game.last.pool='prestige';Game.last.parents=['Divine sales','Divine discount']; - - new Game.Upgrade('Starter kit','You start with 10 cursors.This can come in handy.',50,[0,14]);Game.last.pool='prestige';Game.last.parents=['Tin of british tea biscuits','Box of macarons','Box of brand biscuits','Tin of butter cookies']; - new Game.Upgrade('Starter kitchen','You start with 5 grandmas.Where did these come from?',5000,[1,14]);Game.last.pool='prestige';Game.last.parents=['Starter kit']; - new Game.Upgrade('Halo gloves','Clicks are 10% more powerful.Smite that cookie.',55555,[22,7]);Game.last.pool='prestige';Game.last.parents=['Starter kit']; - - new Game.Upgrade('Kitten angels','You gain more CpS the more milk you have.All cats go to heaven.',9000,[23,7]);Game.last.pool='prestige';Game.last.parents=['Dominions'];Game.last.kitten=1; - - new Game.Upgrade('Unholy bait','Wrinklers appear 5 times as fast.No wrinkler can resist the scent of worm biscuits.',44444,[15,12]);Game.last.pool='prestige';Game.last.parents=['Starter kitchen']; - new Game.Upgrade('Sacrilegious corruption','Wrinklers regurgitate 5% more cookies.Unique in the animal kingdom, the wrinkler digestive tract is able to withstand an incredible degree of dilation - provided you prod them appropriately.',444444,[19,8]);Game.last.pool='prestige';Game.last.parents=['Unholy bait']; - order=200;new Game.TieredUpgrade('Xtreme walkers','Grandmas are twice as efficient.Complete with flame decals and a little horn that goes "toot".','Grandma',7); - order=300;new Game.TieredUpgrade('Fudge fungus','Farms are twice as efficient.A sugary parasite whose tendrils help cookie growth.
Please do not breathe in the spores. In case of spore ingestion, seek medical help within the next 36 seconds.
','Farm',7); - order=400;new Game.TieredUpgrade('Planetsplitters','Mines are twice as efficient.These new state-of-the-art excavators have been tested on Merula, Globort and Flwanza VI, among other distant planets which have been curiously quiet lately.','Mine',7); - order=500;new Game.TieredUpgrade('Cyborg workforce','Factories are twice as efficient.Semi-synthetic organisms don\'t slack off, don\'t unionize, and have 20% shorter lunch breaks, making them ideal labor fodder.','Factory',7); - order=525;new Game.TieredUpgrade('Way of the wallet','Banks are twice as efficient.This new monetary school of thought is all the rage on the banking scene; follow its precepts and you may just profit from it.','Bank',7); - order=550;new Game.TieredUpgrade('Creation myth','Temples are twice as efficient.Stories have been circulating about the origins of the very first cookie that was ever baked; tales of how it all began, in the Dough beyond time and the Ovens of destiny.','Temple',7); - order=575;new Game.TieredUpgrade('Cookiemancy','Wizard towers are twice as efficient.There it is; the perfected school of baking magic. From summoning chips to hexing nuts, there is not a single part of cookie-making that hasn\'t been improved tenfold by magic tricks.','Wizard tower',7); - order=600;new Game.TieredUpgrade('Dyson sphere','Shipments are twice as efficient.You\'ve found a way to apply your knowledge of cosmic technology to slightly more local endeavors; this gigantic sphere of meta-materials, wrapping the solar system, is sure to kick your baking abilities up a notch.','Shipment',7); - order=700;new Game.TieredUpgrade('Theory of atomic fluidity','Alchemy labs are twice as efficient.Pushing alchemy to its most extreme limits, you find that everything is transmutable into anything else - lead to gold, mercury to water; more importantly, you realize that anything can -and should- be converted to cookies.','Alchemy lab',7); - order=800;new Game.TieredUpgrade('End of times back-up plan','Portals are twice as efficient.Just in case, alright?','Portal',7); - order=900;new Game.TieredUpgrade('Great loop hypothesis','Time machines are twice as efficient.What if our universe is just one instance of an infinite cycle? What if, before and after it, stretched infinite amounts of the same universe, themselves containing infinite amounts of cookies?','Time machine',7); - order=1000;new Game.TieredUpgrade('The Pulse','Antimatter condensers are twice as efficient.You\'ve tapped into the very pulse of the cosmos, a timeless rhythm along which every material and antimaterial thing beats in unison. This, somehow, means more cookies.','Antimatter condenser',7); - order=1100; - new Game.TieredUpgrade('Lux sanctorum','Prisms are twice as efficient.Your prism attendants have become increasingly mesmerized with something in the light - or maybe something beyond it; beyond us all, perhaps?','Prism',7); + for (var i in Game.customInit) {Game.customInit[i]();} - order=200;new Game.TieredUpgrade('The Unbridling','Grandmas are twice as efficient.It might be a classic tale of bad parenting, but let\'s see where grandma is going with this.','Grandma',8); - order=300;new Game.TieredUpgrade('Wheat triffids','Farms are twice as efficient.Taking care of crops is so much easier when your plants can just walk about and help around the farm.
Do not pet. Do not feed. Do not attempt to converse with.
','Farm',8); - order=400;new Game.TieredUpgrade('Canola oil wells','Mines are twice as efficient.A previously untapped resource, canola oil permeates the underground olifers which grant it its particular taste and lucrative properties.','Mine',8); - order=500;new Game.TieredUpgrade('78-hour days','Factories are twice as efficient.Why didn\'t we think of this earlier?','Factory',8); - order=525;new Game.TieredUpgrade('The stuff rationale','Banks are twice as efficient.If not now, when? If not it, what? If not things... stuff?','Bank',8); - order=550;new Game.TieredUpgrade('Theocracy','Temples are twice as efficient.You\'ve turned your cookie empire into a perfect theocracy, gathering the adoration of zillions of followers from every corner of the universe.
Don\'t let it go to your head.
','Temple',8); - order=575;new Game.TieredUpgrade('Rabbit trick','Wizard towers are twice as efficient.Using nothing more than a fancy top hat, your wizards have found a way to simultaneously curb rabbit population and produce heaps of extra cookies for basically free!
Resulting cookies may or may not be fit for vegans.
','Wizard tower',8); - order=600;new Game.TieredUpgrade('The final frontier','Shipments are twice as efficient.It\'s been a long road, getting from there to here. It\'s all worth it though - the sights are lovely and the oil prices slightly more reasonable.','Shipment',8); - order=700;new Game.TieredUpgrade('Beige goo','Alchemy labs are twice as efficient.Well now you\'ve done it. Good job. Very nice. That\'s 3 galaxies you\'ve just converted into cookies. Good thing you can hop from universe to universe.','Alchemy lab',8); - order=800;new Game.TieredUpgrade('Maddening chants','Portals are twice as efficient.A popular verse goes like so : "jau\'hn madden jau\'hn madden aeiouaeiouaeiou brbrbrbrbrbrbr"','Portal',8); - order=900;new Game.TieredUpgrade('Cookietopian moments of maybe','Time machines are twice as efficient.Reminiscing how things could have been, should have been, will have been.','Time machine',8); - order=1000;new Game.TieredUpgrade('Some other super-tiny fundamental particle? Probably?','Antimatter condensers are twice as efficient.When even the universe is running out of ideas, that\'s when you know you\'re nearing the end.','Antimatter condenser',8); - order=1100; - new Game.TieredUpgrade('Reverse shadows','Prisms are twice as efficient.Oh man, this is really messing with your eyes.','Prism',8); + if (!Game.LoadSave()) + {//try to load the save when we open the page. if this fails, try to brute-force it half a second later + setTimeout(function(){ + var local=Game.localStorageGet(Game.SaveTo); + Game.LoadSave(local); + },500); + } + Game.ready=1; + setTimeout(function(){if (typeof showAds==='undefined' && (!l('detectAds') || l('detectAds').clientHeight<1)) Game.addClass('noAds');},500); + l('javascriptError').innerHTML=''; + l('javascriptError').style.display='none'; + Game.Loop(); + Game.Draw(); + } + /*===================================================================================== + LOGIC + =======================================================================================*/ + Game.Logic=function() + { + Game.bounds=Game.l.getBoundingClientRect(); - order=20000; - new Game.Upgrade('Kitten accountants','You gain more CpS the more milk you have.business going great, sir',900000000000000000000000,Game.GetIcon('Kitten',6));Game.last.kitten=1;Game.MakeTiered(Game.last,6,18); - new Game.Upgrade('Kitten specialists','You gain more CpS the more milk you have.optimeowzing your workflow like whoah, sir',900000000000000000000000000,Game.GetIcon('Kitten',7));Game.last.kitten=1;Game.MakeTiered(Game.last,7,18); - new Game.Upgrade('Kitten experts','You gain more CpS the more milk you have.10 years expurrrtise in the cookie business, sir',900000000000000000000000000000,Game.GetIcon('Kitten',8));Game.last.kitten=1;Game.MakeTiered(Game.last,8,18); - - new Game.Upgrade('How to bake your dragon','Allows you to purchase a crumbly egg once you have earned 1 million cookies.A tome full of helpful tips such as "oh god, stay away from it", "why did we buy this thing, it\'s not even house-broken" and "groom twice a week in the direction of the scales".',9,[22,12]);Game.last.pool='prestige'; - - order=25100; - new Game.Upgrade('A crumbly egg','Unlocks the cookie dragon egg.Thank you for adopting this robust, fun-loving cookie dragon! It will bring you years of joy and entertainment.
Keep in a dry and cool place, and away from other house pets. Subscription to home insurance is strongly advised.
',25,[21,12]); - - new Game.Upgrade('Chimera','Synergy upgrades are 2% cheaper.
You gain another +5% of your regular CpS while the game is closed.
You retain optimal cookie production while the game is closed for 2 more days.More than the sum of its parts.',Math.pow(angelPriceFactor,9),[24,7]);Game.last.pool='prestige';Game.last.parents=['God','Lucifer','Synergies Vol. II']; - - new Game.Upgrade('Tin of butter cookies','Contains an assortment of rich butter cookies.Five varieties of danish cookies.
Complete with little paper cups.
',25,[21,9]);Game.last.pool='prestige';Game.last.parents=['Heavenly cookies']; - - new Game.Upgrade('Golden switch','Unlocks the golden switch, which passively boosts your CpS by 50% but disables golden cookies.Less clicking, more idling.',999,[21,10]);Game.last.pool='prestige';Game.last.parents=['Heavenly luck']; - - new Game.Upgrade('Classic dairy selection','Unlocks the milk selector, letting you pick which milk is displayed under your cookie.
Comes with a variety of basic flavors.Don\'t have a cow, man.',9,[1,8]);Game.last.pool='prestige';Game.last.parents=[]; - - new Game.Upgrade('Fanciful dairy selection','Contains more exotic flavors for your milk selector.Strong bones for the skeleton army.',1000000,[9,7]);Game.last.pool='prestige';Game.last.parents=['Classic dairy selection']; - - order=10300; - Game.NewUpgradeCookie({name:'Dragon cookie',desc:'Imbued with the vigor and vitality of a full-grown cookie dragon, this mystical cookie will embolden your empire for the generations to come.',icon:[10,25],power:5,price:9999999999999999*7,locked:1}); - - - order=40000; - new Game.Upgrade('Golden switch [off]','Turning this on will give you a passive +50% CpS, but prevents golden cookies from spawning.
Cost is equal to 1 hour of production.',1000000,[20,10]); - Game.last.pool='toggle';Game.last.toggleInto='Golden switch [on]'; - Game.last.priceFunc=function(){return Game.cookiesPs*60*60;} - var func=function(){ - if (Game.Has('Residual luck')) - { - var bonus=0; - var upgrades=Game.goldenCookieUpgrades; - for (var i in upgrades) {if (Game.Has(upgrades[i])) bonus++;} - return '
'+Game.listTinyOwnedUpgrades(Game.goldenCookieUpgrades)+'

The effective boost is +'+Beautify(Math.round(50+bonus*10))+'%
thanks to residual luck
and your '+bonus+' golden cookie upgrade'+(bonus==1?'':'s')+'.
'+this.desc; - } - return this.desc; - }; - Game.last.descFunc=func; - - new Game.Upgrade('Golden switch [on]','The switch is currently giving you a passive +50% CpS; it also prevents golden cookies from spawning.
Turning it off will revert those effects.
Cost is equal to 1 hour of production.',1000000,[21,10]); - Game.last.pool='toggle';Game.last.toggleInto='Golden switch [off]'; - Game.last.priceFunc=function(){return Game.cookiesPs*60*60;} - Game.last.descFunc=func; - - order=50000; - new Game.Upgrade('Milk selector','Lets you pick what flavor of milk to display.',0,[1,8]); - Game.last.descFunc=function(){ - var choice=this.choicesFunction()[Game.milkType]; - if (!choice) choice=this.choicesFunction()[0]; - return '
Current :
'+choice.name+'
'+this.desc; - }; - - Game.last.pool='toggle'; - Game.last.choicesFunction=function() + if (!Game.OnAscend && Game.AscendTimer==0) { - var rank=0; - var choices=[]; - choices[0]={name:'Automatic',icon:[0,7]}; - choices[1]={name:'Plain milk',icon:[1,8],rank:rank++}; - choices[2]={name:'Chocolate milk',icon:[2,8],rank:rank++}; - choices[3]={name:'Raspberry milk',icon:[3,8],rank:rank++}; - choices[4]={name:'Orange milk',icon:[4,8],rank:rank++}; - choices[5]={name:'Caramel milk',icon:[5,8],rank:rank++}; - choices[6]={name:'Banana milk',icon:[6,8],rank:rank++}; - choices[7]={name:'Lime milk',icon:[7,8],rank:rank++}; - choices[8]={name:'Blueberry milk',icon:[8,8],rank:rank++}; - choices[9]={name:'Strawberry milk',icon:[9,8],rank:rank++}; - choices[10]={name:'Vanilla milk',icon:[10,8],rank:rank++}; - - choices[19]={name:'Honey milk',icon:[21,23],rank:rank++}; - choices[20]={name:'Coffee milk',icon:[22,23],rank:rank++}; - choices[21]={name:'Tea milk',icon:[23,23],rank:rank++}; - choices[22]={name:'Coconut milk',icon:[24,23],rank:rank++}; - choices[23]={name:'Cherry milk',icon:[25,23],rank:rank++}; - - choices[25]={name:'Spiced milk',icon:[26,23],rank:rank++}; - choices[26]={name:'Maple milk',icon:[28,23],rank:rank++}; - choices[27]={name:'Mint milk',icon:[29,23],rank:rank++}; - choices[28]={name:'Licorice milk',icon:[30,23],rank:rank++}; - choices[29]={name:'Rose milk',icon:[31,23],rank:rank++}; - choices[30]={name:'Dragonfruit milk',icon:[21,24],rank:rank++}; - - if (Game.Has('Fanciful dairy selection')) + for (var i in Game.Objects) { - choices[11]={name:'Zebra milk',icon:[10,7],order:10,div:true}; - choices[12]={name:'Cosmic milk',icon:[9,7],order:10}; - choices[13]={name:'Flaming milk',icon:[8,7],order:10}; - choices[14]={name:'Sanguine milk',icon:[7,7],order:10}; - choices[15]={name:'Midas milk',icon:[6,7],order:10}; - choices[16]={name:'Midnight milk',icon:[5,7],order:10}; - choices[17]={name:'Green inferno milk',icon:[4,7],order:10}; - choices[18]={name:'Frostfire milk',icon:[3,7],order:10}; + if (Game.Objects[i].eachFrame) Game.Objects[i].eachFrame(); + } + Game.UpdateSpecial(); + Game.UpdateGrandmapocalypse(); + + //these are kinda fun + //if (Game.BigCookieState==2 && !Game.promptOn && Game.Scroll!=0) Game.ClickCookie(); + //if (Game.BigCookieState==1 && !Game.promptOn) Game.ClickCookie(); + + //handle graphic stuff + if (Game.prefs.wobbly) + { + if (Game.BigCookieState==1) Game.BigCookieSizeT=0.98; + else if (Game.BigCookieState==2) Game.BigCookieSizeT=1.05; + else Game.BigCookieSizeT=1; + Game.BigCookieSizeD+=(Game.BigCookieSizeT-Game.BigCookieSize)*0.75; + Game.BigCookieSizeD*=0.75; + Game.BigCookieSize+=Game.BigCookieSizeD; + Game.BigCookieSize=Math.max(0.1,Game.BigCookieSize); + } + else + { + if (Game.BigCookieState==1) Game.BigCookieSize+=(0.98-Game.BigCookieSize)*0.5; + else if (Game.BigCookieState==2) Game.BigCookieSize+=(1.05-Game.BigCookieSize)*0.5; + else Game.BigCookieSize+=(1-Game.BigCookieSize)*0.5; + } + Game.particlesUpdate(); + + if (Game.mousePointer) l('sectionLeft').style.cursor='pointer'; + else l('sectionLeft').style.cursor='auto'; + Game.mousePointer=0; + + //handle milk and milk accessories + Game.milkProgress=Game.AchievementsOwned/25; + if (Game.milkProgress>=0.5) Game.Unlock('Kitten helpers'); + if (Game.milkProgress>=1) Game.Unlock('Kitten workers'); + if (Game.milkProgress>=2) Game.Unlock('Kitten engineers'); + if (Game.milkProgress>=3) Game.Unlock('Kitten overseers'); + if (Game.milkProgress>=4) Game.Unlock('Kitten managers'); + if (Game.milkProgress>=5) Game.Unlock('Kitten accountants'); + if (Game.milkProgress>=6) Game.Unlock('Kitten specialists'); + if (Game.milkProgress>=7) Game.Unlock('Kitten experts'); + if (Game.milkProgress>=8) Game.Unlock('Kitten consultants'); + if (Game.milkProgress>=9) Game.Unlock('Kitten assistants to the regional manager'); + if (Game.milkProgress>=10) Game.Unlock('Kitten marketeers'); + if (Game.milkProgress>=11) Game.Unlock('Kitten analysts'); + if (Game.milkProgress>=12) Game.Unlock('Kitten executives'); + Game.milkH=Math.min(1,Game.milkProgress)*0.35; + Game.milkHd+=(Game.milkH-Game.milkHd)*0.02; + + Game.Milk=Game.Milks[Math.min(Math.floor(Game.milkProgress),Game.Milks.length-1)]; + + if (Game.autoclickerDetected>0) Game.autoclickerDetected--; + + //handle research + if (Game.researchT>0) + { + Game.researchT--; + } + if (Game.researchT==0 && Game.nextResearch) + { + if (!Game.Has(Game.UpgradesById[Game.nextResearch].name)) + { + Game.Unlock(Game.UpgradesById[Game.nextResearch].name); + if (Game.prefs.popups) Game.Popup('Researched : '+Game.UpgradesById[Game.nextResearch].name); + else Game.Notify('Research complete','You have discovered : '+Game.UpgradesById[Game.nextResearch].name+'.',Game.UpgradesById[Game.nextResearch].icon); + } + Game.nextResearch=0; + Game.researchT=-1; + Game.recalculateGains=1; + } + //handle seasons + if (Game.seasonT>0) + { + Game.seasonT--; + } + if (Game.seasonT<=0 && Game.season!='' && Game.season!=Game.baseSeason && !Game.Has('Eternal seasons')) + { + var str=Game.seasons[Game.season].over; + if (Game.prefs.popups) Game.Popup(str); + else Game.Notify(str,'',Game.seasons[Game.season].triggerUpgrade.icon); + if (Game.Has('Season switcher')) {Game.Unlock(Game.seasons[Game.season].trigger);Game.seasons[Game.season].triggerUpgrade.bought=0;} + Game.season=Game.baseSeason; + Game.seasonT=-1; + } + + //press ctrl to bulk-buy 10, shift to bulk-buy 100 + if (!Game.promptOn) + { + if ((Game.keys[16] || Game.keys[17]) && !Game.buyBulkShortcut) + { + Game.buyBulkOld=Game.buyBulk; + if (Game.keys[16]) Game.buyBulk=100; + if (Game.keys[17]) Game.buyBulk=10; + Game.buyBulkShortcut=1; + Game.storeBulkButton(-1); + } + } + if ((!Game.keys[16] && !Game.keys[17]) && Game.buyBulkShortcut)//release + { + Game.buyBulk=Game.buyBulkOld; + Game.buyBulkShortcut=0; + Game.storeBulkButton(-1); + } + + //handle cookies + if (Game.recalculateGains) Game.CalculateGains(); + Game.Earn(Game.cookiesPs/Game.fps);//add cookies per second + + //grow lumps + Game.doLumps(); + + //minigames + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + if (Game.isMinigameReady(me) && me.minigame.logic && Game.ascensionMode!=1) me.minigame.logic(); + } + + if (Game.specialTab!='' && Game.T%(Game.fps*3)==0) Game.ToggleSpecialMenu(1); + + //wrinklers + if (Game.cpsSucked>0) + { + Game.Dissolve((Game.cookiesPs/Game.fps)*Game.cpsSucked); + Game.cookiesSucked+=((Game.cookiesPs/Game.fps)*Game.cpsSucked); + //should be using one of the following, but I'm not sure what I'm using this stat for anymore + //Game.cookiesSucked=Game.wrinklers.reduce(function(s,w){return s+w.sucked;},0); + //for (var i in Game.wrinklers) {Game.cookiesSucked+=Game.wrinklers[i].sucked;} + } + + //var cps=Game.cookiesPs+Game.cookies*0.01;//exponential cookies + //Game.Earn(cps/Game.fps);//add cookies per second + + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + me.totalCookies+=(me.storedTotalCps*Game.globalCpsMult)/Game.fps; + } + if (Game.cookies && Game.T%Math.ceil(Game.fps/Math.min(10,Game.cookiesPs))==0 && Game.prefs.particles) Game.particleAdd();//cookie shower + + if (Game.T%(Game.fps*10)==0) Game.recalculateGains=1;//recalculate CpS every 10 seconds (for dynamic boosts such as Century egg) + + /*===================================================================================== + UNLOCKING STUFF + =======================================================================================*/ + if (Game.T%(Game.fps)==0 && Math.random()<1/500000) Game.Win('Just plain lucky');//1 chance in 500,000 every second achievement + if (Game.T%(Game.fps*5)==0 && Game.ObjectsById.length>0)//check some achievements and upgrades + { + if (isNaN(Game.cookies)) {Game.cookies=0;Game.cookiesEarned=0;Game.recalculateGains=1;} - choices[24]={name:'Soy milk',icon:[27,23],order:10}; - } - - var maxRank=Math.floor(Game.AchievementsOwned/25); - for (var i in choices) - { - if (choices[i].rank && choices[i].rank>maxRank) choices[i]=0; - } - - choices[Game.milkType].selected=1; - return choices; - } - Game.last.choicesPick=function(id) - {Game.milkType=id;} - - Game.MilksByChoice={ - 0:{pic:'milkPlain'}, - 1:{pic:'milkPlain'}, - 2:{pic:'milkChocolate'}, - 3:{pic:'milkRaspberry'}, - 4:{pic:'milkOrange'}, - 5:{pic:'milkCaramel'}, - 6:{pic:'milkBanana'}, - 7:{pic:'milkLime'}, - 8:{pic:'milkBlueberry'}, - 9:{pic:'milkStrawberry'}, - 10:{pic:'milkVanilla'}, - 11:{pic:'milkZebra'}, - 12:{pic:'milkStars'}, - 13:{pic:'milkFire'}, - 14:{pic:'milkBlood'}, - 15:{pic:'milkGold'}, - 16:{pic:'milkBlack'}, - 17:{pic:'milkGreenFire'}, - 18:{pic:'milkBlueFire'}, - 19:{pic:'milkHoney'}, - 20:{pic:'milkCoffee'}, - 21:{pic:'milkTea'}, - 22:{pic:'milkCoconut'}, - 23:{pic:'milkCherry'}, - 24:{pic:'milkSoy'}, - 25:{pic:'milkSpiced'}, - 26:{pic:'milkMaple'}, - 27:{pic:'milkMint'}, - 28:{pic:'milkLicorice'}, - 29:{pic:'milkRose'}, - 30:{pic:'milkDragonfruit'}, - }; - - - order=10300; - var butterBiscuitMult=100000000; - Game.NewUpgradeCookie({name:'Milk chocolate butter biscuit',desc:'Rewarded for owning 100 of everything.
It bears the engraving of a fine entrepreneur.',icon:[27,8],power: 10,price: 999999999999999999999*butterBiscuitMult,locked:1}); - Game.NewUpgradeCookie({name:'Dark chocolate butter biscuit',desc:'Rewarded for owning 150 of everything.
It is adorned with the image of an experienced cookie tycoon.',icon:[27,9],power: 10,price: 999999999999999999999999*butterBiscuitMult,locked:1}); - Game.NewUpgradeCookie({name:'White chocolate butter biscuit',desc:'Rewarded for owning 200 of everything.
The chocolate is chiseled to depict a masterful pastry magnate.',icon:[28,9],power: 10,price: 999999999999999999999999999*butterBiscuitMult,locked:1}); - Game.NewUpgradeCookie({name:'Ruby chocolate butter biscuit',desc:'Rewarded for owning 250 of everything.
Covered in a rare red chocolate, this biscuit is etched to represent the face of a cookie industrialist gone mad with power.',icon:[28,8],power: 10,price: 999999999999999999999999999999*butterBiscuitMult,locked:1}); - - order=10020; - Game.NewUpgradeCookie({name:'Gingersnaps',desc:'Cookies with a soul. Probably.',icon:[29,10],power: 4,price: 99999999999999999999}); - Game.NewUpgradeCookie({name:'Cinnamon cookies',desc:'The secret is in the patented swirly glazing.',icon:[23,8],power: 4,price: 99999999999999999999*5}); - Game.NewUpgradeCookie({name:'Vanity cookies',desc:'One tiny candied fruit sits atop this decadent cookie.',icon:[22,8],power: 4,price: 999999999999999999999}); - Game.NewUpgradeCookie({name:'Cigars',desc:'Close, but no match for those extravagant cookie straws they serve in coffee shops these days.',icon:[25,8],power: 4,price: 999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Pinwheel cookies',desc:'Bringing you the dizzying combination of brown flavor and beige taste!',icon:[22,10],power: 4,price: 9999999999999999999999}); - Game.NewUpgradeCookie({name:'Fudge squares',desc:'Not exactly cookies, but you won\'t care once you\'ve tasted one of these.
They\'re so good, it\'s fudged-up!',icon:[24,8],power: 4,price: 9999999999999999999999*5}); - - order=10030; - Game.NewUpgradeCookie({name:'Digits',desc:'Three flavors, zero phalanges.',icon:[26,8],require:'Box of brand biscuits',power: 2, price: 999999999999999*5}); - - order=10029; - Game.NewUpgradeCookie({name:'Butter horseshoes',desc:'It would behoove you to not overindulge in these.',icon:[22,9],require:'Tin of butter cookies',power: 4, price: 99999999999999999999999}); - Game.NewUpgradeCookie({name:'Butter pucks',desc:'Lord, what fools these mortals be!
(This is kind of a hokey reference.)',icon:[23,9],require:'Tin of butter cookies',power: 4, price: 99999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Butter knots',desc:'Look, you can call these pretzels if you want, but you\'d just be fooling yourself, wouldn\'t you?',icon:[24,9],require:'Tin of butter cookies',power: 4, price: 999999999999999999999999}); - Game.NewUpgradeCookie({name:'Butter slabs',desc:'Nothing butter than a slab to the face.',icon:[25,9],require:'Tin of butter cookies',power: 4, price: 999999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Butter swirls',desc:'These are equal parts sugar, butter, and warm fuzzy feelings - all of which cause millions of deaths everyday.',icon:[26,9],require:'Tin of butter cookies',power: 4, price: 9999999999999999999999999}); - - order=10020; - Game.NewUpgradeCookie({name:'Shortbread biscuits',desc:'These rich butter cookies are neither short, nor bread. What a country!',icon:[23,10],power: 4,price: 99999999999999999999999}); - Game.NewUpgradeCookie({name:'Millionaires\' shortbreads',desc:'Three thought-provoking layers of creamy chocolate, hard-working caramel and crumbly biscuit in a poignant commentary of class struggle.',icon:[24,10],power: 4,price: 99999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Caramel cookies',desc:'The polymerized carbohydrates adorning these cookies are sure to stick to your teeth for quite a while.',icon:[25,10],power: 4,price: 999999999999999999999999}); - - - var desc=function(totalHours){ - var hours=totalHours%24; - var days=Math.floor(totalHours/24); - var str=hours+(hours==1?' hour':' hours'); - if (days>0) str=days+(days==1?' day':' days')+' and '+str; - return 'You retain optimal cookie production while the game is closed for twice as long, for a total of '+str+'.'; - } - new Game.Upgrade('Belphegor',desc(2)+'A demon of shortcuts and laziness, Belphegor commands machines to do work in his stead.',Math.pow(angelPriceFactor,1),[7,11]);Game.last.pool='prestige';Game.last.parents=['Twin Gates of Transcendence']; - new Game.Upgrade('Mammon',desc(4)+'The demonic embodiment of wealth, Mammon requests a tithe of blood and gold from all his worshippers.',Math.pow(angelPriceFactor,2),[8,11]);Game.last.pool='prestige';Game.last.parents=['Belphegor']; - new Game.Upgrade('Abaddon',desc(8)+'Master of overindulgence, Abaddon governs the wrinkler brood and inspires their insatiability.',Math.pow(angelPriceFactor,3),[9,11]);Game.last.pool='prestige';Game.last.parents=['Mammon']; - new Game.Upgrade('Satan',desc(16)+'The counterpoint to everything righteous, this demon represents the nefarious influence of deceit and temptation.',Math.pow(angelPriceFactor,4),[10,11]);Game.last.pool='prestige';Game.last.parents=['Abaddon']; - new Game.Upgrade('Asmodeus',desc(32)+'This demon with three monstrous heads draws his power from the all-consuming desire for cookies and all things sweet.',Math.pow(angelPriceFactor,5),[11,11]);Game.last.pool='prestige';Game.last.parents=['Satan']; - new Game.Upgrade('Beelzebub',desc(64)+'The festering incarnation of blight and disease, Beelzebub rules over the vast armies of pastry inferno.',Math.pow(angelPriceFactor,6),[12,11]);Game.last.pool='prestige';Game.last.parents=['Asmodeus']; - new Game.Upgrade('Lucifer',desc(128)+'Also known as the Lightbringer, this infernal prince\'s tremendous ego caused him to be cast down from pastry heaven.',Math.pow(angelPriceFactor,7),[13,11]);Game.last.pool='prestige';Game.last.parents=['Beelzebub']; - - new Game.Upgrade('Golden cookie alert sound','Unlocks the golden cookie sound selector, which lets you pick whether golden cookies emit a sound when appearing or not.A sound decision.',9999,[28,6]);Game.last.pool='prestige';Game.last.parents=['Decisive fate','Golden switch']; - - order=49900; - new Game.Upgrade('Golden cookie sound selector','Lets you change the sound golden cookies make when they spawn.',0,[28,6]); - Game.last.descFunc=function(){ - var choice=this.choicesFunction()[Game.chimeType]; - return '
Current :
'+choice.name+'
'+this.desc; - }; - - Game.last.pool='toggle'; - Game.last.choicesFunction=function() - { - var choices=[]; - choices[0]={name:'No sound',icon:[0,7]}; - choices[1]={name:'Chime',icon:[22,6]}; - - choices[Game.chimeType].selected=1; - return choices; - } - Game.last.choicesPick=function(id) - {Game.chimeType=id;} - - - new Game.Upgrade('Basic wallpaper assortment','Unlocks the background selector, letting you select the game\'s background.
Comes with a variety of basic flavors.Prioritizing aesthetics over crucial utilitarian upgrades? Color me impressed.',99,[29,5]);Game.last.pool='prestige';Game.last.parents=['Classic dairy selection']; - - new Game.Upgrade('Legacy','This is the first heavenly upgrade; it unlocks the Heavenly chips system.
Each time you ascend, the cookies you made in your past life are turned into heavenly chips and prestige.
Heavenly chips can be spent on a variety of permanent transcendental upgrades.
Your prestige level also gives you a permanent +1% CpS per level.We\'ve all been waiting for you.',1,[21,6]);Game.last.pool='prestige';Game.last.parents=[]; - - new Game.Upgrade('Elder spice','You can attract 2 more wrinklers.The cookie your cookie could smell like.',444444,[19,8]);Game.last.pool='prestige';Game.last.parents=['Unholy bait']; - - new Game.Upgrade('Residual luck','While the golden switch is on, you gain an additional +10% CpS per golden cookie upgrade owned.Fortune comes in many flavors.',99999,[27,6]);Game.last.pool='prestige';Game.last.parents=['Golden switch']; - - order=150;new Game.Upgrade('Fantasteel mouse','Clicking gains +1% of your CpS.You could be clicking using your touchpad and we\'d be none the wiser.',5000000000000000000,[11,17]);Game.MakeTiered(Game.last,8,11); - new Game.Upgrade('Nevercrack mouse','Clicking gains +1% of your CpS.How much beefier can you make a mouse until it\'s considered a rat?',500000000000000000000,[11,18]);Game.MakeTiered(Game.last,9,11); - - - new Game.Upgrade('Five-finger discount','All upgrades are 1% cheaper per 100 cursors.Stick it to the man.',555555,[28,7],function(){Game.upgradesToRebuild=1;});Game.last.pool='prestige';Game.last.parents=['Halo gloves','Abaddon']; - - - order=5000; - Game.SynergyUpgrade('Future almanacs','Lets you predict optimal planting times. It\'s crazy what time travel can do!','Farm','Time machine','synergy1'); - Game.SynergyUpgrade('Rain prayer','A deeply spiritual ceremonial involving complicated dance moves and high-tech cloud-busting lasers.','Farm','Temple','synergy2'); - - Game.SynergyUpgrade('Seismic magic','Surprise earthquakes are an old favorite of wizardly frat houses.','Mine','Wizard tower','synergy1'); - Game.SynergyUpgrade('Asteroid mining','As per the 1974 United Cosmic Convention, comets, moons, and inhabited planetoids are no longer legally excavatable.
But hey, a space bribe goes a long way.
','Mine','Shipment','synergy2'); - - Game.SynergyUpgrade('Quantum electronics','Your machines won\'t even be sure if they\'re on or off!','Factory','Antimatter condenser','synergy1'); - Game.SynergyUpgrade('Temporal overclocking','Introduce more quickitude in your system for increased speedation of fastness.','Factory','Time machine','synergy2'); - - Game.SynergyUpgrade('Contracts from beyond','Make sure to read the fine print!','Bank','Portal','synergy1'); - Game.SynergyUpgrade('Printing presses','Fake bills so real, they\'re almost worth the ink they\'re printed with.','Bank','Factory','synergy2'); - - Game.SynergyUpgrade('Paganism','Some deities are better left unworshipped.','Temple','Portal','synergy1'); - Game.SynergyUpgrade('God particle','Turns out God is much tinier than we thought, I guess.','Temple','Antimatter condenser','synergy2'); - - Game.SynergyUpgrade('Arcane knowledge','Some things were never meant to be known - only mildly speculated.','Wizard tower','Alchemy lab','synergy1'); - Game.SynergyUpgrade('Magical botany','Already known in some reactionary newspapers as "the wizard\'s GMOs".','Wizard tower','Farm','synergy2'); - - Game.SynergyUpgrade('Fossil fuels','Somehow better than plutonium for powering rockets.
Extracted from the fuels of ancient, fossilized civilizations.
','Shipment','Mine','synergy1'); - Game.SynergyUpgrade('Shipyards','Where carpentry, blind luck, and asbestos insulation unite to produce the most dazzling spaceships on the planet.','Shipment','Factory','synergy2'); - - Game.SynergyUpgrade('Primordial ores','Only when refining the purest metals will you extract the sweetest sap of the earth.','Alchemy lab','Mine','synergy1'); - Game.SynergyUpgrade('Gold fund','If gold is the backbone of the economy, cookies, surely, are its hip joints.','Alchemy lab','Bank','synergy2'); - - Game.SynergyUpgrade('Infernal crops','Sprinkle regularly with FIRE.','Portal','Farm','synergy1'); - Game.SynergyUpgrade('Abysmal glimmer','Someone, or something, is staring back at you.
Perhaps at all of us.
','Portal','Prism','synergy2'); - - Game.SynergyUpgrade('Relativistic parsec-skipping','People will tell you this isn\'t physically possible.
These are people you don\'t want on your ship.
','Time machine','Shipment','synergy1'); - Game.SynergyUpgrade('Primeval glow','From unending times, an ancient light still shines, impossibly pure and fragile in its old age.','Time machine','Prism','synergy2'); - - Game.SynergyUpgrade('Extra physics funding','Time to put your money where your particle colliders are.','Antimatter condenser','Bank','synergy1'); - Game.SynergyUpgrade('Chemical proficiency','Discover exciting new elements, such as Fleshmeltium, Inert Shampoo Byproduct #17 and Carbon++!','Antimatter condenser','Alchemy lab','synergy2'); - - Game.SynergyUpgrade('Light magic','Actually not to be taken lightly! No, I\'m serious. 178 people died last year. You don\'t mess around with magic.','Prism','Wizard tower','synergy1'); - Game.SynergyUpgrade('Mystical energies','Something beckons from within the light. It is warm, comforting, and apparently the cause for several kinds of exotic skin cancers.','Prism','Temple','synergy2'); - - - new Game.Upgrade('Synergies Vol. I','Unlocks a new tier of upgrades that affect 2 buildings at the same time.
Synergies appear once you have 15 of both buildings.The many beats the few.',222222,[10,20]);Game.last.pool='prestige';Game.last.parents=['Satan','Dominions']; - new Game.Upgrade('Synergies Vol. II','Unlocks a new tier of upgrades that affect 2 buildings at the same time.
Synergies appear once you have 75 of both buildings.The several beats the many.',2222222,[10,29]);Game.last.pool='prestige';Game.last.parents=['Beelzebub','Seraphim','Synergies Vol. I']; - - new Game.Upgrade('Heavenly cookies','Cookie production multiplier +10% permanently.Baked with heavenly chips. An otherwordly flavor that transcends time and space.',3,[25,12]);Game.last.pool='prestige';Game.last.parents=['Legacy'];Game.last.power=10;Game.last.pseudoCookie=true; - new Game.Upgrade('Wrinkly cookies','Cookie production multiplier +10% permanently.The result of regular cookies left to age out for countless eons in a place where time and space are meaningless.',6666666,[26,12]);Game.last.pool='prestige';Game.last.parents=['Sacrilegious corruption','Elder spice'];Game.last.power=10;Game.last.pseudoCookie=true; - new Game.Upgrade('Distilled essence of redoubled luck','Golden cookies (and all other things that spawn, such as reindeer) have 1% chance of being doubled.Tastes glittery. The empty phial makes for a great pencil holder.',7777777,[27,12]);Game.last.pool='prestige';Game.last.parents=['Divine bakeries','Residual luck']; - - order=40000; - new Game.Upgrade('Occult obstruction','Cookie production reduced to 0.If symptoms persist, consult a doctor.',7,[15,5]);//debug purposes only - Game.last.pool='debug'; - new Game.Upgrade('Glucose-charged air','Sugar lumps coalesce a whole lot faster.Don\'t breathe too much or you\'ll get diabetes!',7,[29,16]);//debug purposes only - Game.last.pool='debug'; - - order=10300; - Game.NewUpgradeCookie({name:'Lavender chocolate butter biscuit',desc:'Rewarded for owning 300 of everything.
This subtly-flavored biscuit represents the accomplishments of decades of top-secret research. The molded design on the chocolate resembles a well-known entrepreneur who gave their all to the ancient path of baking.',icon:[26,10],power: 10,price: 999999999999999999999999999999999*butterBiscuitMult,locked:1}); - - order=10030; - Game.NewUpgradeCookie({name:'Lombardia cookies',desc:'These come from those farms with the really good memory.',icon:[23,13],require:'Box of brand biscuits',power: 3, price: 999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Bastenaken cookies',desc:'French cookies made of delicious cinnamon and candy sugar. These do not contain Nuts!',icon:[24,13],require:'Box of brand biscuits',power: 3, price: 999999999999999999999*5}); - - order=10020; - Game.NewUpgradeCookie({name:'Pecan sandies',desc:'Stick a nut on a cookie and call it a day! Name your band after it! Whatever!',icon:[25,13],power: 4,price: 999999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Moravian spice cookies',desc:'Popular for being the world\'s moravianest cookies.',icon:[26,13],power: 4,price: 9999999999999999999999999}); - Game.NewUpgradeCookie({name:'Anzac biscuits',desc:'Army biscuits from a bakery down under, containing no eggs but yes oats.',icon:[27,13],power: 4,price: 9999999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Buttercakes',desc:'Glistening with cholesterol, these cookies moistly straddle the line between the legal definition of a cookie and just a straight-up stick of butter.',icon:[29,13],power: 4,price: 99999999999999999999999999}); - Game.NewUpgradeCookie({name:'Ice cream sandwiches',desc:'In an alternate universe, "ice cream sandwich" designates an ice cream cone filled with bacon, lettuce, and tomatoes. Maybe some sprinkles too.',icon:[28,13],power: 4,price: 99999999999999999999999999*5}); - - new Game.Upgrade('Stevia Caelestis','Sugar lumps ripen an hour sooner.A plant of supernatural sweetness grown by angels in heavenly gardens.',100000000,[25,15]);Game.last.pool='prestige';Game.last.parents=['Wrinkly cookies']; - new Game.Upgrade('Diabetica Daemonicus','Sugar lumps mature an hour sooner.A malevolent, if delicious herb that is said to grow on the cliffs of the darkest abyss of the underworld.',300000000,[26,15]);Game.last.pool='prestige';Game.last.parents=['Stevia Caelestis','Lucifer']; - new Game.Upgrade('Sucralosia Inutilis','Bifurcated sugar lumps appear 5% more often and are 5% more likely to drop 2 lumps.A rare berry of uninteresting flavor that is as elusive as its uses are limited; only sought-after by the most avid collectors with too much wealth on their hands.',1000000000,[27,15]);Game.last.pool='prestige';Game.last.parents=['Diabetica Daemonicus']; - - //note : these showIf functions stop working beyond 10 quadrillion prestige level, due to loss in precision; the solution, of course, is to make sure 10 quadrillion is not an attainable prestige level - new Game.Upgrade('Lucky digit','+1% prestige level effect on CpS.
+1% golden cookie effect duration.
+1% golden cookie lifespan.This upgrade is a bit shy and only appears when your prestige level ends in 7.',777,[24,15]);Game.last.pool='prestige';Game.last.parents=['Heavenly luck'];Game.last.showIf=function(){return (Math.ceil(Game.prestige)%10==7);}; - new Game.Upgrade('Lucky number','+1% prestige level effect on CpS.
+1% golden cookie effect duration.
+1% golden cookie lifespan.This upgrade is a reclusive hermit and only appears when your prestige level ends in 777.',77777,[24,15]);Game.last.pool='prestige';Game.last.parents=['Lucky digit','Lasting fortune'];Game.last.showIf=function(){return (Math.ceil(Game.prestige)%1000==777);}; - new Game.Upgrade('Lucky payout','+1% prestige level effect on CpS.
+1% golden cookie effect duration.
+1% golden cookie lifespan.This upgrade took an oath of complete seclusion from the rest of the world and only appears when your prestige level ends in 777777.',77777777,[24,15]);Game.last.pool='prestige';Game.last.parents=['Lucky number','Decisive fate'];Game.last.showIf=function(){return (Math.ceil(Game.prestige)%1000000==777777);}; - - order=50000; - new Game.Upgrade('Background selector','Lets you pick which wallpaper to display.',0,[29,5]); - Game.last.descFunc=function(){ - var choice=this.choicesFunction()[Game.bgType]; - return '
Current :
'+choice.name+'
'+this.desc; - }; - - Game.last.pool='toggle'; - Game.last.choicesFunction=function() - { - var choices=[]; - choices[0]={name:'Automatic',icon:[0,7]}; - choices[1]={name:'Blue',icon:[21,21]}; - choices[2]={name:'Red',icon:[22,21]}; - choices[3]={name:'White',icon:[23,21]}; - choices[4]={name:'Black',icon:[24,21]}; - choices[5]={name:'Gold',icon:[25,21]}; - choices[6]={name:'Grandmas',icon:[26,21]}; - choices[7]={name:'Displeased grandmas',icon:[27,21]}; - choices[8]={name:'Angered grandmas',icon:[28,21]}; - choices[9]={name:'Money',icon:[29,21]}; - choices[Game.bgType].selected=1; - return choices; - } - Game.last.choicesPick=function(id) - {Game.bgType=id;} - - Game.BGsByChoice={ - 0:{pic:'bgBlue'}, - 1:{pic:'bgBlue'}, - 2:{pic:'bgRed'}, - 3:{pic:'bgWhite'}, - 4:{pic:'bgBlack'}, - 5:{pic:'bgGold'}, - 6:{pic:'grandmas1'}, - 7:{pic:'grandmas2'}, - 8:{pic:'grandmas3'}, - 9:{pic:'bgMoney'}, - }; - - order=255; - Game.GrandmaSynergy('Lucky grandmas','A fortunate grandma that always seems to find more cookies.','Chancemaker'); - - order=1200; - new Game.TieredUpgrade('Your lucky cookie','Chancemakers are twice as efficient.This is the first cookie you\'ve ever baked. It holds a deep sentimental value and, after all this time, an interesting smell.','Chancemaker',1); - new Game.TieredUpgrade('"All Bets Are Off" magic coin','Chancemakers are twice as efficient.A coin that always lands on the other side when flipped. Not heads, not tails, not the edge. The other side.','Chancemaker',2); - new Game.TieredUpgrade('Winning lottery ticket','Chancemakers are twice as efficient.What lottery? THE lottery, that\'s what lottery! Only lottery that matters!','Chancemaker',3); - new Game.TieredUpgrade('Four-leaf clover field','Chancemakers are twice as efficient.No giant monsters here, just a whole lot of lucky grass.','Chancemaker',4); - new Game.TieredUpgrade('A recipe book about books','Chancemakers are twice as efficient.Tip the scales in your favor with 28 creative new ways to cook the books.','Chancemaker',5); - new Game.TieredUpgrade('Leprechaun village','Chancemakers are twice as efficient.You\'ve finally become accepted among the local leprechauns, who lend you their mythical luck as a sign of friendship (as well as some rather foul-tasting tea).','Chancemaker',6); - new Game.TieredUpgrade('Improbability drive','Chancemakers are twice as efficient.A strange engine that turns statistics on their head. Recommended by the Grandmother\'s Guide to the Bakery.','Chancemaker',7); - new Game.TieredUpgrade('Antisuperstistronics','Chancemakers are twice as efficient.An exciting new field of research that makes unlucky things lucky. No mirror unbroken, no ladder unwalked under!','Chancemaker',8); - - order=5000; - Game.SynergyUpgrade('Gemmed talismans','Good-luck charms covered in ancient and excruciatingly rare crystals. A must have for job interviews!','Chancemaker','Mine','synergy1'); - - order=20000; - new Game.Upgrade('Kitten consultants','You gain more CpS the more milk you have.glad to be overpaid to work with you, sir',900000000000000000000000000000000,Game.GetIcon('Kitten',9));Game.last.kitten=1;Game.MakeTiered(Game.last,9,18); - - order=99999; - var years=Math.floor((Date.now()-new Date(2013,7,8))/(1000*60*60*24*365)); - //only updates on page load - //may behave strangely on leap years - Game.NewUpgradeCookie({name:'Birthday cookie',desc:'-',icon:[22,13],power:years,price:99999999999999999999999999999});Game.last.baseDesc='Cookie production multiplier +1% for every year Cookie Clicker has existed (currently : +'+Beautify(years)+'%).Thank you for playing Cookie Clicker!
-Orteil
';Game.last.desc=BeautifyInText(Game.last.baseDesc); - - - order=150;new Game.Upgrade('Armythril mouse','Clicking gains +1% of your CpS.This one takes about 53 people to push it around and another 48 to jump down on the button and trigger a click. You could say it\'s got some heft to it.',50000000000000000000000,[11,19]);Game.MakeTiered(Game.last,10,11); - - order=200;new Game.TieredUpgrade('Reverse dementia','Grandmas are twice as efficient.Extremely unsettling, and somehow even worse than the regular kind.','Grandma',9); - order=300;new Game.TieredUpgrade('Humane pesticides','Farms are twice as efficient.Made by people, for people, from people and ready to unleash some righteous scorching pain on those pesky insects that so deserve it.','Farm',9); - order=400;new Game.TieredUpgrade('Mole people','Mines are twice as efficient.Engineered from real human beings within your very labs, these sturdy little folks have a knack for finding the tastiest underground minerals in conditions that more expensive machinery probably wouldn\'t survive.','Mine',9); - order=500;new Game.TieredUpgrade('Machine learning','Factories are twice as efficient.You figured you might get better productivity if you actually told your workers to learn how to work the machines. Sometimes, it\'s the little things...','Factory',9); - order=525;new Game.TieredUpgrade('Edible money','Banks are twice as efficient.It\'s really quite simple; you make all currency too delicious not to eat, solving world hunger and inflation in one fell swoop!','Bank',9); - order=550;new Game.TieredUpgrade('Sick rap prayers','Temples are twice as efficient.With their ill beat and radical rhymes, these way-hip religious tunes are sure to get all the youngins who thought they were 2 cool 4 church back on the pews and praying for more! Wicked!','Temple',9); - order=575;new Game.TieredUpgrade('Deluxe tailored wands','Wizard towers are twice as efficient.In this age of science, most skillful wand-makers are now long gone; but thankfully - not all those wanders are lost.','Wizard tower',9); - order=600;new Game.TieredUpgrade('Autopilot','Shipments are twice as efficient.Your ships are now fitted with completely robotic crews! It\'s crazy how much money you save when you don\'t have to compensate the families of those lost in space.','Shipment',9); - order=700;new Game.TieredUpgrade('The advent of chemistry','Alchemy labs are twice as efficient.You know what? That whole alchemy nonsense was a load of baseless rubbish. Dear god, what were you thinking?','Alchemy lab',9); - order=800;new Game.TieredUpgrade('The real world','Portals are twice as efficient.It turns out that our universe is actually the twisted dimension of another, saner plane of reality. Time to hop on over there and loot the place!','Portal',9); - order=900;new Game.TieredUpgrade('Second seconds','Time machines are twice as efficient.That\'s twice as many seconds in the same amount of time! What a deal! Also, what in god\'s name!','Time machine',9); - order=1000;new Game.TieredUpgrade('Quantum comb','Antimatter condensers are twice as efficient.Quantum entanglement is one of those things that are so annoying to explain that we might honestly be better off without it. This is finally possible thanks to the quantum comb!','Antimatter condenser',9); - order=1100;new Game.TieredUpgrade('Crystal mirrors','Prisms are twice as efficient.Designed to filter more light back into your prisms, reaching levels of brightness that reality itself had never planned for.','Prism',9); - order=1200;new Game.TieredUpgrade('Bunnypedes','Chancemakers are twice as efficient.You\'ve taken to breeding rabbits with hundreds of paws, which makes them intrinsically very lucky and thus a very handy (if very disturbing) pet.','Chancemaker',9); - - order=20000; - new Game.Upgrade('Kitten assistants to the regional manager','You gain more CpS the more milk you have.nothing stresses meowt... except having to seek the approval of my inferiors, sir',900000000000000000000000000000000000,Game.GetIcon('Kitten',10));Game.last.kitten=1;Game.MakeTiered(Game.last,10,18); - - order=5000; - Game.SynergyUpgrade('Charm quarks','They\'re after your lucky quarks!','Chancemaker','Antimatter condenser','synergy2'); - - - order=10020; - Game.NewUpgradeCookie({name:'Pink biscuits',desc:'One of the oldest cookies. Traditionally dipped in champagne to soften it, because the French will use any opportunity to drink.',icon:[21,16],power: 4,price: 999999999999999999999999999}); - Game.NewUpgradeCookie({name:'Whole-grain cookies',desc:'Covered in seeds and other earthy-looking debris. Really going for that "5-second rule" look.',icon:[22,16],power: 4,price: 999999999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Candy cookies',desc:'These melt in your hands just a little bit.',icon:[23,16],power: 4,price: 9999999999999999999999999999}); - Game.NewUpgradeCookie({name:'Big chip cookies',desc:'You are in awe at the size of these chips. Absolute units.',icon:[24,16],power: 4,price: 9999999999999999999999999999*5}); - Game.NewUpgradeCookie({name:'One chip cookies',desc:'You get one.',icon:[25,16],power: 1,price: 99999999999999999999999999999}); - - - new Game.Upgrade('Sugar baking','Each unspent sugar lump (up to 100) gives +1% CpS.
Note : this means that spending sugar lumps will decrease your CpS until they grow back.
To bake with the sugary essence of eons themselves, you must first learn to take your sweet time.',200000000,[21,17]);Game.last.pool='prestige';Game.last.parents=['Stevia Caelestis']; - new Game.Upgrade('Sugar craving','Once an ascension, you may use the "Sugar frenzy" switch to triple your CpS for 1 hour, at the cost of 1 sugar lump.Just a little kick to sweeten the deal.',400000000,[22,17]);Game.last.pool='prestige';Game.last.parents=['Sugar baking']; - new Game.Upgrade('Sugar aging process','Each grandma (up to 600) makes sugar lumps ripen 6 seconds sooner.Aren\'t they just the sweetest?',600000000,[23,17]);Game.last.pool='prestige';Game.last.parents=['Sugar craving','Diabetica Daemonicus']; - - order=40050; - new Game.Upgrade('Sugar frenzy','Activating this will triple your CpS for 1 hour, at the cost of 1 sugar lump.
May only be used once per ascension.',0,[22,17]); - Game.last.priceLumps=1; - Game.last.pool='toggle';Game.last.toggleInto=0; - Game.last.canBuyFunc=function(){return Game.lumps>=1;}; - Game.last.clickFunction=Game.spendLump(1,'activate the sugar frenzy',function() - { - Game.Upgrades['Sugar frenzy'].buy(1); - buff=Game.gainBuff('sugar frenzy',60*60,3); - if (Game.prefs.popups) Game.Popup('Sugar frenzy activated!'); - else Game.Notify('Sugar frenzy!','CpS x3 for 1 hour!',[29,14]); - }); - - order=10020; - Game.NewUpgradeCookie({name:'Sprinkles cookies',desc:'A bit of festive decorating helps hide the fact that this might be one of the blandest cookies you\'ve ever tasted.',icon:[21,14],power: 4,price: 99999999999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Peanut butter blossoms',desc:'Topped with a scrumptious chocolate squirt, which is something we really wish we didn\'t just write.',icon:[22,14],power: 4,price: 999999999999999999999999999999}); - Game.NewUpgradeCookie({name:'No-bake cookies',desc:'You have no idea how these mysterious oven-less treats came to be or how they hold their shape. You\'re thinking either elephant glue or cold fusion.',icon:[21,15],power: 4,price: 999999999999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Florentines',desc:'These make up for being the fruitcake of cookies by at least having the decency to feature chocolate.',icon:[26,16],power: 4,price: 9999999999999999999999999999999}); - Game.NewUpgradeCookie({name:'Chocolate crinkles',desc:'Non-denominational cookies to celebrate year-round deliciousness, and certainly not Christmas or some other nonsense.',icon:[22,15],power: 4,price: 9999999999999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Maple cookies',desc:'Made with syrup from a land where milk comes in bags, instead of spontaneously pooling at the bottom of your screen depending on your achievements.',icon:[21,13],power: 4,price: 99999999999999999999999999999999}); - - - order=40000; - new Game.Upgrade('Turbo-charged soil','Garden plants grow every second.
Garden seeds are free to plant.
You can switch soils at any time.It\'s got electrolytes!',7,[2,16]);//debug purposes only - Game.last.buyFunction=function(){if (Game.Objects['Farm'].minigameLoaded){Game.Objects['Farm'].minigame.computeStepT();}} - Game.last.pool='debug'; - - order=150; - new Game.Upgrade('Technobsidian mouse','Clicking gains +1% of your CpS.A highly advanced mouse of a sophisticated design. Only one thing on its mind : to click.',5000000000000000000000000,[11,28]);Game.MakeTiered(Game.last,11,11); - new Game.Upgrade('Plasmarble mouse','Clicking gains +1% of your CpS.A shifting blur in the corner of your eye, this mouse can trigger a flurry of clicks when grazed by even the slightest breeze.',500000000000000000000000000,[11,30]);Game.MakeTiered(Game.last,12,11); - - order=20000; - new Game.Upgrade('Kitten marketeers','You gain more CpS the more milk you have.no such thing as a saturated markit, sir',900000000000000000000000000000000000000,Game.GetIcon('Kitten',11));Game.last.kitten=1;Game.MakeTiered(Game.last,11,18); - - order=10030; - Game.NewUpgradeCookie({name:'Festivity loops',desc:'These garish biscuits are a perfect fit for children\'s birthday parties or the funerals of strange, eccentric billionaires.',icon:[25,17],require:'Box of brand biscuits',power: 2, price: 999999999999999999999999*5}); - - order=10020; - Game.NewUpgradeCookie({name:'Persian rice cookies',desc:'Rose water and poppy seeds are the secret ingredients of these small, butter-free cookies.',icon:[28,15],power: 4,price: 99999999999999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Norwegian cookies',desc:'A flat butter cookie with a sliver of candied cherry on top. It is said that these illustrate the bleakness of scandinavian existentialism.',icon:[22,20],power: 4,price: 999999999999999999999999999999999}); - Game.NewUpgradeCookie({name:'Crispy rice cookies',desc:'Fun to make at home! Store-bought cookies are obsolete! Topple the system! There\'s marshmallows in these! Destroy capitalism!',icon:[23,20],power: 4,price: 999999999999999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Ube cookies',desc:'The tint is obtained by the use of purple yams. According to color symbolism, these cookies are either noble, holy, or supervillains.',icon:[24,17],power: 4,price: 9999999999999999999999999999999999}); - Game.NewUpgradeCookie({name:'Butterscotch cookies',desc:'The butterscotch chips are just the right amount of sticky, and make you feel like you\'re eating candy.',icon:[24,20],power: 4,price: 9999999999999999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Speculaas',desc:'These crunchy, almost obnoxiously cinnamony cookies are a source of dutch pride. About the origin of the name, one can only speculate.',icon:[21,20],power: 4,price: 99999999999999999999999999999999999}); - - order=10200; - Game.NewUpgradeCookie({name:'Elderwort biscuits',desc:'-',icon:[22,25],power:2,price:60*2,locked:1});Game.last.baseDesc='Cookie production multiplier +2%.
Grandma production multiplier +2%.
Dropped by elderwort plants.They taste incredibly stale, even when baked fresh.'; - Game.NewUpgradeCookie({name:'Bakeberry cookies',desc:'-',icon:[23,25],power:2,price:60,locked:1});Game.last.baseDesc='Cookie production multiplier +2%.
Dropped by bakeberry plants.Really good dipped in hot chocolate.'; - Game.NewUpgradeCookie({name:'Duketater cookies',desc:'-',icon:[24,25],power:10,price:60*3,locked:1});Game.last.baseDesc='Cookie production multiplier +10%.
Dropped by duketater plants.Fragrant and mealy, with a slight yellow aftertaste.'; - Game.NewUpgradeCookie({name:'Green yeast digestives',desc:'-',icon:[25,25],power:0,price:60*3,locked:1});Game.last.baseDesc='+1% golden cookie gains and effect duration.
+1% golden cookie frequency.
+3% random drops.
Dropped by green rot plants.These are tastier than you\'d expect, but not by much.'; - - order=23000; - new Game.Upgrade('Fern tea','You gain +3% of your regular CpS while the game is closed (provided you have the Twin Gates of Transcendence heavenly upgrade).
Dropped by drowsyfern plants.A chemically complex natural beverage, this soothing concoction has been used by mathematicians to solve equations in their sleep.',60,[26,25]); - new Game.Upgrade('Ichor syrup','You gain +7% of your regular CpS while the game is closed (provided you have the Twin Gates of Transcendence heavenly upgrade).
Sugar lumps mature 7 minutes sooner.
Dropped by ichorpuff plants.Tastes like candy. The smell is another story.',60*2,[27,25]); - - order=10200; - Game.NewUpgradeCookie({name:'Wheat slims',desc:'-',icon:[28,25],power:1,price:30,locked:1});Game.last.baseDesc='Cookie production multiplier +1%.
Dropped by baker\'s wheat plants.The only reason you\'d consider these to be cookies is because you feel slightly sorry for them.'; - - var gardenDrops=['Elderwort biscuits','Bakeberry cookies','Duketater cookies','Green yeast digestives','Fern tea','Ichor syrup','Wheat slims']; - for (var i in gardenDrops)//scale by CpS - { - var it=Game.Upgrades[gardenDrops[i]]; - it.priceFunc=function(cost){return function(){return cost*Game.cookiesPs*60;}}(it.basePrice); - it.baseDesc=it.baseDesc.replace('','
Cost scales with CpS.'); - it.desc=BeautifyInText(it.baseDesc); - it.lasting=true; - } - - - order=10300; - Game.NewUpgradeCookie({name:'Synthetic chocolate green honey butter biscuit',desc:'Rewarded for owning 350 of everything.
The recipe for this butter biscuit was once the sole heritage of an ancient mountain monastery. Its flavor is so refined that only a slab of lab-made chocolate specifically engineered to be completely tasteless could complement it.
Also it\'s got your face on it.',icon:[24,26],power: 10,price: 999999999999999999999999999999999999*butterBiscuitMult,locked:1}); - Game.NewUpgradeCookie({name:'Royal raspberry chocolate butter biscuit',desc:'Rewarded for owning 400 of everything.
Once reserved for the megalomaniac elite, this unique strain of fruity chocolate has a flavor and texture unlike any other. Whether its exorbitant worth is improved or lessened by the presence of your likeness on it still remains to be seen.',icon:[25,26],power: 10,price: 999999999999999999999999999999999999999*butterBiscuitMult,locked:1}); - Game.NewUpgradeCookie({name:'Ultra-concentrated high-energy chocolate butter biscuit',desc:'Rewarded for owning 450 of everything.
Infused with the power of several hydrogen bombs through a process that left most nuclear engineers and shareholders perplexed. Currently at the center of some rather heated United Nations meetings. Going in more detail about this chocolate would violate several state secrets, but we\'ll just add that someone\'s bust seems to be pictured on it. Perhaps yours?',icon:[26,26],power: 10,price: 999999999999999999999999999999999999999999*butterBiscuitMult,locked:1}); - - - - order=200;new Game.TieredUpgrade('Timeproof hair dyes','Grandmas are twice as efficient.Why do they always have those strange wispy pink dos? What do they know about candy floss that we don\'t?','Grandma',10); - order=300;new Game.TieredUpgrade('Barnstars','Farms are twice as efficient.Ah, yes. These help quite a bit. Somehow.','Farm',10); - order=400;new Game.TieredUpgrade('Mine canaries','Mines are twice as efficient.These aren\'t used for anything freaky! The miners just enjoy having a pet or two down there.','Mine',10); - order=500;new Game.TieredUpgrade('Brownie point system','Factories are twice as efficient.Oh, these are lovely! You can now reward your factory employees for good behavior, such as working overtime or snitching on coworkers. 58 brownie points gets you a little picture of a brownie, and 178 of those pictures gets you an actual brownie piece for you to do with as you please! Infantilizing? Maybe. Oodles of fun? You betcha!','Factory',10); - order=525;new Game.TieredUpgrade('Grand supercycles','Banks are twice as efficient.We let the public think these are complicated financial terms when really we\'re just rewarding the bankers with snazzy bicycles for a job well done. It\'s only natural after you built those fancy gold swimming pools for them, where they can take a dip and catch Kondratiev waves.','Bank',10); - order=550;new Game.TieredUpgrade('Psalm-reading','Temples are twice as efficient.A theologically dubious and possibly blasphemous blend of fortune-telling and scripture studies.','Temple',10); - order=575;new Game.TieredUpgrade('Immobile spellcasting','Wizard towers are twice as efficient.Wizards who master this skill can now cast spells without having to hop and skip and gesticulate embarrassingly, which is much sneakier and honestly quite a relief.','Wizard tower',10); - order=600;new Game.TieredUpgrade('Restaurants at the end of the universe','Shipments are twice as efficient.Since the universe is spatially infinite, and therefore can be construed to have infinite ends, you\'ve opened an infinite chain of restaurants where your space truckers can rest and partake in some home-brand cookie-based meals.','Shipment',10); - order=700;new Game.TieredUpgrade('On second thought','Alchemy labs are twice as efficient.Disregard that last upgrade, alchemy is where it\'s at! Your eggheads just found a way to transmute children\'s nightmares into rare metals!','Alchemy lab',10); - order=800;new Game.TieredUpgrade('Dimensional garbage gulper','Portals are twice as efficient.So we\'ve been looking for a place to dispose of all the refuse that\'s been accumulating since we started baking - burnt cookies, failed experiments, unruly workers - and well, we figured rather than sell it to poor countries like we\'ve been doing, we could just dump it in some alternate trash dimension where it\'s not gonna bother anybody! Probably!','Portal',10); - order=900;new Game.TieredUpgrade('Additional clock hands','Time machines are twice as efficient.It seemed like a silly idea at first, but it turns out these have the strange ability to twist time in interesting new ways.','Time machine',10); - order=1000;new Game.TieredUpgrade('Baking Nobel prize','Antimatter condensers are twice as efficient.What better way to sponsor scientific growth than to motivate those smarmy nerds with a meaningless award! What\'s more, each prize comes with a fine print lifelong exclusive contract to come work for you (or else)!','Antimatter condenser',10); - order=1100;new Game.TieredUpgrade('Reverse theory of light','Prisms are twice as efficient.A whole new world of physics opens up when you decide that antiphotons are real and posit that light is merely a void in shadow.','Prism',10); - order=1200;new Game.TieredUpgrade('Revised probabilistics','Chancemakers are twice as efficient.Either something happens or it doesn\'t. That\'s a 50% chance! This suddenly makes a lot of unlikely things very possible.','Chancemaker',10); - - order=20000; - new Game.Upgrade('Kitten analysts','You gain more CpS the more milk you have.based on purrent return-on-investment meowdels we should be able to affurd to pay our empawyees somewhere around next century, sir',900000000000000000000000000000000000000000,Game.GetIcon('Kitten',12));Game.last.kitten=1;Game.MakeTiered(Game.last,12,18); - - - new Game.Upgrade('Eye of the wrinkler','Mouse over a wrinkler to see how many cookies are in its stomach.Just a wrinkler and its will to survive.
Hangin\' tough, stayin\' hungry.
',99999999,[27,26]);Game.last.pool='prestige';Game.last.parents=['Wrinkly cookies']; - - new Game.Upgrade('Inspired checklist','Unlocks the Buy all feature, which lets you instantly purchase every upgrade in your store (starting from the cheapest one).
Also unlocks the Vault, a store section where you can place upgrades you do not wish to auto-buy.Snazzy grandma accessories? Check. Transdimensional abominations? Check. A bunch of eggs for some reason? Check. Machine that goes "ping"? Check and check.',900000,[28,26]);Game.last.pool='prestige';Game.last.parents=['Persistent memory','Permanent upgrade slot II']; - - order=10300; - Game.NewUpgradeCookie({name:'Pure pitch-black chocolate butter biscuit',desc:'Rewarded for owning 500 of everything.
This chocolate is so pure and so flawless that it has no color of its own, instead taking on the appearance of whatever is around it. You\'re a bit surprised to notice that this one isn\'t stamped with your effigy, as its surface is perfectly smooth (to the picometer) - until you realize it\'s quite literally reflecting your own face like a mirror.',icon:[24,27],power: 10,price: 999999999999999999999999999999999999999999999*butterBiscuitMult,locked:1}); - - order=10020; - Game.NewUpgradeCookie({name:'Chocolate oatmeal cookies',desc:'These bad boys compensate for lack of a cohesive form and a lumpy, unsightly appearance by being just simply delicious. Something we should all aspire to.',icon:[23,28],power: 4,price: 99999999999999999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Molasses cookies',desc:'Sticky, crackly, and dusted in fine sugar.
Some lunatics have been known to eat these with potatoes.',icon:[24,28],power: 4,price: 999999999999999999999999999999999999}); - Game.NewUpgradeCookie({name:'Biscotti',desc:'Almonds and pistachios make these very robust cookies slightly more interesting to eat than to bludgeon people with.',icon:[22,28],power: 4,price: 999999999999999999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Waffle cookies',desc:'Whether these are cookies with shockingly waffle-like features or simply regular cookie-sized waffles is a debate we\'re not getting into here.',icon:[21,28],power: 4,price: 9999999999999999999999999999999999999}); - - - order=10000; - //early cookies that unlock at the same time as coconut cookies; meant to boost early game a little bit - Game.NewUpgradeCookie({name:'Almond cookies',desc:'Sometimes you feel like one of these. Sometimes you don\'t.',icon:[21,27],power: 2, price: 99999999}); - Game.NewUpgradeCookie({name:'Hazelnut cookies',desc:'Tastes like a morning stroll through a fragrant forest, minus the clouds of gnats.',icon:[22,27],power: 2, price: 99999999}); - Game.NewUpgradeCookie({name:'Walnut cookies',desc:'Some experts have pointed to the walnut\'s eerie resemblance to the human brain as a sign of its sentience - a theory most walnuts vehemently object to.',icon:[23,27],power: 2, price: 99999999}); - - - new Game.Upgrade('Label printer','Mouse over an upgrade to see its tier.
Note : only some upgrades have tiers. Tiers are purely cosmetic and have no effect on gameplay.Also comes in real handy when you want to tell catsup apart from ketchup.',999999,[28,29]);Game.last.pool='prestige';Game.last.parents=['Starter kitchen']; - - - - - order=200;new Game.TieredUpgrade('Good manners','Grandmas are twice as efficient.Apparently these ladies are much more amiable if you take the time to learn their strange, ancient customs, which seem to involve saying "please" and "thank you" and staring at the sun with bulging eyes while muttering eldritch curses under your breath.','Grandma',11); - order=300;new Game.TieredUpgrade('Lindworms','Farms are twice as efficient.You have to import these from far up north, but they really help aerate the soil!','Farm',11); - order=400;new Game.TieredUpgrade('Bore again','Mines are twice as efficient.After extracting so much sediment for so long, you\'ve formed some veritable mountains of your own from the accumulated piles of rock and dirt. Time to dig through those and see if you find anything fun!','Mine',11); - order=500;new Game.TieredUpgrade('"Volunteer" interns','Factories are twice as efficient.If you\'re bad at something, always do it for free.','Factory',11); - order=525;new Game.TieredUpgrade('Rules of acquisition','Banks are twice as efficient.Rule 387 : a cookie baked is a cookie kept.','Bank',11); - order=550;new Game.TieredUpgrade('War of the gods','Temples are twice as efficient.An interesting game; the only winning move is not to pray.','Temple',11); - order=575;new Game.TieredUpgrade('Electricity','Wizard towers are twice as efficient.Ancient magicks and forbidden hexes shroud this arcane knowledge, whose unfathomable power can mysteriously turn darkness into light and shock an elephant to death.','Wizard tower',11); - order=600;new Game.TieredUpgrade('Universal alphabet','Shipments are twice as efficient.You\'ve managed to chart a language that can be understood by any sentient species in the galaxy; its exciting vocabulary contains over 56 trillion words that sound and look like sparkly burps, forming intricate sentences that usually translate to something like "give us your cookies, or else".','Shipment',11); - order=700;new Game.TieredUpgrade('Public betterment','Alchemy labs are twice as efficient.Why do we keep trying to change useless matter into cookies, or cookies into even better cookies? Clearly, the way of the future is to change the people who eat the cookies into people with a greater understanding, appreciation and respect for the cookies they\'re eating. Into the vat you go!','Alchemy lab',11); - order=800;new Game.TieredUpgrade('Embedded microportals','Portals are twice as efficient.We\'ve found out that if we bake the portals into the cookies themselves, we can transport people\'s taste buds straight into the taste dimension! Good thing your army of lawyers got rid of the FDA a while ago!','Portal',11); - order=900;new Game.TieredUpgrade('Nostalgia','Time machines are twice as efficient.Your time machine technicians insist that this is some advanced new time travel tech, and not just an existing emotion universal to mankind. Either way, you have to admit that selling people the same old cookies just because it reminds them of the good old times is an interesting prospect.','Time machine',11); - order=1000;new Game.TieredUpgrade('The definite molecule','Antimatter condensers are twice as efficient.Your scientists have found a way to pack a cookie into one single continuous molecule, opening exciting new prospects in both storage and flavor despite the fact that these take up to a whole year to digest.','Antimatter condenser',11); - order=1100;new Game.TieredUpgrade('Light capture measures','Prisms are twice as efficient.As the universe gets ever so slightly dimmer due to you converting more and more of its light into cookies, you\'ve taken to finding new and unexplored sources of light for your prisms; for instance, the warm glow emitted by a pregnant woman, or the twinkle in the eye of a hopeful child.','Prism',11); - order=1200;new Game.TieredUpgrade('0-sided dice','Chancemakers are twice as efficient.The advent of the 0-sided dice has had unexpected and tumultuous effects on the gambling community, and saw experts around the world calling you both a genius and an imbecile.','Chancemaker',11); - - - new Game.Upgrade('Heralds','You now benefit from the boost provided by heralds.
Each herald gives you +1% CpS.
Look on the purple flag at the top to see how many heralds are active at any given time.Be excellent to each other.
And Patreon, dudes!
',100,[21,29]);Game.last.pool='prestige'; - - order=255; - Game.GrandmaSynergy('Metagrandmas','A fractal grandma to make more grandmas to make more cookies.','Fractal engine'); - - order=1300; - new Game.TieredUpgrade('Metabakeries','Fractal engines are twice as efficient.They practically bake themselves!','Fractal engine',1); - new Game.TieredUpgrade('Mandelbrown sugar','Fractal engines are twice as efficient.A substance that displays useful properties such as fractal sweetness and instant contact lethality.','Fractal engine',2); - new Game.TieredUpgrade('Fractoids','Fractal engines are twice as efficient.Here\'s a frun fract : all in all, these were a terrible idea.','Fractal engine',3); - new Game.TieredUpgrade('Nested universe theory','Fractal engines are twice as efficient.Asserts that each subatomic particle is host to a whole new universe, and therefore, another limitless quantity of cookies.
This somehow stacks with the theory of nanocosmics, because physics.
','Fractal engine',4); - new Game.TieredUpgrade('Menger sponge cake','Fractal engines are twice as efficient.Frighteningly absorbent thanks to its virtually infinite surface area. Keep it isolated in a dry chamber, never handle it with an open wound, and do not ever let it touch a body of water.','Fractal engine',5); - new Game.TieredUpgrade('One particularly good-humored cow','Fractal engines are twice as efficient.This unassuming bovine was excruciatingly expensive and it may seem at first like you were ripped off. On closer inspection however, you notice that its earrings (it\'s wearing earrings) are actually fully functional copies of itself, each of which also wearing their own cow earrings, and so on, infinitely. It appears your dairy concerns will be taken care of for a while, although you\'ll have to put up with the cow\'s annoying snickering.','Fractal engine',6); - new Game.TieredUpgrade('Chocolate ouroboros','Fractal engines are twice as efficient.Forever eating its own tail and digesting itself, in a metabolically dubious tale of delicious tragedy.','Fractal engine',7); - new Game.TieredUpgrade('Nested','Fractal engines are twice as efficient.Clever self-reference or shameful cross-promotion? This upgrade apparently has the gall to advertise a link to orteil.dashnet.org/nested, in a tooltip you can\'t even click.','Fractal engine',8); - new Game.TieredUpgrade('Space-filling fibers','Fractal engines are twice as efficient.This special ingredient has the incredible ability to fill the local space perfectly, effectively eradicating hunger in those who consume it!
Knowing that no hunger means no need for cookies, your marketers urge you to repurpose this product into next-level packing peanuts.
','Fractal engine',9); - new Game.TieredUpgrade('Endless book of prose','Fractal engines are twice as efficient.','Fractal engine',10); - Game.last.descFunc=function(){ - var str='"There once was a baker named '+Game.bakeryName+'. One day, there was a knock at the door; '+Game.bakeryName+' opened it and was suddenly face-to-face with a strange and menacing old grandma. The grandma opened her mouth and, in a strange little voice, started reciting this strange little tale : '; - var n=35; - var i=Math.floor(Game.T*0.1); - return this.desc+''+(str.substr(i%str.length,n)+(i%str.length>(str.length-n)?str.substr(0,i%str.length-(str.length-n)):''))+''; - }; - new Game.TieredUpgrade('The set of all sets','Fractal engines are twice as efficient.The answer, of course, is a definite maybe.','Fractal engine',11); - - order=5000; - Game.SynergyUpgrade('Recursive mirrors','Do you have any idea what happens when you point two of these at each other? Apparently, the universe doesn\'t either.','Fractal engine','Prism','synergy1'); - //Game.SynergyUpgrade('Compounded odds','When probabilities start cascading, "never in a billion lifetimes" starts looking terribly like "probably before Monday comes around".','Fractal engine','Chancemaker','synergy1'); - Game.SynergyUpgrade('Mice clicking mice','','Fractal engine','Cursor','synergy2'); - Game.last.descFunc=function(){ - Math.seedrandom(Game.seed+'-blasphemouse'); - if (Math.random()<0.3) {Math.seedrandom();return this.desc+'Absolutely blasphemouse!';} - else {Math.seedrandom();return this.desc+'Absolutely blasphemous!';} - }; - - - order=10020; - Game.NewUpgradeCookie({name:'Custard creams',desc:'British lore pits these in a merciless war against bourbon biscuits.
The filling evokes vanilla without quite approaching it.
They\'re tastier on the inside!',icon:[23,29],power: 4,price: 9999999999999999999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Bourbon biscuits',desc:'Two chocolate biscuits joined together with even more chocolate.
The sworn rivals of custard creams, as legend has it.',icon:[24,29],power: 4,price: 99999999999999999999999999999999999999}); - - - new Game.Upgrade('Keepsakes','Seasonal random drops have a 1/5 chance to carry over through ascensions.Cherish the memories.',1111111111,[22,29]);Game.last.pool='prestige';Game.last.parents=['Starsnow','Starlove','Starterror','Startrade','Starspawn']; - - order=10020; - Game.NewUpgradeCookie({name:'Mini-cookies',desc:'Have you ever noticed how the smaller something is, the easier it is to binge on it?',icon:[29,30],power: 5,price: 99999999999999999999999999999999999999*5}); - - new Game.Upgrade('Sugar crystal cookies','Cookie production multiplier +5% permanently, and +1% for every building type level 10 or higher.Infused with cosmic sweetness. It gives off a faint shimmery sound when you hold it up to your ear.',1000000000,[21,30]);Game.last.pool='prestige';Game.last.parents=['Sugar baking'];Game.last.power=function(){ - var n=5; - for (var i in Game.Objects) - { - if (Game.Objects[i].level>=10) n++; - } - return n; - };Game.last.pseudoCookie=true; - Game.last.descFunc=function(){ - var n=5; - for (var i in Game.Objects) - { - if (Game.Objects[i].level>=10) n++; - } - return '
Current : +'+Beautify(n)+'%
'+this.desc; - }; - new Game.Upgrade('Box of maybe cookies','Contains an assortment of...something.These may or may not be considered cookies.',333000000000,[25,29]);Game.last.pool='prestige';Game.last.parents=['Sugar crystal cookies']; - new Game.Upgrade('Box of not cookies','Contains an assortment of...something.These are strictly, definitely not cookies.',333000000000,[26,29]);Game.last.pool='prestige';Game.last.parents=['Sugar crystal cookies']; - new Game.Upgrade('Box of pastries','Contains an assortment of delicious pastries.These are a damn slippery slope is what they are!',333000000000,[27,29]);Game.last.pool='prestige';Game.last.parents=['Sugar crystal cookies']; - - order=10040; - Game.NewUpgradeCookie({name:'Profiteroles',desc:'Also known as cream puffs, these pastries are light, fluffy, filled with whipped cream and fun to throw at people when snowballs are running scarce.',icon:[29,29],require:'Box of pastries', power:4,price: Math.pow(10,31)}); - Game.NewUpgradeCookie({name:'Jelly donut',desc:'Guaranteed to contain at least 0.3% jelly filling, or your money back.
You can still see the jelly stab wound!',icon:[27,28],require:'Box of pastries', power:4,price: Math.pow(10,33)}); - Game.NewUpgradeCookie({name:'Glazed donut',desc:'Absolutely gooey with sugar. The hole is the tastiest part!',icon:[28,28],require:'Box of pastries', power:4,price: Math.pow(10,35)}); - Game.NewUpgradeCookie({name:'Chocolate cake',desc:'The cake is a Portal reference!',icon:[25,27],require:'Box of pastries', power:4,price: Math.pow(10,37)}); - Game.NewUpgradeCookie({name:'Strawberry cake',desc:'It\'s not easy to come up with flavor text for something as generic as this, but some would say it\'s a piece of cake.',icon:[26,27],require:'Box of pastries', power:4,price: Math.pow(10,39)}); - Game.NewUpgradeCookie({name:'Apple pie',desc:'It is said that some grandmas go rogue and bake these instead.',icon:[25,28],require:'Box of pastries', power:4,price: Math.pow(10,41)}); - Game.NewUpgradeCookie({name:'Lemon meringue pie',desc:'Meringue is a finicky substance made of sugar and egg whites that requires specific atmospheric conditions to be baked at all. The lemon, as far as we can tell, isn\'t nearly as picky.',icon:[26,28],require:'Box of pastries', power:4,price: Math.pow(10,43)}); - Game.NewUpgradeCookie({name:'Butter croissant',desc:'Look around.
A rude man in a striped shirt bikes past you. He smells of cigarettes and café-au-lait. Somewhere, a mime uses his moustache to make fun of the British. 300 pigeons fly overhead.
Relax. You\'re experiencing croissant.',icon:[29,28],require:'Box of pastries', power:4,price: Math.pow(10,45)}); - - order=10050; - Game.NewUpgradeCookie({name:'Cookie dough',desc:'Bursting with infinite potential, but can also be eaten as is. Arguably worth the salmonella.',icon:[25,30],require:'Box of maybe cookies', power:4,price: Math.pow(10,35)}); - Game.NewUpgradeCookie({name:'Burnt cookie',desc:'This cookie flew too close to the sun and is now a shadow of its former self. If only you remembered to set a timer, you wouldn\'t have this tragedy on your hands...',icon:[23,30],require:'Box of maybe cookies', power:4,price: Math.pow(10,37)}); - Game.NewUpgradeCookie({name:'A chocolate chip cookie but with the chips picked off for some reason',desc:'This has to be the saddest thing you\'ve ever seen.',icon:[24,30],require:'Box of maybe cookies', power:3,price: Math.pow(10,39)}); - Game.NewUpgradeCookie({name:'Flavor text cookie',desc:'What you\'re currently reading is what gives this cookie its inimitable flavor.',icon:[22,30],require:'Box of maybe cookies', power:4,price: Math.pow(10,41)}); - Game.NewUpgradeCookie({name:'High-definition cookie',desc:'Uncomfortably detailed, like those weird stories your aunt keeps telling at parties.',icon:[28,10],require:'Box of maybe cookies', power:5,price: Math.pow(10,43)}); - - order=10060; - Game.NewUpgradeCookie({name:'Toast',desc:'A crisp slice of bread, begging for some butter and jam.
Why do people keep proposing these at parties?',icon:[27,10],require:'Box of not cookies', power:4,price: Math.pow(10,34)}); - Game.NewUpgradeCookie({name:'Peanut butter & jelly',desc:'It\'s time.',icon:[29,9],require:'Box of not cookies', power:4,price: Math.pow(10,36)}); - Game.NewUpgradeCookie({name:'Wookies',desc:'These aren\'t the cookies you\'re looking for.',icon:[26,30],require:'Box of not cookies', power:4,price: Math.pow(10,38)}); - Game.NewUpgradeCookie({name:'Cheeseburger',desc:'Absolutely no relation to cookies whatsoever - Orteil just wanted an excuse to draw a cheeseburger.',icon:[28,30],require:'Box of not cookies', power:4,price: Math.pow(10,40)}); - Game.NewUpgradeCookie({name:'One lone chocolate chip',desc:'The start of something beautiful.',icon:[27,30],require:'Box of not cookies', power:1,price: Math.pow(10,42)}); - - - new Game.Upgrade('Genius accounting','Unlocks extra price information.
Each displayed cost now specifies how long it\'ll take you to afford it, and how much of your bank it represents.There\'s no accounting for taste, and yet here we are.',2000000,[11,10]);Game.last.pool='prestige';Game.last.parents=['Inspired checklist']; - - - new Game.Upgrade('Shimmering veil','Unlocks the shimmering veil, a switch that passively boosts your CpS by 50%.
You start with the veil turned on; however, it is very fragile, and clicking the big cookie or any golden cookie or reindeer will turn it off, requiring 24 hours of CpS to turn back on.Hands off!',999999999,[9,10]);Game.last.pool='prestige';Game.last.parents=['Distilled essence of redoubled luck']; - - order=40005; - var func=function(){ - var boost=50; - var resist=0; - if (Game.Has('Reinforced membrane')) {boost+=10;resist+=10;} - return (this.name=='Shimmering veil [on]'?'
Active.
':'')+'Boosts your cookie production by '+Beautify(boost)+'% when active.
The veil is very fragile and will break if you click the big cookie or any golden cookies or reindeer.

Once broken, turning the veil back on costs 24 hours of unbuffed CpS.'+(resist>0?('

Has a '+Beautify(resist)+'% chance to not break.'):''); - }; - new Game.Upgrade('Shimmering veil [off]','',1000000,[9,10]); - Game.last.pool='toggle';Game.last.toggleInto='Shimmering veil [on]'; - Game.last.priceFunc=function(){return Game.unbuffedCps*60*60*24;} - Game.last.descFunc=func; - new Game.Upgrade('Shimmering veil [on]','',0,[9,10]); - Game.last.pool='toggle';Game.last.toggleInto='Shimmering veil [off]'; - Game.last.descFunc=func; - - Game.loseShimmeringVeil=function(context) - { - if (!Game.Has('Shimmering veil')) return false; - if (!Game.Has('Shimmering veil [off]') && Game.Has('Shimmering veil [on]')) return false; - if (Game.Has('Reinforced membrane')) - { - if (context=='shimmer') Math.seedrandom(Game.seed+'/'+(Game.goldenClicks+Game.reindeerClicked)); - else if (context=='click') Math.seedrandom(Game.seed+'/'+Game.cookieClicks); - if (Math.random()<0.1) + var timePlayed=new Date(); + timePlayed.setTime(Date.now()-Game.startDate); + + if (!Game.fullDate || (Date.now()-Game.fullDate)>=365*24*60*60*1000) Game.Win('So much to do so much to see'); + + if (Game.cookiesEarned>=1000000 && (Game.ascensionMode==1 || Game.resets==0))//challenge run or hasn't ascended yet { - Game.Notify('The reinforced membrane protects the shimmering veil.','',[7,10]); - Game.Win('Thick-skinned'); - return false; + if (timePlayed<=1000*60*35) Game.Win('Speed baking I'); + if (timePlayed<=1000*60*25) Game.Win('Speed baking II'); + if (timePlayed<=1000*60*15) Game.Win('Speed baking III'); + + if (Game.cookieClicks<=15) Game.Win('Neverclick'); + if (Game.cookieClicks<=0) Game.Win('True Neverclick'); + if (Game.cookiesEarned>=1000000000 && Game.UpgradesOwned==0) Game.Win('Hardcore'); } - Math.seedrandom(); + + for (var i in Game.UnlockAt) + { + var unlock=Game.UnlockAt[i]; + if (Game.cookiesEarned>=unlock.cookies) + { + var pass=1; + if (unlock.require && !Game.Has(unlock.require) && !Game.HasAchiev(unlock.require)) pass=0; + if (unlock.season && Game.season!=unlock.season) pass=0; + if (pass) {Game.Unlock(unlock.name);Game.Win(unlock.name);} + } + } + + if (Game.Has('Golden switch')) Game.Unlock('Golden switch [off]'); + if (Game.Has('Shimmering veil') && !Game.Has('Shimmering veil [off]') && !Game.Has('Shimmering veil [on]')) {Game.Unlock('Shimmering veil [on]');Game.Upgrades['Shimmering veil [off]'].earn();} + if (Game.Has('Sugar craving')) Game.Unlock('Sugar frenzy'); + if (Game.Has('Classic dairy selection')) Game.Unlock('Milk selector'); + if (Game.Has('Basic wallpaper assortment')) Game.Unlock('Background selector'); + if (Game.Has('Golden cookie alert sound')) Game.Unlock('Golden cookie sound selector'); + + if (Game.Has('Eternal heart biscuits')) Game.Win('Lovely cookies'); + if (Game.season=='easter') + { + var eggs=0; + for (var i in Game.easterEggs) + { + if (Game.HasUnlocked(Game.easterEggs[i])) eggs++; + } + if (eggs>=1) Game.Win('The hunt is on'); + if (eggs>=7) Game.Win('Egging on'); + if (eggs>=14) Game.Win('Mass Easteria'); + if (eggs>=Game.easterEggs.length) Game.Win('Hide & seek champion'); + } + + if (Game.Has('Fortune cookies')) + { + var list=Game.Tiers['fortune'].upgrades; + var fortunes=0; + for (var i in list) + { + if (Game.Has(list[i].name)) fortunes++; + } + if (fortunes>=list.length) Game.Win('O Fortuna'); + } + + if (Game.prestige>0 && Game.ascensionMode!=1) + { + Game.Unlock('Heavenly chip secret'); + if (Game.Has('Heavenly chip secret')) Game.Unlock('Heavenly cookie stand'); + if (Game.Has('Heavenly cookie stand')) Game.Unlock('Heavenly bakery'); + if (Game.Has('Heavenly bakery')) Game.Unlock('Heavenly confectionery'); + if (Game.Has('Heavenly confectionery')) Game.Unlock('Heavenly key'); + + if (Game.Has('Heavenly key')) Game.Win('Wholesome'); + } + + for (var i in Game.BankAchievements) + { + if (Game.cookiesEarned>=Game.BankAchievements[i].threshold) Game.Win(Game.BankAchievements[i].name); + } + + var buildingsOwned=0; + var mathematician=1; + var base10=1; + var minAmount=100000; + for (var i in Game.Objects) + { + buildingsOwned+=Game.Objects[i].amount; + minAmount=Math.min(Game.Objects[i].amount,minAmount); + if (!Game.HasAchiev('Mathematician')) {if (Game.Objects[i].amount=1) Game.Win('One with everything'); + if (mathematician==1) Game.Win('Mathematician'); + if (base10==1) Game.Win('Base 10'); + if (minAmount>=100) {Game.Win('Centennial');Game.Unlock('Milk chocolate butter biscuit');} + if (minAmount>=150) {Game.Win('Centennial and a half');Game.Unlock('Dark chocolate butter biscuit');} + if (minAmount>=200) {Game.Win('Bicentennial');Game.Unlock('White chocolate butter biscuit');} + if (minAmount>=250) {Game.Win('Bicentennial and a half');Game.Unlock('Ruby chocolate butter biscuit');} + if (minAmount>=300) {Game.Win('Tricentennial');Game.Unlock('Lavender chocolate butter biscuit');} + if (minAmount>=350) {Game.Win('Tricentennial and a half');Game.Unlock('Synthetic chocolate green honey butter biscuit');} + if (minAmount>=400) {Game.Win('Quadricentennial');Game.Unlock('Royal raspberry chocolate butter biscuit');} + if (minAmount>=450) {Game.Win('Quadricentennial and a half');Game.Unlock('Ultra-concentrated high-energy chocolate butter biscuit');} + if (minAmount>=500) {Game.Win('Quincentennial');Game.Unlock('Pure pitch-black chocolate butter biscuit');} + + if (Game.handmadeCookies>=1000) {Game.Win('Clicktastic');Game.Unlock('Plastic mouse');} + if (Game.handmadeCookies>=100000) {Game.Win('Clickathlon');Game.Unlock('Iron mouse');} + if (Game.handmadeCookies>=10000000) {Game.Win('Clickolympics');Game.Unlock('Titanium mouse');} + if (Game.handmadeCookies>=1000000000) {Game.Win('Clickorama');Game.Unlock('Adamantium mouse');} + if (Game.handmadeCookies>=100000000000) {Game.Win('Clickasmic');Game.Unlock('Unobtainium mouse');} + if (Game.handmadeCookies>=10000000000000) {Game.Win('Clickageddon');Game.Unlock('Eludium mouse');} + if (Game.handmadeCookies>=1000000000000000) {Game.Win('Clicknarok');Game.Unlock('Wishalloy mouse');} + if (Game.handmadeCookies>=100000000000000000) {Game.Win('Clickastrophe');Game.Unlock('Fantasteel mouse');} + if (Game.handmadeCookies>=10000000000000000000) {Game.Win('Clickataclysm');Game.Unlock('Nevercrack mouse');} + if (Game.handmadeCookies>=1000000000000000000000) {Game.Win('The ultimate clickdown');Game.Unlock('Armythril mouse');} + if (Game.handmadeCookies>=100000000000000000000000) {Game.Win('All the other kids with the pumped up clicks');Game.Unlock('Technobsidian mouse');} + if (Game.handmadeCookies>=10000000000000000000000000) {Game.Win('One...more...click...');Game.Unlock('Plasmarble mouse');} + + if (Game.cookiesEarned=1) Game.Win('Itchscratcher'); + if (Game.wrinklersPopped>=50) Game.Win('Wrinklesquisher'); + if (Game.wrinklersPopped>=200) Game.Win('Moistburster'); + + if (Game.cookiesEarned>=1000000 && Game.Has('How to bake your dragon')) Game.Unlock('A crumbly egg'); + + if (Game.cookiesEarned>=25 && Game.season=='christmas') Game.Unlock('A festive hat'); + if (Game.Has('Christmas tree biscuits') && Game.Has('Snowflake biscuits') && Game.Has('Snowman biscuits') && Game.Has('Holly biscuits') && Game.Has('Candy cane biscuits') && Game.Has('Bell biscuits') && Game.Has('Present biscuits')) Game.Win('Let it snow'); + + if (Game.reindeerClicked>=1) Game.Win('Oh deer'); + if (Game.reindeerClicked>=50) Game.Win('Sleigh of hand'); + if (Game.reindeerClicked>=200) Game.Win('Reindeer sleigher'); + + if (buildingsOwned>=100) Game.Win('Builder'); + if (buildingsOwned>=500) Game.Win('Architect'); + if (buildingsOwned>=1000) Game.Win('Engineer'); + if (buildingsOwned>=2000) Game.Win('Lord of Constructs'); + if (Game.UpgradesOwned>=20) Game.Win('Enhancer'); + if (Game.UpgradesOwned>=50) Game.Win('Augmenter'); + if (Game.UpgradesOwned>=100) Game.Win('Upgrader'); + if (Game.UpgradesOwned>=200) Game.Win('Lord of Progress'); + if (buildingsOwned>=3000 && Game.UpgradesOwned>=300) Game.Win('Polymath'); + if (buildingsOwned>=4000 && Game.UpgradesOwned>=400) Game.Win('Renaissance baker'); + + if (Game.cookiesEarned>=10000000000000 && !Game.HasAchiev('You win a cookie')) {Game.Win('You win a cookie');Game.Earn(1);} + + if (Game.shimmerTypes['golden'].n>=4) Game.Win('Four-leaf cookie'); + + var grandmas=0; + for (var i in Game.GrandmaSynergies) + { + if (Game.Has(Game.GrandmaSynergies[i])) grandmas++; + } + if (!Game.HasAchiev('Elder') && grandmas>=7) Game.Win('Elder'); + if (!Game.HasAchiev('Veteran') && grandmas>=14) Game.Win('Veteran'); + if (Game.Objects['Grandma'].amount>=6 && !Game.Has('Bingo center/Research facility') && Game.HasAchiev('Elder')) Game.Unlock('Bingo center/Research facility'); + if (Game.pledges>0) Game.Win('Elder nap'); + if (Game.pledges>=5) Game.Win('Elder slumber'); + if (Game.pledges>=10) Game.Unlock('Sacrificial rolling pins'); + if (Game.Objects['Cursor'].amount+Game.Objects['Grandma'].amount>=777) Game.Win('The elder scrolls'); + + for (var i in Game.Objects) + { + var it=Game.Objects[i]; + for (var ii in it.productionAchievs) + { + if (it.totalCookies>=it.productionAchievs[ii].pow) Game.Win(it.productionAchievs[ii].achiev.name); + } + } + + if (!Game.HasAchiev('Cookie-dunker') && Game.LeftBackground && Game.milkProgress>0.1 && (Game.LeftBackground.canvas.height*0.4+256/2-16)>((1-Game.milkHd)*Game.LeftBackground.canvas.height)) Game.Win('Cookie-dunker'); + //&& l('bigCookie').getBoundingClientRect().bottom>l('milk').getBoundingClientRect().top+16 && Game.milkProgress>0.1) Game.Win('Cookie-dunker'); + + for (var i in Game.customChecks) {Game.customChecks[i]();} } - var me=Game.Upgrades['Shimmering veil [on]']; - me.bought=1; - //Game.Upgrades[me.toggleInto].bought=false; - Game.Lock(me.toggleInto); - Game.Unlock(me.toggleInto); - Game.Notify('The shimmering veil disappears...','',[9,10]); - Game.upgradesToRebuild=1; - Game.recalculateGains=1; - PlaySound('cookieclicker/snd/spellfail.mp3',0.75); + + Game.cookiesd+=(Game.cookies-Game.cookiesd)*0.3; + + if (Game.storeToRefresh) Game.RefreshStore(); + if (Game.upgradesToRebuild) Game.RebuildUpgrades(); + + Game.updateShimmers(); + Game.updateBuffs(); + + Game.UpdateTicker(); } + if (Game.T%(Game.fps*2)==0) + { + var title='Cookie Clicker'; + if (Game.season=='fools') title='Cookie Baker'; + document.title=(Game.OnAscend?'Ascending! ':'')+Beautify(Game.cookies)+' '+(Game.cookies==1?'cookie':'cookies')+' - '+title; + } + if (Game.T%15==0) + { + //written through the magic of "hope for the best" maths + var chipsOwned=Game.HowMuchPrestige(Game.cookiesReset); + var ascendNowToOwn=Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned)); + var ascendNowToGet=ascendNowToOwn-Math.floor(chipsOwned); + var nextChipAt=Game.HowManyCookiesReset(Math.floor(chipsOwned+ascendNowToGet+1))-Game.HowManyCookiesReset(Math.floor(chipsOwned+ascendNowToGet)); + var cookiesToNext=Game.HowManyCookiesReset(ascendNowToOwn+1)-(Game.cookiesEarned+Game.cookiesReset); + var percent=1-(cookiesToNext/nextChipAt); + + //fill the tooltip under the Legacy tab + var date=new Date(); + date.setTime(Date.now()-Game.startDate); + var timeInSeconds=date.getTime()/1000; + var startDate=Game.sayTime(timeInSeconds*Game.fps,-1); + + var str=''; + str+='You\'ve been on this run for '+(startDate==''?'not very long':(startDate))+'.
'; + str+='
'; + if (Game.prestige>0) + { + str+='Your prestige level is currently '+Beautify(Game.prestige)+'.
(CpS +'+Beautify(Game.prestige)+'%)'; + str+='
'; + } + if (ascendNowToGet<1) str+='Ascending now would grant you no prestige.'; + else if (ascendNowToGet<2) str+='Ascending now would grant you
1 prestige level (+1% CpS)
and 1 heavenly chip to spend.'; + else str+='Ascending now would grant you
'+Beautify(ascendNowToGet)+' prestige levels (+'+Beautify(ascendNowToGet)+'% CpS)
and '+Beautify(ascendNowToGet)+' heavenly chips to spend.'; + str+='
'; + str+='You need '+Beautify(cookiesToNext)+' more cookies for the next level.
'; + l('ascendTooltip').innerHTML=str; + + if (ascendNowToGet>0)//show number saying how many chips you'd get resetting now + { + var str=ascendNowToGet.toString(); + var str2=''; + for (var i in str)//add commas + { + if ((str.length-i)%3==0 && i>0) str2+=','; + str2+=str[i]; + } + Game.ascendNumber.innerHTML='+'+str2; + Game.ascendNumber.style.display='block'; + } + else + { + Game.ascendNumber.style.display='none'; + } + + if (ascendNowToGet>Game.ascendMeterLevel || Game.ascendMeterPercentT=1) {Game.ascendMeter.className='';} else Game.ascendMeter.className='filling'; + } + Game.ascendMeter.style.right=Math.floor(Math.max(0,1-Game.ascendMeterPercent)*100)+'px'; + Game.ascendMeterPercent+=(Game.ascendMeterPercentT-Game.ascendMeterPercent)*0.1; - var getCookiePrice=function(level){return 999999999999999999999999999999999999999*Math.pow(10,(level-1)/2);}; + Game.NotesLogic(); + if (Game.mouseMoved || Game.Scroll || Game.tooltip.dynamic) Game.tooltip.update(); - order=10020; - Game.NewUpgradeCookie({name:'Whoopie pies',desc:'Two chocolate halves joined together by a cream filling. It\'s got no eyebrows, but you never noticed until now.',icon:[21,31],power: 5,price: getCookiePrice(1)}); - Game.NewUpgradeCookie({name:'Caramel wafer biscuits',desc:'Coated in delicious chocolate. As many layers as you\'ll get in a biscuit without involving onions.',icon:[22,31],power: 5,price: getCookiePrice(2)}); - Game.NewUpgradeCookie({name:'Chocolate chip mocha cookies',desc:'Mocha started out as an excuse to smuggle chocolate into coffee. And now, in a poignant display of diplomacy and cultural exchange, it\'s bringing coffee to chocolate cookies.',icon:[23,31],power: 5,price: getCookiePrice(3)}); - Game.NewUpgradeCookie({name:'Earl Grey cookies',desc:'Captain Picard\'s favorite.',icon:[24,31],power: 5,price: getCookiePrice(4)}); - Game.NewUpgradeCookie({name:'Corn syrup cookies',desc:'The corn syrup makes it extra chewy. Not the type of stuff you\'d think to put in a cookie, but bakers make do.',icon:[25,31],power: 5,price: getCookiePrice(5)}); - Game.NewUpgradeCookie({name:'Icebox cookies',desc:'Can be prepared in a variety of shapes with a variety of ingredients. Made by freezing dough before baking it, mirroring a time-proven medieval torture practice. Gotta keep them guessing.',icon:[26,31],power: 5,price: getCookiePrice(6)}); - Game.NewUpgradeCookie({name:'Graham crackers',desc:'Inspired in their design by the wish to live a life of austere temperance, free from pleasure or cheer; it\'s no wonder these are so tasty.',icon:[27,31],power: 5,price: getCookiePrice(7)}); - Game.NewUpgradeCookie({name:'Hardtack',desc:'Extremely hard and, if we\'re being honest, extremely tack.
If you\'re considering eating this as a fun snack, you probably have other things to worry about than this game, like getting scurvy or your crew fomenting mutiny.',icon:[28,31],power: 5,price: getCookiePrice(8)}); - Game.NewUpgradeCookie({name:'Cornflake cookies',desc:'They\'re grrrrrroovy! Careful not to let it sit in your milk too long, lest you accidentally end up with a bowl of cereal and get confused.',icon:[29,31],power: 5,price: getCookiePrice(9)}); - Game.NewUpgradeCookie({name:'Tofu cookies',desc:'There\'s really two ways to go with tofu cooking; either it asserts itself in plain sight or it camouflages itself in the other ingredients. This happens to be the latter, and as such, you can\'t really tell the difference between this and a regular cookie, save for that one pixel on the left.',icon:[30,31],power: 5,price: getCookiePrice(10)}); - Game.NewUpgradeCookie({name:'Gluten-free cookies',desc:'Made with browned butter and milk to closely match the archetypal chocolate chip cookie.
For celiacs, a chance to indulge in a delicious risk-free pastry. For others, a strangely threatening confection whose empty eyes will never know heaven nor hell.',icon:[30,30],power: 5,price: getCookiePrice(10)}); - Game.NewUpgradeCookie({name:'Russian bread cookies',desc:'Also known as alphabet cookies; while most bakers follow the recipe to the letter, it is said that some substitute the flour for spelt. But don\'t take my word for it.',icon:[30,29],power: 5,price: getCookiePrice(11)}); - Game.NewUpgradeCookie({name:'Lebkuchen',desc:'Diverse cookies from Germany, fragrant with honey and spices, often baked around Christmas.
Once worn by warriors of old for protection in battle.
+5 STR, +20% magic resistance.',icon:[30,28],power: 5,price: getCookiePrice(12)}); - Game.NewUpgradeCookie({name:'Aachener Printen',desc:'The honey once used to sweeten these gingerbread-like treats has since been swapped out for beet sugar, providing another sad example of regressive evolution.',icon:[30,27],power: 5,price: getCookiePrice(13)}); - Game.NewUpgradeCookie({name:'Canistrelli',desc:'A dry biscuit flavored with anise and wine, tough like the people of Corsica where it comes from.',icon:[30,26],power: 5,price: getCookiePrice(14)}); - Game.NewUpgradeCookie({name:'Nice biscuits',desc:'Made with coconut and perfect with tea. Traces its origins to a French city so nice they named it that.',icon:[30,25],power: 5,price: getCookiePrice(15)}); - Game.NewUpgradeCookie({name:'French pure butter cookies',desc:'You can\'t tell what\'s stronger coming off these - the smell of butter or condescension.',icon:[31,25],power: 5,price: getCookiePrice(16)}); - Game.NewUpgradeCookie({name:'Petit beurre',desc:'An unassuming biscuit whose name simply means "little butter". Famed and feared for its four ears and forty-eight teeth.
When it hears ya, it\'ll get ya...',icon:[31,26],power: 5,price: getCookiePrice(16)}); - Game.NewUpgradeCookie({name:'Nanaimo bars',desc:'A delicious no-bake pastry hailing from Canada. Probably beats eating straight-up snow with maple syrup poured on it, but what do I know.',icon:[31,27],power: 5,price: getCookiePrice(17)}); - Game.NewUpgradeCookie({name:'Berger cookies',desc:'Messily slathered with chocolate fudge, but one of the most popular bergers of Baltimore, along with the triple fried egg berger and the blue crab cheeseberger.',icon:[31,28],power: 5,price: getCookiePrice(18)}); - Game.NewUpgradeCookie({name:'Chinsuko',desc:'A little piece of Okinawa in cookie form. Part of a Japanese custom of selling sweets as souvenirs. But hey, pressed pennies are cool too.',icon:[31,29],power: 5,price: getCookiePrice(19)}); - Game.NewUpgradeCookie({name:'Panda koala biscuits',desc:'Assorted jungle animals with equally assorted fillings.
Comes in chocolate, strawberry, vanilla and green tea.
Eat them all before they go extinct!',icon:[31,13],power: 5,price: getCookiePrice(19)}); - Game.NewUpgradeCookie({name:'Putri salju',desc:'A beloved Indonesian pastry; its name means "snow princess", for the powdered sugar it\'s coated with. Had we added these to Cookie Clicker some years ago, this is where we\'d make a reference to that one Disney movie, but it\'s probably time to let it go.',icon:[31,30],power: 5,price: getCookiePrice(20)}); - Game.NewUpgradeCookie({name:'Milk cookies',desc:'Best eaten with a tall glass of chocolate.',icon:[31,31],power: 5,price: getCookiePrice(21)}); + if (Game.T%(Game.fps*5)==0 && !Game.mouseDown && (Game.onMenu=='stats' || Game.onMenu=='prefs')) Game.UpdateMenu(); + if (Game.T%(Game.fps*1)==0) Game.UpdatePrompt(); + if (Game.AscendTimer>0) Game.UpdateAscendIntro(); + if (Game.ReincarnateTimer>0) Game.UpdateReincarnateIntro(); + if (Game.OnAscend) Game.UpdateAscend(); - order=9999; - Game.NewUpgradeCookie({name:'Cookie crumbs',desc:'There used to be a cookie here. Now there isn\'t.
Good heavens, what did you DO?!',icon:[30,13],power:1,require:'Legacy',price:100}); - Game.NewUpgradeCookie({name:'Chocolate chip cookie',desc:'This is the cookie you\'ve been clicking this whole time. It looks a bit dented and nibbled on, but it\'s otherwise good as new.',icon:[10,0],power:10,require:'Legacy',price:1000000000000}); + for (var i in Game.customLogic) {Game.customLogic[i]();} + + if (Game.sparklesT>0) + { + Game.sparkles.style.backgroundPosition=-Math.floor((Game.sparklesFrames-Game.sparklesT+1)*128)+'px 0px'; + Game.sparklesT--; + if (Game.sparklesT==1) Game.sparkles.style.display='none'; + } + + Game.Click=0; + Game.Scroll=0; + Game.mouseMoved=0; + Game.CanClick=1; + + if ((Game.toSave || (Game.T%(Game.fps*60)==0 && Game.T>Game.fps*10 && Game.prefs.autosave)) && !Game.OnAscend) + { + //check if we can save : no minigames are loading + var canSave=true; + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + if (me.minigameLoading){canSave=false;break;} + } + if (canSave) Game.WriteSave(); + } + + //every 30 minutes : get server data (ie. update notification, patreon data) + if (Game.T%(Game.fps*60*30)==0 && Game.T>Game.fps*10/* && Game.prefs.autoupdate*/) {Game.CheckUpdates();Game.GrabData();} + + Game.T++; + } + + /*===================================================================================== + DRAW + =======================================================================================*/ + + Game.Draw=function() + { + Game.DrawBackground();Timer.track('end of background'); + + if (!Game.OnAscend) + { + + var unit=(Math.round(Game.cookiesd)==1?' cookie':' cookies'); + var str=Beautify(Math.round(Game.cookiesd)); + if (Game.cookiesd>=1000000)//dirty padding + { + var spacePos=str.indexOf(' '); + var dotPos=str.indexOf('.'); + var add=''; + if (spacePos!=-1) + { + if (dotPos==-1) add+='.000'; + else + { + if (spacePos-dotPos==2) add+='00'; + if (spacePos-dotPos==3) add+='0'; + } + } + str=[str.slice(0, spacePos),add,str.slice(spacePos)].join(''); + } + if (str.length>11 && !Game.mobile) unit='
cookies'; + str+=unit; + if (Game.prefs.monospace) str=''+str+''; + str=str+'
0?' class="warning"':'')+'>per second : '+Beautify(Game.cookiesPs*(1-Game.cpsSucked),1)+'
';//display cookie amount + l('cookies').innerHTML=str; + l('compactCookies').innerHTML=str; + Timer.track('cookie amount'); + + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + if (me.onMinigame && me.minigame.draw && !me.muted) me.minigame.draw(); + } + Timer.track('draw minigames'); + + if (Game.drawT%5==0) + { + //if (Game.prefs.monospace) {l('cookies').className='title monospace';} else {l('cookies').className='title';} + var lastLocked=0; + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + + //make products full-opacity if we can buy them + var classes='product'; + var price=me.bulkPrice; + if (Game.cookiesEarned>=me.basePrice || me.bought>0) {classes+=' unlocked';lastLocked=0;me.locked=0;} else {classes+=' locked';lastLocked++;me.locked=1;} + if ((Game.buyMode==1 && Game.cookies>=price) || (Game.buyMode==-1 && me.amount>0)) classes+=' enabled'; else classes+=' disabled'; + if (lastLocked>2) classes+=' toggledOff'; + me.l.className=classes; + //if (me.id>0) {l('productName'+me.id).innerHTML=Beautify(me.storedTotalCps/Game.ObjectsById[me.id-1].storedTotalCps,2);} + } + + //make upgrades full-opacity if we can buy them + var lastPrice=0; + for (var i in Game.UpgradesInStore) + { + var me=Game.UpgradesInStore[i]; + if (!me.bought) + { + var price=me.getPrice(); + var canBuy=me.canBuy();//(Game.cookies>=price); + var enabled=(l('upgrade'+i).className.indexOf('enabled')>-1); + if ((canBuy && !enabled) || (!canBuy && enabled)) Game.upgradesToRebuild=1; + if (price'; + T=(T*144)%144; + l('upgradePieTimer'+i).style.backgroundPosition=(-Math.floor(T%18))*48+'px '+(-Math.floor(T/18))*48+'px'; + } + } + + //if (me.canBuy()) l('upgrade'+i).className='crate upgrade enabled'; else l('upgrade'+i).className='crate upgrade disabled'; + } + } + Timer.track('store'); + + if (Game.PARTY)//i was bored and felt like messing with CSS + { + var pulse=Math.pow((Game.T%10)/10,0.5); + Game.l.style.filter='hue-rotate('+((Game.T*5)%360)+'deg) brightness('+(150-50*pulse)+'%)'; + Game.l.style.webkitFilter='hue-rotate('+((Game.T*5)%360)+'deg) brightness('+(150-50*pulse)+'%)'; + Game.l.style.transform='scale('+(1.02-0.02*pulse)+','+(1.02-0.02*pulse)+') rotate('+(Math.sin(Game.T*0.5)*0.5)+'deg)'; + l('wrapper').style.overflowX='hidden'; + l('wrapper').style.overflowY='hidden'; + } + + Timer.clean(); + if (Game.prefs.animate && ((Game.prefs.fancy && Game.drawT%1==0) || (!Game.prefs.fancy && Game.drawT%10==0)) && Game.AscendTimer==0 && Game.onMenu=='') Game.DrawBuildings();Timer.track('buildings'); + + Game.textParticlesUpdate();Timer.track('text particles'); + } + + Game.NotesDraw();Timer.track('notes'); + //Game.tooltip.update();//changed to only update when the mouse is moved + + for (var i in Game.customDraw) {Game.customDraw[i]();} + + Game.drawT++; + //if (Game.prefs.altDraw) requestAnimationFrame(Game.Draw); + } + + /*===================================================================================== + MAIN LOOP + =======================================================================================*/ + Game.Loop=function() + { + if (Game.timedout) return false; + Timer.say('START'); + Timer.track('browser stuff'); + Timer.say('LOGIC'); + //update game logic ! + Game.catchupLogic=0; + Game.Logic(); + Game.catchupLogic=1; + + var time=Date.now(); - new Game.Upgrade('Cosmic beginner\'s luck','Prior to purchasing the Heavenly chip secret upgrade in a run, random drops are 5 times more common.Oh! A penny!
Oh! A priceless heirloom!
Oh! Another penny!
',999999999*15,[8,10]);Game.last.pool='prestige';Game.last.parents=['Shimmering veil']; - new Game.Upgrade('Reinforced membrane','The shimmering veil is more resistant, and has a 10% chance not to break. It also gives +10% more CpS.A consistency between jellyfish and cling wrap.',999999999*15,[7,10]);Game.last.pool='prestige';Game.last.parents=['Shimmering veil']; + //latency compensator + Game.accumulatedDelay+=((time-Game.time)-1000/Game.fps); + if (Game.prefs.timeout && time-Game.lastActivity>=1000*60*5) + { + if (Game.accumulatedDelay>1000*60*30) Game.delayTimeouts+=3;//more than 30 minutes delay ? computer probably asleep and not making cookies anyway + else if (Game.accumulatedDelay>1000*5) Game.delayTimeouts++;//add to timeout counter when we skip 10 seconds worth of frames (and the player has been inactive for at least 5 minutes) + if (Game.delayTimeouts>=3) Game.Timeout();//trigger timeout when the timeout counter is 3+ + } + Game.accumulatedDelay=Math.min(Game.accumulatedDelay,1000*5);//don't compensate over 5 seconds; if you do, something's probably very wrong + Game.time=time; + while (Game.accumulatedDelay>0) + { + Game.Logic(); + Game.accumulatedDelay-=1000/Game.fps;//as long as we're detecting latency (slower than target fps), execute logic (this makes drawing slower but makes the logic behave closer to correct target fps) + } + Game.catchupLogic=0; + Timer.track('logic'); + Timer.say('END LOGIC'); + if (!Game.prefs.altDraw) + { + var hasFocus=document.hasFocus(); + Timer.say('DRAW'); + if (hasFocus || Game.prefs.focus || Game.loopT%10==0) requestAnimationFrame(Game.Draw); + //if (document.hasFocus() || Game.loopT%5==0) Game.Draw(); + Timer.say('END DRAW'); + } + else requestAnimationFrame(Game.Draw); - order=255; - Game.GrandmaSynergy('Binary grandmas','A digital grandma to transfer more cookies.
(See also : boolean grandmas, string grandmas, and not-a-number grandmas, also known as "NaNs".)','Javascript console'); + //if (!hasFocus) Game.tooltip.hide(); - order=1400; - new Game.TieredUpgrade('The JavaScript console for dummies','Javascript consoles are twice as efficient.This should get you started. The first line reads: "To open the javascript console, press-"
...the rest of the book is soaked in chocolate milk. If only there was a way to look up this sort of information...
','Javascript console',1); - new Game.TieredUpgrade('64bit arrays','Javascript consoles are twice as efficient.A long-form variable type to pack your cookies much more efficiently.','Javascript console',2); - new Game.TieredUpgrade('Stack overflow','Javascript consoles are twice as efficient.This is really bad! You probably forgot to close a loop somewhere and now your programs are going crazy! The rest of your engineers seem really excited about it somehow. How could a software mishap like a stack overflow possibly ever help anyone?','Javascript console',3); - new Game.TieredUpgrade('Enterprise compiler','Javascript consoles are twice as efficient.This bespoke javascript compiler took your team years of development and billions in research, but it should let you execute (certain) functions (up to) 2% faster (in optimal circumstances).','Javascript console',4); - new Game.TieredUpgrade('Syntactic sugar','Javascript consoles are twice as efficient.Tastier code for tastier cookies.','Javascript console',5); - new Game.TieredUpgrade('A nice cup of coffee','Javascript consoles are twice as efficient.All this nerd stuff has you exhausted. You make yourself a nice cup of coffee, brewed with roasted beans from some far-away island. You may have been working a bit too hard though - the cup of coffee starts talking to you, insisting that it is NOT javascript.','Javascript console',6); - new Game.TieredUpgrade('Just-in-time baking','Javascript consoles are twice as efficient.A new method of preparing cookies; they bake themselves right in front of the customers before eating, leaving your kitchens mess-free.','Javascript console',7); - new Game.TieredUpgrade('cookies++','Javascript consoles are twice as efficient.Your very own cookie-themed programming language, elegantly named after its most interesting ability - increasing the "cookies" variable by 1.','Javascript console',8); - new Game.TieredUpgrade('Software updates','Javascript consoles are twice as efficient.This is grand news - someone\'s finally figured out the Wifi password, and your newfound internet connection seems to have triggered a whole lot of software updates! Your browsers, drivers and plugins all received a fresh coat of paint, and your javascript version has been updated to the latest ECMAScript specification. It\'s really too bad thousands had to die due to some deprecated function in your neurotoxin ventilation code, but I guess that\'s progress for you.','Javascript console',9); - new Game.TieredUpgrade('Game.Loop','Javascript consoles are twice as efficient.You\'re not quite sure what to make of this. What does it mean? What does it do? Who would leave something like that just laying around here? Try asking again in 1/30th of a second.','Javascript console',10); - new Game.TieredUpgrade('eval()','Javascript consoles are twice as efficient.It is said that this simple function holds the key to the universe, and that whosoever masters it may shape reality to their will.
Good thing you have no idea how it works. Makes for a neat plaque on your wall, though.
','Javascript console',11); + if (Game.sesame) + { + //fps counter and graph + Game.previousFps=Game.currentFps; + Game.currentFps=Game.getFps(); + var ctx=Game.fpsGraphCtx; + ctx.drawImage(Game.fpsGraph,-1,0); + ctx.fillStyle='rgb('+Math.round((1-Game.currentFps/Game.fps)*128)+',0,0)'; + ctx.fillRect(128-1,0,1,64); + ctx.strokeStyle='#fff'; + ctx.beginPath(); + ctx.moveTo(128-1,(1-Game.previousFps/Game.fps)*64); + ctx.lineTo(128,(1-Game.currentFps/Game.fps)*64); + ctx.stroke(); + + l('fpsCounter').innerHTML=Game.currentFps+' fps'; + var str=''; + for (var i in Timer.labels) {str+=Timer.labels[i];} + if (Game.debugTimersOn) l('debugLog').style.display='block'; + else l('debugLog').style.display='none'; + l('debugLog').innerHTML=str; + + } + Timer.reset(); - order=5000; - Game.SynergyUpgrade('Script grannies','Armies of energy drink-fueled grandmas ready to hack into the cyberspace for renegade e-cookies.','Javascript console','Grandma','synergy1'); - Game.SynergyUpgrade('Tombola computing','','Javascript console','Chancemaker','synergy2'); - Game.last.descFunc=function(){ - Math.seedrandom(Game.seed+'-tombolacomputing'); - var str='(Your ticket reads '+Math.floor(Math.random()*100)+' '+Math.floor(Math.random()*100)+' '+Math.floor(Math.random()*100)+' '+Math.floor(Math.random()*100)+', entitling you to '+choose([Math.floor(Math.random()*5+2)+' lines of javascript','one free use of Math.random()','one qubit, whatever that is','one half-eaten cookie','a brand new vacuum cleaner','most of one room-temperature cup of orange soda','one really good sandwich','one handful of pocket lint','someone\'s mostly clean hairpiece','a trip to a fancy restaurant','the knowledge of those numbers','a furtive glance at the news ticker','another ticket, half-price','all-you-can-eat moldy bread','one lifetime supply of oxygen','the color '+choose['red','orange','yellow','green','blue','purple','black','white','gray','brown','pink','teal'],'increased intellect for a limited time','an ancient runesword','the throne of a far-away country','the position of Mafia capo. Good luck','one free time-travel week-end','something beautiful','the deed to some oil well','one hamburger made out of the animal, plant, or person of your choice','the last surviving '+choose['dodo bird','thylacine','unicorn','dinosaur','neanderthal'],'a deep feeling of accomplishment','a fleeting tinge of entertainment','a vague sense of unease','deep existential dread','one extra week added to your lifespan','breathe manually','blink right here and now','one meeting with any famous person, living or dead, in your next dream','one very nice dream','a wacky sound effect','45 seconds of moral flexibility','hundreds and thousands, also known as "sprinkles"','one circle, triangle, square or other simple geometric shape, of average dimensions','just this extra bit of randomness','the extra push you needed to turn your life around','a good fright','one secret superpower','a better luck next time','an irrational phobia of tombola tickets','one whole spider','an increased sense of self-worth and determination','inner peace','one double-XP week-end in the MMORPG of your choice','a little piece of the universe, represented by the trillions of atoms that make up this very ticket','food poisoning','the Moon! Well, conceptually','a new car, baby','a new catchphrase','an intrusive thought of your choice','- ...aw man, it just cuts off there','the director spot for the next big hit movie','really good-looking calves','one genuine pirate golden doubloon','"treasure and riches", or something','one boat, sunken','baby shoes, never worn','direct lineage to some King or Queen','innate knowledge of a dead language you\'ll never encounter','the melody of a song you don\'t know the words to','white noise','mild physical impairment','a new pair of lips','things, and such','one popular expression bearing your name','one typo','one get-out-of-jail-free card','the rest of your life... for now','one polite huff','a condescending stare','one cursed monkey paw','true love, probably','an interesting factoid about the animal, country, TV show or celebrity of your choice','a pop culture reference','minutes of fun','the etymology of the word "tombola" - it\'s Italian for "a tumble"','nothing. You lost, sorry'])+'.)'; - Math.seedrandom(); - return this.desc+'Like quantum computing, but more fun.
'+str+'
'; - }; - - order=10020; - Game.NewUpgradeCookie({name:'Kruidnoten',desc:'A festive dutch favorite; tiny cinnamony bites sometimes coated in chocolate. The name translates roughly to "kruidnoten".',icon:[30,3],power: 5,price: getCookiePrice(22)}); - Game.NewUpgradeCookie({name:'Marie biscuits',desc:'Pleasantly round, smoothly buttery, subtly vanilla-flavored, ornately embossed, each ridge represents a person Marie killed in prison.',icon:[30,4],power: 5,price: getCookiePrice(23)}); - Game.NewUpgradeCookie({name:'Meringue cookies',desc:'Probably the most exciting thing you can make out of egg whites. Also called forgotten cookies, due to the recipe being once lost in a sealed mystical vault for 10,000 years.',icon:[31,4],power: 5,price: getCookiePrice(24)}); - - order=10060; - Game.NewUpgradeCookie({name:'Pizza',desc:'What is a pizza if not a large, chewy cookie, frosted with a rather exuberant tomato & cheese icing? Not a cookie, that\'s what.',icon:[31,9],require:'Box of not cookies', power:5,price: Math.pow(10,44)}); - - order=10050; - Game.NewUpgradeCookie({name:'Crackers',desc:'These are the non-flavored kind with no salt added. Really just a judgement-free wheat square begging to have bits of ham and spreadable cheese piled onto it, its main contribution being "crunchy".',icon:[30,9],require:'Box of maybe cookies', power:4,price: Math.pow(10,45)}); - - order=10030; - Game.NewUpgradeCookie({name:'Havabreaks',desc:'You can snap the sections neatly or just bite into the whole thing like some kind of lunatic. Some oversea countries manufacture these in hundreds of unique flavors, such as green tea, lobster bisque, and dark chocolate.',icon:[31,3],require:'Box of brand biscuits',power: 2, price: 999999999999999999999999999*5}); - - order=20000; - new Game.Upgrade('Kitten executives','You gain more CpS the more milk you have.ready to execute whatever and whoever you\'d like, sir',900000000000000000000000000000000000000000000,Game.GetIcon('Kitten',13));Game.last.kitten=1;Game.MakeTiered(Game.last,13,18); - - - order=10020; - Game.NewUpgradeCookie({name:'Chai tea cookies',desc:'Not exactly Captain Picard\'s favorite, but I mean, these will do in a pinch.',icon:[23,32],power: 5,price: getCookiePrice(4)+5});Game.last.order=10020.5685; - - Game.NewUpgradeCookie({name:'Yogurt cookies',desc:'Augmented by the wonders of dairy, these cookies are light and fluffy and just one more thing for the lactose-intolerant to avoid.
Truly for the cultured among us.',icon:[24,32],power: 5,price: getCookiePrice(25)}); - Game.NewUpgradeCookie({name:'Thumbprint cookies',desc:'Filled with jam and sometimes served in little paper cups. No longer admissible as biometric evidence in court. We\'re not having a repeat of that whole mess.',icon:[25,32],power: 5,price: getCookiePrice(26)}); - Game.NewUpgradeCookie({name:'Pizzelle',desc:'Thin, crisp waffle cookies baked in a bespoke iron following an ancient Italian recipe.
These cookies have been around for a long, long time.
These cookies have seen things.',icon:[26,32],power: 5,price: getCookiePrice(27)}); - - order=10030; - Game.NewUpgradeCookie({name:'Zilla wafers',desc:'Popular vanilla-flavored biscuits that somehow keep ending up in banana pudding.
Themed after a beloved radioactive prehistoric monster, for some reason.',icon:[22,32],require:'Box of brand biscuits',power: 2, price: 999999999999999999999999999999*5}); - Game.NewUpgradeCookie({name:'Dim Dams',desc:'Two biscuits joined by chocolate and coated in even more chocolate.
You wonder - which one is the dim, and which one is the dam?',icon:[31,10],require:'Box of brand biscuits',power: 2, price: 999999999999999999999999999999999*5}); - - order=10060; - Game.NewUpgradeCookie({name:'Candy',desc:'There are two pillars to the world of sweets : pastries, of course - and candy.
You could make a whole new game just about these, but for now, please enjoy these assorted generic treats.',icon:[30,10],require:'Box of not cookies', power:5,price: Math.pow(10,46)}); - - - order=19000; - new Game.TieredUpgrade('Fortune #001','Cursors are 7% more efficient and 7% cheaper.Fingers are not the only thing you can count on.','Cursor','fortune'); - new Game.TieredUpgrade('Fortune #002','Grandmas are 7% more efficient and 7% cheaper.A wrinkle is a crack in a mundane facade.','Grandma','fortune'); - new Game.TieredUpgrade('Fortune #003','Farms are 7% more efficient and 7% cheaper.The seeds of tomorrow already lie within the seeds of today.','Farm','fortune'); - new Game.TieredUpgrade('Fortune #004','Mines are 7% more efficient and 7% cheaper.Riches from deep under elevate you all the same.','Mine','fortune'); - new Game.TieredUpgrade('Fortune #005','Factories are 7% more efficient and 7% cheaper.True worth is not in what you find, but in what you make.','Factory','fortune'); - new Game.TieredUpgrade('Fortune #006','Banks are 7% more efficient and 7% cheaper.The value of money means nothing to a pocket.','Bank','fortune'); - new Game.TieredUpgrade('Fortune #007','Temples are 7% more efficient and 7% cheaper.Not all guides deserve worship.','Temple','fortune'); - new Game.TieredUpgrade('Fortune #008','Wizard towers are 7% more efficient and 7% cheaper.Magic is about two things - showmanship, and rabbits.','Wizard tower','fortune'); - new Game.TieredUpgrade('Fortune #009','Shipments are 7% more efficient and 7% cheaper.Every mile travelled expands the mind by just as much.','Shipment','fortune'); - new Game.TieredUpgrade('Fortune #010','Alchemy labs are 7% more efficient and 7% cheaper.Don\'t get used to yourself. You\'re gonna have to change.','Alchemy lab','fortune'); - new Game.TieredUpgrade('Fortune #011','Portals are 7% more efficient and 7% cheaper.Every doorway is a gamble. Tread with care.','Portal','fortune'); - new Game.TieredUpgrade('Fortune #012','Time machines are 7% more efficient and 7% cheaper.Do your future self a favor; they\'ll thank you for it.','Time machine','fortune'); - new Game.TieredUpgrade('Fortune #013','Antimatter condensers are 7% more efficient and 7% cheaper.The world is made of what we put into it.','Antimatter condenser','fortune'); - new Game.TieredUpgrade('Fortune #014','Prisms are 7% more efficient and 7% cheaper.Staring at a dazzling light can blind you back to darkness.','Prism','fortune'); - new Game.TieredUpgrade('Fortune #015','Chancemakers are 7% more efficient and 7% cheaper.Don\'t leave to blind chance what you could accomplish with deaf skill.','Chancemaker','fortune'); - new Game.TieredUpgrade('Fortune #016','Fractal engines are 7% more efficient and 7% cheaper.It\'s good to see yourself in others. Remember to see yourself in yourself, too.','Fractal engine','fortune'); - new Game.TieredUpgrade('Fortune #017','Javascript consoles are 7% more efficient and 7% cheaper.If things aren\'t working out for you, rewrite the rules.','Javascript console','fortune'); - - - order=19100; - //note : price for these capped to base price OR 1 day of unbuffed CpS - new Game.Upgrade('Fortune #100','Upgrades and buildings cost -1%; you gain +1% CpS.True wealth is counted in gifts.', - Game.Tiers['fortune'].price*100000,[0,0]);Game.MakeTiered(Game.last,'fortune',10); - Game.last.priceFunc=function(me){return Math.min(me.basePrice,Game.unbuffedCps*60*60*24);} - new Game.Upgrade('Fortune #101','You gain +7% CpS.Some people dream of fortunes; others dream of cookies.',Game.Tiers['fortune'].price*100000000,[0,0]);Game.MakeTiered(Game.last,'fortune',10); - Game.last.priceFunc=function(me){return Math.min(me.basePrice,Game.unbuffedCps*60*60*24);} - new Game.Upgrade('Fortune #102','You gain +1% of your regular CpS while the game is closed (provided you have the Twin Gates of Transcendence heavenly upgrade).Help, I\'m trapped in a browser game!',Game.Tiers['fortune'].price*100000000000,[0,0]);Game.MakeTiered(Game.last,'fortune',10); - Game.last.priceFunc=function(me){return Math.min(me.basePrice,Game.unbuffedCps*60*60*24);} - new Game.Upgrade('Fortune #103','You gain more CpS the more milk you have.Don\'t believe the superstitions; all cats are good luck.',Game.Tiers['fortune'].price*100000000000000,[0,0]);Game.MakeTiered(Game.last,'fortune',18);Game.last.kitten=1; - Game.last.priceFunc=function(me){return Math.min(me.basePrice,Game.unbuffedCps*60*60*24);} - new Game.Upgrade('Fortune #104','Clicking gains +1% of your CpS.Remember to stay in touch.',Game.Tiers['fortune'].price*100000000000,[0,0]);Game.MakeTiered(Game.last,'fortune',11); - Game.last.priceFunc=function(me){return Math.min(me.basePrice,Game.unbuffedCps*60*60*24);} - - new Game.Upgrade('Fortune cookies','The news ticker may occasionally have fortunes, which may be clicked for something good.These don\'t taste all that great but that\'s not really the point, is it?',77777777777,[29,8]);Game.last.pool='prestige';Game.last.parents=['Distilled essence of redoubled luck']; - - - order=40000; - new Game.Upgrade('A really good guide book','?????????',7,[22,12]);//debug purposes only - //new Game.Upgrade('A really good guide book','All dungeon locations behave as if unlocked.
You may shift-click a dungeon location to teleport there.It even tells you which hotels to avoid!',7,[22,12]);//debug purposes only - Game.last.buyFunction=function(){if (Game.Objects['Factory'].minigameLoaded){Game.Objects['Factory'].minigame.computeMapBounds();Game.Objects['Factory'].minigame.updateLocStyles();}} - Game.last.pool='debug'; - - order=10300; - Game.NewUpgradeCookie({name:'Prism heart biscuits',desc:'An every-flavor biscuit that stands for universal love and being true to yourself.',require:'Eternal heart biscuits',season:'valentines',icon:[30,8], power:heartPower,price: 1000000000000000000000000});Game.last.order=10300.175; - - order=19100; - new Game.Upgrade('Kitten wages','Through clever accounting, this actually makes kitten upgrades 10% cheaper.Cats can have little a salary, as a treat.
Cats are expert hagglers and have a keen sense of bargaining, especially in the case of cash.
',9000000000,[31,8]);Game.last.pool='prestige';Game.last.parents=['Kitten angels'];Game.last.kitten=1; - new Game.Upgrade('Pet the dragon','Unlocks the ability to pet your dragon by clicking on it once hatched.Dragons do not purr. If your dragon starts purring, vacate the area immediately.',99999999999,[30,12]);Game.last.pool='prestige';Game.last.parents=['How to bake your dragon','Residual luck']; - - order=25100; - var dragonDropUpgradeCost=function(me){return Game.unbuffedCps*60*30*((Game.dragonLevel+3%.
Cost scales with CpS, but 10 times cheaper with a fully-trained dragon.Your dragon sheds these regularly, so this one probably won\'t be missed.
Note: icon not to scale.
',999,[30,14]);Game.last.priceFunc=dragonDropUpgradeCost; - new Game.Upgrade('Dragon claw','Clicks are +3% more powerful.
Cost scales with CpS, but 10 times cheaper with a fully-trained dragon.Will grow back in a few days\' time.
A six-inch retractable claw, like a razor, from the middle toe. So you know, try to show a little respect.
',999,[31,14]);Game.last.priceFunc=dragonDropUpgradeCost; - new Game.Upgrade('Dragon fang','+3% golden cookie gains.
Dragon harvest and Dragonflight are 10% stronger.
Cost scales with CpS, but 10 times cheaper with a fully-trained dragon.Just a fallen baby tooth your dragon wanted you to have, as a gift.
It might be smaller than an adult tooth, but it\'s still frighteningly sharp - and displays some awe-inspiring cavities, which you might expect from a creature made out of sweets.
',999,[30,15]);Game.last.priceFunc=dragonDropUpgradeCost; - new Game.Upgrade('Dragon teddy bear','+3% random drops.
Cost scales with CpS, but 10 times cheaper with a fully-trained dragon.Your dragon used to sleep with this, but it\'s yours now.
Crafted in the likelihood of a fearsome beast. Stuffed with magical herbs picked long ago by a wandering wizard. Woven from elven yarn and a polyester blend.
',999,[31,15]);Game.last.priceFunc=dragonDropUpgradeCost; - - order=10020; - Game.NewUpgradeCookie({name:'Granola cookies',desc:'Wait! These are just oatmeal cookies mixed with raisin cookies! What next, half-dark chocolate half-white chocolate cookies?',icon:[28,32],power: 5,price: getCookiePrice(28)}); - Game.NewUpgradeCookie({name:'Ricotta cookies',desc:'Light and cake-like. Often flavored with lemon or almond extract. Sprinkles optional. Allegedly Italian. Investigation pending.',icon:[29,32],power: 5,price: getCookiePrice(29)}); - Game.NewUpgradeCookie({name:'Roze koeken',desc:'The icing on these Dutch cookies is traditionally pink, but different colors may be used for special occasions - such as pink to celebrate Breast Cancer Awareness Month, or for International Flamingo Day, pink.',icon:[30,32],power: 5,price: getCookiePrice(30)}); - Game.NewUpgradeCookie({name:'Peanut butter cup cookies',desc:'What more poignant example of modern societal struggles than the brazen reclaiming of a corporate product by integrating it in the vastly more authentic shell of a homemade undertaking? Anyway this is a peanut butter cup, baked into a cookie. It\'s pretty good!',icon:[31,32],power: 5,price: getCookiePrice(31)}); - Game.NewUpgradeCookie({name:'Sesame cookies',desc:'Look at all the little seeds on these! It\'s like someone dropped them on the street or something! A very welcoming and educational street!',icon:[22,33],power: 5,price: getCookiePrice(32)}); - Game.NewUpgradeCookie({name:'Taiyaki',desc:'A pastry fish filled with red bean paste, doomed to live an existence of constant and excruciating pain as its aquatic environment slowly dissolves its soft doughy body.
Also comes in chocolate flavor!',icon:[23,33],power: 5,price: getCookiePrice(33)}); - Game.NewUpgradeCookie({name:'Vanillekipferl',desc:'Nut-based cookies from Central Europe, coated in powdered vanilla sugar. Regular kipferl, crescent-shaped br + Game.loopT++; + setTimeout(Game.Loop,1000/Game.fps); + } +} + + +/*===================================================================================== +LAUNCH THIS THING +=======================================================================================*/ +Game.Launch(); +//try {Game.Launch();} +//catch(err) {console.log('ERROR : '+err.message);} + +window.onload=function() +{ + + if (!Game.ready) + { + if (top!=self) Game.ErrorFrame(); + else + { + console.log('[=== '+choose([ + 'Oh, hello!', + 'hey, how\'s it hangin', + 'About to cheat in some cookies or just checking for bugs?', + 'Remember : cheated cookies taste awful!', + 'Hey, Orteil here. Cheated cookies taste awful... or do they?', + ])+' ===]'); + Game.Load(); + //try {Game.Load();} + //catch(err) {console.log('ERROR : '+err.message);} + } + } +};