The **Grimoire** is a minigame added on July 15, 2017, Version 2.0034. It is unlocked by spending one sugar lump to upgrade Wizard Towers to level 1.

It has several spells that can be cast:

Icon | Spell | Magic Cost | Chance to Backfire | Effect | Backfire |
---|---|---|---|---|---|

Conjure Baked Goods | 2 magic +40% of max magic | 15% | Summon half an hour worth of your CpS, capped at 15% of your cookies owned. | Trigger a 15-minute clot and lose 15 minutes of CpS. | |

Force the Hand of Fate | 10 magic +60% of max magic | 15% | Summon a random golden cookie. Each existing golden cookie makes this spell +15% more likely to backfire. | Summon an unlucky wrath cookie. | |

Stretch Time | 8 magic +20% of max magic | 15% | All active buffs gain 10% more time (up to 5 more minutes). | All active buffs are shortened by 20% (up to 10 minutes shorter). | |

Spontaneous Edifice | 20 magic +75% of max magic | 15% | The spell picks a random building you could afford if you had twice your current cookies, and gives it to you for free. The building selected must be under 400, and cannot be your most-built one (unless it is your only one). | Lose a random building. | |

Haggler's Charm
| 10 magic +10% of max magic | 15% | Upgrades are 2% cheaper for 1 minute. | Upgrades are 2% more expensive for an hour. | |

Summon Crafty Pixies | 10 magic +20% of max magic | 15% | Buildings are 2% cheaper for 1 minute. | Buildings are 2% more expensive for an hour. | |

Gambler's Fever Dream | 3 magic +5% of max magic | Cast a random spell at half the magic cost, with twice the chance of backfiring.^{[note 1]}
| |||

Resurrect Abomination | 20 magic +10% of max magic | 15% | Instantly summon a wrinkler if conditions are fulfilled. | Pop one of your wrinklers. | |

Diminish Ineptitude | 5 magic +20% of max magic | 15% | Spells backfire 10 times less for the next 5 minutes. | Spells backfire 5 times more for the next 10 minutes. |

- ↑ Does not stack with Diminish Inepitude.

Each spell costs magic to use. Your maximum amount of magic varies depending on your amount of wizard towers, as well as their building level. Magic refills over time; the lower your magic meter, the slower it refills. Alternatively, up to 100 can be refilled instantly by using a sugar lump.

Selling wizard towers will reduce the maximum limit of the magic meter, but not the current magic, unless the new maximum limit is below the current magic. This allows casting Force the Hand of Fate once, then selling wizard towers to reduce the cost of a second cast. For instance, at 100 magic / 100 max magic, the first Force spell would cost 70 magic, leaving 30 magic available. Selling towers to reduce the maximum magic to 30 will make the cost of a second Force spell to go down to 28 magic, effectively allowing a double cast without the use of a sugar lump.

## Conjure Baked GoodsEdit

An optimal strategy for using the "Conjure Baked Goods" spell would be to wait until you have a large production multiplier. A good time to cast it is when the golden cookie effect "*Frenzy*" and the wrath cookie effect "*Elder frenzy*" are both active, as this will earn you 30 minutes of x4662 your cookie production. It is also possible to gain even larger multipliers, for example with the help of Force the Hand of Fate. (It is limited to 15% of current bank so plan accordingly.)

## Outcome of Force the Hand of FateEdit

The mechanism of this spell follows a random list mechanism.

For golden cookie, the rules are:

- Add Frenzy and Lucky to a pool.
- If there is no Dragonflight buff active, add Click Frenzy.
- 10% chance to add Storm (added twice) and Blab to the pool.
- 25% chance to add Building Special, if you own more than or equal to 10 total buildings.
- For all buildings of which you own more than or equal to 10, choose one and buff according to the chosen building's amount. If no building has such quantity, choose Frenzy.

- 15% chance to replace the pool with Storm Drop.
- 0.01% chance to add Free Sugar Lump to the pool.
- Pick a random effect from the pool.

In the following, we assume at least one building's number is more or equal to 10.

The final results are:

No Dragonflight buff | ||||||
---|---|---|---|---|---|---|

Frenzy=Lucky=C. Frenzy | Storm | Blab | Building | StormDrop | Sugar | |

Exact | $ \frac{566086723}{2240000000} $ | $ \frac{1223983}{44800000} $ | $ \frac{1223983}{89600000} $ | $ \frac{113897773}{2240000000} $ | $ \frac{59997}{400000} $ | $ \frac{60133}{2240000000} $ |

Approx. | 25.27172871% | 2.732104911% | 1.366052455% | 5.084722009% | 14.99925% | 0.002684508929% |

With Dragonflight buff | ||||||
---|---|---|---|---|---|---|

Frenzy=Lucky | Storm | Blab | Building | StormDrop | Sugar | |

Exact | $ \frac{410933877}{1120000000} $ | $ \frac{4561593}{140000000} $ | $ \frac{4561593}{280000000} $ | $ \frac{3014593}{44800000} $ | $ \frac{59997}{400000} $ | $ \frac{7341}{224000000} $ |

