Hadean Lands: HL Ritual

Copyright 2014-6 by Andrew Plotkin.

This source code is provided for personal, educational use only. The story and text of Hadean Lands belong to me; you may not use them or create derivative works which contain them. However, you have permission to use the programming techniques of this game in your own works, and you may use the source code excluding game text.



Version 1 of HL Ritual by Andrew Plotkin begins here.
 
Use authorial modesty.
 
 
Chapter - The Bounds
 
A ritual-bound is a kind of container. A ritual-bound is usually scenery.
A ritual-bound has some text called the sealing-description. The sealing-description is usually "You take a breath".
A ritual-bound has some text called the short-description. The short-description is usually "arc".
A ritual-bound has some text called the short-adjective. The short-adjective is usually "bound".
A ritual-bound can be normal-bound-level, nave-bound-level, or chancel-bound-level. A ritual-bound is usually normal-bound-level.
A ritual-bound can be ever-used. [ever sealed it? not resettable]
 
Understand "arc", "bound", "boundary" as a ritual-bound.
[### accept "beaker" if you type "put foo in beaker" and there are no beakers around?]
 
The no-bound is a ritual-bound.
 
Definition: a ritual-bound is empty-inactive if the number of things in it is zero and rstate is inactive.
Definition: a ritual-bound is nave-like if it is not normal-bound-level. [nave or chancel]
Definition: a ritual-bound is chancel-like if it is chancel-bound-level.
 
To say the visible state of (B - ritual-bound):
    let N be the number of things in B;
    if rstate is inactive and N is zero:
        say "The [short-adjective of B] is empty.";
        stop;
    if rstate is active and N is zero:
        say "The [short-adjective of B] glows [colorly of env of rstate], but there is nothing within.";
        stop;
    if N is one:
        say "[A first thing held by B roomily] rests within the [short-adjective of B]";
        if rstate is active:
            say ", which is glowing [colorly of env of rstate]";
        say ".";
        stop;
    if rstate is active:
        say "The [short-adjective of B] glows [colorly of env of rstate]. Inside it you see [a list of things *in B roomily].";
    else:
        say "Inside the [short-adjective of B] you see [a list of things *in B roomily].";
 
Carry out examining a ritual-bound (called B):
    say "[description of B][para]";
    say the visible state of B;
    let L be the linked-shelf of B;
    if L is not no-shelf and L is not empty:
        say "[line break]The gestalt shelf holds [a list of things *in L roomily].";
    stop the action.
 
Check inspecting a ritual-bound with the planetary-lens:
    instead say "When viewed through the lens, the ritual bound appears as an arc of pure potential."
 
Check entering a ritual-bound:
    instead say "The whole purpose of a ritual bound is to separate the actor from the things acted upon. Climbing into a bound is the kind of student horseplay that got your entire academy class a week's duty in looking at scary pictures. People whose bones had been accidentally turned to salt or their skin to mercury or what have you. That sort of picture. You stay out of arcs now."
Check climbing a ritual-bound:
    instead try entering the noun.
 
Check opening a ritual-bound:
    [catches "unseal/open bound"]
    if rstate is active:
        if the unseal-word is known:
            instead try invoking the unseal-word;
        instead say "You're not sure how."; [shouldn't happen]
    instead say "The bound isn't currently sealed. If it were, you could invoke the unsealing mantra."
 
Check closing a ritual-bound:
    [catches "seal/close bound"]
    if rstate is active:
        instead say "[The noun] is already sealed; the ritual has begun.";
    if the number of known sealish formulas <= 1:
        instead say "To begin the ritual, invoke [the simple-seal-word].";
    else:
        instead say "To begin the ritual, invoke one of the sealing words you've learned."
 
Check freeing a ritual-bound:
    [catches "unbind bound"]
    instead try opening the noun.
 
The taking action has an object called the bound taken from.
Setting action variables for taking:
    now the bound taken from is no-bound.
 
Rule for implicitly taking something (called item) when the item is in a ritual-bound (called B) and rstate is active:
    say "But [the item] is inside the active [short-adjective of B]."
 
Check taking when the noun is in a ritual-bound (called B):
    if rstate is active:
        now the bound taken from is B;
        try rit-removing the noun;
    tutor tut-step-remove with the noun.
 
Report taking when the bound taken from is not no-bound and rstate is active:
    let B be the bound taken from;
    let E be the env of rstate;
    instead say "You reach into the [short-adjective of B] and extract [the noun]. The [color of E] light ripples.";
 
[Block all portable supporters.]
Check inserting the labyrinth-tile into a ritual-bound:
    instead say "[The labyrinth-tile] is a symbolic association focus, not an ingredient. It goes on the shelf, not in the bound."
Check inserting the paten into a ritual-bound:
    instead say "[The paten] is a symbolic association focus, not an ingredient. It goes on the shelf, not in the bound."
Check inserting a clay-mold into a ritual-bound:
    instead say "[The noun] is a tool, not an ingredient."
 
Instead of putting something on a ritual-bound:
    instead try inserting the noun into the second noun.
 
Check inserting something into a ritual-bound (called B) when the noun is in the second noun:
    instead say "[The noun] [is-are noun] already in [the B].";
 
Check inserting something into a ritual-bound (called B) when the noun is takeable:
    if the noun is in B:
        instead say "[The noun] [is-are noun] already in [the B].";
    if rstate is active:
        try rit-adding the noun;
        tutor tut-step-insert with the noun;
        stop the action;
    else:
        tutor tut-step-insert with the noun;
        continue the action.
 
Instead of putting something on when rstate is active and the second noun is in a ritual-bound (called B) (this is the instead of putting something on a ritual element rule):
    if the second noun is the beaker and the noun is alight:
        instead try igniting the beaker with the noun;
    instead try inserting the noun into B.
 
Check igniting the beaker with something when rstate is active:
    instead try rit-igniting the noun with the second noun.
 
Check inspecting a ritual-bound (called B) with the oculus:
    say "You inspect [the B] through the oculus";
    let T be the linked-shelf of B;
    if T is not no-shelf and T is not empty:
        say ", taking the shelf into account";
    let E be the ritual environment of location with B;
    let OE be E;
    if rstate is active:
        now E is the env of rstate;
    if E is no-env:
        instead say ". The ritual environment has no particular nature that stands out.";
    if E is chymic-env:
        instead say ". It has a chymic ritual environment, of course.";
    say ". The ritual environment has [a E] nature";
    if OE is not E:
        say ", although it looks wobbly around the edges";
    instead say "."
 
 
Section - The Bounds Shelf
 
A ritual-shelf is a kind of supporter.
A ritual-shelf is usually scenery.
The printed name of a ritual-shelf is usually "gestalt shelf".
The no-shelf is a ritual-shelf. [Never has anything on it.]
Understand "shelf", "gestalt" as a ritual-shelf.
 
A ritual-bound has a ritual-shelf called the linked-shelf. The linked-shelf of a ritual-bound is usually no-shelf.
 
Check inserting something into a ritual-shelf:
    instead try putting the noun on the second noun.
 
Check inspecting a ritual-shelf with the oculus:
    if a ritual-bound (called B) is in the location and the linked-shelf of B is the noun:
        instead try inspecting B with the oculus.
 
 
Section - Auto-Cleaning for Goals
 
[Move anything in the bound or its shelf to the floor. (We do not try to clear the wire-groove here. It's game-specific, and anyway the attain-or-fail goal will have already dealt with it.)]
To auto-clean ritual location:
    unless a ritual-bound (called B) is in the location:
        say "(BUG) Auto-cleaning, but no ritual bound in [location].";
        stop;
    if B is the retort:
        silently dump the retort;
        stop;
    discard the beaker;
    while always:
        let T be the first thing held by B;
        if T is nothing:
            break;
        now T is in the location;
    let L be the linked-shelf of B;
    if L is not no-shelf:
        while always:
            let T be the first thing held by L;
            if T is nothing:
                break;
            now T is in the location;
    stop.
 
 
Chapter - The Retort
 
The retort is a recallable glassy ritual-bound.
The short-adjective is "retort".
The short-description is "retort's equator".
Understand "glassware", "glass", "magnificent", "huge", "bulb", "equator", "apparatus" as the retort.
Understand "mesh", "basket", "slot" as the retort.
 
Check burning the retort:
    instead try switching on the burner.
Check igniting the retort with:
    instead try igniting the burner with the second noun.
 
The reservoir is a scenery thing in the retort.
The printed name of the reservoir is "reservoir[if substance of reservoir is not no-subst] of [substance][end if]".
The reservoir has a substance-type called the substance.
The reservoir has a extra-substance-type called the extra-substance.
The reservoir has a number called the heating-time.
Understand "quantity", "quantity of", "measure", "measure of" as the reservoir.
Understand the substance property as describing the reservoir.
Understand the extra-substance property as describing the reservoir.
 
Definition: the reservoir is empty rather than non-empty if its substance is no-subst.
Definition: a thing is retort-contained if it is in the retort and it is not the reservoir.
Definition: the retort is cooking if the burner is alight or the retort-best-fire is not no-thing.
 
To decide whether the retort contains exactly nothing:
    let N be the number of not scenery things in the retort;
    if N is zero:
        decide yes.
 
To decide whether the retort contains exactly (T - thing):
    if T is nothing:
        say "(BUG) retort contains exactly phrase got nothing";
    let N be the number of not scenery things in the retort;
    if N is one and T is in the retort:
        decide yes.
 
To decide whether the retort contains exactly (T1 - thing) and (T2 - thing):
    let N be the number of not scenery things in the retort;
    if N is two and T1 is in the retort and T2 is in the retort:
        decide yes.
 
To decide what thing is retort-best-fire:
    let result be no-thing;
    let temp be zero;
    repeat with T running through things in the retort:
        if T is alight and the flame-point of T is greater than temp:
            now temp is the flame-point of T;
            now result is T;
    decide on result.
 
To shut down the retort:
    now the substance of the reservoir is no-subst;
    now the extra-substance of the reservoir is extra-nil-subst;
    now the burner is not alight;
    now the heating-time of the reservoir is zero;
    repeat with T in raw contents of the retort:
        if T is not scenery:
            now T retired to no-fate; [shouldn't be any]
            now T is off-stage.
 
Check taking the reservoir:
    instead say "The reservoir is part of the retort."
Check touching the reservoir:
    instead say "The reservoir is inside the retort; you cannot reach it."
Check pushing the reservoir:
    instead try touching the reservoir.
Check pulling the reservoir:
    instead try touching the reservoir.
Check examining the reservoir:
    instead try searching the retort.
Check searching the reservoir:
    instead try searching the retort.
Check burning the reservoir:
    instead try switching on the burner.
Check igniting the reservoir with:
    instead try igniting the burner with the second noun.
Check emptying the reservoir:
    instead try pulling the dump-valve.
 
Check examining the retort:
    let N be the number of things in the retort; [the reservoir counts here]
    if rstate is not active and N <= 1 and the reservoir comprises no-subst:
        say "The retort is a magnificent piece of glassware, the pride of the laboratory. It practically [em]is[/em] the laboratory -- a bespoke apparatus for any sort of chymical ritual.[para]The outer enclosure";
    else:
        say "The retort";
    say " is a glass bulb, two feet across. Its equator is etched with an encircling ritual bound[if rstate is active], which glows [colorly of the env of rstate][end if]. Suspended within is a reservoir for chymic reagents, and a mesh basket for solid components. The retort has a slot in the top for adding these reagents, a tap for extracting products, and a dump valve for discarding ruined experiments. The base also contains a gas burner[if the burner is alight], which is alight with a crown of blue flame[else], although it is not currently lit[end if]";
    if N <= 1:
        if the reservoir does not comprise no-subst:
            say ".[para]The retort contains a quantity of [substance of the reservoir]";
    else:
        if the reservoir comprises no-subst:
            say ".[para]Lying in the retort [if N is 2]is[else]are[end if] [a list of not scenery things *in the retort]";
        else:
            say ".[para]Lying in the retort [if N is 2]is[else]are[end if] [a list of not scenery things *in the retort], suspended in a quantity of [substance of the reservoir]";
    instead say "."
 
Check searching the retort:
    let N be the number of things in the retort;
    [the reservoir counts here]
    if N <= 1:
        if the reservoir does not comprise no-subst:
            say "The retort contains a quantity of [substance of the reservoir]";
        else:
            say "The retort is empty";
    else:
        if the reservoir comprises no-subst:
            say "Lying in the retort [if N is 2]is[else]are[end if] [a list of not scenery things *in the retort]";
        else:
            say "Lying in the retort [if N is 2]is[else]are[end if] [a list of not scenery things *in the retort], suspended in a quantity of [substance of the reservoir]";
    instead say "."
 
Check emptying the retort:
    instead try pulling the dump-valve.
 
Check opening the retort when rstate is not active:
    instead try pulling the dump-valve.
 
Report inserting a metal-wire into the retort:
    instead say "You feed [the noun] into the retort, where it lies in a coil."
 
Report inserting mercury into the retort:
    instead say "You tip the droplet of mercury from the saucer into the retort."
 
Check switching on the retort:
    instead say "The retort has no power switch. Possibly you meant to switch on the gas burner."
Check switching off the retort:
    instead say "The retort has no power switch. Possibly you meant to switch off the gas burner."
 
The dump-valve is part of the retort. The printed name is "dump valve".
The dump-valve is fixed in place.
The description is "A heavy alloy lever beneath the retort allows you to dump the contents and flush the retort clean."
Understand "dump", "valve", "lever" as the dump-valve.
 
Check opening the dump-valve:
    instead try pulling the dump-valve.
 
Check pushing the dump-valve:
    instead say "The dump-valve lever is for pulling, not pushing."
 
Check pulling the dump-valve:
    let N be the number of things in the retort;
    if N <= 1 and the reservoir comprises no-subst:
        now the heating-time of the reservoir is zero;
        instead say "You pull the lever. Gears clunk; the guts of the retort flip over, as if to dump out their contents. Since nothing is in there, you just admire the mechanism.";
    if the reservoir comprises no-subst:
        say "You pull the lever. Within the retort, the basket flips over";
        if N is 2:
            say "; [the list of not scenery things *in the retort] falls down a chute and out of a slot below the retort. You carefully pick it up";
        else if N > 2:
            say "; [the list of not scenery things *in the retort] fall down a chute and out of a slot below the retort. You carefully pick them up";
    else:
        let M be the substance of the reservoir;
        now the reservoir comprises no-subst;
        fix up the substance of the reservoir;
        say "You pull the lever. Within the retort, the [if M is in-stock]surplus [M][else][M][end if] drain[s re M] away, leaving the reservoir clean";
        if N is 2:
            say ". Simultanously, the basket flips over; [the list of not scenery things *in the retort] falls down a chute and out of a slot below the retort. You carefully pick it up";
        else if N > 2:
            say ". Simultanously, the basket flips over; [the list of not scenery things *in the retort] fall down a chute and out of a slot below the retort. You carefully pick them up";
    if the mercury is in the retort:
        say " (scooping the mercury back into its saucer)";
    now the heating-time of the reservoir is zero;
    repeat with T in raw contents of the retort:
        if T is not scenery, now the player carries T;
    if rstate is active:
        shut down the ritual state;
        say ".[para]The extraction breaks the ritual bound. The energy dissipates, and the retort's bound goes dark";
    instead say "."
 
To silently dump the retort:
    now the heating-time of the reservoir is zero;
    now the burner is not alight;
    now the reservoir comprises no-subst;
    fix up the substance of the reservoir;
    let L be the location of the retort;
    repeat with T in raw contents of the retort:
        if T is not scenery, now T is in L.
 
The burner is part of the retort. The printed name is "gas burner".
[resettable -- turn off the burner at reset time]
The flame-point is 15.
The burner can be ever-used.
The burner is fixed in place.
The description is "The burner is a ring of gas outlets[if not alight] at the base of the retort,[end if] connected to a knob[if not alight]. The burner is not lit; but you have only to twist the knob to start the gas flowing[else]. The burner is lit; blue flames dance beneath the retort[end if].[if not ever-used] (It will ignite itself. That's ensured by a clever pyrophilic filament built into the outlets.)[end if]".
Understand "gas", "knob", "pyrophilic", "filament", "ring", "outlet", "outlets", "heat" as the burner.
Understand "blue", "crown", "fire", "flame", "flaming", "burning", "flames" as the burner when the burner is alight.
 
Check taking the burner:
    instead say "The gas burner is part of the retort."
Check pushing the burner:
    instead say "The gas burner is fixed in the base of the retort."
Check pulling the burner:
    instead say "The gas burner is fixed in the base of the retort."
 
Check turning the burner:
    if the burner is alight:
        instead try switching off the burner;
    else:
        instead try switching on the burner.
 
Check vague-setting the burner:
    instead say "The gas burner can be turned on or off."
 
Check opening the burner:
    instead try switching on the burner.
Check closing the burner:
    instead try switching off the burner.
 
Check burning the burner:
    instead try switching on the burner.
 
Check igniting the not alight burner with:
    instead say "If you want to light the gas burner, just turn the knob."
 
Check switching on the alight burner:
    instead say "The gas burner is already alight."
Check switching on the not alight burner:
    now the burner is alight;
    now the burner is ever-used;
    instead say "You twist the knob. The gas burner hisses, and then bursts into flame."
 
Check extinguishing the burner:
    instead try switching off the burner.
Check switching off the not alight burner:
    instead say "The gas burner is already off."
Check switching off the alight burner:
    now the burner is not alight;
    instead say "You twist the knob. The gas burner goes silent, and the blue flames die."
 
Check burning something with the not alight burner:
    instead say "The burner isn't lit right now."
 
Check smelling the burner:
    if the burner is alight:
        instead say "The burner smells of clean heat.";
    else:
        instead say "The gas valve is off, so you don't smell anything."
 
Check inserting a chem-flask into the retort when rstate is inactive:
    if the reservoir is non-empty:
        let M be the substance of the noun;
        derive the mixture of M into the reservoir;
        stop the action;
    now the substance of the reservoir is the substance of the noun;
    fix up the substance of the reservoir;
    instead say "You pour a measure of [the substance of the reservoir] into the retort."
 
Check inserting a chem-vial into the retort when the reservoir is empty:
    instead say "Recipes generally start with a base medium (water, sand, something like that) before you start adding the fancy stuff."
 
Check inserting a chem-vial into the retort when rstate is inactive:
    retire the noun by alchemy;
    let M be the substance of the noun;
    derive the mixture of M into the reservoir;
    stop the action.
 
Check inserting el-water into the retort when rstate is inactive:
    instead say "Elemental water should only be used after a ritual has begun."
 
Check inserting something into the reservoir:
    instead try inserting the noun into the retort.
Check putting something on the reservoir:
    instead try inserting the noun into the retort.
 
[
Instead of doing anything except examining to something retort-contained (this is the can't reach into the retort rule):
    instead say "You cannot reach [the noun] inside the retort."
]
Rule for reaching inside the retort:
    if the untouchable-object is not the reservoir:
        say "You cannot reach [the untouchable-object] inside the retort.";
        deny access.
 
First check igniting something with something retort-contained:
    instead say "You cannot reach [the second noun] inside the retort."
First check tapping something on something retort-contained:
    instead say "You cannot reach [the second noun] inside the retort."
 
[###Check igniting the reservoir with something:
    derive the kindling of the reservoir from the second noun;
    stop the action.
]
 
Section - The Retort-Cooking Daemon
 
Every turn (this is the retort-cooking daemon rule):
    if the retort is not cooking:
        now the heating-time of the reservoir is zero;
        continue the action;
    let T be retort-best-fire;
    [Any burning object takes precedence over the burner, even if it's not as hot. We trust that feeble heat sources will burn out quickly.]
    if T is no-thing:
        if the burner is not alight:
            say "(BUG) The retort is cooking, but nothing seems to be alight.";
            continue the action;
        let T be the burner;
    if the reservoir is not empty:
        derive the kindling of the reservoir from the T.
 
The retort-cooking daemon rule is listed before the fire-consumption daemon rule in the every turn rulebook.
 
Chapter - Great Marriage Code
 
To check great marriage status adding (B - number):
    if rstate is not active:
        say "(BUG) Cannot check GM status -- no ritual.";
        stop;
    let N be the current-count of rstate;
    now N is N bitwise-or B;
    now the current-count of rstate is N;
    let L be the shelf of rstate;
    let C be 0;
    if a tin-slip thing (called T) is on L:
        now C is the tin-slip-correctness of T;
    if C is 1:
        say "[br]You have an unpleasant sensation of being in too many places at once.";
        stop;
    if C is less than 3:
        say "[br]You have an unpleasant sensation of not being in the right place.";
        stop;
    if N is 15:
        if great-marriage is not homunc-done:
            [The ritual blows up here, ending chapter 1.]
            shut down the ritual state;
            say "[br]The whirling haze seems to expand and thicken.[para]You sense a ripple in the air -- [em]outside[/em] the bound, which is impossible. You look around. The black marks on the wall are... moving, flowing, coming free... being drawn towards the pedestal. That's bad.[para]You hear the walls creaking. You smell blood and copal incense. You feel the whirling force of the ritual against your mind. This is [em]bad,[/em] you think.";
            complete initial marriage;
            invoke reset, involuntarily;
        else:
            [Later chapters: wait for dracon invocation.]
            now rstate bestates RSMarriageElemented;
            say "[br]The whirling haze in the bound slows. It is more difficult to see, now; not dissipating, but developing an aching lucent clarity. The space above the pedestal seems more transparent than air.";
        stop;
    stop.
 
 
Chapter - Ritual Environments
 
A ritual-env is a kind of value.
A ritual-env is no-env. [First]
The ritual-envs are bad-env, fiery-env, fierier-env, lunar-env, earthy-env, anchor-env, tidal-env, orderly-env, exhilarant-env, phlegmatic-env, spiritual-env, catalytic-env, helian-env, arctic-env, quicksilver-env, chymic-env.
A ritual-env is terminator-env. [Last]
 
Understand "none" as no-env.
Understand "fiery" as fiery-env.
Understand "fierier" as fierier-env.
Understand "lunar" as lunar-env.
Understand "earthy" as earthy-env.
Understand "anchor" as anchor-env.
Understand "tidal" as tidal-env.
Understand "orderly" as orderly-env.
Understand "exhilarant", "exhiliarant", "exhil" as exhilarant-env.
Understand "phlegmatic", "phleg" as phlegmatic-env.
Understand "spiritual", "spirit" as spiritual-env.
Understand "catalytic" as catalytic-env.
Understand "helian" as helian-env.
Understand "arctic" as arctic-env.
Understand "chymic" as chymic-env.
 
Definition: a ritual-env is fire-based if it is fiery-env or it is fierier-env.
Definition: a ritual-env is earth-based if it is earthy-env or it is phlegmatic-env.
 
To say a (E - ritual-env) (this is ritual-env-name-saying):
    if E is:
        -- no-env: say "a neutral";
        -- fiery-env: say "a fiery";
        -- fierier-env: say "a strongly fiery";
        -- lunar-env: say "a lunar";
        -- earthy-env: say "an earthy";
        -- anchor-env: say "an anchored";
        -- tidal-env: say "a tidal";
        -- orderly-env: say "an orderly";
        -- exhilarant-env: say "an exhilarant";
        -- phlegmatic-env: say "a stony";
        -- spiritual-env: say "a spiritual";
        -- catalytic-env: say "a catalytic";
        -- helian-env: say "a solar";
        -- arctic-env: say "an arctic";
        -- quicksilver-env: say "a mercurial";
        -- chymic-env: say "a chymic";
        -- otherwise: say "(BUG) [E]".
 
To say color of (E - ritual-env) (this is ritual-env-color-saying):
    if E is:
        -- no-env: say "pale";
        -- fiery-env: say "orange";
        -- fierier-env: say "crimson";
        -- lunar-env: say "silver";
        -- earthy-env: say "beige";
        -- anchor-env: say "slate-blue";
        -- tidal-env: say "blue-green";
        -- orderly-env: say "grey";
        -- exhilarant-env: say "gold";
        -- phlegmatic-env: say "dark";
        -- spiritual-env: say "indigo";
        -- catalytic-env: say "green";
        -- helian-env: say "yellow";
        -- arctic-env: say "blue-white";
        -- quicksilver-env: say "silver-grey";
        -- chymic-env: say "pearly";
        -- otherwise: say "(BUG) [E]".
 
To say colorly of (E - ritual-env):
    if E is:
        -- no-env: say "palely";
        -- fiery-env: say "orange";
        -- fierier-env: say "crimson";
        -- lunar-env: say "silver";
        -- earthy-env: say "beige";
        -- anchor-env: say "slate-blue";
        -- tidal-env: say "blue-green";
        -- orderly-env: say "smoke-grey";
        -- exhilarant-env: say "golden";
        -- phlegmatic-env: say "gloomily";
        -- spiritual-env: say "indigo";
        -- catalytic-env: say "green";
        -- helian-env: say "yellow";
        -- arctic-env: say "blue-white";
        -- quicksilver-env: say "silver-grey";
        -- chymic-env: say "pearl-grey";
        -- otherwise: say "(BUG) [E]".
 
To decide what ritual-env is the ritual environment of (R - room):
    if rstate is active:
        decide on the ritual environment of R with the bound of rstate;
    else:
        say "(BUG) Querying the ritual environment with no bound (or active ritual).";
        decide on bad-env.
 
To decide what ritual-env is the ritual environment of (R - room) with (B - ritual-bound), memorizing:
    [No-env is the RSFail-y default. Bad-env will prevent the bound from sealing at all.]
    if B is the retort:
        decide on chymic-env;
    let L be the linked-shelf of B;
    let env be the debug-override-env;
    if env is not bad-env:
        decide on env;
    let aroma be the aroma of R;
    clear the env-influence register;
    if aroma is:
        -- ginger:
            now the env-influence-current-object is ginger-impet;
            influence fiery-env;
        -- peppermint:
            now the env-influence-current-object is peppermint-impet;
            influence arctic-env;
        -- kelp:
            now the env-influence-current-object is kelp-impet;
            influence exhilarant-env;
    follow the env influence rulebook for B;
    if L is not nothing:
        repeat with T running through things on L:
            follow the env influence rulebook for T;
    now the env-influence-current-object is nothing;
    let E be the env-influence register tally;
    if E is bad-env or E is no-env:
        decide on E;
    if memorizing:
        let O be the temp best object for E;
        if O is not nothing:
            set the best object for E to O;
    decide on E.
 
To decide what ritual-env is the isolated ritual influence of (T - thing):
    clear the env-influence register;
    follow the env influence rulebook for T;
    now the env-influence-current-object is nothing;
    decide on the env-influence register tally.
 
The env influence rulebook is an object-based rulebook.
The env-influence-current-object is an object that varies.
 
First env influence rule for an object (called O):
    now the env-influence-current-object is O.
 
To clear the env-influence register: (- envinfluence_clear(); -).
To decide what ritual-env is the env-influence register tally: (- envinfluence_tally() -).
To decide what object is the temp best object for (E - ritual-env): (- (env_tempobject_array-->({E})) -).
To decide what object is the best object for (E - ritual-env): (- (env_bestobject_array-->({E})) -).
To set the best object for (E - ritual-env) to (O - object): (- env_bestobject_array-->({E}) = {O}; -).
To influence (E - ritual-env): (- envinfluence_add({E}, 1); -).
To influence (E - ritual-env) by (N - number): (- envinfluence_add({E}, {N}); -).
 
The best-amalgam-wire is a thing that varies. The best-amalgam-wire is no-thing. [Will be white-amalgam-wire or gold-amalgam-wire]
 
Include (-
 
Constant ENV_INFLUENCE_SIZE 20;
Array env_influence_array --> ENV_INFLUENCE_SIZE;
Array env_tempobject_array --> ENV_INFLUENCE_SIZE; ! cleared every influence-test
Array env_bestobject_array --> ENV_INFLUENCE_SIZE; ! memorized after some influence-tests
 
#ifdef DEBUG;
Global envinfluence_trace = 0;
#endif;
 
[ envinfluence_clear   env;
    if ( (+ terminator-env +) >= ENV_INFLUENCE_SIZE)
        print "(BUG) ENV_INFLUENCE_SIZE too small!^";
    for (env=0 : env<ENV_INFLUENCE_SIZE : env++) {
        env_influence_array-->env = 0;
        env_tempobject_array-->env = nothing;
    }
];
 
[ envinfluence_add env val;
    if (env < 0 || env >= ENV_INFLUENCE_SIZE)
        print_ret "(BUG) ", env, " does not fit ENV_INFLUENCE_SIZE!";
    env_influence_array-->env = env_influence_array-->env + val;
    if (val > 0 && (+ env-influence-current-object +) && ~~(env_tempobject_array-->env))
        env_tempobject_array-->env = (+ env-influence-current-object +);
];
 
[ envinfluence_tally   env score bestenv bestscore ties printenv;
    bestenv = (+ no-env +);
    bestscore = 0;
    ties = 1;
 
    printenv = (+ ritual-env-color-saying +)-->1;
 
    for (env=0 : env<ENV_INFLUENCE_SIZE : env++) {
        score = env_influence_array-->env;
        if (score) {
            #ifdef DEBUG;
            if (envinfluence_trace) {
                print "...env ", env, "/";
                printenv(env);
                print " = ", score, "^";
            }
            #endif;
            if (score > bestscore) {
                bestscore = score;
                bestenv = env;
                ties = 1;
            }
            else if (score == bestscore) {
                bestenv = (+ no-env +);
                ties++;
            }
        }
    }
 
    env = bestenv;
    if (ties > 1)
        env = (+ no-env +);
 
    if (env == (+ fiery-env +) && bestscore > 3) {
        env = (+ fierier-env +);
    }
 
    #ifdef DEBUG;
    if (envinfluence_trace) {
        print "...resulting env ", env, "/";
        printenv(env);
        print " (score ", bestscore, ")", " (ties ", ties, ")^";
    }
    #endif;
    return env;
];
 
-).
 
Chapter - Ritual States
 
Section - Internal Ritual Actions
 
Rit-sealing it with is an action applying to two visible things. [bound, formula]
Rit-speaking is an action applying to one visible thing. [specifically, a formula]
Rit-adding is an action applying to one visible thing. [putting in bound]
Rit-removing is an action applying to one visible thing. [removing from bound]
Rit-combining it with is an action applying to two things. [second noun is the one in the bound]
Rit-ringing is an action applying to one visible thing. [chimes]
Rit-wafting is an action applying to one visible thing. [wave rosemary, crush pinecone, crush honeysuckle]
Rit-igniting it with is an action applying to two visible things. [second noun is fire]
 
Carry out rit-sealing:
    let B be the noun;
    let F be the second noun;
    say "[sealing-description of B], trace the bound in your mind, and intone [the F]";
    if B is the retort:
        if F is not hermetic-seal-word:
            instead say ". But it echoes off-key; the retort's bound does not close.";
        mark chymic-ritual-location as done;
    if F is marcher-seal-word and B is not nave-like:
        instead say ". But it echoes off-center around the room. The bound does not close.";
    say ".[para]";
    let E be the ritual environment of the location with B, memorizing;
    if E is bad-env:
        stop the action;
    shut down the ritual state; [Just to ensure cleanup; the state should already be inactive.]
    now B is ever-used;
    now the rstate bestates RSInitial;
    now the initial-sealing of rstate is F;
    now the bound of rstate is B;
    now the shelf of rstate is the linked-shelf of B;
    now the env of rstate is E;
    let count be the raw contents count of B;
    if count is 1:
        now the primary-obj of rstate is the first thing held by B;
    if count is 2:
        now the primary-obj of rstate is the first thing held by B;
        now the secondary-obj of rstate is the next thing held after the first thing held by B;
    follow the ritual-processing rules;
    tutor tut-step-sealing;
    say "The [short-description of B] begins to glow [colorly of E]";
    if count is not 0:
        if B is the retort and the reservoir comprises no-subst:
            if count is not 1:
                say " around [the list of not scenery things *in B]";
        else:
            say " around [the list of things *in B]";
    instead say "."
 
Carry out rit-speaking:
    follow the ritual-processing rules.
Carry out rit-adding:
    follow the ritual-processing rules.
Carry out rit-removing:
    follow the ritual-processing rules.
Carry out rit-combining:
    follow the ritual-processing rules.
Carry out rit-ringing:
    follow the ritual-processing rules.
Carry out rit-wafting:
    follow the ritual-processing rules.
Carry out rit-igniting:
    follow the ritual-processing rules.
 
Check rit-sealing when rstate is active:
    instead say "(BUG) Ritual already active (rit-sealing)."
Check rit-speaking when rstate is inactive:
    instead say "(BUG) No ritual (rit-speaking)."
Check rit-adding when rstate is inactive:
    instead say "(BUG) No ritual (rit-adding)."
Check rit-removing when rstate is inactive:
    instead say "(BUG) No ritual (rit-removing)."
Check rit-combining when rstate is inactive:
    instead say "(BUG) No ritual (rit-combining)."
Check rit-ringing when rstate is inactive:
    instead say "(BUG) No ritual (rit-ringing)."
Check rit-wafting when rstate is inactive:
    instead say "(BUG) No ritual (rit-wafting)."
Check rit-igniting when rstate is inactive:
    instead say "(BUG) No ritual (rit-igniting)."
 
Section - The Shut-Off-The-Lights Rule
 
Before going from a room (this is the shut-off-the-lights rule):
    ensure no ritual is left behind "Before you leave".
 
To ensure no ritual is left behind (pretext - text):
    if the beaker is on-stage:
        discard the beaker;
        if rstate is active:
            let B be the bound of rstate;
            shut down the ritual state;
            say "[pretext], you carefully unseal the [short-adjective of B] and let the energies disperse. You also tidy away the beaker and its contents.";
        else:
            say "[pretext], you tidy away the beaker and its contents.";
    else if the retort is cooking:
        now the heating-time of the reservoir is zero;
        now the burner is not alight;
        if the retort is not cooking:
            if rstate is active:
                shut down the ritual state;
                say "[pretext], you carefully unseal the retort's bound and let the energies disperse. You also shut off the gas burner.";
            else:
                say "[pretext], you shut off the gas burner.";
        else:
            say "A trace of lab drill reminds you not to leave things on fire in an unattended retort. You pull the dump lever and retrieve [the list of not scenery things *in the retort]";
            now the reservoir comprises no-subst;
            fix up the substance of the reservoir;
            repeat with T in raw contents of the retort:
                if T is not scenery, now the player carries T;
            if rstate is active:
                shut down the ritual state;
                say ". You also release the ritual energy";
            say ".";
    else if rstate is active:
        let B be the bound of rstate;
        shut down the ritual state;
        discard the beaker;
        say "The ritual energy disperses when you turn your attention from it. The [short-adjective of B] goes dark behind you."
 
Chapter - The Ritual Processing Rules
 
Ritual-processing is a rulebook.
 
Section - Rit-Sealing
 
Ritual-processing rule for rit-sealing when the initial-sealing of rstate is simple-seal-word:
    let T be the rstate-solo;
    if T is the beaker and the substance of the beaker is saline-subst and the aroma of the location is no-odor:
        instead now the rstate bestates RSFireResistStart;
    if T is feather-or-feather:
        instead now the rstate bestates RSDispersalBrushStart;
    if the env of rstate is:
        -- fiery-env:
            if T is pin-or-bolt:
                instead now the rstate bestates RSRustRemoverStart;
        -- fierier-env:
            if T is pin-or-bolt:
                instead now the rstate bestates RSRustRemoverStart;
        -- catalytic-env:
            if T is pin-or-bolt:
                instead now the rstate bestates RSGenRustRemoverStart;
            if T is electrum or T is gold-rod or T is electrum-wire or T is gold-wire:
                instead now the rstate bestates RSPhloElectrumStart;
            if T is symbolish:
                instead now the rstate bestates RSGenRustRemoverSymStart;
        -- lunar-env:
            if T is loop-or-loop and the aroma of the location is no-odor:
                instead now the rstate bestates RSResonantOculusStart;
            if T is lens-or-lens and the aroma of the location is no-odor:
                instead now the rstate bestates RSPlanetaryLensStart;
            if T is chain-or-chain and the aroma of the location is not no-odor:
                instead now the rstate bestates RSPurityStart;
        -- anchor-env:
            if T is a pebble or T is a quartz-prism:
                instead now the rstate bestates RSLeadStart;
            if T is a chime:
                instead now the rstate bestates RSBronzeMagnetStart;
        -- helian-env:
            if T is a chime:
                instead now the rstate bestates RSGlassPassStart;
        -- exhilarant-env:
            if T is the beaker and the beaker comprises saline-subst and the aroma of the location is kelp:
                instead now the rstate bestates RSBreathStart;
        -- spiritual-env:
            if the rstate-duo is the iron-bead and the jade:
                instead now the rstate bestates RSAuraImitAltStart;
    instead now the rstate bestates RSFailed.
 
Ritual-processing rule for rit-sealing when the initial-sealing of rstate is ka-seal-word:
    let T be the rstate-solo;
    if T is the scalpel and the aroma of the location is not no-odor:
        instead now the rstate bestates RSScalpelStart;
    if the env of rstate is:
        -- spiritual-env:
            if T is a quartz-prism:
                instead now the rstate bestates RSAuraStart;
    instead now the rstate bestates RSFailed.
 
Ritual-processing rule for rit-sealing when the initial-sealing of rstate is shamash-seal-word:
    let T be the rstate-solo;
    if the env of rstate is:
        -- orderly-env:
            if T is the beaker and the beaker comprises alum-subst:
                instead now the rstate bestates RSClockStart;
    instead now the rstate bestates RSFailed.
 
Ritual-processing rule for rit-sealing when the initial-sealing of rstate is mithraic-seal-word:
    let T be the rstate-solo;
    if the env of rstate is:
        -- earthy-env:
            if T is the silk-cord:
                instead now the rstate bestates RSCentralityStart;
        -- phlegmatic-env:
            if T is the silk-cord:
                instead now the rstate bestates RSCentralityStart;
    instead now the rstate bestates RSFailed.
 
Ritual-processing rule for rit-sealing when the initial-sealing of rstate is hermetic-seal-word:
    if the bound of rstate is the retort:
        instead now the rstate bestates RSChymicStart;
    let T be the rstate-solo;
    if the env of rstate is:
        -- exhilarant-env:
            if T is the beaker and the beaker comprises saline-subst:
                instead now the rstate bestates RSAitherStart;
    instead now the rstate bestates RSFailed.
 
Ritual-processing rule for rit-sealing when the initial-sealing of rstate is phlegmatic-seal-word:
    let T be the rstate-solo;
    if the env of rstate is:
        -- exhilarant-env:
            if T is the beaker and the beaker comprises saline-subst:
                instead now the rstate bestates RSVacuumStart;
        -- catalytic-env:
            if T is the beaker and the beaker comprises mineral-oil-subst:
                instead now the rstate bestates RSBrunStart;
        -- phlegmatic-env:
            if T is diamond-or-diamond:
                instead now the rstate bestates RSDiamondStart;
        -- fiery-env:
            if T is the beaker and the beaker comprises alcohol-subst:
                instead now the rstate bestates RSSuckerWeakStart;
        -- fierier-env:
            if T is the beaker and the beaker comprises alcohol-subst:
                instead now the rstate bestates RSSuckerStart;
    instead now the rstate bestates RSFailed.
 
Ritual-processing rule for rit-sealing when the initial-sealing of rstate is grendel-seal-word:
    let T be the rstate-solo;
    if the env of rstate is:
        -- quicksilver-env:
            if T is a pebble:
                instead now the rstate bestates RSFulcrumStart;
    instead now the rstate bestates RSFailed.
 
Ritual-processing rule for rit-sealing when the initial-sealing of rstate is marcher-seal-word:
    let T be the rstate-solo;
    if the env of rstate is:
        -- orderly-env:
            [Really the bound shouldn't have sealed if not nave-like, but we'll check again.]
            if T is no-thing and the bound of rstate is nave-like:
                instead now the rstate bestates RSMarriageStart;
    instead now the rstate bestates RSFailed.
 
Ritual-processing rule for rit-sealing:
    [We don't handle the report stage here; that's covered by "carry out rit-sealing".]
    instead now the rstate bestates RSFailed.
 
 
Section - Rit-Removing
 
Ritual-processing rule for rit-removing:
    [We don't handle the report stage here, because it's always the same. It's a "report taking" rule, above.]
    [Undo any state changes on the noun? Turns out we don't have any.]
    instead now the rstate bestates RSFailed.
 
 
Section - Rit-Adding
 
Ritual-processing rule for rit-adding alcohol when at RSDispersalBrushStart and the rstate-solo is feather-or-feather:
    now rstate bestates RSDispersalBrushAlcoholed;
    instead say "You carefully drip [short-description of noun] onto [the rstate-solo]. The quill absorbs the liquid without darkening."
 
Ritual-processing rule for rit-adding lubanja when at RSGenRustRemoverCategored and the rstate-solo is pin-or-bolt:
    now rstate bestates RSGenRustRemoverLubaned;
    instead say "You carefully drip [short-description of noun] onto [the rstate-solo]; a cleansing solvent quality adheres to the metal."
 
Ritual-processing rule for rit-adding lubanja when at RSGenRustRemoverSymCategored and the rstate-solo is symbolish:
    now rstate bestates RSGenRustRemoverSymLubaned;
    let T be the rstate-solo;
    instead say "You carefully drip [short-description of noun] onto [the T]; a cleansing solvent quality adheres to [it-them T]."
 
Ritual-processing rule for rit-adding lubanja when at RSPlanetaryLensNatured and the rstate-solo is lens-or-lens:
    now rstate bestates RSPlanetaryLensLubaned;
    instead say "You place a drop of [short-description of noun] onto [the rstate-solo]. It spreads into a fine film across the surface."
 
Ritual-processing rule for rit-adding percalcinate when at RSAuraStart and the rstate-solo is a quartz-prism:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSAuraCalcined;
    instead say "You empty the vial of [short-description of noun] [into-bound-contents of B]. The green-gold grains adhere to the quartz prism, slowly losing their color, and are absorbed into the crystal."
 
Ritual-processing rule for rit-adding percalcinate:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSFailed;
    instead say "You empty the vial of [short-description of noun] [into-bound-contents of B]. The green-gold grains scatter and are lost."
 
Ritual-processing rule for rit-adding highlime when at RSVacuumStart and the rstate-solo is the beaker and the beaker comprises saline-subst:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSVacuumLimed;
    now the beaker comprises clear-subst;
    fix up the substance of the beaker;
    instead say "You empty the vial of [short-description of noun] into the beaker. The powder slowly dissolves."
 
Ritual-processing rule for rit-adding highlime:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSFailed;
    instead say "You empty the vial of [short-description of noun] [into-bound-contents of B]. The white powder fumes slowly away into the air."
 
Ritual-processing rule for rit-adding viridigris when at RSCentralityStart and the rstate-solo is silk-cord:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSCentralityViridigrised;
    instead say "You empty the vial of [short-description of noun] [into-bound-contents of B]. The turquoise powder clings to the silk as if to a magnet."
 
Ritual-processing rule for rit-adding viridigris:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSFailed;
    instead say "You empty the vial of [short-description of noun] [into-bound-contents of B]. The turquoise powder scatters across the work surface and is lost."
 
Ritual-processing rule for rit-adding brun-oil when at RSPhloElectrumStart and the rstate-solo is electrum:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSPhloElectrumOiled;
    instead say "You empty the vial of [short-description of noun] [into-bound-contents of B]. The oil sinks into the metal, giving a flush of richer gold to the electrum's sheen."
 
Ritual-processing rule for rit-adding brun-oil when at RSPhloElectrumStart and the rstate-solo is electrum-wire:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSPhloElectrumOiled;
    instead say "You empty the vial of [short-description of noun] [into-bound-contents of B]. The oil sinks into the wire, giving a flush of richer gold to the electrum's sheen."
 
Ritual-processing rule for rit-adding brun-oil when at RSPhloElectrumStart and the rstate-solo is gold-rod or the rstate-solo is gold-wire:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSPhloElectrumOiledGold;
    instead say "You empty the vial of [short-description of noun] [into-bound-contents of B]. The oil beads up on the gold and drips off, rather than being absorbed."
 
Ritual-processing rule for rit-adding brun-oil:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSFailed;
    [### special case for adding it to gold! It doesn't sink in.]
    instead say "You empty the vial of [short-description of noun] [into-bound-contents of B]. The oil sinks down into the surface and is absorbed."
 
Ritual-processing rule for rit-adding perfect-mud when at RSClockStart and the rstate-solo is the beaker and the beaker comprises alum-subst:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSClockMudded;
    now the beaker comprises clock-paste-subst;
    fix up the substance of the beaker;
    instead say "You empty the vial of [short-description of noun] into the beaker. The alum absorbs the moisture, and the substances merge into a pale, glittering paste."
 
Ritual-processing rule for rit-adding Gaian-precip when at RSLeadNatured and the rstate-solo is a pebble:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSLeadIncreaseGaianed;
    instead say "You empty the vial of [short-description of noun] [into-bound-contents of B]. The purple-grey dust whirls around the pebble for a moment; then the vortex tightens and is absorbed."
 
Ritual-processing rule for rit-adding counter-Gaian-precip when at RSLeadNatured and the rstate-solo is a pebble:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSLeadDecreaseCounterGaianed;
    instead say "You empty the vial of [short-description of noun] [into-bound-contents of B]. The indigo-blue dust whirls around the pebble for a moment; then the vortex tightens and is absorbed."
 
Ritual-processing rule for rit-adding anti-Tellurian-dist when at RSLeadNatured and the rstate-solo is a pebble:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSLeadDecreaseAntiTellured;
    instead say "You empty the vial of [short-description of noun] [into-bound-contents of B]. The indigo-blue liquid swirls around the pebble for a moment; then the vortex tightens and is absorbed."
 
Ritual-processing rule for rit-adding Gaian-precip:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSFailed;
    instead say "You empty the vial of [short-description of noun] [into-bound-contents of B]. The purple-grey dust drifts away."
 
Ritual-processing rule for rit-adding counter-Gaian-precip:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSFailed;
    instead say "You empty the vial of [short-description of noun] [into-bound-contents of B]. The indigo-blue dust drifts away."
 
Ritual-processing rule for rit-adding anti-Tellurian-dist:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSFailed;
    instead say "You empty the vial of [short-description of noun] [into-bound-contents of B]. The indigo-blue liquid evaporates silently."
 
Ritual-processing rule for rit-adding vitriolic acid when at RSFulcrumStart and the rstate-solo is a pebble:
    let B be the bound of rstate;
    now rstate bestates RSFulcrumAcided;
    instead say "You carefully drip [short-description of noun] [into-bound-contents of B]. The stone hisses and spits, and seems to absorb the acid."
 
Ritual-processing rule for rit-adding muriatic acid when at RSFulcrumStart and the rstate-solo is a pebble:
    let B be the bound of rstate;
    now rstate bestates RSFailed;
    instead say "You carefully drip [short-description of noun] [into-bound-contents of B]. The stone hisses and spits."
 
Ritual-processing rule for rit-adding bamuriatic acid when at RSFulcrumStart and the rstate-solo is a pebble:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSFailed;
    instead say "You empty the vial of [short-description of noun] [into-bound-contents of B]. The stone hisses and spits."
 
Ritual-processing rule for rit-adding bamuriatic acid when the reservoir is in the bound of rstate and the reservoir comprises muriatic-subst:
    retire the noun by ritual;
    now the reservoir comprises grey-acid-subst;
    fix up the substance of the reservoir;
    instead say "You empty the vial of bamuriatic acid into the retort. The mixture of acids fumes acridly, and turns slate-grey."
 
Ritual-processing rule for rit-adding bamuriatic acid when the beaker is in the bound of rstate and the beaker comprises muriatic-subst:
    retire the noun by ritual;
    now the beaker comprises grey-acid-subst;
    fix up the substance of the beaker;
    instead say "You empty the vial of bamuriatic acid into the beaker. The mixture of acids fumes acridly, and turns slate-grey."
 
Ritual-processing rule for rit-adding bamuriatic acid:
    retire the noun by ritual;
    let B be the bound of rstate;
    now rstate bestates RSFailed;
    instead say "You pour the vial of [short-description of noun] [into-bound-contents of B]. It fumes acridly."
 
Ritual-processing rule for rit-adding sublime when at RSAuraInvisibilityIdempoted and the rstate-solo is a quartz-prism:
    retire the noun by ritual;
    now rstate bestates RSAuraInvisibilitySublimed;
    instead say "You dribble the vial of [short-description of noun] onto [the rstate-solo]. It forms a rainbow sheen, which quickly evaporates."
 
Ritual-processing rule for rit-adding sublime when at RSClockCountered and the rstate-solo is a beaker and the beaker comprises clock-paste-subst:
    retire the noun by ritual;
    now rstate bestates RSClockSublimed;
    now the beaker comprises clock-solution-subst;
    fix up the substance of the beaker;
    instead say "You dribble the sublime spirit into the beaker. The paste softens, shimmering, and liquifies into a translucent silvery solution."
 
Ritual-processing rule for rit-adding sand when at RSGlassPassStart and the rstate-solo is a chime:
    let T be the rstate-solo;
    now rstate bestates RSGlassPassSanded;
    instead say "You carefully sprinkle sand over [the T]. Each grain falls with its own tiny note."
 
Ritual-processing rule for rit-adding sand when the env of rstate is helian-env and the rstate-solo is a chime:
    [glass-pass failure: sand at the wrong stage.]
    let T be the rstate-solo;
    now rstate bestates RSFailed;
    instead say "You carefully sprinkle sand over [the T], but the grains fall with faint, sour notes."
 
Ritual-processing rule for rit-adding the el-water when at RSMudTempered and the bound of the rstate is the retort and the reservoir comprises sand-subst:
    retire the noun by ritual;
    now the reservoir comprises sand-water-subst;
    fix up the substance of the reservoir;
    now rstate bestates RSMudFirstWater;
    instead say "You crack open the capsule, and pour the elemental water into the retort. The drops sparkle on the sand; then they are absorbed. The elemental water seems to moisten the sand more than those few drops could warrant -- the retort now contains a watery slurry of sand."
 
Ritual-processing rule for rit-adding the el-water when at RSMudFirstEarth and the bound of the rstate is the retort and the reservoir comprises sand-earth-subst:
    retire the noun by ritual;
    now the reservoir comprises damp-sand-subst;
    fix up the substance of the reservoir;
    if rstate is not entension-word-used:
        now rstate bestates RSFailed;
        instead say "You crack open the capsule, and pour the elemental water into the retort. The sparkling drops sink into the damp sand and disappear.";
    now rstate bestates RSMudSeconded;
    instead say "You crack open the capsule, and pour the elemental water into the retort. The sparkling drops sink into the sand, and a slow upwelling current begins, like a tiny pool of quicksand within the retort."
 
Ritual-processing rule for rit-adding the el-water when the bound of the rstate is the retort and the reservoir comprises sand-subst:
    retire the noun by ritual;
    now rstate bestates RSFailed;
    let B be the bound of rstate;
    instead say "You crack open the capsule, and pour the elemental water [into-bound-contents of B]. The drops sparkle on the sand; then they sink in and disappear."
 
Ritual-processing rule for rit-adding the el-water:
    retire the noun by ritual;
    now rstate bestates RSFailed;
    let B be the bound of rstate;
    instead say "You crack open the capsule, and pour the elemental water [into-bound-contents of B]. The drops sparkle just that little bit more than ordinary water."
 
Ritual-processing rule for rit-adding a descriptor-compatible thing that descriptor-matches brass-descriptor when at RSClockSublimed and the rstate-solo is a beaker and the beaker comprises clock-solution-subst:
    retire the noun by ritual;
    now rstate bestates RSClockPinned;
    instead say "You drop [the noun] into the beaker. Plop! It lies at the bottom for a moment... and then in the next moment dissolves, all at once, lending the solution a brassy tinge."
 
Ritual-processing rule for rit-adding a descriptor-compatible thing that descriptor-matches brass-descriptor when at RSClockCountered and the rstate-solo is a beaker and the beaker comprises clock-paste-subst:
    [clock tincture failure -- no sublime]
    retire the noun by ritual;
    now rstate bestates RSFailed;
    instead say "You drop [the noun] into the beaker. Plop! It lies in the glittering paste for a moment... and then in the next moment dissolves, all at once."
 
Ritual-processing rule for rit-adding lens-or-lens when at RSPlanetaryLensLubaned and the rstate-solo is lens-or-lens:
    let the other-lens be the rstate-solo;
    if the noun is the other-lens:
        instead say "[The noun] is already inside the bound.";
    let B be the bound of rstate;
    now the noun is in B;
    now the secondary-obj of rstate is the noun;
    now rstate bestates RSPlanetaryLensLensed;
    instead say "The [color of env of rstate] light ripples as you push through the arc. You place [the noun] against [the other-lens]; the curved surfaces adhere on their delicate film of solvent."
 
Ritual-processing rule for rit-adding orichalcum when at RSAuraStart and the rstate-solo is a quartz-prism and the aroma of the location is not citronelle:
    let T be the rstate-solo;
    let B be the bound of rstate;
    now the noun is in B;
    now the secondary-obj of rstate is the noun;
    now rstate bestates RSAuraToughenOried;
    instead say "The [color of env of rstate] light ripples as you push through the arc. You align [the noun] against [the T]."
 
Ritual-processing rule for rit-adding the el-earth when at RSMudTempered and the bound of the rstate is the retort and the reservoir comprises sand-subst:
    retire the noun by ritual;
    now the reservoir comprises sand-earth-subst;
    fix up the substance of the reservoir;
    now rstate bestates RSMudFirstEarth;
    instead say "You drop the shard of elemental earth into the retort. The bound's pearly light ripples.[para]The shard seems to fall apart the moment it touches the surface of the sand. A shower of crystalline dust spreads across the sand, giving it a glassy translucency."
 
Ritual-processing rule for rit-adding the el-earth when at RSMudFirstWater and the bound of the rstate is the retort and the reservoir comprises sand-water-subst:
    retire the noun by ritual;
    now the reservoir comprises damp-sand-subst;
    fix up the substance of the reservoir;
    if rstate is not entension-word-used:
        now rstate bestates RSFailed;
        instead say "You drop the shard of elemental earth into the retort. The bound's pearly light ripples.[para]The shard seems to fall apart the moment it touches the surface. A shower of crystalline dust sinks into the damp sand and disappears.";
    now rstate bestates RSMudSeconded;
    instead say "You drop the shard of elemental earth into the retort. The bound's pearly light ripples.[para]The shard seems to fall apart the moment it touches the surface. A shower of crystalline dust spreads across the sand, and a slow upwelling current begins, like a tiny pool of quicksand within the retort."
 
Ritual-processing rule for rit-adding the perfect-diamond when at RSMudTempered and the bound of the rstate is the retort and the reservoir comprises sand-subst:
    retire the noun by ritual;
    now rstate bestates RSFailed;
    instead say "You drop the perfect diamond into the retort. The bound's pearly light ripples.[para]The diamond cracks, splinters, and falls into a shower of dust that is immediately lost in the sand."
 
Ritual-processing rule for rit-adding the perfect-diamond when at RSMudFirstWater and the bound of the rstate is the retort and the reservoir comprises sand-water-subst:
    retire the noun by ritual;
    now rstate bestates RSFailed;
    instead say "You drop the perfect diamond into the retort. The bound's pearly light ripples.[para]The diamond cracks, splinters, and falls into a shower of dust that is immediately lost in the sand."
 
Ritual-processing rule for rit-adding el-earth when at RSCentralityViridigrised and the rstate-solo is silk-cord:
    let B be the bound of rstate;
    now the el-earth is in B;
    now the secondary-obj of rstate is the el-earth;
    now rstate bestates RSCentralityEarthed;
    instead say "The [color of env of rstate] light ripples as you push through the arc. You lay the elemental earth on one end of the silk cord, where it clings."
 
Ritual-processing rule for rit-adding el-earth when the rstate-solo is silk-cord:
    [centrality failure -- no viridigris, wrong state]
    let B be the bound of rstate;
    now the el-earth is in B;
    now rstate bestates RSFailed;
    instead say "The [color of env of rstate] light ripples as you push through the arc. You lay the elemental earth on one end of the silk cord -- but it slips off."
 
Ritual-processing rule for rit-adding perfect-diamond when the rstate-solo is silk-cord:
    [bad substitution in centrality]
    let B be the bound of rstate;
    now the perfect-diamond is in B;
    now rstate bestates RSFailed;
    instead say "The [color of env of rstate] light ripples as you push through the arc. You lay the diamond on one end of the silk cord -- but it slips off."
 
Ritual-processing rule for rit-adding el-earth when at RSMarriageStart:
    retire the noun by ritual;
    now rstate bestates RSFailed;
    instead say "The [color of env of rstate] light ripples as you push through the arc. The shard of elemental earth sublimes away into nothingness."
 
Ritual-processing rule for rit-adding el-earth when at RSMarriageSprigged:
    retire the noun by ritual;
    [Cannot already be added, because there's only one el-earth.]
    let N be the current-count of rstate;
    say "The [color of env of rstate] light ripples as you push through the arc. The shard of elemental earth does not fall. It hangs in the center of the circle, spinning and spinning, until it blurs into [if N is zero]an indistinct haze[else]the thickening haze[end if].";
    check great marriage status adding 4;
    stop.
 
Ritual-processing rule for rit-adding perfect-diamond when at RSMarriageStart:
    retire the noun by ritual;
    now rstate bestates RSFailed;
    instead say "The [color of env of rstate] light ripples as you push through the arc. The perfect diamond sublimes away into nothingness."
 
Ritual-processing rule for rit-adding perfect-diamond when at RSMarriageSprigged:
    retire the noun by ritual;
    now rstate bestates RSFailed;
    instead say "The [color of env of rstate] light ripples as you push through the arc. The perfect diamond sublimes away into nothingness."
 
Ritual-processing rule for rit-adding an alight wood-splint when at RSMarriageStart:
    say "The [color of env of rstate] light ripples as you push through the arc. [The noun]";
    now the noun is not alight;
    update fire consumption;
    retire the noun by ritual;
    now rstate bestates RSFailed;
    instead say " immediately flares up and falls to ash. But it was a nasty smoky flame; you don't like the looks of it."
 
Ritual-processing rule for rit-adding an alight wood-splint when at RSMarriageSprigged:
    say "The [color of env of rstate] light ripples as you push through the arc. [The noun]";
    now the noun is not alight;
    update fire consumption;
    retire the noun by ritual;
    now rstate bestates RSFailed;
    instead say " immediately flares up and falls to ash. But it was a nasty smoky flame; you don't like the looks of it."
 
[The el-wood rules should be sequenced after alight wood-splint rules, but I am out of spoons here.]
Ritual-processing rule for rit-adding el-wood when at RSMarriageStart:
    retire the noun by ritual;
    now rstate bestates RSFailed;
    instead say "The [color of env of rstate] light ripples as you push through the arc. The elemental wood immediately bursts into flame, flares up, and is gone. But it was a nasty smoky flame; you don't like the looks of it."
 
Ritual-processing rule for rit-adding el-wood when at RSMarriageSprigged:
    retire the noun by ritual;
    now rstate bestates RSFailed;
    instead say "The [color of env of rstate] light ripples as you push through the arc. The elemental wood immediately bursts into flame, flares up, and is gone. But it was a nasty smoky flame; you don't like the looks of it."
 
Ritual-processing rule for rit-adding el-fire when at RSMarriageStart:
    dephlogisticate the noun;
    now rstate bestates RSFailed;
    instead say "The [color of env of rstate] light ripples as you push through the arc. The elemental fire flares up into an eye-searing flash, leaving the rod cold in your fingers."
 
Ritual-processing rule for rit-adding el-fire when at RSMarriageSprigged:
    dephlogisticate the noun;
    let N be the current-count of rstate;
    say "The [color of env of rstate] light ripples as you push through the arc. The elemental fire leaps from the rod; you pull the cold rod back. The flame whirls unsupported in the center of the arc, slowly dimming into [if N is zero]an indistinct haze[else]the thickening haze[end if].";
    check great marriage status adding 8;
    stop.
 
Ritual-processing rule for rit-adding saline when at RSMarriageStart:
    now rstate bestates RSFailed;
    instead say "You pour saline into the arc. The droplets seem to boil away in midair."
 
Ritual-processing rule for rit-adding saline when at RSMarriageSprigged:
    now rstate bestates RSFailed;
    instead say "You pour saline into the arc. The droplets seem to boil away in midair."
 
Ritual-processing rule for rit-adding a soluble-stone when at RSSolventAnaphylaxed and the bound of rstate is the retort and the reservoir comprises black-reagent-subst:
    say "You drop [the noun] into the retort";
    retire the noun by ritual;
    if the mineral-used of rstate is no-thing:
        now the mineral-used of rstate is the noun;
    else:
        now the mineral-used of rstate is the nonexistent-stone;
    instead say ". It dissolves instantly into the black reagent."
 
Ritual-processing rule for rit-adding zafranum when at RSBronzeMagnetStart and the rstate-solo is a chime:
    let B be the bound of rstate;
    now the zafranum is in B;
    now the secondary-obj of rstate is the zafranum;
    now rstate bestates RSBronzeMagnetZafranumed;
    instead say "The [color of env of rstate] light ripples as you push through the arc. You strew the zafranum threads around the chime."
 
Ritual-processing rule for rit-adding zafranum when at RSAitherStart and the rstate-solo is a beaker and the beaker comprises saline-subst:
    let B be the bound of rstate;
    now the zafranum is in B;
    now the secondary-obj of rstate is the zafranum;
    now rstate bestates RSAitherZafranumed;
    instead say "The [color of env of rstate] light ripples as you push through the arc. You strew the zafranum threads around the beaker."
 
Ritual-processing rule for rit-adding zafranum when at RSGenRustRemoverLubaned and the rstate-solo is pin-or-bolt:
    let T be the rstate-solo;
    retire the zafranum by ritual;
    say "The [color of env of rstate] light ripples as you push through the arc. You sift the zafranum threads onto [the T]";
    if T is not the brass-pin:
        now rstate bestates RSFailed;
        instead say ". They dissolve into the metal, lending it a peculiar off-green tint.";
    now rstate bestates RSIntensionalBallastZafranumed;
    instead say ". They dissolve into the metal, lending it a clear green tint.";
 
Ritual-processing rule for rit-adding zafranum when at RSGenRustRemoverSymLubaned and the rstate-solo is symbolish:
    let T be the rstate-solo;
    retire the zafranum by ritual;
    say "The [color of env of rstate] light ripples as you push through the arc. You sift the zafranum threads onto [the T]";
    now rstate bestates RSFailed;
    instead say ". They dissolve into the metal, lending it a green tint. The markings on [the T] distort the color's clarity, however."
 
To say into-bound-contents of (B - ritual-bound):
    let N be the number of things in B;
    if B is the retort:
        say "into the retort";
    else if N is zero:
        say "into the empty bound";
    else if N is one:
        let T be the first thing held by B;
        if T is the beaker or T is the reservoir:
            say "into [the T]";
        else:
            say "onto [the T]";
    else:
        say "over the contents of the bound".
 
Ritual-processing rule for rit-adding alum when at RSGaianSequenced and the bound of rstate is the retort and the reservoir comprises ori-vitriol-subst:
    now rstate bestates RSGaianAlumed;
    now the substance of the reservoir is violet-mix-subst;
    fix up the substance of the reservoir;
    instead say "You pour a gentle stream of alum into the retort. At first nothing happens; the powder simply dissolves into the sky-blue solution. Then the color begins to darken. You pull back your hand, and watch the solution turn to a clear violet."
 
Ritual-processing rule for rit-adding alum when at RSCounterGaianSequenced and the bound of rstate is the retort and the reservoir comprises ori-vitriol-subst:
    now rstate bestates RSCounterGaianAlumed;
    now the substance of the reservoir is indigo-mix-subst;
    fix up the substance of the reservoir;
    instead say "You pour a gentle stream of alum into the retort. At first nothing happens; the powder simply dissolves into the sky-blue solution. Then the color begins to darken. You pull back your hand, and watch the solution turn to a clear indigo."
 
Ritual-processing rule for rit-adding nickel-filings when at RSChymicStart and the bound of rstate is the retort and the reservoir comprises mineral-oil-subst:
    [no state change]
    retire the nickel-filings by alchemy;
    now the substance of the reservoir is nickel-oil-subst;
    fix up the substance of the reservoir;
    instead say "You empty the nickel shavings into the retort. They disperse into the oil, forming a golden mixture."
 
Ritual-processing rule for rit-adding a chem-flask when the bound of rstate is the retort:
    if the reservoir comprises no-subst:
        [no state change]
        now the substance of the reservoir is the substance of the noun;
        fix up the substance of the reservoir;
        instead say "You pour a measure of [the substance of the reservoir] into the retort.";
    [no state change]
    let M be the substance of the noun;
    instead derive the mixture of M into the reservoir.
 
Ritual-processing rule for rit-adding a chem-flask when the rstate-solo is the beaker:
    now rstate bestates RSFailed;
    let M be the substance of the noun;
    instead derive the mixture of M into the beaker.
 
Ritual-processing rule for rit-adding a chem-flask:
    now rstate bestates RSFailed;
    instead follow the general flask-adding report rule.
 
This is the general flask-adding report rule:
    let B be the bound of rstate;
    instead say "You carefully [sprinkle-word of noun] [short-description of noun] [into-bound-contents of B]."
 
Ritual-processing rule for rit-adding a chem-vial when the rstate-solo is the beaker:
    retire the noun by ritual;
    now rstate bestates RSFailed;
    let M be the substance of the noun;
    instead derive the mixture of M into the beaker.
 
Ritual-processing rule for rit-adding a chem-vial:
    retire the noun by ritual;
    now rstate bestates RSFailed;
    instead follow the general vial-adding report rule.
 
This is the general vial-adding report rule:
    let B be the bound of rstate;
    instead say "You carefully [sprinkle-word of noun] the [short-description of noun] [into-bound-contents of B]."
 
Ritual-processing rule for rit-adding a charged bubble when at RSAuraImitAltNamed and the rstate-duo is iron-bead and jade:
    now rstate bestates RSAuraImitAltAired;
    now the noun is uncharged;
    instead say "You twist the bubble's valve, and carefully vent the elemental air over the iron and jade. The beads are now clinging tightly together."
 
Ritual-processing rule for rit-adding a charged bubble when the rstate-duo is iron-bead and jade:
    now rstate bestates RSFailed;
    now the noun is uncharged;
    instead say "You twist the bubble's valve, and carefully vent the elemental air over the iron and jade. The beads roll slightly apart."
 
Ritual-processing rule for rit-adding a charged bubble when at RSMarriageStart:
    now the noun is uncharged;
    now rstate bestates RSFailed;
    instead say "You twist the bubble's valve, and carefully vent the elemental air into the bound. It whisks around the arc, slowly dissipating."
 
Ritual-processing rule for rit-adding a charged bubble when at RSMarriageSprigged:
    now the noun is uncharged;
    let N be the current-count of rstate;
    say "You twist the bubble's valve, and carefully vent the elemental air into the bound. It whisks around the arc, and [if N is zero]slowly thickens into an indistinct haze in the circle[else]joins the thickening haze[end if].";
    check great marriage status adding 2;
    stop.
 
Ritual-processing rule for rit-adding a charged bubble:
    now rstate bestates RSFailed;
    now the noun is uncharged;
    instead follow the general bubble-adding report rule.
 
Ritual-processing rule for rit-adding an uncharged bubble:
    instead say "[The noun] contains no elemental air."
 
This is the general bubble-adding report rule:
    let B be the bound of rstate;
    instead say "You twist the bubble's valve, and carefully vent the elemental air [into-bound-contents of B]. The discharge has no obvious effect."
 
Ritual-processing rule for rit-adding el-water when at RSAuraImitationIsomorphed and the rstate-solo is a quartz-prism:
    retire the noun by ritual;
    now rstate bestates RSAuraImitationWatered;
    instead say "You crack open the capsule, and pour the elemental water onto [the rstate-solo]. The drops sparkle on the crystal for a moment, and then evaporate -- or are absorbed."
 
Ritual-processing rule for rit-adding el-water when at RSMarriageStart:
    retire the noun by ritual;
    now rstate bestates RSFailed;
    instead say "You crack open the capsule, and pour the elemental water into the bound. The sparkling drops never land on the workbench surface. They seem to boil away in midair."
 
Ritual-processing rule for rit-adding el-water when at RSMarriageSprigged:
    retire the noun by ritual;
    [Cannot already be added, because there's only one el-water.]
    let N be the current-count of rstate;
    say "You crack open the capsule, and pour the elemental water into the bound. The sparkling drops never land on the workbench surface. Instead, they whirl around the arc, and slowly fade into [if N is zero]an indistinct haze which is accumulating in the circle[else]the thickening haze[end if].";
    check great marriage status adding 1;
    stop.
 
Ritual-processing rule for rit-adding swamp-pith when at RSBrunNatured and the rstate-solo is a beaker and the beaker comprises mineral-oil-subst:
    let B be the bound of rstate;
    now the swamp-pith is in B;
    now rstate bestates RSBrunWooded;
    instead say "The [color of env of rstate] light ripples as you push through the arc. You lay [the swamp-pith] next to the beaker."
 
Ritual-processing rule for rit-adding a metal-wire when the bound of rstate is the retort:
    let B be the bound of rstate;
    now the noun is in B;
    [no state change]
    instead say "You feed [the noun] into the retort, where it lies in a coil. The bound's pearly light ripples."
 
Ritual-processing rule for rit-adding mercury when the bound of rstate is the retort:
    let B be the bound of rstate;
    now the noun is in B;
    [no state change]
    instead say "You tip the droplet of mercury from the saucer into the retort. The bound's pearly light ripples."
 
Ritual-processing rule for rit-adding when the bound of rstate is the retort:
    let B be the bound of rstate;
    now the noun is in B;
    [no state change]
    instead say "You drop [the noun] into the retort. The bound's pearly light ripples."
 
Ritual-processing rule for rit-adding:
    let B be the bound of rstate;
    now the noun is in B;
    now rstate bestates RSFailed;
    instead follow the general object-adding report rule.
 
This is the general object-adding report rule:
    tutor tut-step-insert with the noun;
    let B be the bound of rstate;
    instead say "The [color of env of rstate] light ripples as you push through the arc. You leave [the noun] within the [short-adjective of B], and carefully withdraw your hand."
 
 
Section - Rit-Speaking
 
Ritual-processing rule for rit-speaking nature-word when at RSRustRemoverStart and the rstate-solo is brass-pin:
    now rstate bestates RSRustRemoverNatured;
    instead follow the nature-word-speaking report rule.
 
Ritual-processing rule for rit-speaking nature-word when at RSRustRemoverStart and the rstate-solo is steel-bolt:
    now rstate bestates RSRustRemoverNatured;
    instead follow the nature-word-speaking report rule.
 
Ritual-processing rule for rit-speaking nature-word when at RSPlanetaryLensStart and the rstate-solo is lens-or-lens:
    now rstate bestates RSPlanetaryLensNatured;
    instead follow the nature-word-speaking report rule.
 
Ritual-processing rule for rit-speaking nature-word when at RSLeadSprigged and the rstate-solo is a pebble:
    now rstate bestates RSLeadNatured;
    instead follow the nature-word-speaking report rule.
 
Ritual-processing rule for rit-speaking nature-word when at RSLeadSprigged and the rstate-solo is a quartz-prism:
    [lead-weight failures: tried to use quartz instead of a pebble.]
    let T be the rstate-solo;
    now rstate bestates RSFailed;
    say "You intone the [nature-word]";
    instead say ", but the words feel weak. They refuse to catch hold in the quartz; they slip through its crystalline structure and are lost."
 
Ritual-processing rule for rit-speaking nature-word when at RSPurityStart and the rstate-solo is chain-or-chain:
    now rstate bestates RSPurityNatured;
    instead follow the nature-word-speaking report rule.
 
Ritual-processing rule for rit-speaking nature-word when at RSBrunHoneyed and the rstate-solo is the beaker and the beaker comprises mineral-oil-subst:
    now rstate bestates RSBrunNatured;
    instead follow the nature-word-speaking report rule.
 
Ritual-processing rule for rit-speaking nature-word when the rstate-solo is the dirty scalpel:
    now rstate bestates RSFailed;
    say "You intone the [nature-word]";
    instead say ", but the words feel weak. The scalpel's nature is confused by the foreign substances caked on it."
 
Ritual-processing rule for rit-speaking nature-word when at RSScalpelStart and the rstate-solo is the clean scalpel:
    now rstate bestates RSScalpelNatured;
    instead follow the nature-word-speaking report rule.
 
Ritual-processing rule for rit-speaking nature-word:
    now rstate bestates RSFailed;
    instead follow the nature-word-speaking report rule.
 
To decide what text is the nature-evoke-string of (T - thing):
    if T is elemental:
        decide on "singular nature of the alchemical element";
    if T is a pebble:
        decide on "mineral nature of the chip";
    if T is a quartz-prism:
        decide on "mineral nature of the quartz";
    if T is a wood-splint:
        decide on "woody nature of the splinter";
    if T is the baros-key:
        decide on "mineral nature of the key";
    if T is the beaker:
        if the substance of the beaker is:
            -- saline-subst:
                decide on "briny nature of the saline";
            -- mineral-oil-subst:
                decide on "pinguid nature of the oil";
            [### others?]
        decide on "";
    if T is:
        -- brass-pin: decide on "metallic nature of the brass pin";
        -- steel-bolt: decide on "metallic nature of the steel bolt";
        -- silver-chain: decide on "metallic nature of the silver chain";
        -- purity-lodestone: decide on "metallic nature of the silver chain";
        -- electrum: decide on "metallic nature of the electrum";
        -- orichalcum: decide on "metallic nature of the orichalcum";
        -- phlo-electrum: decide on "metallic nature of the electrum";
        -- phlo-gold: decide on "metallic nature of the gold";
        -- glass-loop: decide on "glassy nature of the loop";
        -- oculus: decide on "glassy nature of the oculus";
        -- convex-lens: decide on "glassy nature of the lens";
        -- concave-lens: decide on "glassy nature of the lens";
        -- planetary-lens: decide on "glassy nature of the lens";
        -- H-chime: decide on "glassy nature of the chime";
        -- G-flat-chime: decide on "glassy nature of the chime";
        -- B-chime: decide on "metallic nature of the chime";
        -- F-sharp-chime: decide on "metallic nature of the chime";
        -- rough-diamond: decide on "mineral nature of the diamond";
        -- perfect-diamond: decide on "mineral nature of the diamond";
        -- scalpel:
            if the scalpel is clean:
                decide on "metallic nature of the scalpel";
        [### others?]
    if T is symbolish:
        decide on "symbolic nature of the item";
    decide on "".
 
This is the nature-word-speaking report rule:
    tutor tut-saw-nature;
    tutor tut-step-nature;
    let B be the bound of rstate;
    let N be the number of things in B;
    say "You intone the [nature-word]";
    if N is zero:
        instead say ". The arc flickers, but there is nothing within to evoke.";
    if N is greater than one:
        [### If they all have the same material, this message should be different]
        instead say ", but it wavers as you speak it. [The list of things *in B] are too varied to evoke a single alchemical nature.";
    let T be the first thing held by B;
    if T is not the rstate-solo:
        instead say ". The nature of [the T] flares unevenly. That isn't right.";
    if T is elemental:
        instead say ", but it falls too easily from your lips. [The T] is already of a single nature.";
    if T is symbolish:
        instead say ", but the pronunciation is off. Probably the symbolism of [the T] complicates [its-their T] material nature.";
    let V be the nature-evoke-string of T;
    if V is "":
        instead say ", but it wavers as you speak it. Apparently [the T] [has-have T] too complex a material nature to evoke in this way.";
    if rstate is nature-word-used:
        instead say " again. The [V] shimmers unevenly on the surface.";
    now rstate is nature-word-used;
    instead say ". The [V] rises to the surface[if rstate is failed], though with an indistinct shimmer[end if].";
 
Ritual-processing rule for rit-speaking anaphylaxis-word when at RSChymicStart and the bound of rstate is the retort and the reservoir comprises grey-acid-subst and the retort contains exactly el-earth:
    say "You intone the [anaphylaxis-word]; it makes your mouth itch";
    retire the el-earth by ritual;
    now rstate bestates RSSolventAnaphylaxed;
    now the additive-used of the rstate is el-earth;
    now the reservoir comprises black-reagent-subst;
    fix up the substance of the reservoir;
    instead say ".[para]The shard of elemental earth fizzes and dissolves. The grey acid solution darkens and thickens until it is black as ink."
 
Ritual-processing rule for rit-speaking anaphylaxis-word when at RSChymicStart and the bound of rstate is the retort and the reservoir comprises grey-acid-subst and the retort contains exactly perfect-diamond:
    say "You intone the [anaphylaxis-word]; it makes your mouth itch";
    retire the perfect-diamond by ritual;
    now rstate bestates RSSolventAnaphylaxed;
    now the additive-used of the rstate is perfect-diamond;
    now the reservoir comprises black-reagent-subst;
    fix up the substance of the reservoir;
    instead say ".[para]The diamond fizzes and dissolves. The grey acid solution darkens and thickens until it is black as ink."
 
Ritual-processing rule for rit-speaking anaphylaxis-word when at RSChymicStart and the bound of rstate is the retort and the reservoir comprises muriatic-subst and (the retort contains exactly perfect-diamond or the retort contains exactly el-earth):
    say "You intone the [anaphylaxis-word]; it makes your mouth itch";
    instead say ".[para]A few bubbles rise from the crystal, but it does not dissolve."
 
Ritual-processing rule for rit-speaking anaphylaxis-word when at RSChymicStart and the bound of rstate is the retort and the reservoir comprises grey-acid-subst and the retort contains exactly rough-diamond:
    say "You intone the [anaphylaxis-word]; it makes your mouth itch";
    now rstate bestates RSFailed;
    instead say ".[para]The diamond fizzes in the acid, but does not dissolve."
 
Ritual-processing rule for rit-speaking anaphylaxis-word when at RSAuraToughenOried and the secondary-obj of rstate is orichalcum:
    now rstate bestates RSAuraToughenAnaphylaxed;
    instead follow the anaphylaxis-word-speaking report rule.
 
Ritual-processing rule for rit-speaking anaphylaxis-word:
    now rstate bestates RSFailed;
    instead follow the anaphylaxis-word-speaking report rule.
 
This is the anaphylaxis-word-speaking report rule:
    let B be the bound of rstate;
    let N be the number of things in B;
    say "You intone the [anaphylaxis-word]; it makes your mouth itch";
    if N is zero:
        instead say ". The arc squirms uneasily.";
    if N is greater than one:
        instead say ". [The list of things *in B] [if rstate is failed]shift uneasily away from each other[else]vibrate against each other, emitting a high, irritating whine[end if].";
    let T be a random thing in B;
    if rstate is failed:
        instead say ". The [T] squirms uneasily.";
    else:
        instead say ". The surface of the [T] seems to squirm."
 
Ritual-processing rule for rit-speaking emulgence-word when at RSMudSeconded and the bound of rstate is the retort and the reservoir comprises damp-sand-subst:
    say "You intone the [emulgence-word]; it feels creamy on your tongue";
    unless the retort contains exactly nothing:
        now rstate bestates RSFailed;
        now the reservoir comprises brown-paste-subst;
        fix up the substance of the reservoir;
        instead say ".[para]Circulating within the retort, the sand begins to dissolve. Its color darkens to a beige, then to tan, as the grains roll themselves finer and finer. But the color is not pure, and the final result is a nasty-looking brown paste.";
    [cannot already exist due to prereqs]
    mark the perfect-mud-creation as done;
    shut down the ritual state;
    shut down the retort;
    now the player carries the perfect-mud;
    set pronouns from the perfect-mud;
    instead say ".[para]Circulating within the retort, the sand begins to dissolve. Its color darkens to a beige, then to tan, as the grains roll themselves finer and finer. After several more moments, the water and sand have resolved themselves to a silky brown sediment.[para]The upwelling current ceases, and the bound goes dark. You extract the perfect mud into a fresh vial."
 
Ritual-processing rule for rit-speaking emulgence-word when the bound of rstate is the retort and the reservoir comprises damp-sand-subst:
    say "You intone the [emulgence-word]; it feels creamy on your tongue";
    now rstate bestates RSFailed;
    instead say ".[para]The damp sand roils within the retort, but the motion quickly fades."
 
Ritual-processing rule for rit-speaking emulgence-word:
    now rstate bestates RSFailed;
    instead follow the emulgence-word-speaking report rule.
 
This is the emulgence-word-speaking report rule:
    let B be the bound of rstate;
    let N be the number of things in B;
    say "You intone the [emulgence-word]; it feels creamy on your tongue";
    if N is zero:
        instead say ". The arc squirms uneasily.";
    if N is greater than one:
        instead say ". [The list of things *in B] [if rstate is failed]shift uneasily towards each other[else]vibrate against each other, emitting a low, melodic hum[end if].";
    let T be a random thing in B;
    if rstate is failed:
        instead say ". The [T] squirms uneasily.";
    else:
        instead say ". The surface of the [T] seems to squirm."
 
Ritual-processing rule for rit-speaking entension-word when rstate is entension-word-used:
    say "You declaim the [entension-word]";
    now rstate bestates RSFailed;
    instead say ". The sense of anticipation becomes sickeningly strong.";
 
Ritual-processing rule for rit-speaking entension-word when at RSChymicStart:
    [no state change]
    instead follow the entension-word-speaking report rule.
 
Ritual-processing rule for rit-speaking entension-word when at RSMudTempered:
    [no state change]
    instead follow the entension-word-speaking report rule.
 
Ritual-processing rule for rit-speaking entension-word when at RSMudFirstWater:
    [no state change]
    instead follow the entension-word-speaking report rule.
 
Ritual-processing rule for rit-speaking entension-word when at RSMudFirstEarth:
    [no state change]
    instead follow the entension-word-speaking report rule.
 
Ritual-processing rule for rit-speaking entension-word:
    now rstate bestates RSFailed;
    instead follow the entension-word-speaking report rule.
 
This is the entension-word-speaking report rule:
    say "You declaim the [entension-word]";
    if rstate is entension-word-used:
        instead say ". The sense of anticipation swells.";
    now rstate is entension-word-used;
    if rstate is failed:
        instead say ". The world seems to hold its breath, although you're not sure for what.";
    else:
        instead say ". The world seems to hold its breath."
 
Ritual-processing rule for rit-speaking culmination-word when at RSDispersalBrushAlcoholed and the rstate-solo is feather-or-feather:
    say "You declaim the [culmination-word]";
    if the rstate-solo is the dispersal-brush:
        shut down the ritual state;
        instead say ". The feather ruffles and gleams. However, it does not seem any different after the bound darkens.";
    unless the rstate-solo is feather:
        shut down the ritual state;
        instead say ". It sounds out of places, however, and the bound goes dark.";
    [cannot already exist due to prereqs]
    let B be the bound of rstate;
    retire the feather by transformation into the dispersal-brush;
    now the dispersal-brush is in B;
    set pronouns from the dispersal-brush;
    mark the dispersal-brush-creation as done;
    shut down the ritual state;
    instead say ". It falls solidly into place; the bound flares and then darkens.[para]The feather ruffles in an unfelt breeze, and takes on a subtle sheen. It is simpler than the dispersal tools you've used in class, but it should be effective."
 
Ritual-processing rule for rit-speaking culmination-word when at RSMudSeconded and the bound of rstate is the retort and the reservoir comprises damp-sand-subst:
    say "You declaim the [culmination-word]";
    now rstate bestates RSFailed;
    instead say ". It echoes, as if the world has been waiting ages for such a thing. But the only visible change is that the sand stops circulating within the retort."
 
Ritual-processing rule for rit-speaking culmination-word when at RSChymicStart and the bound of rstate is the retort and the reservoir comprises swirl-mixture-subst:
    say "You declaim the [culmination-word]";
    if the heating-time of the reservoir is not zero:
        shut down the ritual state;
        shut down the retort;
        instead say ". The amber mixture blends together, all at once -- and explodes into a fuming wash of yellow spray.[para]If it weren't contained in the retort, you'd be in serious trouble right now. As it is, the ritual is clearly wrecked. You pull the dump lever and wash away the residue.";
    unless the retort contains exactly nothing:
        now rstate bestates RSFailed;
        now the reservoir comprises moderate-acid-subst;
        fix up the substance of the reservoir;
        instead say ".[para]The amber mixture blends together, all at once -- and begins to boil around [the list of not scenery things *in the retort]. Eventually the diluted acid settles down.";
    [cannot already exist due to prereqs]
    mark the bamuriatic-creation as done;
    shut down the ritual state;
    shut down the retort;
    now the player carries the bamuriatic;
    set pronouns from the bamuriatic;
    instead say ".[para]The amber mixture blends together, all at once. But there is no boiling, no explosion. The liquid steams silently away, filling the retort with vapor. When it clears, the solution has been reduced to a few drops of -- well, if a clear liquid ever looked malevolent, it's this stuff.[para]You locate a wax-lined vial, tap the bamuriatic acid into it, and flush the retort.";
 
Ritual-processing rule for rit-speaking culmination-word when the bound of rstate is the retort and the reservoir comprises swirl-mixture-subst:
    say "You declaim the [culmination-word]";
    if the heating-time of the reservoir is not zero:
        shut down the ritual state;
        shut down the retort;
        instead say ". The amber mixture blends together, all at once -- and explodes into a fuming wash of yellow spray.[para]If it weren't contained in the retort, you'd be in serious trouble right now. As it is, the ritual is clearly wrecked. You pull the dump lever and wash away the residue.";
    now rstate bestates RSFailed;
    now the reservoir comprises moderate-acid-subst;
    fix up the substance of the reservoir;
    instead say ".[para]The amber mixture blends together, all at once -- and begins to boil. Eventually the diluted acid settles down.";
 
Ritual-processing rule for rit-speaking culmination-word:
    now rstate bestates RSFailed;
    instead follow the culmination-word-speaking report rule.
 
This is the culmination-word-speaking report rule:
    say "You declaim the [culmination-word]";
    if rstate is not entension-word-used:
        instead say ". It seems out of place, however.";
    else:
        now rstate is not entension-word-used;
        instead say ". It echoes, as if the world has been waiting ages for such a thing."
 
Ritual-processing rule for rit-speaking the binding-word when the state of rstate is RSFireResistXCountered and the rstate-solo is the beaker and the substance of the beaker is saline-subst:
    say "You intone [the binding-word]";
    let B be the bound of rstate;
    let target-aroma be ginger;
    if at RSFireResistGingerCountered:
        now target-aroma is peppermint;
    if the aroma of the location is the target-aroma:
        if the fire-resistance is on-stage:
            now the beaker comprises chalky-paste-subst;
            fix up the substance of the beaker;
            now rstate bestates RSFailed;
            say ". The solution steams for a moment, then curdles to a chalky paste.[para]";
            instead invoke duplicate-ritual for the fire-resistance;
        mark fire-resistance-creation as done;
        shut down the ritual state;
        discard the beaker;
        now the player carries the fire-resistance;
        set pronouns from the fire-resistance;
        instead say ". The liquid in the beaker steams, gold and green vapor swirling wildly above the surface. The bound emits a bright pulse of light and then goes dark.[para]You pick up the beaker, peer at the liquid -- looks stable, if rather cloudy -- and transfer it carefully to a potion bottle. You set aside the empty beaker.";
    shut down the ritual state;
    instead say ". The liquid in the beaker steams for a moment, but the vapor dissipates quickly as the bound's light fades."
 
Ritual-processing rule for rit-speaking the binding-word when at RSAuraInvisibilitySublimed:
    say "You intone [the binding-word]";
    let B be the bound of rstate;
    unless the rstate-solo is a quartz-prism:
        instead say ", but it falls off-key. Apparently [the list of things *in B] cannot be alchemically bound.";
    unless the ritual environment of the location is spiritual-env:
        shut down the ritual state;
        instead say ". But your concentration slips, distracted by the altered environment, and the binding refuses to take hold.[para]The bound goes dark.";
    say "; the syllables snap cleanly away";
    mark the aura-invisibility-inscription as done;
    let T be the rstate-solo;
    if T is inscribed and the symbol-type of T is not invisibility-symbol:
        let old-symbol be the symbol-type of T;
        inscribe T with invisibility-symbol;
        let E be the env of rstate;
        shut down the ritual state;
        instead say ".[para]The [old-symbol] symbol on [the T] begins to oscillate. The [color of E] light flares; the symbol twists, blurs, and reforms. When the bound fades, you see [the T] now carries a symbol of [invisibility-symbol].";
    if T is inscribed:
        shut down the ritual state;
        instead say ".[para]The symbol on [the T] rings like a crystal chime. It does not otherwise change, however. The bound slowly dims, and the ritual dissipates.";
    inscribe T with invisibility-symbol;
    let E be the env of rstate;
    shut down the ritual state;
    set pronouns from T;
    instead say ". The [color of E] light flares through the clear crystal.[para]When the light fades, a symbol shines on the surface of [the T]."
 
Ritual-processing rule for rit-speaking the binding-word when at RSAuraImitationWatered:
    say "You intone [the binding-word]";
    let B be the bound of rstate;
    unless the rstate-solo is a quartz-prism:
        instead say ", but it falls off-key. Apparently [the list of things *in B] cannot be alchemically bound.";
    unless the ritual environment of the location is spiritual-env:
        shut down the ritual state;
        instead say ". But your concentration slips, distracted by the altered environment, and the binding refuses to take hold.[para]The bound goes dark.";
    say "; the syllables snap cleanly away";
    let T be the rstate-solo;
    mark aura-imi-quartz-inscription as done;
    mark aura-imi-either-inscription as done;
    now the proxy-goal of aura-imi-either-inscription is aura-imi-quartz-inscription;
    if T is inscribed and the symbol-type of T is not imitation-symbol:
        let old-symbol be the symbol-type of T;
        inscribe T with imitation-symbol;
        let E be the env of rstate;
        shut down the ritual state;
        instead say ".[para]The [old-symbol] symbol on [the T] begins to oscillate. The [color of E] light flares; the symbol twists, blurs, and reforms. When the bound fades, you see [the T] now carries a symbol of [imitation-symbol].";
    if T is inscribed:
        shut down the ritual state;
        instead say ".[para]The symbol on [the T] rings like a crystal chime. It does not otherwise change, however. The bound slowly dims, and the ritual dissipates.";
    inscribe T with imitation-symbol;
    let E be the env of rstate;
    shut down the ritual state;
    set pronouns from T;
    instead say ". The [color of E] light flares through the clear crystal.[para]When the light fades, a symbol shines on the surface of [the T]."
 
Ritual-processing rule for rit-speaking the binding-word when at RSPhloElectrumOiled:
    say "You intone [the binding-word]";
    let B be the bound of rstate;
    if the rstate-solo is electrum-wire:
        retire the electrum-wire by ritual;
        let E be the env of rstate;
        shut down the ritual state;
        instead say ".[para]The [color of E] light flares. The electrum wire bursts into a shower of sparks that scatter across the arc. When they fade, unfortunately, the wire has been completely consumed.";
    unless the rstate-solo is electrum:
        instead say ", but it falls off-key. Apparently [the list of things *in B] cannot be alchemically bound.";
    unless the ritual environment of the location is catalytic-env:
        shut down the ritual state;
        instead say ". But your concentration slips, distracted by the altered environment, and the binding refuses to take hold.[para]The bound goes dark.";
    say "; the syllables snap cleanly away";
    retire the electrum by transformation into the phlo-electrum;
    now the electrum is ever-used;
    now the phlo-electrum is in B;
    let E be the env of rstate;
    mark phlo-electrum-creation as done;
    shut down the ritual state;
    set pronouns from phlo-electrum;
    instead say ".[para]The [color of E] light flares, focusses, and bursts as a shower of sparks from the electrum rod. When your eyes clear, the rod looks no different, but its sense of imbued energy is palpable."
 
Ritual-processing rule for rit-speaking the binding-word when at RSPhloElectrumOiledGold:
    say "You intone [the binding-word]";
    let B be the bound of rstate;
    unless the rstate-solo is gold-rod or the rstate-solo is gold-wire:
        instead say ", but it falls off-key. Apparently [the list of things *in B] cannot be alchemically bound.";
    shut down the ritual state;
    instead say ", but it falls off-key, for the gold has no phlogiston to absorb. The bound goes dark."
 
 
Ritual-processing rule for rit-speaking the binding-word when at RSBreathAnodyned and the rstate-solo is the beaker:
    say "You intone [the binding-word]";
    unless the beaker comprises breath-bubbly-subst:
        let B be the bound of rstate;
        instead say ", but it falls off-key. Apparently [the list of things *in B] cannot be alchemically bound.";
    let L be the shelf of rstate;
    unless the paten is on L:
        if something alight is on L:
            shut down the ritual state;
            discard the beaker;
            instead say ". The solution roils -- and the contents of the beaker splatter across the bound. Oh dear.[para]You clear away the empty beaker.";
        shut down the ritual state;
        now the beaker comprises unknown-subst;
        fix up the substance of the beaker;
        instead say ". The solution thickens, becomes murky, and slowly stops bubbling. The bound flickers uncompliantly and goes dark.";
    unless the el-wood is on the paten and the el-wood is alight:
        if something alight is on the paten:
            shut down the ritual state;
            now the beaker comprises yellowish-subst;
            fix up the substance of the beaker;
            instead say ". The solution turns yellowish, bubbles dramatically, and goes still. The bound flickers hesitantly, and darkens.";
        shut down the ritual state;
        now the beaker comprises clear-subst;
        fix up the substance of the beaker;
        instead say ". The beaker foams vigorously, all the bubbles coming out of solution at once. The bound flickers uncompliantly and goes dark.";
    if the breath-holding is on-stage:
        now the beaker comprises chalky-paste-subst;
        fix up the substance of the beaker;
        now rstate bestates RSFailed;
        say ". The solution foams up and curdles to a chalky paste.[para]";
        instead invoke duplicate-ritual for the breath-holding;
    mark breath-holding-creation as done;
    shut down the ritual state;
    discard the beaker;
    now the el-wood is not alight;
    update fire consumption;
    now the player carries the breath-holding;
    set pronouns from the breath-holding;
    instead say ". The liquid in the beaker roils, bubbles dramatically, and goes abruptly still. The splinter of wood, equally abruptly, is extinguished; the bound emits a bright pulse of light and vanishes.[para]The bound fades. You lift the beaker and gently decant the clear potion into a fresh bottle. You set aside the empty beaker.";
 
Ritual-processing rule for rit-speaking the binding-word:
    say "You intone [the binding-word]";
    now rstate bestates RSFailed;
    let B be the bound of rstate;
    let T be the rstate-solo;
    if T is a quartz-prism and the env of rstate is spiritual-env:
        shut down the ritual state;
        [Aura imitation / invisibility failures.]
        instead say ". The quartz does not seem receptive, however, and the syllables go mushy on your lips. The bound flickers uncompliantly and goes dark.";
    if T is electrum and the env of rstate is catalytic-env:
        shut down the ritual state;
        [Phlo-electrum failures.]
        instead say ". The electrum does not seem receptive, however, and the syllables go mushy on your lips. The bound flickers uncompliantly and goes dark.";
    if T is the beaker and the beaker comprises breath-bubbly-subst:
        shut down the ritual state;
        [Breath-holding failures.]
        now the beaker comprises clear-subst;
        fix up the substance of the beaker;
        instead say ". The beaker foams violently, all the bubbles coming out of solution at once. The bound flickers uncompliantly and goes dark.";
    tutor tut-step-binding;
    let N be the number of things in B;
    if N is zero:
        instead say ". The arc flickers, but there is nothing within to bind.";
    if N is one:
        let T2 be a random thing in B;
        if T2 is the beaker:
            instead say ", but it echoes hollowly. Apparently the contents of the beaker cannot be alchemically bound.";
        else:
            instead say ", but it echoes hollowly. There is nothing else in the arc to bind [the T2] to.";
    instead say ", but it falls off-key. Apparently [the list of things *in B] cannot be alchemically bound."
 
 
Ritual-processing rule for rit-speaking categorical imperative when at RSGenRustRemoverStart and the rstate-solo is pin-or-bolt:
    now rstate bestates RSGenRustRemoverCategored;
    instead follow the categorical-imperative-speaking report rule.
 
Ritual-processing rule for rit-speaking categorical imperative when at RSGenRustRemoverSymStart and the rstate-solo is symbolish:
    now rstate bestates RSGenRustRemoverSymCategored;
    instead follow the categorical-imperative-speaking report rule.
 
Ritual-processing rule for rit-speaking categorical imperative:
    now rstate bestates RSFailed;
    instead follow the categorical-imperative-speaking report rule.
 
This is the categorical-imperative-speaking report rule:
    let B be the bound of rstate;
    let N be the number of things in B;
    say "You intone the [categorical imperative]";
    if N is zero:
        instead say ", but the bound contains the null category, which is beyond your reach.";
    if N is greater than one:
        instead say ", but your voice falters as you try to encompass [if N is two]both[else]all the[end if] things within the bound.";
    let T be a random thing in B;
    if T is not the rstate-solo:
        instead say ", but [the T] seems impossible to define clearly.";
    let V be the nature-evoke-string of T;
    if V is "":
        say ". The material nature of [the T]";
    else:
        say ". The [V]";
    if rstate is categorical-imperative-used:
        instead say " wobbles, but cannot be generalized any further.";
    now rstate is categorical-imperative-used;
    instead say " extends smoothly[if rstate is not failed] and clearly[end if] into a general class.";
 
Ritual-processing rule for rit-speaking the Crystalline Tempering when at RSChymicStart and the reservoir comprises sand-subst and the retort contains exactly nothing:
    say "You recite the Crystalline Tempering";
    now rstate bestates RSMudTempered;
    instead say ". The sand shifts subtly within the reservoir, grains aligning on inner axes."
 
Ritual-processing rule for rit-speaking the Crystalline Tempering when at RSChymicStart and the reservoir comprises calcinate-crystal-subst and the retort contains exactly nothing:
    say "You recite the Crystalline Tempering";
    now rstate bestates RSPercalcinateTempered;
    instead say ". The crystals darken further, while also taking on a lucent green clarity."
 
Ritual-processing rule for rit-speaking the Crystalline Tempering when at RSPercalcinateTempered and the reservoir comprises calcinate-crystal-subst and the retort contains exactly nothing:
    say "You recite the Crystalline Tempering";
    now rstate bestates RSFailed;
    instead say " again. The crystals seem to frost over, losing clarity."
 
Ritual-processing rule for rit-speaking the Crystalline Tempering when at RSDiamondChimed and the rstate-solo is diamond-or-diamond:
    say "You recite the Crystalline Tempering";
    unless the ritual environment of the location is phlegmatic-env:
        shut down the ritual state;
        instead say ". But your concentration slips, distracted by the altered environment.[para]The bound goes dark.";
    let L be the shelf of rstate;
    if the el-earth is not on L:
        now rstate bestates RSDiamondChimed; [stay in the current state]
        instead say ". The diamond darkens further.[para]The ritual refuses to close, however, no matter how intensely you speak the words. After several moments, you give up, gasping for breath.";
    if the rstate-solo is the perfect-diamond:
        shut down the ritual state;
        instead say ". The diamond darkens further; the elemental shard begins to vibrate on its shelf, emitting a faint, high-pitched hum.[para]Then, with an almost audible shock, the ritual closes: the diamond emits all its stored light in a blinding flash. When your vision clears, however, it is no more perfect than before.";
    [cannot already exist due to prereqs]
    let B be the bound of rstate;
    mark the diamond-perfection as done;
    shut down the ritual state;
    retire the rough-diamond by transformation into the perfect-diamond;
    now the perfect-diamond is in B;
    set pronouns from the perfect-diamond;
    instead say ". The diamond darkens further; the elemental shard begins to vibrate on its shelf, emitting a faint, high-pitched hum.[para]Then, with an almost audible shock, the ritual closes: the diamond emits all its stored light in a blinding flash. You blink away tears, to find that the cloudy crystal is now flawless and bright.[first time][br][sarge]Now that's a nice trick, swabbie.[/sarge][br][only]"
 
Ritual-processing rule for rit-speaking the Crystalline Tempering:
    say "You recite the Crystalline Tempering";
    now rstate bestates RSFailed;
    let E be the env of rstate;
    let B be the bound of rstate;
    let N be the number of things in B;
    if E is phlegmatic-env and N is two and the el-earth is in B and ( the rough-diamond is in B or the perfect-diamond is in B):
        retire the el-earth by ritual;
        shut down the ritual state;
        [perfect-diamond failure -- put the earth in the bound instead of on the shelf]
        instead say ". The diamond and the shard of earth begin to vibrate. They shift towards each other within the bound, and then cling with an audible [em]click[/em].[para]Darkness grows within the paired crystals, as they absorb light from the room. Then it is released in a brilliant flash. When your vision clears, the elemental earth is gone -- absorbed into the diamond matrix, or shattered? You're not sure. The diamond seems unchanged, however.";
    if N is zero:
        instead say ", but nothing happens.";
    if N is not one:
        instead say ". Nothing in the bound seems to respond, however.";
    let T be a random thing in B;
    instead say ". [The T] does not appear to be affected.";
 
Ritual-processing rule for rit-speaking the Anodyne Evocation when at RSVacuumStart and the rstate-solo is the beaker:
    [vacuum protection failure -- no highlime]
    say "You begin the Anodyne Evocation. The rhythm beats in your chest and blood";
    now rstate bestates RSFailed;
    instead say ". The liquid in the beaker roils, but does not appear to change."
 
Ritual-processing rule for rit-speaking the Anodyne Evocation when at RSVacuumLimed and the rstate-solo is the beaker and the beaker comprises clear-subst:
    say "You begin the Anodyne Evocation. The rhythm beats in your chest and blood";
    now rstate bestates RSVacuumAnodyned;
    now the beaker comprises breath-bubbly-subst;
    fix up the substance of the beaker;
    instead say ". The liquid in the beaker shivers and begins to effervesce."
 
Ritual-processing rule for rit-speaking the Anodyne Evocation when at RSBreathStart and the rstate-solo is the beaker and the beaker comprises saline-subst:
    say "You begin the Anodyne Evocation. The rhythm beats in your chest and blood";
    now rstate bestates RSBreathAnodyned;
    now the beaker comprises breath-bubbly-subst;
    fix up the substance of the beaker;
    instead say ". Slowly, the liquid in the beaker begins to effervesce."
 
Ritual-processing rule for rit-speaking the Anodyne Evocation when at RSAitherBurned and the rstate-solo is the beaker and the beaker comprises saline-subst:
    say "You begin the Anodyne Evocation. The rhythm beats in your chest and blood";
    now rstate bestates RSAitherAnodyned;
    now the beaker comprises aither-sparkly-subst;
    fix up the substance of the beaker;
    instead say ". Slowly, the liquid in the beaker turns a deep, sparkling blue."
 
Ritual-processing rule for rit-speaking the Anodyne Evocation when the initial-sealing of rstate is the hermetic-seal-word and the rstate-duo is the beaker and the zafranum:
    [aither protection failure -- did not ignite the zafranum]
    say "You begin the Anodyne Evocation. The rhythm beats in your chest and blood";
    now rstate bestates RSFailed;
    instead say ". The liquid in the beaker begins to sparkle, but the light quickly dies away."
 
Ritual-processing rule for rit-speaking the Anodyne Evocation when the initial-sealing of rstate is the hermetic-seal-word and the rstate-solo is the beaker:
    [aither protection failure -- various mistakes]
    say "You begin the Anodyne Evocation. The rhythm beats in your chest and blood";
    now rstate bestates RSFailed;
    instead say ". The liquid in the beaker sparkles a bit, but that's all."
 
Ritual-processing rule for rit-speaking the Anodyne Evocation:
    say "You begin the Anodyne Evocation. The rhythm beats in your chest and blood";
    now rstate bestates RSFailed;
    let T be the rstate-solo;
    instead say ". But when you complete the formula, nothing has changed."
 
Ritual-processing rule for rit-speaking the tortoise-name when at RSAuraImitAltStart and the rstate-duo is iron-bead and jade:
    say "You call out the Name of the Tortoise in a firm voice";
    let L be the shelf of rstate;
    unless an alight wood-splint (called T) is on L:
        now rstate bestates RSFailed;
        instead say ". The iron and jade roll together, rattling unnervingly.";
    now T is not alight;
    update fire consumption;
    now rstate bestates RSAuraImitAltNamed;
    instead say ". [The T] flares up and is abruptly quenched. The smoke whirls into a vortex around the iron and jade; the beads roll towards each other."
 
Ritual-processing rule for rit-speaking the tortoise-name when the rstate-duo is iron-bead and jade:
    say "You call out the Name of the Tortoise in a firm voice";
    [aura-imitation-alt failure -- various mistakes]
    now rstate bestates RSFailed;
    instead say ". The iron and jade roll sluggishly towards each other.";
 
Ritual-processing rule for rit-speaking the tortoise-name:
    say "You call out the Name of the Tortoise in a firm voice";
    now rstate bestates RSFailed;
    let T be the rstate-solo;
    instead say ". Nothing seems to be listening."
 
Ritual-processing rule for rit-speaking the Celestial Sphere when at RSLeadIncreaseGaianed or at RSLeadDecreaseCounterGaianed or at RSLeadDecreaseAntiTellured:
    say "You begin invoking the Binding of the Celestial Sphere. The sounds seem distant and foreign, but you speak them precisely";
    let B be the bound of rstate;
    let target-symbol be ponderosity-symbol;
    let target-goal be lead-heavy-inscription;
    if at RSLeadDecreaseCounterGaianed:
        now target-symbol is gossamerity-symbol;
        let target-goal be lead-light-cg-inscription;
    if at RSLeadDecreaseAntiTellured:
        now target-symbol is gossamerity-symbol;
        let target-goal be lead-light-at-inscription;
    let T be the rstate-solo;
    unless T is a pebble:
        shut down the ritual state;
        instead say ".[para]The blueish light flares around [the list of things *in B]. But the binding does not take hold, and after a few moments, the ritual energy drains away.";
    unless the env of rstate is anchor-env and the ritual environment of the location is anchor-env:
        shut down the ritual state;
        instead say ". But your concentration slips, distracted by the altered environment, and the binding refuses to take hold.[para]The bound goes dark.";
    if T is inscribed and the symbol-type of T is not target-symbol:
        let old-symbol be the symbol-type of T;
        inscribe T with target-symbol;
        let E be the env of rstate;
        mark target-goal as done;
        mark lead-light-either-inscription as done;
        now the proxy-goal of lead-light-either-inscription is target-goal;
        shut down the ritual state;
        instead say ".[para]The blueish light flares, and the [old-symbol] symbol on [the T] begins to twist, blur, and reform. When the bound fades, you see [the T] now carries a symbol of [target-symbol].";
    if T is inscribed:
        shut down the ritual state;
        instead say ".[para]The blueish light flares, and the symbol on [the T] rings like a bell. It does not otherwise change, however. The bound slowly dims, and the ritual dissipates.";
    inscribe T with target-symbol;
    let E be the env of rstate;
    mark target-goal as done;
    if target-symbol is gossamerity-symbol:
        mark lead-light-either-inscription as done;
        now the proxy-goal of lead-light-either-inscription is target-goal;
    shut down the ritual state;
    set pronouns from T;
    instead say ".[para]The blueish light flares, drawing together the mineral and celestial principles you have assembled. When it fades, a symbol shines on the surface of [the T].[first time][br][sarge]Clever work, swabbie.[/sarge][br][only]"
 
Ritual-processing rule for rit-speaking the Celestial Sphere when at RSPlanetaryLensLensed:
    say "You begin invoking the Binding of the Celestial Sphere. The sounds seem distant and foreign, but you speak them precisely";
    let B be the bound of rstate;
    unless the rstate-duo is convex-lens and concave-lens:
        shut down the ritual state;
        instead say ".[para]The silver light shines like moonlight on [the list of things *in B]. But the binding does not take hold, and after a few moments, the ritual energy drains away.";
    unless the aroma of the location is no-odor:
        shut down the ritual state;
        instead say ". But your concentration slips, distracted by the impure atmosphere, and the binding refuses to take hold.[para]The bound goes dark.";
    unless the ritual environment of the location is lunar-env:
        shut down the ritual state;
        instead say ". But your concentration slips, distracted by the altered environment, and the binding refuses to take hold.[para]The bound goes dark.";
    [cannot already exist due to prereqs]
    retire the convex-lens by transformation into the planetary-lens;
    retire the concave-lens by transformation into the planetary-lens;
    let B be the bound of rstate;
    now the planetary-lens is in B;
    set pronouns from planetary-lens;
    mark the lens-creation as done;
    shut down the ritual state;
    instead say ". The lenses glow as if in silver moonlight.[para]When the light fades, the lenses have fused into a single opalescent glass -- a planetary association lens."
 
Ritual-processing rule for rit-speaking the Celestial Sphere when at RSPlanetaryLensLubaned:
    [failed planetary lens -- forgot to add second lens]
    say "You begin invoking the Binding of the Celestial Sphere. The sounds seem distant and foreign, but you speak them precisely";
    shut down the ritual state;
    instead say ". The lens glows as if in silver moonlight. But the binding feels incomplete, and after a few moments, the ritual energy drains away."
 
Ritual-processing rule for rit-speaking the Celestial Sphere:
    say "You begin invoking the Binding of the Celestial Sphere. The sounds seem distant and foreign, but you speak them precisely";
    now rstate bestates RSFailed;
    let T be the rstate-solo;
    if T is the planetary-lens and the env of rstate is lunar-env and the ritual environment of the location is lunar-env:
        [failed planetary lens -- start with the lens already]
        shut down the ritual state;
        instead say ". The planetary lens glows as if in silver moonlight.[para]When the light fades, however, the lens remains as it was before.";
    if T is not no-thing and the env of rstate is lunar-env and the ritual environment of the location is lunar-env:
        [failed planetary lens -- wrong singleton object]
        shut down the ritual state;
        instead say ".[para]The silver light shines like moonlight on [the T]. You feel a faint inward pressure, as the binding seeks to make itself whole. But the material element cannot accomodate it, and after a few moments, the ritual energy drains away.";
    let B be the bound of rstate;
    if the number of things in B is not zero and the env of rstate is lunar-env and the ritual environment of the location is lunar-env:
        [general failure with lunar env]
        shut down the ritual state;
        instead say ".[para]The silver light shines like moonlight on [the list of things *in B]. But the binding does not take hold, and after a few moments, the ritual energy drains away.";
    instead say ". Nonetheless, you perceive no effect."
 
Ritual-processing rule for rit-speaking the Chi-Binding when at RSAuraImitAltAired and the rstate-duo is iron-bead and jade:
    say "You begin the Chi Binding, paying proper attention to your tonality";
    let B be the bound of rstate;
    if B is not nave-like:
        shut down the ritual state;
        instead say ". The balance of the five elements comes into focus, but it's off-center. Or you are off-center within the balance.[para]You hear spectral wailing and the displeased muttering of ancestral spirits. The iron and jade roll away from each other, and the bound dies.";
    [cannot already exist due to prereqs]
    retire the iron-bead by ritual;
    inscribe the jade with imitation-symbol;
    set pronouns from the jade;
    mark aura-imi-jade-inscription as done;
    mark aura-imi-either-inscription as done;
    now the proxy-goal of aura-imi-either-inscription is aura-imi-jade-inscription;
    shut down the ritual state;
    instead say ". The balance of the five elements comes into focus in your mind.[para]Spectral voices are chanting in unison, somewhere in the distance. (Song Dynasty rituals [em]always[/em] unsettle you.) Slowly, the iron melts into the jade. When the binding is complete, the bound snaps into darkness; but a small symbol shines on the jade bead."
 
Ritual-processing rule for rit-speaking the Chi-Binding when at RSAitherAnodyned and the rstate-solo is the beaker and the beaker comprises aither-sparkly-subst:
    say "You begin the Chi Binding, paying proper attention to your tonality";
    let L be the shelf of rstate;
    unless the rock-salt is on L:
        now rstate bestates RSFailed;
        now the beaker comprises unknown-subst;
        fix up the substance of the beaker;
        instead say ". The sparkling light within the solution brightens, and then disperses. Its color deepens... and the curdles to an unpleasant murky opacity. That can't be right.";
    if the aither-protection is on-stage:
        now the beaker comprises chalky-paste-subst;
        fix up the substance of the beaker;
        now rstate bestates RSFailed;
        say ". The sparkling light within the solution flickers; the liquid curdles to a chalky paste.[para]";
        instead invoke duplicate-ritual for the aither-protection;
    mark aither-protection-creation as done;
    shut down the ritual state;
    discard the beaker;
    now the player carries the aither-protection;
    set pronouns from the aither-protection;
    instead say ". The sparkling light within the solution brightens, and then disperses. Its color deepens to a startling indigo.[para]The bound fades. You lift the beaker and gently decant the indigo potion into a fresh bottle.[first time][br][sarge]Now what's an apprentice going to do with that, I wonder.[/sarge][br][only]"
 
Ritual-processing rule for rit-speaking the Chi-Binding when the rstate-solo is the beaker and the beaker comprises saline-subst and the initial-sealing of rstate is the hermetic-seal-word:
    say "You begin the Chi Binding, paying proper attention to your tonality";
    shut down the ritual state;
    now the beaker comprises yellowish-subst;
    fix up the substance of the beaker;
    instead say ".[para]Slowly, the solution in the beaker acquires an unpleasant yellowish tint. That can't be right. The bound flickers and dies."
 
Ritual-processing rule for rit-speaking the Chi-Binding:
    say "You begin the Chi Binding, paying proper attention to your tonality";
    let T be the rstate-solo;
    let B be the bound of rstate;
    if the rstate-duo is the iron-bead and the jade:
        [initation-alt failures -- various]
        shut down the ritual state;
        instead say ".[para]Despite your care, the iron and jade beads remain inert; something has gone wrong with the binding. The bound flickers and dies.";
    if the number of things in B is zero:
        instead say ". The arc flickers, but there is nothing within to bind.";
    if the number of things in B is one:
        let T be a random thing in B;
        shut down the ritual state;
        instead say ". But the bound flickers and dies -- there is nothing else to bind [the T] to.";
    shut down the ritual state;
    instead say ". But the bound flickers and dies -- apparently [the list of things *in B] cannot be bound in this way."
 
Ritual-processing rule for rit-speaking the Major Animus when at RSClockPinned and the rstate-solo is the beaker and the beaker comprises clock-solution-subst:
    say "You voice the Major Animus, trying not to choke";
    if the clock-tincture is on-stage:
        now the beaker comprises chalky-paste-subst;
        fix up the substance of the beaker;
        now rstate bestates RSFailed;
        say ". As the clicks and pops roll on, the solution slowly darkens, and then curdles to a chalky paste.[para]";
        instead invoke duplicate-ritual for the clock-tincture;
    mark the clock-tincture-creation as done;
    shut down the ritual state;
    discard the beaker;
    now the player carries the clock-tincture;
    set pronouns from the clock-tincture;
    instead say ". As the clicks and pops roll on, the solution slowly darkens to a rich, brassy opacity. When you reach the final sound, the bound flashes bright silver, and the solution precipitates all at once -- glittery particles of brass, suspended in a dark tincture.[para]The bound fades. You lift the beaker, tilt it appreciately, and decant the tincture into a fresh bottle.[first time][br][sarge]Cleverly done, kid.[/sarge][br][only]"
 
Ritual-processing rule for rit-speaking the Minor Animus when at RSClockPinned and the rstate-solo is the beaker and the beaker comprises clock-solution-subst:
    [clock tincture failure: wrong animus]
    say "You voice the Minor Animus, trying not to cough";
    shut down the ritual state;
    now the beaker comprises unknown-subst;
    fix up the substance of the beaker;
    instead say ". As the clicks and pops roll on, the solution slowly darkens to a rich, brassy opacity.[para]But when you are done, the ritual bound fades, and the solution curdles into a murky mess."
 
Ritual-processing rule for rit-speaking the Minor Animus when at RSPurityNatured and the rstate-solo is chain-or-chain:
    say "You voice the Minor Animus, trying not to cough";
    if the aroma of the location is not no-odor:
        shut down the ritual state;
        instead say ". As the clicks and pops roll on, the chain writhes aimlessly. The atmosphere feels wrong. The ritual bound fades, and the chain falls still.";
    if the rstate-solo is the purity-lodestone:
        shut down the ritual state;
        instead say ". As the clicks and pops roll on, the chain begins to writhe. But when the bound fades, you can see no difference in the knot's conformation.";
    [cannot already exist due to prereqs]
    let B be the bound of rstate;
    mark the purity-creation as done;
    shut down the ritual state;
    retire the silver-chain by transformation into the purity-lodestone;
    now the purity-lodestone is in B;
    set pronouns from the purity-lodestone;
    instead say ". As the clicks and pops roll on, the chain begins to vibrate, and then writhe back and forth across the bound.[para]When you reach the final sound, the bound flares and fades. You see that the end of the chain has tied itself into a tiny silver knot.";
 
Ritual-processing rule for rit-speaking the Major Animus when at RSGlassPassChimed and the rstate-solo is a chime:
    say "You voice the Major Animus, trying not to choke";
    let B be the bound of rstate;
    let E be the env of rstate;
    let T be the rstate-solo;
    unless the ritual environment of the location is helian-env:
        shut down the ritual state;
        instead say ". But your concentration slips, distracted by the altered environment, and the binding refuses to take hold.[para]The bound goes dark.";
    if T is inscribed:
        [we could change permeability to decoherence here, but eh, whatever]
        shut down the ritual state;
        set pronouns from T;
        instead say ". [The T] resonates again, this time with a deep vibration that buzzes against the bound's surface. The symbol inscribed on the chime does not change, however, and the [color of E] light slowly fades.";
    if T is the B-chime:
        [the bronze B is an aluminum-shatterer. Useless in the game.]
        inscribe T with decoherence-symbol;
        mark alum-destroy-inscription as done;
        shut down the ritual state;
        set pronouns from T;
        instead say ". [The T] resonates again, this time with a deep vibration that buzzes against the bound's surface.[para]The [color of E] light flares and fades, and you see a symbol gleaming on the surface of [the T].";
    if T is the F-sharp-chime:
        inscribe T with decoherence-symbol;
        mark glass-destroy-inscription as done;
        shut down the ritual state;
        set pronouns from T;
        instead say ". [The T] resonates again, this time with a deep vibration that buzzes against the bound's surface.[para]The [color of E] light flares and fades, and you see a symbol gleaming on the surface of [the T].";
    [inscribing a glass chime -- should never get here.]
    shut down the ritual state;
    instead say ". [The T] resonates again, this time with a queer, off-key note. The [color of E] light slowly fades."
 
Ritual-processing rule for rit-speaking the Minor Animus:
    say "You voice the Minor Animus, trying not to cough";
    now rstate bestates RSFailed;
    let B be the bound of rstate;
    if the number of things in B is zero:
        instead say ". Nothing seems to happen.";
    if the rstate-duo is the silk-cord and the el-earth and the ritual environment of the location is earth-based:
        [failed centrality -- various mistakes]
        shut down the ritual state;
        instead say ". As the clicks and pops roll on, the silk cord and elemental earth twitch aimlessly. Your recitation does not seem to be imbuing them with the proper focus. After a moment, the ritual bound fades, and they fall still.";
    let T be the rstate-solo;
    if T is chain-or-chain and the env of rstate is lunar-env and the ritual environment of the location is lunar-env:
        [failed purity-lodestone -- no initial odor, or other mistakes]
        shut down the ritual state;
        instead say ". As the clicks and pops roll on, the chain writhes aimlessly. Your recitation does not seem to be aligning it correctly. After a moment, the ritual bound fades, and the chain falls still.";
    shut down the ritual state;
    if the number of things in B is one:
        say ". [The random thing in B] vibrates";
    else:
        say ". [The list of things *in B] vibrate";
    instead say " faintly, and the ritual bound goes dark."
 
Ritual-processing rule for rit-speaking the Major Animus:
    say "You voice the Major Animus, trying not to choke";
    now rstate bestates RSFailed;
    let B be the bound of rstate;
    if the number of things in B is zero:
        instead say ". Nothing seems to happen.";
    shut down the ritual state;
    if the number of things in B is one:
        say ". [The random thing in B] vibrates";
    else:
        say ". [The list of things *in B] vibrate";
    instead say " sharply, and the ritual bound goes dark."
 
Ritual-processing rule for rit-speaking the Minor Animus when at RSCentralityChimed and the rstate-duo is the silk-cord and the el-earth:
    say "You voice the Minor Animus, trying not to cough";
    unless the env of rstate is earth-based and the ritual environment of the location is earth-based:
        shut down the ritual state;
        instead say ".[para]The energy comes together oddly. You try to keep the ritual in tune, but the atmosphere must not be right. The bound flashes into a bright streak of many colors, and then goes dark.";
    let L be the shelf of rstate;
    unless the labyrinth-tile is on L:
        if something alight is on L:
            shut down the ritual state;
            retire the el-earth by ritual;
            instead say ". The shard of elemental earth acquires a milky tint. As the formula progresses, it thickens towards opacity.[para]You are nearly finished when the earth-stone goes chalk-white, crackles, and splinters to dust. Oh dear.";
        shut down the ritual state;
        instead say ". But the elemental earth appears unaffected. When you reach the final throat-clearing stop, the bound flickers weakly and goes dark.";
    unless something (called T) is el-fire on the labyrinth-tile:
        if something alight is on the labyrinth-tile:
            shut down the ritual state;
            instead say ". The shard of elemental earth grows hazy as the formula progresses.[para]The haze darkens and lightens irregularly -- but when you reach the final throat-clearing stop, it fades away, leaving the elemental earth unchanged. The bound flickers uncompliantly and goes dark.";
        shut down the ritual state;
        instead say ". But the elemental earth appears unaffected. When you reach the final throat-clearing stop, the bound flickers weakly and goes dark.";
    [cannot already exist due to prereqs]
    let B be the bound of rstate;
    mark centrality-creation as done;
    now the fire-source-used of centrality-creation is T;
    shut down the ritual state;
    retire the el-earth by transformation into the centrality-lodestone;
    retire the silk-cord by transformation into the centrality-lodestone;
    dephlogisticate T;
    update fire consumption;
    [ritual can't be repeated, because it consumes the silk-cord and earth]
    now the centrality-lodestone is in B;
    set pronouns from the centrality-lodestone;
    instead say ". The shard of elemental earth acquires a milky tint. As the formula progresses, it thickens towards opacity; and the elemental flame dims, its phlogiston draining away.[para]When you reach the final throat-clearing stop, the bound goes dark. The earth shard is now pure white, with fine labyrinthine lines crazing its surface. The silk cord has melded with the stone, forming a pendulum.[first time][br][sarge]Good work, kid.[/sarge][br][only]";
 
Ritual-processing rule for rit-speaking the Relative Anima when at RSGlassPassChimed and the rstate-solo is a chime:
    say "You raise your voice in the Relative Anima";
    let B be the bound of rstate;
    let E be the env of rstate;
    let T be the rstate-solo;
    unless the ritual environment of the location is helian-env:
        shut down the ritual state;
        instead say ". But your concentration slips, distracted by the altered environment, and the binding refuses to take hold.[para]The bound goes dark.";
    if T is inscribed:
        [we could change decoherence to permeability here, but eh, whatever]
        shut down the ritual state;
        set pronouns from T;
        instead say ". [The T] resonates again, this time with a deep vibration that buzzes against the bound's surface. The symbol inscribed on the chime does not change, however, and the [color of E] light slowly fades.";
    if T is the B-chime:
        [the bronze B is an aluminum-passer. Useless in the game.]
        inscribe T with permeability-symbol;
        mark alum-pass-inscription as done;
        shut down the ritual state;
        set pronouns from T;
        instead say ". [The T] resonates again, this time with a deep vibration that buzzes against the bound's surface.[para]The [color of E] light flares and fades, and you see a symbol gleaming on the surface of [the T].";
    if T is the F-sharp-chime:
        inscribe T with permeability-symbol;
        mark glass-pass-inscription as done;
        shut down the ritual state;
        set pronouns from T;
        instead say ". [The T] resonates again, this time with a deep vibration that buzzes against the bound's surface.[para]The [color of E] light flares and fades, and you see a symbol gleaming on the surface of [the T].";
    [inscribing a glass chime -- should never get here.]
    shut down the ritual state;
    instead say ". [The T] resonates again, this time with a queer, off-key note. The [color of E] light slowly fades."
 
Ritual-processing rule for rit-speaking the Relative Anima when at RSFulcrumAcided and the rstate-solo is a pebble:
    [no glyph, or an already-consumed one]
    say "You raise your voice in the Relative Anima";
    let T be the rstate-solo;
    shut down the ritual state;
    instead say ". But your concentration slips[if T is not nothing] -- [the T] doesn't feel like it's the right shape --[end if] and the binding refuses to take hold.[para]The bound goes dark."
 
Ritual-processing rule for rit-speaking the Relative Anima when at RSFulcrumSymboled and the rstate-solo is a pebble:
    say "You raise your voice in the Relative Anima";
    let E be the env of rstate;
    let T be the rstate-solo;
    unless the ritual environment of the location is quicksilver-env:
        shut down the ritual state;
        instead say ". But your concentration slips, distracted by the altered environment, and the binding refuses to take hold.[para]The bound goes dark.";
    if T is inscribed:
        [We could change whatever to leverage here, but eh, whatever. This also fails to update glyph-used, etc, which is fine; minimal change is safe.]
        shut down the ritual state;
        set pronouns from T;
        instead say ". The symbol inscribed on the stone does not change, however, and the [color of E] light slowly fades.";
    if a pebble (called ET) symbol-matches leverage-symbol:
        shut down the ritual state;
        instead say ". There's a conflicting resonance coming from somewhere, however, and the binding refuses to take hold.[para]The bound goes dark.";
    if the additive-used of rstate is not an unconsumed alien-glyph:
        shut down the ritual state;
        instead say ". (BUG) You didn't use a valid glyph.";
    inscribe T with leverage-symbol;
    now the glyph-used of fulcrum-inscription is the additive-used of rstate;
    now the pebble-used of fulcrum-inscription is T;
    now the sequence-used of fulcrum-inscription is no-word;
    now the senility of fulcrum-inscription is zero;
    now the fulcrum-inscription is unlit;
    mark fulcrum-inscription as done;
    shut down the ritual state;
    set pronouns from T;
    instead say ". [The T] seems to revolve in place without moving.[para]The [color of E] light flares and fades, and you see a symbol gleaming on the surface of [the T].";
 
Ritual-processing rule for rit-speaking the Relative Anima:
    say "You raise your voice in the Relative Anima";
    now rstate bestates RSFailed;
    let B be the bound of rstate;
    if the number of things in B is zero:
        instead say ". Nothing seems to happen.";
    shut down the ritual state;
    if the number of things in B is one:
        say ". [The random thing in B] shifts slightly, but there is no other effect";
    else:
        say ". [The list of things *in B] shift towards each other";
    instead say ". The ritual bound slowly fades."
 
 
Ritual-processing rule for rit-speaking the Mediate Anima when at RSFulcrumSymboled and the rstate-solo is a pebble:
    say "You raise your voice in the Mediate Anima";
    let T be the rstate-solo;
    shut down the ritual state;
    retire T by ritual;
    instead say ". [The T] seems to twist violently in place without moving -- and then it explodes into a puff of dust. The bound goes dark."
 
Ritual-processing rule for rit-speaking the Mediate Anima when at RSBronzeMagnetChimed and the rstate-solo is a chime:
    say "You raise your voice in the Mediate Anima";
    let B be the bound of rstate;
    let E be the env of rstate;
    let T be the rstate-solo;
    unless the ritual environment of the location is anchor-env:
        shut down the ritual state;
        instead say ". But your concentration slips, distracted by the altered environment, and the binding refuses to take hold.[para]The bound goes dark.";
    if T is inscribed:
        shut down the ritual state;
        set pronouns from T;
        instead say ". [The T] resonates again, this time with a deep vibration that buzzes against the bound's surface. The symbol inscribed on the chime does not change, however, and the [color of E] light slowly fades.";
    if T is the F-sharp-chime:
        [the bronze F-sharp is an aluminum-magnet. Useless in the game.]
        inscribe T with attraction-symbol;
        mark alum-magnet-inscription as done;
        shut down the ritual state;
        set pronouns from T;
        instead say ". [The T] resonates again, this time with a deep vibration that buzzes against the bound's surface.[para]The [color of E] light flares and fades, and you see a symbol gleaming on the surface of [the T].";
    if T is the B-chime:
        inscribe T with attraction-symbol;
        mark bronze-magnet-inscription as done;
        shut down the ritual state;
        set pronouns from T;
        instead say ". [The T] resonates again, this time with a deep vibration that buzzes against the bound's surface.[para]The [color of E] light flares and fades, and you see a symbol gleaming on the surface of [the T].";
    [inscribing a glass chime -- should never get here.]
    shut down the ritual state;
    instead say ". [The T] resonates again, this time with a queer, off-key note. The [color of E] light slowly fades."
 
Ritual-processing rule for rit-speaking the Mediate Anima:
    say "You raise your voice in the Mediate Anima";
    now rstate bestates RSFailed;
    let B be the bound of rstate;
    if the number of things in B is zero:
        instead say ". Nothing seems to happen.";
    shut down the ritual state;
    if the number of things in B is one:
        say ". [The random thing in B] shifts slightly, but there is no other effect. The";
    else:
        say ". [The list of things *in B] shift slightly away from each other. Then the";
    instead say " ritual bound slowly fades."
 
Ritual-processing rule for rit-speaking the binding-antipathy when at RSChymicStart and the bound of rstate is the retort and the reservoir comprises saline-subst and the retort contains exactly the mushroom and the mustard:
    say "You begin invoking the Binding of Antipathy, forcing out the bitter phrases";
    unless the heating-time of the reservoir >= 3:
        instead say ". The saline ripples, but you see no sign of a chymic reaction. It must not be hot enough.";
    if the fungicide is on-stage:
        retire the mustard by ritual;
        now the reservoir comprises chalky-paste-subst;
        fix up the substance of the reservoir;
        now rstate bestates RSFailed;
        say ". Gradually the mustard seeds dissolve; then the solution curdles to a chalky paste.[para]";
        instead invoke duplicate-ritual for the fungicide;
    now the player carries the mushroom;
    now the mushroom is moist;
    now the player carries the fungicide;
    retire the mustard by ritual;
    mark fungicide-creation as done;
    shut down the ritual state;
    shut down the retort;
    instead say ". Gradually the mustard seeds dissolve, and the saline solution acquires a lavender tint. Purple fumes begin to fill the retort.[para]When you finish choking out the formula, the liquid is deep purple in hue. You find an empty vial in the clutter and tap the fungicide from the retort. Phew! It smells [em]awful.[/em] You snap the vial shut.[para]As an afterthought, you shut off the gas flame. You also pull the retort's dump lever -- the mushroom falls out into your hand. It's damp, but none the worse for wear."
 
Ritual-processing rule for rit-speaking the binding-antipathy when at RSChymicStart and the bound of rstate is the retort and the reservoir comprises saline-subst and the retort contains exactly the coral and the mustard:
    say "You begin invoking the Binding of Antipathy, forcing out the bitter phrases";
    unless the heating-time of the reservoir >= 3:
        instead say ". The saline ripples, but you see no sign of a chymic reaction. It must not be hot enough.";
    if the coralicide is on-stage:
        retire the mustard by ritual;
        now the reservoir comprises chalky-paste-subst;
        fix up the substance of the reservoir;
        now rstate bestates RSFailed;
        say ". Gradually the mustard seeds dissolve; then the solution curdles to a chalky paste.[para]";
        instead invoke duplicate-ritual for the coralicide;
    now the player carries the coralicide;
    retire the coral by ritual;
    retire the mustard by ritual;
    mark coralicide-creation as done;
    shut down the ritual state;
    shut down the retort;
    instead say ". Gradually the coral and the mustard seeds dissolve, and the saline solution acquires a rosy tint. Pink fumes begin to fill the retort.[para]When you finish choking out the formula, the liquid is bright pink in hue. You find an empty vial in the clutter and tap the potion from the retort. It has a bitter stink to it. With luck, this will act as a coralicide.[para]As an afterthought, you shut off the gas flame."
 
Ritual-processing rule for rit-speaking the binding-antipathy when at RSChymicStart and the bound of rstate is the retort and the reservoir comprises saline-subst and the retort contains the mustard and the retort contains a wood-splint (called T):
    say "You begin invoking the Binding of Antipathy, forcing out the bitter phrases";
    unless the heating-time of the reservoir >= 3:
        instead say ". The saline ripples, but you see no sign of a chymic reaction. It must not be hot enough.";
    say ". Gradually [the T] and the mustard seeds dissolve";
    retire T by ritual;
    retire the mustard by ritual;
    now the reservoir comprises brown-paste-subst;
    fix up the substance of the reservoir;
    now rstate bestates RSFailed;
    instead say ". The saline solution acquires a brown tint, thickens, and congeals into a nasty-looking paste. That doesn't look good."
 
Ritual-processing rule for rit-speaking the binding-antipathy when at RSChymicStart and the bound of rstate is the retort and the reservoir comprises saline-subst and the retort contains exactly the pinecone and the mustard:
    say "You begin invoking the Binding of Antipathy, forcing out the bitter phrases";
    unless the heating-time of the reservoir >= 3:
        instead say ". The saline ripples, but you see no sign of a chymic reaction. It must not be hot enough.";
    say ". Gradually the pinecone and the mustard seeds dissolve";
    retire the pinecone by ritual;
    retire the mustard by ritual;
    now the reservoir comprises brown-paste-subst;
    fix up the substance of the reservoir;
    now rstate bestates RSFailed;
    instead say ". The saline solution acquires a brown tint, thickens, and congeals into a nasty-looking paste. That doesn't look good."
 
Ritual-processing rule for rit-speaking the binding-antipathy when at RSChymicStart and the bound of rstate is the retort and the reservoir comprises saline-subst and the retort contains exactly the rosemary and the mustard:
    say "You begin invoking the Binding of Antipathy, forcing out the bitter phrases";
    unless the heating-time of the reservoir >= 3:
        instead say ". The saline ripples, but you see no sign of a chymic reaction. It must not be hot enough.";
    say ". Gradually the rosemary and the mustard seeds dissolve";
    retire the rosemary by ritual;
    retire the mustard by ritual;
    now the reservoir comprises brown-paste-subst;
    fix up the substance of the reservoir;
    now rstate bestates RSFailed;
    instead say ". The saline solution acquires a brown tint, thickens, and congeals into a nasty-looking paste. That doesn't look good."
 
Ritual-processing rule for rit-speaking the binding-antipathy when at RSChymicStart and the bound of rstate is the retort and the reservoir comprises saline-subst and the retort contains exactly the honeysuckle and the mustard:
    say "You begin invoking the Binding of Antipathy, forcing out the bitter phrases";
    unless the heating-time of the reservoir >= 3:
        instead say ". The saline ripples, but you see no sign of a chymic reaction. It must not be hot enough.";
    say ". Gradually the honeysuckle and the mustard seeds dissolve";
    retire the honeysuckle by ritual;
    retire the mustard by ritual;
    now the reservoir comprises brown-paste-subst;
    fix up the substance of the reservoir;
    now rstate bestates RSFailed;
    instead say ". The saline solution acquires a brown tint, thickens, and congeals into a nasty-looking paste. That doesn't look good."
 
Ritual-processing rule for rit-speaking the binding-antipathy when at RSChymicStart and the bound of rstate is the retort and the reservoir comprises saline-subst and the retort contains exactly the feather and the mustard:
    say "You begin invoking the Binding of Antipathy, forcing out the bitter phrases";
    unless the heating-time of the reservoir >= 3:
        instead say ". The saline ripples, but you see no sign of a chymic reaction. It must not be hot enough.";
    retire the feather by ritual;
    retire the mustard by ritual;
    shut down the ritual state;
    shut down the retort;
    instead say ". Gradually the feather and the mustard seeds dissolve, and yellow fumes begin to fill the retort.[para]When you finish choking out the formula, the liquid is still clear. It's possible that you have invented a bird repellant, but you can't think of any possible use for such a thing, so you just pull the dump lever and shut off the gas."
 
Ritual-processing rule for rit-speaking the binding-antipathy when at RSChymicStart and the bound of rstate is the retort and the reservoir comprises saline-subst and the retort contains the mushroom:
    say "You begin invoking the Binding of Antipathy, forcing out the bitter phrases";
    unless the heating-time of the reservoir >= 3:
        instead say ". The saline ripples, but you see no sign of a chymic reaction. It must not be hot enough.";
    now the mushroom is moist;
    instead say ". The mushroom rolls around in the simmering solution, but you see no sign of a chymic reaction."
 
Ritual-processing rule for rit-speaking the binding-antipathy when at RSChymicStart and the bound of rstate is the retort and the reservoir comprises saline-subst and the retort contains the coral:
    say "You begin invoking the Binding of Antipathy, forcing out the bitter phrases";
    unless the heating-time of the reservoir >= 3:
        instead say ". The saline ripples, but you see no sign of a chymic reaction. It must not be hot enough.";
    instead say ". The coral rolls around in the simmering solution, but you see no sign of a chymic reaction."
 
Ritual-processing rule for rit-speaking the binding-antipathy when at RSChymicStart and the bound of rstate is the retort and the reservoir comprises saline-subst and the retort contains the mustard:
    say "You begin invoking the Binding of Antipathy, forcing out the bitter phrases";
    unless the heating-time of the reservoir >= 3:
        instead say ". The saline ripples, but you see no sign of a chymic reaction. It must not be hot enough.";
    instead say ". The mustard seeds roll around in the simmering solution, but you see no sign of a chymic reaction."
 
Ritual-processing rule for rit-speaking the binding-antipathy when at RSSolventAnaphylaxed and the bound of rstate is the retort and the reservoir comprises black-reagent-subst and the retort contains exactly nothing:
    say "You begin invoking the Binding of Antipathy, forcing out the bitter phrases";
    if the mineral-used of rstate is no-thing:
        [no state change]
        instead say ". The black reagent seethes. But when you finish choking out the formula, the liquid has not changed.";
    if the mineral-used of rstate is nonexistent-stone:
        shut down the ritual state;
        shut down the retort;
        instead say ". The black reagent seethes, bubbles violently, and then vaporizes into a nasty-looking cloud. You hurriedly flush out the retort before it eats through the glass.";
    let T be the solvent form of the mineral-used of rstate;
    if T is no-thing:
        instead say ". (BUG) Tried to find solvent for unknown mineral.";
    [cannot already exist due to prereqs]
    if the additive-used of rstate is perfect-diamond:
        if there is an rstate-mineral-matching diasolvent-synthesis-action-goal (called G):
            mark G as done;
            now the creation-action of T is G;
        else:
            say ". (BUG) No ritual matching [T] and diamond";
    if the additive-used of rstate is el-earth:
        if there is an rstate-mineral-matching earsolvent-synthesis-action-goal (called G):
            mark G as done;
            now the creation-action of T is G;
        else:
            say ". (BUG) No ritual matching [T] and earth";
    shut down the ritual state;
    shut down the retort;
    now the player carries T;
    set pronouns from T;
    instead say ". The black reagent seethes, and then begins to bubble slightly.[para]By the time you have finished choking out the formula, the black solution has quieted. It seems less viscous now. You tap the solvent into a fresh vial -- which doesn't dissolve, you are happy to see, so you've probably gotten the ritual right.[first time][br][sarge]Nice work, kid.[/sarge][br][only]"
 
Ritual-processing rule for rit-speaking the binding-antipathy when at RSAuraToughenAnaphylaxed:
    say "You begin invoking the Binding of Antipathy, forcing out the bitter phrases";
    let B be the bound of rstate;
    let E be the env of rstate;
    unless the number of things in B is two:
        shut down the ritual state;
        instead say ". The [color of E] light blinks twice and goes dead.";
    unless the primary-obj of rstate is a quartz-prism and the secondary-obj of rstate is orichalcum:
        shut down the ritual state;
        instead say ". The [color of E] light blinks thrice and goes dead.";
    unless the primary-obj of rstate is in B and the secondary-obj of rstate is in B:
        shut down the ritual state;
        instead say ". The [color of E] light blinks thrice and goes dead.";
    unless the aroma of the location is citronelle:
        shut down the ritual state;
        instead say ".[para]After long moments, your lips start going numb. You continue choking out the words, but your mouth feels swollen and ungainly. Finally a syllable slips out of place, and the [color of E] light goes dead.";
    say ".[para]After long moments, your lips start going numb; you inhale the lemony aroma, which seems to soothe them, and continue chanting. Soon the [color of E] light flares, and the orichalcum rod begins to dissolve into the quartz";
    let T be the primary-obj of rstate;
    mark the aura-toughen-inscription as done;
    retire the orichalcum by ritual;
    if T is inscribed and the symbol-type of T is not impermeability-symbol:
        let old-symbol be the symbol-type of T;
        inscribe T with impermeability-symbol;
        let E be the env of rstate;
        shut down the ritual state;
        instead say ".[para]The [old-symbol] symbol on [the T] begins to oscillate. When the bound fades, you see [the T] now carries a symbol of [impermeability-symbol].";
    if T is inscribed:
        shut down the ritual state;
        instead say ".[para]The symbol on [the T] rings like a crystal chime. It does not otherwise change, however. The bound slowly dims, and the ritual dissipates.";
    inscribe T with impermeability-symbol;
    shut down the ritual state;
    set pronouns from T;
    instead say ".[para]When the orichalcum is entirely gone, a symbol shines on the surface of [the T]."
 
Ritual-processing rule for rit-speaking the binding-antipathy when at RSScalpelNatured and the rstate-solo is the scalpel:
    say "You begin invoking the Binding of Antipathy, forcing out the bitter phrases";
    let E be the env of rstate;
    if the scalpel is dirty:
        shut down the ritual state;
        instead say ".[para]The scalpel feels out of tune, however. Finally a syllable slips out of place, and the [color of E] light goes dead.";
    let M be the aroma of the location;
    if M is not no-odor:
        shut down the ritual state;
        instead say ".[para]You find the [if M is many-odor]atmosphere's aromas[else][M] aroma[end if] distracting, however. Finally a syllable slips out of place, and the [color of E] light goes dead.";
    if the scalpel is inscribed:
        shut down the ritual state;
        instead say ".[para]The symbol on the scalpel rings like a crystal chime. It does not otherwise change, however. The bound slowly dims, and the ritual dissipates.";
    mark scalpel-inscription as done;
    shut down the ritual state;
    set pronouns from the scalpel;
    inscribe the scalpel with prophylaxis-symbol;
    instead say ".[para]After several long minutes of chanting, the [color of E] light flares and goes out. The scalpel now carries a symbol of [prophylaxis-symbol]."
 
Ritual-processing rule for rit-speaking the binding-antipathy when the rstate-solo is the scalpel:
    say "You begin invoking the Binding of Antipathy, forcing out the bitter phrases";
    [scalpel failures -- various mistakes]
    let E be the env of rstate;
    if the scalpel is dirty:
        shut down the ritual state;
        instead say ".[para]The scalpel feels out of tune, however. Finally a syllable slips out of place, and the [color of E] light goes dead.";
    let M be the aroma of the location;
    if M is not no-odor:
        shut down the ritual state;
        instead say ".[para]You find the [if M is many-odor]atmosphere's aromas[else][M] aroma[end if] distracting, however. Finally a syllable slips out of place, and the [color of E] light goes dead.";
    shut down the ritual state;
    instead say ".[para]The words feel thicker and thicker in your mouth. Finally a syllable slips out of place, and the [color of E] light goes dead."
 
Ritual-processing rule for rit-speaking the binding-antipathy:
    say "You begin invoking the Binding of Antipathy, forcing out the bitter phrases";
    let B be the bound of rstate;
    let N be the number of things in B;
    if B is the retort and N is at least two:
        let E be the env of rstate;
        shut down the ritual state;
        say ".[para]The words become more difficult, moment by moment. You strain against the pressure, until -- in the middle of one choked syllable -- your tongue slips. [em]Crash![/em] The [color of E] light dies, and [the list of not scenery things *in B] [if N is 2]goes[else]go[end if] bouncing around the inside of the retort";
        instead say ".";
    if N is at least two:
        let E be the env of rstate;
        shut down the ritual state;
        say ".[para]The words become more difficult, moment by moment. You strain against the pressure, until -- in the middle of one choked syllable -- your tongue slips. [em]Crash![/em] The [color of E] light dies, and [the list of things *in B] go flying across the room";
        now everything in B is in the location;
        instead say ".";
    now rstate bestates RSFailed;
    instead say ". But nothing seems to happen."
 
 
Ritual-processing rule for rit-speaking counterbalance when at RSFireResistStart and the rstate-solo is beaker and the substance of the beaker is saline-subst:
    say "You speak the [counterbalance]";
    let R be the aroma of the location;
    if R is:
        -- peppermint:
            now the rstate bestates RSFireResistMintCountered;
            instead say ". The contents of the beaker ripple, and a wisp of blue-green steam rises from it.";
        -- ginger:
            now the rstate bestates RSFireResistGingerCountered;
            instead say ". The contents of the beaker ripple, and a wisp of golden steam rises from it.";
        -- citronelle:
            now the rstate bestates RSFailed;
            instead say ". The contents of the beaker ripple, and a wisp of greenish, sweet-smelling steam rises from it.";
        -- kelp:
            now the rstate bestates RSFailed;
            instead say ". The contents of the beaker ripple and foam a bit.";
        -- eucalyptus:
            now the rstate bestates RSFailed;
            instead say ". The contents of the beaker ripple greasily.";
        -- otherwise:
            now the rstate bestates RSFailed;
            instead say ". The contents of the beaker ripple[if R is many-odor] murkily[end if].";
 
Ritual-processing rule for rit-speaking counterbalance when at RSClockMudded and the rstate-solo is beaker and the substance of the beaker is clock-paste-subst:
    say "You speak the [counterbalance]";
    now the rstate bestates RSClockCountered;
    instead say ". The paste roils gently in the beaker.";
 
Ritual-processing rule for rit-speaking counterbalance when at RSResonantOculusToned:
    say "You speak the [counterbalance]";
    say ". Aitheric forces eddy around the room, and then swirl in around the silver bound";
    if the rstate-solo is the oculus:
        shut down the ritual state;
        instead say ".[para]The oculus hums; the aitheric vortex tightens and vanishes in a silver flash. However, the oculus changes no further.";
    unless the rstate-solo is glass-loop:
        shut down the ritual state;
        instead say ". But the focus is askew; the forces skirl off each other and dissipate.[para]The bound goes dark.";
    unless the aroma of the location is no-odor:
        shut down the ritual state;
        instead say ". But your concentration slips, distracted by the impure atmosphere, and the forces escape your grasp.[para]The bound goes dark.";
    unless the ritual environment of the location is lunar-env:
        shut down the ritual state;
        instead say ". But your concentration slips, distracted by the altered environment, and the forces escape your grasp.[para]The bound goes dark.";
    [cannot already exist due to prereqs]
    let B be the bound of rstate;
    retire the glass-loop by transformation into the oculus;
    now the oculus is in B;
    set pronouns from the oculus;
    mark the oculus-creation as done;
    shut down the ritual state;
    instead say ". The [glass-loop] hums, responding to the vibration you imparted. The aitheric vortex tightens, until -- with a silver flash -- it is absorbed into the loop.[para]The glass has acquired the subtle pearly sheen of a working oculus."
 
Ritual-processing rule for rit-speaking counterbalance:
    now rstate bestates RSFailed;
    instead follow the counterbalance-speaking report rule.
 
This is the counterbalance-speaking report rule:
    say "You speak the [counterbalance]";
    say ". ";
    if the env of rstate is:
        -- lunar-env: say "Aitheric forces";
        -- orderly-env: say "Metrical impulses";
        -- fiery-env: say "Thermal forces";
        -- fierier-env: say "Thermal forces";
        -- arctic-env: say "Counterthermal forces";
        -- tidal-env: say "Rhythmic forces";
        -- spiritual-env: say "Spiritual forces";
        -- exhilarant-env: say "Giddy forces";
        -- helian-env: say "Aitheric forces";
        -- anchor-env: say "Slow forces";
        -- earthy-env: say "Weighty forces";
        -- phlegmatic-env: say "Weighty forces";
        -- quicksilver-env: say "Mercurial forces";
        -- otherwise: say "Forces";
    if rstate is failed:
        instead say " eddy around the room, and then settle.";
    else:
        instead say " eddy eagerly around the room."
 
 
Ritual-processing rule for rit-speaking resonant-tone when at RSResonantOculusStart and the rstate-solo is loop-or-loop:
    now rstate bestates RSResonantOculusToned;
    instead follow the resonant-tone-speaking report rule.
 
Ritual-processing rule for rit-speaking resonant-tone when at RSGlassPassSanded and the rstate-solo is a chime:
    now rstate bestates RSGlassPassToned;
    instead follow the resonant-tone-speaking report rule.
 
Ritual-processing rule for rit-speaking resonant-tone when at RSBronzeMagnetBurned and the rstate-solo is a chime:
    now rstate bestates RSBronzeMagnetToned;
    instead follow the resonant-tone-speaking report rule.
 
Ritual-processing rule for rit-speaking resonant-tone:
    now rstate bestates RSFailed;
    instead follow the resonant-tone-speaking report rule.
 
This is the resonant-tone-speaking report rule:
    let B be the bound of rstate;
    let N be the number of things in B;
    say "You hum the [resonant-tone]";
    if N is zero:
        instead say ". Nothing responds.";
    if N is greater than one:
        instead say ". [The list of things *in B] shift slightly against each other.";
    let T be a random thing in B;
    instead say ". The [T] vibrates [if rstate is failed]gently[else]sharply[end if] in response.";
 
 
Ritual-processing rule for rit-speaking the Lesser Phlogistical Saturation when at RSSuckerIgnited and the rstate-solo is the beaker and the beaker comprises sucker-crimson-subst:
    [fire-sucker failure -- wrong saturation]
    say "You begin the Lesser Phlogistical Saturation. The sounds try to bend and smear on your lips, but you are on your guard, and you hold clearly to the formula";
    shut down the ritual state;
    now the beaker comprises yellowish-subst;
    fix up the substance of the beaker;
    instead say ". Sparks crackle through the crimson liquid for a moment.[para]The bound fades. But the liquid fades as well, to a straw-yellow. Apparently the compound wasn't sufficiently fixed."
 
Ritual-processing rule for rit-speaking the Lesser Phlogistical Saturation when at RSVacuumAnodyned and the rstate-solo is the beaker and the beaker comprises breath-bubbly-subst:
    [vacuum protection failure -- wrong saturation]
    say "You begin the Lesser Phlogistical Saturation. The sounds try to bend and smear on your lips, but you are on your guard, and you hold clearly to the formula";
    let E be the env of rstate;
    shut down the ritual state;
    discard the beaker;
    instead say ".[para]The energy slowly converges, and the bubbling of the solution increases to a rolling boil. The [color of E] light flares -- and the contents of the beaker splatter across the bound. Oh dear.[para]You clear away the empty beaker.";
 
Ritual-processing rule for rit-speaking the Lesser Phlogistical Saturation when at RSRustRemoverSprigged:
    say "You begin the Lesser Phlogistical Saturation. The sounds try to bend and smear on your lips, but you are on your guard, and you hold clearly to the formula";
    let T be the rstate-solo;
    unless T is brass-pin or T is steel-bolt:
        shut down the ritual state;
        tutor tut-step-saturation;
        instead say ". But the energy gutters out, unable to focus on a subject in the bound.[para]The bound flickers and goes dark as the ritual fails.";
    unless the env of rstate is fire-based and the ritual environment of the location is fire-based:
        shut down the ritual state;
        tutor tut-step-saturation;
        instead say ".[para]The energy comes together oddly. You inhale, trying to keep the ritual in tune, but the atmosphere must not be right. The bound flashes into a bright streak of many colors, and then goes dark.";
    if T is inscribed and the symbol-type of T is not saturation-symbol:
        let old-symbol be the symbol-type of T;
        inscribe T with saturation-symbol;
        mark the basic-saturation-ritual for T as done;
        let E be the env of rstate;
        shut down the ritual state;
        tutor tut-step-success with T;
        instead say ".[para]The energy converges, and the [old-symbol] symbol on [the T] begins to oscillate. The [color of E] light flares; the symbol twists, blurs, and reforms. When the bound fades, you see [the T] now carries a symbol of [saturation-symbol].";
    if T is inscribed:
        shut down the ritual state;
        tutor tut-step-success with T;
        instead say ".[para]The energy converges, and the symbol on [the T] rings like a bell. It does not otherwise change, however. The bound slowly dims, and the ritual dissipates.";
    inscribe T with saturation-symbol;
    mark the basic-saturation-ritual for T as done;
    let E be the env of rstate;
    shut down the ritual state;
    tutor tut-step-success with T;
    set pronouns from T;
    instead say ".[para]The energy slowly converges. The [color of E] light flares, drawing together the blended aromas and the words that you speak.[para]When the light fades, a symbol shines on the surface of [the T]."
 
Ritual-processing rule for rit-speaking the Lesser Phlogistical Saturation when at RSRustRemoverConed:
    say "You begin the Lesser Phlogistical Saturation. It's harder this time -- more intense -- but you hold clearly to the formula";
    let T be the rstate-solo;
    unless T is brass-pin or T is steel-bolt:
        shut down the ritual state;
        instead say ". But the energy gutters out, unable to focus on a subject in the bound.[para]The bound flickers and goes dark as the ritual fails.";
    unless the env of rstate is fire-based and the ritual environment of the location is fire-based:
        shut down the ritual state;
        instead say ".[para]The energy comes together oddly. You inhale, trying to keep the ritual in tune, but the atmosphere must not be right. The bound flashes into a bright streak of many colors, and then goes dark.";
    if T is inscribed and the symbol-type of T is not supersaturation-symbol:
        let old-symbol be the symbol-type of T;
        inscribe T with supersaturation-symbol;
        mark the super-saturation-ritual for T as done;
        let E be the env of rstate;
        shut down the ritual state;
        instead say ".[para]The energy converges, and the [old-symbol] symbol on [the T] begins to oscillate. The [color of E] light flares; the symbol twists, blurs, and reforms. When the bound fades, you see [the T] now carries a symbol of [supersaturation-symbol].";
    if T is inscribed:
        shut down the ritual state;
        instead say ".[para]The energy converges, and the symbol on [the T] rings like a bell. It does not otherwise change, however. The bound slowly dims, and the ritual dissipates.";
    inscribe T with supersaturation-symbol;
    mark the super-saturation-ritual for T as done;
    let E be the env of rstate;
    shut down the ritual state;
    set pronouns from T;
    instead say ".[para]The energy pulses and converges. The [color of E] light goes blinding-bright, drawing together the blended aromas and the words that you speak.[para]When the light fades, a symbol shines on the surface of [the T]."
 
Ritual-processing rule for rit-speaking the Lesser Phlogistical Saturation when at RSGenRustRemoverLubaned:
    say "You begin the Lesser Phlogistical Saturation. The sounds fight fiercely, but you master them";
    let T be the rstate-solo;
    unless T is brass-pin or T is steel-bolt:
        shut down the ritual state;
        instead say ". But the energy gutters out, unable to focus on a subject in the bound.[para]The bound flickers and goes dark as the ritual fails.";
    unless the env of rstate is catalytic-env and the ritual environment of the location is catalytic-env:
        shut down the ritual state;
        instead say ".[para]The energy comes together oddly. You inhale, trying to keep the ritual in tune, but the atmosphere must not be right. The bound flashes into a bright streak of many colors, and then goes dark.";
    if T is inscribed and the symbol-type of T is not gensaturation-symbol:
        let old-symbol be the symbol-type of T;
        inscribe T with gensaturation-symbol;
        mark the gen-saturation-ritual for T as done;
        let E be the env of rstate;
        shut down the ritual state;
        instead say ".[para]The energy converges, and the [old-symbol] symbol on [the T] begins to oscillate. The [color of E] light flares; the symbol twists, blurs, and reforms. When the bound fades, you see [the T] now carries a symbol of [gensaturation-symbol].";
    if T is inscribed:
        shut down the ritual state;
        instead say ".[para]The energy converges, and the symbol on [the T] rings like a bell. It does not otherwise change, however. The bound slowly dims, and the ritual dissipates.";
    inscribe T with gensaturation-symbol;
    mark the gen-saturation-ritual for T as done;
    let E be the env of rstate;
    shut down the ritual state;
    set pronouns from T;
    instead say ".[para]The energy pulses and converges. The [color of E] light goes blinding-bright, drawing together the blended aromas and the words that you speak.[para]When the light fades, a symbol shines on the surface of [the T]."
 
Ritual-processing rule for rit-speaking the Lesser Phlogistical Saturation:
    say "You begin the Lesser Phlogistical Saturation. The sounds try to bend and smear on your lips, but you are on your guard, and you hold clearly to the formula";
    now rstate bestates RSFailed;
    let T be the rstate-solo;
    if T is not no-thing and the env of rstate is fire-based and the ritual environment of the location is fire-based:
        [failed RSRustRemover -- wrong sealing, wrong item, no rosemary/pinecone]
        let E be the env of rstate;
        shut down the ritual state;
        tutor tut-step-saturation;
        instead say ".[para]The energy slowly converges. The [color of E] light flares... but [the T] seems to vibrate, and the ritual energy passes through it without leaving a trace. The bound dims and goes out; the ritual dissipates.";
    tutor tut-step-saturation;
    instead say ". Nonetheless, something must be wrong; the words seem to fall flat.";
 
 
Ritual-processing rule for rit-speaking the Greater Phlogistical Saturation when at RSSuckerIgnited and the rstate-solo is the beaker and the beaker comprises sucker-crimson-subst:
    say "You begin the Greater Phlogistical Saturation. The tonal vowels and labial stops require all your concentration, but you manage to hold them in place";
    unless the env of rstate is fierier-env and the ritual environment of the location is fierier-env:
        shut down the ritual state;
        instead say ".[para]The energy comes together oddly. You try to keep the ritual in tune, but the atmosphere must not be right. The bound flashes into a bright streak of many colors, and then goes dark.";
    if the fire-sucker is on-stage:
        now the beaker comprises chalky-paste-subst;
        fix up the substance of the beaker;
        now rstate bestates RSFailed;
        say ". Sparks crackle through the crimson liquid for a moment; then it curdles to a chalky paste.[para]";
        instead invoke duplicate-ritual for the fire-sucker;
    mark fire-sucker-creation as done;
    shut down the ritual state;
    discard the beaker;
    now the player carries the fire-sucker;
    set pronouns from the fire-sucker;
    instead say ". Sparks crackle through the crimson liquid for a moment.[para]The bound fades. Is that all? Apparently that's all. You lift the beaker and gently decant the red potion into a fresh bottle."
 
Ritual-processing rule for rit-speaking the Greater Phlogistical Saturation when at RSSuckerStart and the rstate-solo is the beaker and the beaker comprises alcohol-subst:
    say "You begin the Greater Phlogistical Saturation. The tonal vowels and labial stops require all your concentration, but you manage to hold them in place";
    [fire-sucker failure -- no fire used]
    shut down the ritual state;
    discard the beaker;
    instead say ".[para]Sparks crackle through the alcohol, and it erupts in a splatter of blue flame. The bound goes dark.[para]Hardly successful. You clear away the mess and the beaker."
 
Ritual-processing rule for rit-speaking the Greater Phlogistical Saturation when at RSSuckerWeakStart and the rstate-solo is the beaker and the beaker comprises alcohol-subst:
    say "You begin the Greater Phlogistical Saturation. The tonal vowels and labial stops require all your concentration, but you manage to hold them in place";
    [fire-sucker failure -- no fire used]
    shut down the ritual state;
    discard the beaker;
    instead say ".[para]Sparks crackle through the alcohol, and it erupts in a splatter of blue flame. The bound goes dark.[para]Hardly successful. You clear away the mess and the beaker."
 
Ritual-processing rule for rit-speaking the Greater Phlogistical Saturation when at RSSuckerWeakIgnited and the rstate-solo is the beaker and the beaker comprises clear-subst:
    say "You begin the Greater Phlogistical Saturation. The tonal vowels and labial stops require all your concentration, but you manage to hold them in place";
    [fire-sucker failure -- wrong env]
    shut down the ritual state;
    discard the beaker;
    instead say ".[para]Sparks crackle through the clear liquid for a moment.[para]The bound fades. Is that all? No -- the liquid begins to steam. In moments it has all evaporated, leaving nothing but an astringent smell.[para]Apparently [em]that's[/em] all. You clear away the empty beaker."
 
Ritual-processing rule for rit-speaking the Greater Phlogistical Saturation when at RSVacuumAnodyned and the rstate-solo is the beaker and the beaker comprises breath-bubbly-subst:
    say "You begin the Greater Phlogistical Saturation. The tonal vowels and labial stops require all your concentration, but you manage to hold them in place";
    unless the env of rstate is exhilarant-env and the ritual environment of the location is exhilarant-env:
        shut down the ritual state;
        instead say ".[para]The energy comes together oddly. You try to keep the ritual in tune, but the atmosphere must not be right. The bound flashes into a bright streak of many colors, and then goes dark.";
    if the vacuum-protection is on-stage:
        now the beaker comprises chalky-paste-subst;
        fix up the substance of the beaker;
        now rstate bestates RSFailed;
        say ". The solution bubbles furiously, and then curdles to a chalky paste.[para]";
        instead invoke duplicate-ritual for the vacuum-protection;
    mark vacuum-protection-creation as done;
    shut down the ritual state;
    discard the beaker;
    [the player can't already have it, because there's only one dose of highlime]
    now the player carries the vacuum-protection;
    set pronouns from the vacuum-protection;
    instead say ". The bubbling of the solution increases to a rolling boil, and then ceases abruptly.[para]The bound fades. You lift the beaker and gently decant the clear potion into a fresh bottle."
 
Ritual-processing rule for rit-speaking the Greater Phlogistical Saturation when at RSRustRemoverSprigged:
    [rust remover failure -- wrong saturation]
    say "You begin the Greater Phlogistical Saturation. The tonal vowels and labial stops require all your concentration, but you manage to hold them in place";
    let T be the rstate-solo;
    unless T is brass-pin or T is steel-bolt:
        shut down the ritual state;
        instead say ". But the energy gutters out, unable to focus on a subject in the bound.[para]The bound flickers and goes dark as the ritual fails.";
    retire T by ritual;
    shut down the ritual state;
    instead say " -- until the energy surges out of control.[para]The bound flickers wildly and fades, and [the T] catches fire. You stare in horror as it burns away entirely."
 
Ritual-processing rule for rit-speaking the Greater Phlogistical Saturation when at RSRustRemoverConed:
    [super-rust remover failure -- wrong saturation]
    say "You begin the Greater Phlogistical Saturation. The tonal vowels and labial stops require all your concentration, but you manage to hold them in place";
    let T be the rstate-solo;
    unless T is brass-pin or T is steel-bolt:
        shut down the ritual state;
        instead say ". But the energy gutters out, unable to focus on a subject in the bound.[para]The bound flickers and goes dark as the ritual fails.";
    retire T by ritual;
    shut down the ritual state;
    instead say " -- until the energy surges out of control.[para]The bound flickers wildly and fades, and [the T] catches fire. You stare in horror as it burns away entirely."
 
Ritual-processing rule for rit-speaking the Greater Phlogistical Saturation when at RSGenRustRemoverLubaned:
    [general rust remover failure -- wrong saturation]
    say "You begin the Greater Phlogistical Saturation. The tonal vowels and labial stops require all your concentration, but you manage to hold them in place";
    let T be the rstate-solo;
    unless T is brass-pin or T is steel-bolt:
        shut down the ritual state;
        instead say ". But the energy gutters out, unable to focus on a subject in the bound.[para]The bound flickers and goes dark as the ritual fails.";
    retire T by ritual;
    shut down the ritual state;
    instead say " -- until the energy surges out of control.[para]The bound flickers wildly and fades, and [the T] catches fire. You stare in horror as it burns away entirely."
 
Ritual-processing rule for rit-speaking the Greater Phlogistical Saturation when at RSIntensionalBallastZafranumed:
    say "You begin the Greater Phlogistical Saturation. The tonal vowels and labial stops require all your concentration, but you manage to hold them in place";
    let T be the rstate-solo;
    unless T is brass-pin:
        shut down the ritual state;
        instead say ". But the energy gutters out, unable to focus on a subject in the bound.[para]The bound flickers and goes dark as the ritual fails.";
    unless the env of rstate is catalytic-env and the ritual environment of the location is catalytic-env:
        shut down the ritual state;
        instead say ".[para]The energy comes together oddly. You inhale, trying to keep the ritual in tune, but the atmosphere must not be right. The bound flashes into a bright streak of many colors, and then goes dark.";
    if T is inscribed and the symbol-type of T is not fixation-symbol:
        let old-symbol be the symbol-type of T;
        inscribe T with fixation-symbol;
        now the fixit-brass-inscription is unlit;
        mark the fixit-brass-inscription as done;
        let E be the env of rstate;
        shut down the ritual state;
        instead say ".[para]The energy converges, and the [old-symbol] symbol on [the T] begins to oscillate. The [color of E] light flares; the symbol twists, blurs, and reforms. When the bound fades, you see [the T] now carries a symbol of [fixation-symbol].";
    if T is inscribed:
        shut down the ritual state;
        instead say ".[para]The energy converges, and the symbol on [the T] rings like a bell. It does not otherwise change, however. The bound slowly dims, and the ritual dissipates.";
    inscribe T with fixation-symbol;
    now the fixit-brass-inscription is unlit;
    mark the fixit-brass-inscription as done;
    let E be the env of rstate;
    shut down the ritual state;
    set pronouns from T;
    instead say ".[para]The energy pulses and converges. The [color of E] light goes blinding-bright, drawing together the blended aromas and the words that you speak.[para]When the light fades, a symbol shines on the surface of [the T]."
 
Ritual-processing rule for rit-speaking the Greater Phlogistical Saturation:
    say "You begin the Greater Phlogistical Saturation. The tonal vowels and labial stops require all your concentration, but you manage to hold them in place";
    now rstate bestates RSFailed;
    let T be the rstate-solo;
    instead say ". Nonetheless, something must be wrong; the words go weak and dry.";
 
Ritual-processing rule for rit-speaking the Phlogistical Catalysis when at RSChymicStart and the bound of rstate is the retort and the reservoir comprises vinegar-subst and the retort contains exactly orichalcum and the burner is alight:
    say "You begin murmuring the Phlogistical Catalysis";
    if the heating-time of the reservoir <= 2:
        instead say ". Neither the vinegar nor the orichalcum seem to respond.";
    if the heating-time of the reservoir >= 6:
        now the burner is not alight;
        now the reservoir comprises no-subst;
        fix up the substance of the reservoir;
        instead say ". Immediately, the orichalcum starts to dissolve, tinting the solution a delicate turquoise.[para]Before you're even halfway through the permutations, the vinegar erupts violently. Oh dear. You shut off the gas flame immediately, but the vinegar is already boiled away. At least the orichalcum rod is undamaged.";
    [cannot already exist due to prereqs]
    mark the viridigris-creation as done;
    retire the orichalcum by ritual;
    shut down the ritual state;
    shut down the retort;
    now the player carries the viridigris;
    set pronouns from the viridigris;
    instead say ". Immediately, the orichalcum starts to dissolve, tinting the solution a delicate turquoise.[para]It takes some time to run through all the permutations. By the time you are done, the orichalcum is gone, and the acid solution has been reduced to a thick turquoise layer. A few moments later, it is entirely dry.[para]You shut off the gas flame, and tap the viridigris powder out into a fresh vial."
 
Ritual-processing rule for rit-speaking the Phlogistical Catalysis when at RSChymicStart and the bound of rstate is the retort and the substance of the reservoir is acidic and the retort contains exactly orichalcum and the burner is alight:
    [viridigris failure -- wrong acid]
    now the rstate bestates RSFailed;
    retire the orichalcum by ritual;
    now the reservoir comprises yellowish-subst;
    fix up the substance of the reservoir;
    instead say ". Immediately, the orichalcum starts to dissolve, tinting the solution a sickly green.[para]It takes some time to run through all the permutations. By the time you are done, the orichalcum is gone. But the solution has faded to a yellowish color, and shows no signs of reducing."
 
Ritual-processing rule for rit-speaking the Phlogistical Catalysis when at RSBrunWooded:
    say "You begin murmuring the Phlogistical Catalysis. It takes some time to run through all the permutations";
    unless the env of rstate is catalytic-env and the ritual environment of the location is catalytic-env:
        shut down the ritual state;
        instead say ".[para]The energy comes together oddly. You try to keep the ritual in tune, but the atmosphere must not be right. The bound flashes into a bright streak of many colors, and then goes dark.";
    let B be the bound of rstate;
    unless the swamp-pith is in B and the swamp-pith is alight:
        if something alight is in B:
            shut down the ritual state;
            now the beaker comprises brown-paste-subst;
            fix up the substance of the beaker;
            instead say ". As you do, smoke swirls around the arc. The surface of the oil shimmers.[para]Slowly, the oil reduces and darkens. By the time your formula is complete, and the bound has faded, the beaker contains only a greasy brown paste.";
        now the beaker comprises unknown-subst;
        fix up the substance of the beaker;
        now rstate bestates RSFailed;
        instead say ". By the time you are finished, the oil has darkened to an oleaginous murk.";
    if the brun-oil is on-stage:
        now the beaker comprises chalky-paste-subst;
        fix up the substance of the beaker;
        now rstate bestates RSFailed;
        say ". When you finish, the oil sizzles and hardens to a chalky paste.[para]";
        instead invoke duplicate-ritual for the brun-oil;
    mark brun-oil-creation as done;
    shut down the ritual state;
    discard the beaker;
    now the swamp-pith is not alight;
    retire the swamp-pith by ritual;
    now the player carries the brun-oil;
    set pronouns from the brun-oil;
    instead say ". As you do, the ripple of heat from the swamp pith begins emitting a thin vapor, which swirls around the arc. The surface of the oil shimmers.[para]Slowly, the oil reduces and darkens. By the time your formula is complete, the beaker contains just a thin film of orange-tinted oil.[para]The bound fades. You lift the beaker and gently decant the yang oil into a fresh bottle."
 
Ritual-processing rule for rit-speaking the Phlogistical Catalysis when not at RSBrunWooded and the beaker is in the bound of rstate and the beaker comprises mineral-oil-subst:
    say "You begin murmuring the Phlogistical Catalysis. It takes some time to run through all the permutations";
    [brun-oil -- various failures]
    if an alight wood-splint is in the bound of rstate:
        shut down the ritual state;
        now the beaker comprises brown-paste-subst;
        fix up the substance of the beaker;
        instead say ". As you do, smoke swirls around the arc. The surface of the oil shimmers.[para]Slowly, the oil reduces and darkens. By the time your formula is complete, and the bound has faded, the beaker contains only a greasy brown paste.";
    now the beaker comprises unknown-subst;
    fix up the substance of the beaker;
    now rstate bestates RSFailed;
    instead say ". By the time you are finished, the oil has darkened to an oleaginous murk."
 
Ritual-processing rule for rit-speaking the Phlogistical Catalysis:
    say "You begin murmuring the Phlogistical Catalysis. It takes some time to run through all the permutations";
    now rstate bestates RSFailed;
    let T be the rstate-solo;
    instead say "; and when you are done, nothing seems to have changed.";
 
 
Ritual-processing rule for rit-speaking the idempotent group when at RSAuraCalcined and the rstate-solo is a quartz-prism:
    now rstate bestates RSAuraInvisibilityIdempoted;
    instead follow the idempotent-group-speaking report rule.
 
Ritual-processing rule for rit-speaking idempotent group:
    now rstate bestates RSFailed;
    instead follow the idempotent-group-speaking report rule.
 
This is the idempotent-group-speaking report rule:
    say "You begin reciting the formulae that make up [the idempotent group]";
    if rstate is failed:
        instead say ". However, you must have missed a lemma; the group elements fail to resolve.";
    instead say ". After a rigorous chain of axioms and lemmas, the group elements resolve to a singleton.";
 
 
Ritual-processing rule for rit-speaking the isomorphic group when at RSAuraCalcined and the rstate-solo is a quartz-prism:
    now rstate bestates RSAuraImitationIsomorphed;
    instead follow the isomorphic-group-speaking report rule.
 
Ritual-processing rule for rit-speaking isomorphic group:
    now rstate bestates RSFailed;
    instead follow the isomorphic-group-speaking report rule.
 
This is the isomorphic-group-speaking report rule:
    say "You begin reciting the formulae that make up [the isomorphic group]";
    if rstate is failed:
        instead say ". However, you must have missed a lemma; the group elements fail to line up.";
    instead say ". After a rigorous chain of axioms and lemmas, the group elements fall into a one-to-one relation.";
 
Ritual-processing rule for rit-speaking symmetric sequence when at RSChymicStart and the retort contains exactly nothing and the reservoir comprises ori-vitriol-subst:
    now rstate bestates RSGaianSequenced;
    instead follow the symmetric-sequence-speaking report rule.
 
Ritual-processing rule for rit-speaking symmetric sequence when at RSMarriageStart:
    now rstate bestates RSSummonDragonSequenced;
    now the additive-used of rstate is the symmetric sequence;
    instead follow the symmetric-sequence-speaking report rule.
 
Ritual-processing rule for rit-speaking symmetric sequence:
    now rstate bestates RSFailed;
    instead follow the symmetric-sequence-speaking report rule.
 
This is the symmetric-sequence-speaking report rule:
    say "You begin reciting the values of the symmetric sequence";
    if rstate is failed:
        instead say ". However, when you reach the end, it doesn't sound the same as the beginning.";
    instead say ". After a few minutes and a bit of counting on your fingers, you reach the end (which is of course the same as the beginning).";
 
Ritual-processing rule for rit-speaking antisymmetric sequence when at RSChymicStart and the retort contains exactly nothing and the reservoir comprises ori-vitriol-subst:
    now rstate bestates RSCounterGaianSequenced;
    instead follow the antisymmetric-sequence-speaking report rule.
 
Ritual-processing rule for rit-speaking antisymmetric sequence when at RSMarriageStart:
    now rstate bestates RSSummonDragonSequenced;
    now the additive-used of rstate is the antisymmetric sequence;
    instead follow the antisymmetric-sequence-speaking report rule.
 
Ritual-processing rule for rit-speaking antisymmetric sequence:
    now rstate bestates RSFailed;
    instead follow the antisymmetric-sequence-speaking report rule.
 
This is the antisymmetric-sequence-speaking report rule:
    say "You begin reciting the values of the antisymmetric sequence";
    if rstate is failed:
        instead say ". However, when you reach the end, it doesn't feel like the opposite of the beginning.";
    instead say ". After a few minutes and a bit of counting on your fingers, you reach the end (which is of course the inverse of the beginning).";
 
Ritual-processing rule for rit-speaking dracon-invocation when at RSSummonDragonSequenced:
    let seq be the additive-used of rstate;
    unless seq is the symmetric sequence or seq is the antisymmetric sequence:
        instead say "(BUG) RSSummonDragonSequenced but no sequence set.";
    if current-mobile-dragon is not no-dragon:
        now rstate bestates RSFailed;
        instead say "You begin rumbling your way through the Dracon Invocation. There's a terrible echo, however, and you soon lose your place.";
    let ET be the current-fulcrum;
    if ET is no-thing:
        now rstate bestates RSFailed;
        instead say "You rumble your way through the Dracon Invocation. There's no sense of resistance, though. It's like spinning a wheel that's not touching the ground, and when you're finished, nothing has changed.";
    if ET is not a pebble:
        instead say "(BUG) RSSummonDragonSequenced and current-fulcrum but no pebble found.";
    if the glyph-used of fulcrum-inscription is no-word:
        instead say "(BUG) RSSummonDragonSequenced and current-fulcrum but no glyph used.";
    let R be the location of ET;
    if the player is in R:
        shut down the ritual state;
        instead say "You begin rumbling your way through the Dracon Invocation.[para]A sense of pressure builds in the air, centered on [the ET]. It's like balancing a ball on itself, though, and it slips almost immediately. The bound goes dark.";
    if R is not dragon-nested:
        shut down the ritual state;
        instead say "You begin rumbling your way through the Dracon Invocation.[para]A sense of pressure builds in the air, but it feels unanchored, loose, unstable. Before the invocation is finished, the pressure slips and slithers away into nothing. The bound goes dark.";
    if the active-dragon is no-dragon:
        shut down the ritual state;
        instead say "You rumble your way through the Dracon Invocation.[para]A sense of pressure builds in the air. The tension grates at your nerves as you come to the invocation's end. But nothing seems to be listening, and the bound goes dark.";
    shut down the ritual state;
    mobilize active dragon dir seq;
    instead say "You rumble your way through the Dracon Invocation.[para]A sense of pressure builds in the air. You feel something move, in the distance. The bound slowly dims."
 
Ritual-processing rule for rit-speaking dracon-invocation when at RSMarriageElemented:
    if the bound of rstate is not chancel-like:
        shut down the ritual state;
        instead say "You rumble your way through the Dracon Invocation.[para]An oppressive weight comes into the air. A flicker of multicolored light begins to play across the writ screen; you can see runes whirling on the other side, in the Chancel.[para]Then, with a [em]snap[/em] that you feel in your guts, the ritual falls apart.";
    if dead-dragon-count < 3:
        instead say "(BUG) RSMarriageElemented, but dead-dragon-count is [dead-dragon-count].";
    if the active-dragon is no-dragon:
        instead say "(BUG) RSMarriageElemented, but active-dragon is no-dragon.";
    if current-mobile-dragon is not no-dragon:
        shut down the ritual state;
        say "You rumble your way through the Dracon Invocation.[para]A sense of pressure builds in the air. The bound slowly dims; [the current-mobile-dragon] slides into the Chancel, through the writ screen";
    else:
        [copy tests from above]
        let ET be the current-fulcrum;
        if ET is no-thing:
            now rstate bestates RSFailed;
            instead say "You rumble your way through the Dracon Invocation. There's no sense of resistance, though. It's like spinning a wheel that's not touching the ground, and when you're finished, nothing has changed.";
        if ET is not a pebble:
            instead say "(BUG) RSMarriageElemented and current-fulcrum but no pebble found.";
        if the glyph-used of fulcrum-inscription is no-word:
            instead say "(BUG) RSMarriageElemented and current-fulcrum but no glyph used.";
        let R be the location of ET;
        if the player is in R:
            shut down the ritual state;
            instead say "You begin rumbling your way through the Dracon Invocation.[para]A sense of pressure builds in the air, centered on [the ET]. It's like balancing a ball on itself, though, and it slips almost immediately. The bound goes dark.";
        if R is not dragon-nested:
            shut down the ritual state;
            instead say "You begin rumbling your way through the Dracon Invocation.[para]A sense of pressure builds in the air, but it feels unanchored, loose, unstable. Before the invocation is finished, the pressure slips and slithers away into nothing. The bound goes dark.";
        shut down the ritual state;
        mobilize active dragon dir no-word;
        say "You rumble your way through the Dracon Invocation.[para]A sense of pressure builds in the air. You feel something move, in the distance. The bound slowly dims.[para][The current-mobile-dragon] slides into the Chancel, through the writ screen";
    say "; across the ceiling; towards the pedestal. It seems to move slowly, but you have no sense of time to react.[para]The dragon is above the pedestal now. The whirling haze rises to meet it. Then the rotating [color of current-mobile-dragon] runes begin to descend, one by one, loosed from their circles, free in the darkening air.[para]Blood, incense, ruin, screams.";
    let N be zero;
    if the symbol-type of the brass-pin is fixation-symbol:
        now N is 1;
        if the location of the brass-pin is ballast-appropriate:
            now N is 2;
    complete the game proper with ballast N;
    invoke reset, involuntarily;
    stop the action.
 
Ritual-processing rule for rit-speaking dracon-invocation when at RSMarriageStart:
    now rstate bestates RSFailed;
    instead say "You rumble your way through the Dracon Invocation. But the words lack directionality."
 
Ritual-processing rule for rit-speaking dracon-invocation:
    now rstate bestates RSFailed;
    instead say "You rumble your way through the Dracon Invocation. But the words are not true."
 
Ritual-processing rule for rit-speaking a consumed alien-glyph:
    [no ritual failure; you can try a different one.]
    instead say "You try to visualize [the noun], but the shape doesn't seem interesting any more."
 
Ritual-processing rule for rit-speaking an unconsumed alien-glyph (called G) when at RSFulcrumAcided and the rstate-solo is a pebble:
    now the additive-used of rstate is G; [not consumed until fulcrum is used]
    now rstate bestates RSFulcrumSymboled;
    instead say "You visualize [the noun] as clearly as possible. The stone does not visibly change, but you have a peculiar notion that it has changed shape [em]inside[/em]."
 
Ritual-processing rule for rit-speaking an unconsumed alien-glyph when at RSFulcrumStart and the rstate-solo is a pebble:
    now rstate bestates RSFailed;
    instead say "You visualize [the noun] as clearly as possible. The stone seems to twist itself up in some obscure way."
 
Ritual-processing rule for rit-speaking an unconsumed alien-glyph when at RSFulcrumSymboled and the rstate-solo is a pebble:
    now rstate bestates RSFailed;
    instead say "You visualize [the noun] as clearly as possible. The stone seems to twist itself up in some obscure way."
 
Ritual-processing rule for rit-speaking an unconsumed alien-glyph:
    now rstate bestates RSFailed;
    instead say "You visualize [the noun] as clearly as possible. Nothing seems to result, however."
 
Ritual-processing rule for rit-speaking an alien-pattern:
    now rstate bestates RSFailed;
    instead say "You begin running through [the noun] in your head. It doesn't seem to fit the structure of the ritual."
 
 
Ritual-processing rule for rit-speaking:
    now rstate bestates RSFailed;
    instead follow the general formula-speaking report rule.
 
This is the general formula-speaking report rule:
    say "You [one of]say[or]recite[or]invoke[or]speak[at random] [the noun][one of]. Nothing happens[or], but nothing results[or]. There is no effect[or], but there is no effect[at random]."
 
 
Section - Rit-Wafting
 
Ritual-processing rule for rit-wafting the zafranum:
    now rstate bestates RSFailed;
    instead follow the zafranum-wafting report rule.
 
This is the zafranum-wafting report rule:
    say "You wave the zafranum, and inhale its [if rstate is not failed]intensely[else]thickly[end if] pungent aroma";
    if the aroma of the location is:
        -- no-odor: say ". The air seems to sparkle";
        -- many-odor: say ". It overpowers away the room's muddled scent for a moment";
        -- ginger: say ". The fiery reek of ginger turns spicy and complex";
        -- peppermint: say ". The icy smell of peppermint mixes strangely with the spice";
        -- citronelle: say ". The flowery citron moderates the spicy scent";
        -- kelp: say ". It clashes strangely with the surrounding smell of the sea";
        -- eucalyptus: say ". The soapy eucalyptus turns strange and herbal";
    say "."
 
Ritual-processing rule for rit-wafting the rosemary when at RSLeadStart:
    now rstate bestates RSLeadSprigged;
    instead follow the rosemary-wafting report rule.
 
Ritual-processing rule for rit-wafting the rosemary when at RSRustRemoverNatured:
    now rstate bestates RSRustRemoverSprigged;
    instead follow the rosemary-wafting report rule.
 
Ritual-processing rule for rit-wafting the rosemary when at RSMarriageStart:
    let L be the shelf of rstate;
    unless a tin-slip thing (called T) is on L:
        shut down the ritual state;
        instead say "You wave the sprig, and inhale its distinct resinous aroma. But the ritual feels ungrounded and adrift. The bound wobbles and goes dark.";
    let N be the tin-slip-correctness of T;
    if N is zero: [blank]
        shut down the ritual state;
        instead say "You wave the sprig, and inhale its distinct resinous aroma. But the ritual feels uncentered and adrift. The bound wobbles and goes dark.";
    now rstate bestates RSMarriageSprigged;
    instead follow the rosemary-wafting report rule.
 
Ritual-processing rule for rit-wafting the rosemary:
    now rstate bestates RSFailed;
    instead follow the rosemary-wafting report rule.
 
This is the rosemary-wafting report rule:
    tutor tut-step-rosemary;
    say "You wave the sprig, and inhale its [if rstate is not failed]fresh,[else]distinct[end if] resinous aroma";
    if the aroma of the location is:
        -- no-odor: say ". The air seems to sharpen";
        -- many-odor: say ". It washes away the room's muddled scent for a moment";
        -- ginger: say ". The fiery reek of ginger seems to shift to a cleaner, more gentle scent";
        -- peppermint: say ". The icy smell of peppermint seems to gain a more complex herbal note";
        -- citronelle: say ". The flowery citron balances against it, centering your attention";
        -- kelp: say ". It clashes oddly with the surrounding smell of the sea";
        -- eucalyptus: say ". The soapy eucalyptus turns strange and herbal";
    say "."
 
Ritual-processing rule for rit-wafting the pinecone when at RSRustRemoverNatured:
    now rstate bestates RSRustRemoverConed;
    instead follow the pinecone-wafting report rule.
 
Ritual-processing rule for rit-wafting the pinecone:
    now rstate bestates RSFailed;
    instead follow the pinecone-wafting report rule.
 
This is the pinecone-wafting report rule:
    say "The old pinecone crumbles into dusty flakes, which sift from your fingers. A [if rstate is not failed]blade-sharp[else]sharp[end if], resinous aroma bursts into the air";
    if the aroma of the location is:
        -- no-odor: say ". The atmosphere seems to burn with clarity";
        -- many-odor: say ". It wipes away the room's muddled scent for several moments";
        -- ginger: say ". The fiery reek of ginger goes clean and harsh with it";
        -- peppermint: say ". The icy smell of peppermint goes clean and harsh with it";
        -- citronelle: say ". The flowery citron is briefly overwhelmed";
        -- kelp: say ". It clashes weirdly with the surrounding smell of the sea";
        -- eucalyptus: say ". The soapy eucalyptus turns strange and herbal";
    say "."
 
Ritual-processing rule for rit-wafting the honeysuckle when at RSBrunStart:
    now rstate bestates RSBrunHoneyed;
    instead follow the honeysuckle-wafting report rule.
 
Ritual-processing rule for rit-wafting the honeysuckle:
    now rstate bestates RSFailed;
    instead follow the honeysuckle-wafting report rule.
 
This is the honeysuckle-wafting report rule:
    say "The dried flowers crumble and sift from your fingers, releasing a burst of [if rstate is not failed]astonishing[else]cloying[end if] honey-sweetness into the air";
    if the aroma of the location is:
        -- no-odor: say ". The perfume lingers";
        -- many-odor: say ". It overshadows the room's muddled scent for a moment";
        -- ginger: say ". The fiery reek of ginger seems more pleasant now";
        -- peppermint: say ". The icy smell of peppermint seems more pleasant now";
        -- citronelle: say ". It blends soothingly with the flowery citron";
        -- kelp: say ". It clashes weirdly with the surrounding smell of the sea";
        -- eucalyptus: say ". The soapy eucalyptus turns weirdly sweet";
    say "."
 
 
Section - Rit-Ringing
 
Ritual-processing rule for rit-ringing the G-flat-chime when at RSDiamondStart and the rstate-solo is diamond-or-diamond:
    now rstate bestates RSDiamondChimed;
    instead say "The [short-description of the noun] chime rings sweetly, and you let its resonances fill your mind.[para]The diamond darkens, absorbing light."
 
Ritual-processing rule for rit-ringing the G-flat-chime when the rstate-solo is el-earth and the env of rstate is phlegmatic-env:
    [diamond failure -- use el-earth instead of diamond]
    now rstate bestates RSFailed;
    retire the el-earth by alchemy;
    instead say "The [short-description of the noun] chime rings sweetly, and you let its resonances fill your mind.[para]The shard of elemental earth vibrates in response. The crystal darkens, absorbing light from the room, until it looks like a drop of ink. Then -- [em]crack[/em] -- it splinters, spraying crystalline dust across the workspace. Oh dear."
 
Ritual-processing rule for rit-ringing the G-flat-chime when the rstate-solo is diamond-or-diamond and the env of rstate is earthy-env:
    [diamond failure -- use earthy-env instead of phlegmatic-env]
    now rstate bestates RSFailed;
    instead say "The [short-description of the noun] chime rings sweetly, and you let its resonances fill your mind.[para][The rstate-solo] darkens for a moment."
 
Ritual-processing rule for rit-ringing the G-flat-chime when the rstate-solo is el-earth and the env of rstate is earthy-env:
    [diamond failure -- use earthy-env instead of phlegmatic-env, *and* el-earth instead of diamond]
    now rstate bestates RSFailed;
    instead say "The [short-description of the noun] chime rings sweetly, and you let its resonances fill your mind.[para][The rstate-solo] darkens for a moment."
 
Ritual-processing rule for rit-ringing the G-flat-chime when at RSDiamondChimed:
    [diamond failure -- hit chime twice]
    now rstate bestates RSFailed;
    instead say "The [short-description of the noun] chime rings sweetly, and you let its resonances fill your mind.[para]The diamond flickers back to its normal appearance."
 
Ritual-processing rule for rit-ringing the H-chime when at RSDiamondStart:
    [diamond failure -- hit wrong chime]
    now rstate bestates RSFailed;
    instead say "The [short-description of the noun] chime rings sweetly, and you let its resonances fill your mind.[para]The diamond brightens, seeming to capture and radiate light."
 
Ritual-processing rule for rit-ringing the H-chime when at RSCentralityEarthed and the rstate-duo is silk-cord and el-earth:
    now rstate bestates RSCentralityChimed;
    instead say "The [short-description of the noun] chime rings sweetly, and you let its resonances fill your mind.[para]The shard of elemental earth brightens, seeming to capture and radiate light."
 
Ritual-processing rule for rit-ringing the H-chime when at RSCentralityChimed:
    [centrality failure -- hit chime twice]
    now rstate bestates RSFailed;
    instead say "The [short-description of the noun] chime rings sweetly, and you let its resonances fill your mind.[para]The elemental earth flickers back to its normal appearance."
 
Ritual-processing rule for rit-ringing the G-flat-chime when at RSCentralityEarthed:
    [centrality failure -- hit wrong chime]
    now rstate bestates RSFailed;
    instead say "The [short-description of the noun] chime rings sweetly, and you let its resonances fill your mind.[para]The elemental earth darkens, absorbing light."
 
Ritual-processing rule for rit-ringing a chime when at RSGlassPassToned:
    let T be the rstate-solo;
    if T is not the noun:
        [glass-passing failure: hit a chime not involved in the ritual]
        now rstate bestates RSFailed;
        instead say "The [short-description of the noun] chime rings [if the descriptor-type of the noun is glass-descriptor]sweetly[else]brightly[end if]. [The T] resonates sourly in response, out of tune.";
    if the descriptor-type of the noun is glass-descriptor:
        [glass-passing failure: the chime is glass]
        retire the noun by ritual;
        now rstate bestates RSFailed;
        instead say "The [short-description of the noun] chime rings sweetly at first, but the note rapidly grows louder, to an ear-stabbing intensity. With a single [em]snap[/em], the glass chime shatters into dust.";
    now rstate bestates RSGlassPassChimed;
    instead say "The [short-description of the noun] chime rings brightly, as if it were not lying in the bound, but suspended above it. The sound swells to a thrilling intensity, then fades."
 
Ritual-processing rule for rit-ringing a chime when at RSBronzeMagnetToned:
    let T be the rstate-solo;
    if T is not the noun:
        [bronze-magnet failure: hit a chime not involved in the ritual]
        now rstate bestates RSFailed;
        instead say "The [short-description of the noun] chime rings [if the descriptor-type of the noun is glass-descriptor]sweetly[else]brightly[end if]. [The T] resonates sourly in response, out of tune.";
    if the descriptor-type of the noun is glass-descriptor:
        [bronze-magnet failure: the chime is glass]
        retire the noun by ritual;
        now rstate bestates RSFailed;
        instead say "The [short-description of the noun] chime rings sweetly at first, but the note rapidly grows louder, to an ear-stabbing intensity. With a single [em]snap[/em], the glass chime shatters into dust.";
    now rstate bestates RSBronzeMagnetChimed;
    instead say "The [short-description of the noun] chime rings brightly, as if it were not lying in the bound, but suspended above it. The sound swells to a thrilling intensity, then fades."
 
Ritual-processing rule for rit-ringing a chime:
    now rstate bestates RSFailed;
    say "The [short-description of the noun] chime rings [if the descriptor-type of the noun is glass-descriptor]sweetly[else]brightly[end if]";
    if the noun is in the bound of rstate:
        say ", as if it were not lying in the bound, but suspended above it. You";
    else:
        say ", and you";
    instead say " let its resonances fill your mind."
 
 
Section - Rit-Igniting
 
Ritual-processing rule for rit-igniting the beaker with when at RSSuckerStart and the beaker comprises alcohol-subst and the second noun is el-fire:
    now rstate bestates RSSuckerIgnited;
    say "You dip [the second noun] into [the noun]";
    now the fire-source-used of fire-sucker-creation is the second noun;
    dephlogisticate the second noun;
    now the beaker comprises sucker-crimson-subst;
    fix up the substance of the beaker;
    instead say ". The [base-description of the second noun] is instantly extinguished, as its phlogiston is drawn into the alcohol. Blue flames erupt, and a red phosphorescence builds within the liquid.[para]As the flames die down, the red light does as well; but the liquid in the [if the noun is beaker]beaker[else]retort[end if] remains a brilliant crimson."
 
Ritual-processing rule for rit-igniting the beaker with when at RSSuckerWeakStart and the beaker comprises alcohol-subst and the second noun is el-fire:
    now rstate bestates RSSuckerWeakIgnited;
    say "You dip [the second noun] into [the noun]";
    now the fire-source-used of fire-sucker-creation is the second noun;
    dephlogisticate the second noun;
    now the beaker comprises clear-subst;
    fix up the substance of the beaker;
    instead say ". The [base-description of the second noun] is instantly extinguished, as its phlogiston is drawn into the alcohol. Blue flames erupt, and a reddish phosphorescence builds within the liquid.[para]As the flames die down, however, the red color fades from the [if the noun is beaker]beaker[else]retort[end if]."
 
Ritual-processing rule for rit-igniting the beaker with when at RSSuckerStart and the beaker comprises alcohol-subst:
    now rstate bestates RSFailed;
    say "You dip [the second noun] into [the noun]";
    now the beaker comprises yellowish-subst;
    fix up the substance of the beaker;
    instead say ". Blue flames erupt on the surface, and a red phosphorescence begins to build within the liquid. But the flames die down as the alcohol vapor is consumed, and the liquid fades to a straw-yellow."
 
Ritual-processing rule for rit-igniting the beaker with when the env of rstate is fire-based and the beaker comprises alcohol-subst:
    now rstate bestates RSFailed;
    say "You dip [the second noun] into [the noun]";
    now the beaker comprises clear-subst;
    fix up the substance of the beaker;
    instead say ". A jet of blue fire shoots up -- you jerk away -- but the alcohol vapor is consumed almost instantly."
 
Ritual-processing rule for rit-igniting the beaker with:
    now rstate bestates RSFailed;
    derive the kindling of the noun from the second noun;
    stop the action.
 
Ritual-processing rule for rit-igniting the rosemary with:
    now rstate bestates RSFailed;
    retire the rosemary by ritual;
    instead say "The rosemary flares up and vanishes. A puff of resinous smoke rises within the bound."
 
Ritual-processing rule for rit-igniting the pinecone with:
    now rstate bestates RSFailed;
    retire the pinecone by ritual;
    instead say "The pinecone flares up and vanishes. A puff of resinous smoke rises within the bound."
 
Ritual-processing rule for rit-igniting the honeysuckle with:
    now rstate bestates RSFailed;
    retire the honeysuckle by ritual;
    instead say "The honeysuckle flares up and vanishes. A puff of sickly-sweet smoke rises within the bound."
 
Ritual-processing rule for rit-igniting the zafranum with when at RSBronzeMagnetZafranumed and the rstate-duo like a chime and the zafranum:
    now rstate bestates RSBronzeMagnetBurned;
    retire the zafranum by ritual;
    now the secondary-obj of rstate is no-thing;
    let T be the primary-obj of rstate;
    instead say "The zafranum threads flare up and vanish. A puff of pungent yellow smoke rises, and then swirls around the [if the descriptor-type of T is glass-descriptor]glass[else]bronze[end if] chime."
 
Ritual-processing rule for rit-igniting the zafranum with when at RSAitherZafranumed and the rstate-duo is the beaker and the zafranum:
    retire the zafranum by ritual;
    now the secondary-obj of rstate is no-thing;
    if the aroma of the location is not kelp:
        now rstate bestates RSFailed;
        instead say "The zafranum threads flare up and vanish. A puff of pungent yellow smoke rises, and then swirls around the beaker.";
    now rstate bestates RSAitherBurned;
    instead say "The zafranum threads flare up and vanish. A puff of pungent yellow smoke rises, and then swirls around the beaker.[para]The aroma of zafranum melds with the smell of the ocean, provoking images of sea-travel and distant lands."
 
Ritual-processing rule for rit-igniting the zafranum with:
    now rstate bestates RSFailed;
    retire the zafranum by ritual;
    instead say "The zafranum threads flare up and vanish. A puff of pungent yellow smoke rises within the bound."
 
Ritual-processing rule for rit-igniting the mustard with:
    now rstate bestates RSFailed;
    retire the mustard by ritual;
    instead say "The mustard seed doesn't burn well, but eventually a small waft of choking smoke rises within the bound."
 
The last ritual-processing rule:
    instead say "(BUG) Ritual-processing shouldn't get this far."
 
 
Chapter - The Ritual State Itself
 
A ritual-state is a kind of value.
 
The rstate is a thing.
The rstate has a ritual-state called the state.
The rstate has a ritual-bound called the bound.
The rstate has a ritual-shelf called the shelf.
The rstate has a ritual-env called the env.
The rstate has a formula called the initial-sealing.
The rstate has an thing called the primary-obj.
The rstate has an thing called the secondary-obj.
The rstate can be nature-word-used.
The rstate can be entension-word-used.
The rstate can be categorical-imperative-used.
The rstate has a thing called the mineral-used.
The rstate has an object called the additive-used.
The rstate has a number called the current-count.
 
The verb to bestate (it bestates, they bestate, it is bestating) implies the state property.
 
Definition: rstate is active rather than inactive if rstate does not bestate RSNone.
Definition: rstate is failed if rstate bestates RSFailed or rstate bestates RSNone.
 
To decide whether at (R - ritual-state):
    if rstate bestates R:
        decide yes.
 
To decide what thing is the rstate-solo:
    let T be the secondary-obj of rstate;
    if T is not no-thing:
        decide on no-thing;
    let B be the bound of rstate;
    if the number of things in B is not one:
        decide on no-thing;
    let T be the primary-obj of rstate;
    if T is not in B:
        decide on no-thing;
    decide on T.
 
To decide whether the rstate-duo is (T1 - thing) and (T2 - thing):
    let B be the bound of rstate;
    if the number of things in B is not two:
        decide no;
    unless T1 is in B and T2 is in B:
        decide no;
    unless T1 is the primary-obj of rstate or T1 is the secondary-obj of rstate:
        decide no;
    unless T2 is the primary-obj of rstate or T2 is the secondary-obj of rstate:
        decide no;
    decide yes.
 
To decide whether the rstate-duo like a chime and (T2 - thing):
    let B be the bound of rstate;
    if the number of things in B is not two:
        decide no;
    unless a chime (called T1) is in B:
        decide no;
    unless T1 is in B and T2 is in B:
        decide no;
    unless T1 is the primary-obj of rstate or T1 is the secondary-obj of rstate:
        decide no;
    unless T2 is the primary-obj of rstate or T2 is the secondary-obj of rstate:
        decide no;
    decide yes.
 
To shut down the ritual state:
    now rstate bestates RSNone;
    now the env of rstate is no-env;
    now the bound of rstate is no-bound;
    now the shelf of rstate is no-shelf;
    now the initial-sealing of rstate is no-word;
    now the primary-obj of rstate is no-thing;
    now the secondary-obj of rstate is no-thing;
    now rstate is not nature-word-used;
    now rstate is not entension-word-used;
    now rstate is not categorical-imperative-used;
    now the mineral-used of rstate is no-thing;
    now the additive-used of rstate is no-thing;
    now the current-count of rstate is zero.
 
RSNone is a ritual-state.
RSInitial is a ritual-state.
RSFailed is a ritual-state.
RSChymicStart is a ritual-state.
 
RSRustRemoverStart, RSRustRemoverNatured, RSRustRemoverSprigged, RSRustRemoverConed are ritual-states.
RSGenRustRemoverStart, RSGenRustRemoverCategored, RSGenRustRemoverLubaned are ritual-states.
RSGenRustRemoverSymStart, RSGenRustRemoverSymCategored, RSGenRustRemoverSymLubaned are ritual-states.
RSIntensionalBallastZafranumed is a ritual-state.
RSFireResistStart, RSFireResistGingerCountered, RSFireResistMintCountered are ritual-states.
RSDispersalBrushStart, RSDispersalBrushAlcoholed are ritual-states.
RSResonantOculusStart, RSResonantOculusToned are ritual-states.
RSPlanetaryLensStart, RSPlanetaryLensNatured, RSPlanetaryLensLubaned, RSPlanetaryLensLensed are ritual-states.
RSAuraStart, RSAuraCalcined, RSAuraInvisibilityIdempoted, RSAuraInvisibilitySublimed, RSAuraImitationIsomorphed, RSAuraImitationWatered, RSAuraToughenOried, RSAuraToughenAnaphylaxed are ritual-states.
RSAuraImitAltStart, RSAuraImitAltNamed, RSAuraImitAltAired are ritual-states.
RSLeadStart, RSLeadSprigged, RSLeadNatured, RSLeadIncreaseGaianed, RSLeadDecreaseCounterGaianed, RSLeadDecreaseAntiTellured are ritual-states.
RSPhloElectrumStart, RSPhloElectrumOiled, RSPhloElectrumOiledGold are ritual-states.
RSClockStart, RSClockMudded, RSClockCountered, RSClockSublimed, RSClockPinned are ritual-states.
RSVacuumStart, RSVacuumLimed, RSVacuumAnodyned are ritual-states.
RSPurityStart, RSPurityNatured are ritual-states.
RSDiamondStart, RSDiamondChimed are ritual-states.
RSGlassPassStart, RSGlassPassSanded, RSGlassPassToned, RSGlassPassChimed are ritual-states.
RSBrunStart, RSBrunHoneyed, RSBrunNatured, RSBrunWooded are ritual-states.
RSBreathStart, RSBreathAnodyned are ritual-states.
RSSuckerStart, RSSuckerIgnited are ritual-states.
RSSuckerWeakStart, RSSuckerWeakIgnited are ritual-states.
RSCentralityStart, RSCentralityViridigrised, RSCentralityEarthed, RSCentralityChimed are ritual-states.
RSScalpelStart, RSScalpelNatured are ritual-states.
RSBronzeMagnetStart, RSBronzeMagnetZafranumed, RSBronzeMagnetBurned, RSBronzeMagnetToned, RSBronzeMagnetChimed are ritual-states.
RSAitherStart, RSAitherZafranumed, RSAitherBurned, RSAitherAnodyned are ritual-states.
RSGaianSequenced, RSGaianAlumed are ritual-states.
RSCounterGaianSequenced, RSCounterGaianAlumed are ritual-states.
RSPercalcinateTempered is a ritual-state.
RSMudTempered, RSMudFirstWater, RSMudFirstEarth, RSMudSeconded are ritual-states.
RSSolventAnaphylaxed is a ritual-state.
RSFulcrumStart, RSFulcrumAcided, RSFulcrumSymboled are ritual-states.
RSMarriageStart, RSMarriageSprigged, RSMarriageElemented are ritual-states.
RSSummonDragonSequenced is a ritual-state.
 
Definition: a ritual-state is RSFireResistXCountered if it is RSFireResistGingerCountered or it is RSFireResistMintCountered.
 
 
HL Ritual ends here.