Scroll Thief — 61 of 138

Daniel M. Stelzer

Release 2

Chapter 4 - Spell Durations

Table of Spell Durations

subject (an object)enchantment (a spell)duration (a number)end effect (a phrase object -> nothing)
with 16 blank rows

Affecting relates various spells to various things. The verb to affect implies the affecting relation.

The currently reset object is an object that varies.

Reset is a spell based rulebook with default success.

To remove effects of (enchantment - a spell) from (item - an object):

now the currently reset object is the item;

follow the reset rules for the enchantment;

now the item is not affected by the enchantment.

To affect (subject - an object) with (enchantment - a spell) for (duration - a number) turns:

if the number of blank rows in the Table of Spell Durations is 0:

say "*** ERROR ***[br]No more space in the Table of Spell Durations!";

stop;

choose a blank row in the Table of Spell Durations;

now the subject entry is the subject;

now the enchantment entry is the enchantment;

now the duration entry is the duration plus one; [Add one since we're about to decrement it.]

now the subject is affected by the enchantment.

To remove records of (enchantment - a spell) from (subject - an object) without reset: [Cut a row out of the duration table without running any final effects.]

repeat through the Table of Spell Durations:

if the subject entry is the subject and the enchantment entry is the enchantment:

blank out the whole row;

stop.

To fizzle (enchantment - a spell) from (subject - an object):

remove records of the enchantment from the subject without reset;

remove effects of the enchantment from the subject.

To fizzle all spells from (subject - an object):

repeat with the enchantment running through spells which affect the subject:

fizzle the enchantment from the subject.

Every turn when the Table of Spell Durations is non-empty:

repeat through the Table of Spell Durations:

unless the duration entry is -1, decrement the duration entry;

if the duration entry is zero:

remove effects of the enchantment entry from the subject entry;

blank out the whole row.

Inverse effect of casting a spell at an object when the second noun is affected by the spell understood (this is the fizzle long-term spells rule):

say "Your inverse-spell slowly drains the energy from the [i][spell understood][/i] enchantment on [the second noun].";

fizzle the spell understood from the second noun.