Approx. | 36.69052473% | 3.258280714% | 1.629140357% | 6.729002232% | 14.99925% | 0.003277232143% |

For wrath cookie (backfire), the rules are:

- Add Clot and Ruin to a pool.
- 10% chance to add Cursed Finger and Elder Frenzy to the pool.
- 0.3% chance to add Free Sugar Lump to the pool.
- 10% chance to replace the pool with Blab.
- Pick a random effect from the pool.

The final result is:

Clot=Ruin | Cursed Finger=Elder Frenzy | Sugar | Blab | |
---|---|---|---|---|

Exact | $ \frac{854163}{2000000} $ | $ \frac{44973}{2000000} $ | $ \frac{27}{31250} $ | $ \frac{1}{10} $ |

Exact | 42.70815% | 2.24865% | 0.0864% | 10% |

### ManipulationEdit

Oddly enough, the seed used to determine the outcome of casting a spell is stored in your save-file as for version v2.0042. More specifically the result of casting any spell is based on your game seed (this is changed only on ascension) and your total number of spells cast. This means that if you save the game, cast a spell, re-load the game, and cast the same spell, the outcome will be the same. However, because Force the Hand of Fate uses Golden Cookie mechanics, there may be extra randomness checks before determining the specific bonus from the cookie and each additional check may change the outcome of the spell. These checks occur after determining whether the spell backfires so they have no effect on whether or not the spell backfires, they do however affect the outcome of Wrath Cookies spawned by backfires in the same way.

Extra randomness checks | Golden cookie sound | |
---|---|---|

Season | On | Off |

Valentine's Day or Easter | +2 | +1 |

any other season | +1 | 0 |

This means that depending on your settings the cookie from the spell may have up to 3 different results. Note however that the result is **still deterministic** so casting with the same number of spells cast total, same season and same golden cookie sound setting will always yield the same result. This gives the player the opportunity to get different results without having to cast additional spells, provided that the player has unlocked Golden cookie alert sound and/or Season switcher Heavenly upgrades.

Since the result is deterministic you can check in advance to see whether a spell will have a favorable outcome, and then use that spell at a later time with predictable results. One application of this is using Force the Hand of Fate to confirm either a Click Frenzy, or Elder Frenzy cookie will be generated and use that during a Frenzy, Building Special or/and Dragonflight buff.

Also, whether a spell will backfire or not is also deterministic, not tied to each specific spell (note however that because Force the Hand of Fate has additional chance to fail depending on the number of golden cookies on screen the spell may fail even though other spells would not). This can be manipulated so that the backfire can be "wasted" on a spell that won't have as much of an impact, such as using it on Diminish Ineptitude to make it cause backfires to occur 5 times more likely for 10 minutes, and then not use spells during those 10 minutes, or use it on Haggler's Charm to cause upgrades to be 2% more expensive for an hour when no upgrades are available to purchase, or are too expensive to purchase within the hour.

## Spontaneous Edifice mechanicsEdit

Building quantity achievements will remain locked when the player reaches the certain threshold using Spontaneous Edifice. Simply save and refresh the game to have them unlocked.

The total number of Wizard towers needed to cast the Spontaneous Edifice spell at each upgrade level is as follows:

- Lvl 1: 271 wizard towers
- Lvl 2: 267 wizard towers
- Lvl 3: 262 wizard towers
- Lvl 4: 258 wizard towers
- Lvl 5: 254 wizard towers
- Lvl 6: 249 wizard towers
- Lvl 7: 245 wizard towers
- Lvl 8: 241 wizard towers
- Lvl 9: 237 wizard towers
- lvl 10: 233 wizard towers

## Magic recharge timeEdit

The maximum magic, **M**, one can have is determined by the following formula:

- $ M=\left\lfloor 4+T^{0.6}+15\ln\left(1+\frac{T+10(L-1)}{15}\right)\right\rfloor $

Where **T** is the amount of wizard towers owned and **L** is the level of the wizard towers. How the magic, **m**, increases over time can be approximated by following formula:

- $ m(t)=\begin{cases}\frac{10^{-6}}{\overline{M}}(1800t+\overline{M})^2&,t\ge \frac{\overline{M}}{1800}\\ 0.0072t&,0\le t< \frac{\overline{M}}{1800}\end{cases} $
- $ \overline{M}=\max(100,M) $

Where time, **t**, is in minutes. Notice that when **L=1** and **T <= 530**, **M=100**. In most cases, we can approximate **m** with the quadratic equation only. To estimate how long it takes in minutes to reach the target amount of magic, use the following formula:

- $ \frac{5\sqrt{\overline{M}}}{9}(\sqrt{m_f}-\sqrt{m_i}) $

Where **m _{i}** is the current amount of magic available and

**m**is the desired amount of magic. This time may vary from the actual time taken due to the game running at different frame rates (e.g. when running in the background versus in the foreground). By these calculations, it takes roughly 56 minutes to fully recharge a completely empty magic meter when

