On the Subject of The Grand Grimoire

It would seem that the concept of logic does not exist in this world.

You are a witch in the fairy tale land of Labyrinthia. Your goal: bring despair to the townsfolk, using magic.

Presented is an extract of the Grand Grimoire, a tome containing all known magic spells. This extract consists of seven spells, which have been deemed the most useful to witches: Ignaize, Dimere, Goldor, Famalia, Godoor, Fainfol and Granwyrm. These spells come in the form of gems, which are also depicted in the Grand Grimoire.

Witches require a staff — their Talea Magica — to cast spells. These may only hold up to two gems at any time, limiting the number of spells you can cast to two. The only exception to this is if you are the Great Witch Bezella, capable of casting any spell without the need for a Talea Magica.

  • If the bomb's serial number does not contain any even digits, then you are the Great Witch Bezella.
  • Otherwise, you are a regular witch, in possession of a Talea Magica.

You also have a dagger, which you must use at some point in your attack.

Follow the instructions below to bring wrath to Labyrinthia's citizens!

If you are NOT the Great Witch Bezella:

Second Spell of Pair
First Spell of Pair

First, you must determine which two spells are in your Talea Magica. To do this, take note of the order of the spells in your extract of the Grand Grimoire, then group the first six spells into three pairs. Use these pairs of spells, in order, in the table shown to obtain three candidate spells.

If you have two of the same candidate spell, change the second one to the one after it (wrapping around if necessary) in your extract, until it is unique. If you have three of the same, change the second similarly, then the third.

One of these candidates is not in your Talea Magica; locate the seventh spell in your extract in the table overleaf to find which candidate it is.

Spell Discarded Candidate
Ignaize If the number of lit indicators on the bomb exceeds the number of unlit indicators, discard the first. If unlit exceed lit, discard the second. If there is a tie, discard the third.
Dimere Count the number of ports on the bomb and add / subtract 3 until this value is within the range 1 - 3. Call this value N; discard the Nth candidate.
Goldor If Goldor is a candidate, discard the first. Otherwise, if Granwyrm is a candidate, discard the second. Otherwise, discard the third.
Famalia Count the number of batteries on the bomb and add / subtract 3 until this value is within the range 1 - 3. Call this value N; discard the Nth candidate.
Godoor Take the last digit of the bomb's serial number and add / subtract 3 until it is within the range 1 - 3. Call this value N; discard the Nth candidate.
Fainfol Discard the candidate corresponding with the pair after the pair containing Dimere, where pair 1 comes after pair 3.
Granwyrm If the serial number contains any of the letters in "OATH" , discard the first. Otherwise, if it contains any of the letters in "DEATHS", discard the second. Otherwise, discard the third.

O is a letter and not a digit.

The remaining two candidates are the spells in your Talea Magica. For an effective attack, perform the following actions, where possible, in this order: Dimere, Godoor, Fainfol, Famalia, Dagger, Ignaize, Goldor, Granwyrm.

If you ARE the Great Witch Bezella:

You must use all seven spells and your dagger, with the final action always being casting Granwyrm.

  • Count the number of batteries on the bomb and add / subtract 7 until it is within the range 1 - 7. Call this value N; locate the Nth spell in your extract of the Grand Grimoire. Note its description.
  • Count the number of indicators on the bomb, plus 1. Count this many words into the obtained description, starting again from the first word if you count past the last word.
    • If the obtained word is a numeral, take it as a word (eg. 1 → one). Hyphenated words are treated as two separate words. Let L equal the length of this word.
  • Count the number of ports on the bomb, and add / subtract L until it is within the range 1 - L. Take this letter from the obtained word and the six letters that follow it. Treat the first letter of the description as coming after the last letter.
  • Convert each of the seven obtained letters into numbers, where A = 1, B = 2, … Y = 25, Z = 26. Subtract 7 from each number until they are all within the range 1 - 7.

These numbers represent the seven actions you must take before casting Granwyrm. Reference the table below to convert numbers into actions.

If an action has already been performed, perform the next action numerically (eg. action 3 → action 4, action 7 → action 1).

1 2 3 4 5 6 7
Dagger Ignaize Dimere Goldor Famalia Godoor Fainfol