Scroll Thief — 58 of 138

Daniel M. Stelzer

Release 2

Chapter 3 - Casting Spells

Section A - The Casting Action

Modification is a kind of value. The modifications are unmodified, reversed, and empowered.

The player has a modification. [This state affects spells we cast, and is changed by LLEPS and YONK.]

When play begins: now the command prompt is "[special prompt]". [Show any metamagic in the command prompt.]

To say special prompt:

if accessibility mode is active:

say "Prompt ";

if the player is not unmodified:

say "[i](spells [modification of the player])[/i] ";

otherwise:

if the player is reversed:

say "[bracket][i]lleps[/i][close bracket]";

else if the player is empowered:

say "[bracket][i]yonk[/i][close bracket]";

say ">".

[This section is largely based off the implementation of magic in Graham Nelson's "The Reliques of Tolti-Aph" example.]

Casting it at is an action applying to one spell and one visible thing. Understand "cast [spell] at/on [something]" or "cast [spell]" or "[spell]" or "[spell] [something]" or "use [spell] on [something]" or "use [spell]" as casting it at. Rule for supplying a missing second noun when casting: now the second noun is the location.[1]

Check someone casting (this is the NPCs can't use magic rule):

if the player can see the actor:

if the actor is magical, say "[The actor] [aren't] prepared to cast spells at the moment.";

otherwise say "[The actor] [don't] seem like much of a spellcaster.";

stop the action.

Check casting (this is the can't cast on the wrong sort of target rule):

if the valency of the spell understood is targeted:

if the second noun is a room, say "That enchantment must be cast at something." instead;

otherwise if the valency of the spell understood is untargeted:

if the second noun is not a room, say "That enchantment cannot be cast at anything." instead.

Effect is a rulebook.[2] Effect has default success.

Inverse effect is a rulebook. Inverse effect has default success.

Empowered effect is a rulebook. Empowered effect has default success.

Carry out casting:

increment the casting count of the spell understood;

set pronouns from the second noun;

if the player is unmodified: [As in, there are no metamagic (LLEPS or YONK) spells active.]

follow the effect rulebook;

else if the player is reversed: [LLEPS]

follow the inverse effect rulebook;

now the player is unmodified; [Fallthrough in this case doesn't make much sense, and isn't really necessary.]

else if the player is empowered: [YONK]

follow the empowered effect rulebook;

if the rule succeeded:

now the player is unmodified;

otherwise unless the rule failed:

say "You pour the surge of power into your spell, but in this case some of it dissipates without effect.";

follow the effect rulebook. [Same as above.]

Last effect of casting (this is the casting fallback rule): say "You cast the spell, but nothing obvious happens."

Last inverse effect of casting (this is the inverse casting fallback rule): say "You cast the spell, the [i]lleps[/i] enchantment twisting it around, but nothing obvious happens."

Last empowered effect of casting (this is the empowered casting fallback rule): make no decision. [Fall through to the normal effect rules]

Notes

[1]. Untargeted spells are actually targeted at the location.

[2]. The carry out and report rules for the casting action are going to be surprisingly short - considering the vast range of possible outcomes when a spell is cast - and they do this by using a more powerful mechanism to allow for more flexible reporting than would ordinarily be possible: they create a new rulebook, "Effect", whose task is to carry out the spell.