_{f}**M=100**.

### Optimal max limitsEdit

Spells can be repeatedly cast as long as there is enough magic in the magic meter to cast it. For every spell, there is an optimal value for the max limit of magic, which allows the magic to regenerate in the shortest amount of time. These values and times are recorded in the table below. Some spells have inconveniently low limits, like the 7 of Conjure Baked Goods, so good alternatives have been listed as well.

Name | Optimal Max Magic | Cost to Cast | Time Until Recharged |
---|---|---|---|

Conjure Baked Goods | 7 | 4 | 305 seconds |

9 | 5 | 333 seconds | |

12 | 6 | 338 seconds | |

Force the Hand of Fate | 33 | 29 | 1248 seconds |

38 | 32 | 1238 seconds | |

43 | 35 | 1243 seconds | |

Stretch Time | 44 | 16 | 447 seconds |

49 | 17 | 448 seconds | |

54 | 18 | 449 seconds | |

Spontaneous Edifice | 93 | 89 | 2548 seconds |

97 | 92 | 2538 seconds | |

101 | 95 | 2546 seconds | |

Haggler's Charm | 79 | 17 | 338 seconds |

89 | 18 | 336 seconds | |

99 | 19 | 335 seconds | |

Summon Crafty Pixies | 54 | 20 | 506 seconds |

59 | 21 | 506 seconds | |

64 | 22 | 506 seconds | |

Resurrect Abomination | 89 | 28 | 541 seconds |

99 | 29 | 528 seconds | |

109 | 30 | 540 seconds | |

Diminish Ineptitude | 24 | 9 | 342 seconds |

29 | 10 | 342 seconds | |

34 | 11 | 345 seconds |

With this information, we can see that casting Haggler's Charm with 99 max magic is the fastest way to cast spells, but casting Conjure Baked Goods with low max magic is a good alternative while remaining useful in getting cookies.

## AchievementsEdit

Icon | Name | Description | ID |
---|---|---|---|

Bibbidi-bobbidi-boo | Cast 9 spells.
| 321 | |

I'm the wiz | Cast 99 spells.
| 322 | |

A wizard is you | Cast 999 spells."I'm a what?"
| 323 |

## TriviaEdit

- "A wizard is you" is a reference to "A winner is you," a meme from Nintendo Pro Wrestling.
- The description
*"I'm a what?"*is a reference to Harry Potter.

- The description
- "I'm the wiz" is a reference to a character in the
*Seinfeld*episode "The Junk Mail" - Bibbidi-bobbidi-boo is a reference to Disney's Cinderella.
- The flavor text of Haggler's Charm, "What's that spell? Loadsamoney!", is a reference to the song
*Loadsamoney (Doing up the house)*by Harry Enfield, featuring the lines "What's that spell? Loadsamoney, probably". - Conjure Baked Goods gives a base amount of cookies of 7 when used at a CPS of 0. The only way to get this is through the use of it during a Cursed Finger Wrath Cookie effect, due to always having CPS above 0 when using the spell (it is required to own Wizard Towers in order to use spells), but Cursed Finger sets your CPS to 0 for the duration of the effect.
- Golden Cookies spawned from the Force the Hand of Fate spell are glitched - Cookie Chains don't usually go beyond the initial cookie, using the spell (regardless of outcome or effect) during a cookie chain will cause the next Golden Cookie in the chain to give a different effect (such as a Frenzy, Lucky or Clot if Wrath), and "Lucky" can give less than 15 minutes worth of cookies, even when owning sufficient cookies for 15 minutes worth to be the lower value, giving as low as 1 minute's worth of cookies. These are also not counted in "Golden cookie clicks" on the stats page and can not unlock the Golden Cookie upgrades.
- If you happen to backfire, you can reload the page (or use "save to file" before casting and load from file after backfire) to basically turn back time (if you haven't saved). The game probably won't have been saved so it will load the page with your magic refunded and it will seem like you haven't cast a spell at all. This may be considered cheating, so don't use this if you aren't willing to deal with the consequences.
- When Resurrect Abomination backfires while you have no wrinklers it displays "Backfire! But no wrinkler was harmed." Outside of the Grandmapocalypse, it will say "Unable to spawn a wrinkler!" if the cast is successful. By attempting to cast this before starting the Grandmapocalypse (or during an Elder Pact/Pledge), you can use this information to determine if the next spell will backfire or not.
- Upon receiving a backfire for Conjure Baked Goods, if you get "Clot" from a Wrath Cookie during the 15 minutes of CpS reduction, it will completely refill the timer of the backfire, rather than give the normal "Clot" duration of CpS reduction.
- If Spontaneous Edifice backfires and you lose a grandma, you will get the "Just Wrong" achievement.

Minigames | ||||||
---|---|---|---|---|---|---|

Garden | Pantheon | Grimoire
| ||||

Minigames overview • Category:Minigames |