Spell Description Language

Reference Manual & Programming Guide
Version 2.0  ·  SDL Standard Edition

Preface

The Spell Description Language (SDL) is a procedural extension language for authoring, manipulating, and maintaining magical effects in tabletop and fantasy environments. A spell script is a finite sequence of operator lines that, when cast, produce dynamic magical phenomena. SDL is intentionally compact — its small keyword vocabulary keeps spell scripts readable aloud at the table while still expressing arbitrarily sophisticated behaviour.

This manual is the authoritative reference for SDL version 2.0. It supersedes the 1.0.x specification. Additions in 2.0 include: a formal type system (Section 3), an exhaustive catalogue of Core Effects (Section 4) and Core Events (Section 5), six new basic operators, three new path operators, three new flow-control operators, six new special operators, a formal EBNF grammar (Section 13), and a comprehensive error-condition catalogue (Section 12).

Where a rule is marked [House Rule] it is advisory. Consult your game master for the canonical ruling at your table.

1. Lexical & Structural Conventions

1.1 Tokens & Keywords

An SDL script is a sequence of tokens. The token classes are:

1.2 Case & Whitespace

SDL is case-insensitive for all keywords. By convention, operator keywords are written in lowercase and Effect names are capitalised (e.g., create Fire). Whitespace — spaces, tabs, and newlines — separates tokens. Multiple spaces are treated as one. A new operator should begin on a new line; sub-operators inside shape, if, and repeat blocks are conventionally indented with two spaces or one tab, though indentation carries no semantic weight.

1.3 Comments

Lines beginning with # or // are ignored by the parser and may be used for annotation. Inline comments following an operator on the same line are introduced by --.

# This entire line is a comment.
create Fire    -- inline comment: creates the fire effect
// Also a comment.

1.4 Reserved Words

The following words are reserved and may not be used as identifiers:

and       arcto     at        bind      by        clone     cone
create    destroy   else      emit      extrude   fill      for
foreach   halt      if        in        inscribe  interrupt lineto
link      lookat    makeowner mask      me        merge     move
not       once      or        origin    pointdir  power     range
repeat    resume    revert    ring      rotate    scale     seal
shape     skip      smooth    sphere    surface   tag       then
to        touch     until     volume    wait      while

1.5 Identifiers

An identifier begins with a letter and is followed by zero or more letters, digits, or underscores. Identifiers name spell scripts (in declarations) and named effect instances (in create). Identifiers are case-insensitive. Maximum length is 64 characters.

-- Valid identifiers
myflame   bolt_1   wallOfIce   q

-- Invalid (reserved word)
fire      move

1.6 Literals

Distance Literals

SuffixUnitExample
'Feet30'
"Inches2"
mMetres9m
sqSquares (5-foot grid)6sq

A distance literal with no suffix is interpreted as feet. Axes are appended with x, y, z: 10'x 2'y 0z.

Duration Literals

SuffixMeaning
sec / sReal-time seconds
rounds / rndCombat rounds (6 seconds each, [House Rule])
minMinutes
hrHours
daysIn-game days
permanentUntil explicitly destroyed

Angle Literals

An angle literal is a number (degrees) followed immediately by an axis label: 45x, 90y, 180z.


2. Script & Spell Structure

2.1 Spell Name Declaration

Every SDL script must begin with a spell name declaration: an identifier followed by a colon on its own line. This label uniquely identifies the running instance and is required by operators such as interrupt, resume, range, power, and makeowner.

<spellname>:

A spell name is an identifier (Section 1.5). It must be unique among all concurrently running scripts for the same caster.

2.2 Lines & Operators

After the declaration line, each non-blank, non-comment line contains exactly one operator and its arguments. Certain compound operators (if…then…else, repeat…until, while, for, foreach) span multiple lines and enclose nested operator blocks. Sub-operators of shape also span multiple lines.

2.3 Execution & Flow

SDL executes lines sequentially from top to bottom, beginning at the first line after the declaration. Execution proceeds without pause unless altered by wait, halt, or a looping construct. When the last line is executed the spell terminates naturally (equivalent to halt).

2.4 Nesting & Scope

Compound operators may be nested to arbitrary depth, subject to the resource-cost rules in Section 11. Names given to effects via create <Effect> <name> are global to the script: they may be referenced by any subsequent operator in the same script, including from within nested blocks.

There is currently no local-scope mechanism. If two create statements in different branches of an if both name an effect bolt, the second overwrites the first reference.

3. Type System

3.1 Distances

All positional and size arguments are distance values (Section 1.6). The SDL parser normalises all distances to feet for evaluation. Distance arguments may also be expressed as directional coordinates using axis suffixes (x, y, z), where x is the caster's facing direction, y is lateral, and z is vertical.

3.2 Durations

Operators that accept a time argument take a duration literal. The special keyword permanent indicates indefinite duration, keeping the effect alive until a destroy or halt terminates it.

3.3 Angles

Rotation is always specified in whole degrees around an axis. Angles may be positive (counterclockwise from above) or negative (prefix with -). Compound rotation uses three axis-labelled angle literals in a single operator line.

3.4 Object References

An object reference identifies a target for operators such as move … lookat, surface, volume, and event conditions. References are resolved at runtime.

ReferenceMeaning
meThe caster of this spell
targetThe last explicitly targeted creature or object
pointdirThe direction the caster is pointing
lookat <ref>Aimed directly at the named reference
creature-typeNearest creature of that type (orc, human, dragon, etc.)
identifierA bound object (Section 10.1) or named effect

3.5 Effect Names (Identifiers)

When a create operator includes an optional trailing identifier, that identifier becomes the effect name for all subsequent operators in the script. If no name is given, the effect is referred to by the SDL keyword it (the implicit last-created effect) or by specifying its Effect type alone where unambiguous.


4. Core Data: Effects

An Effect is the fundamental magical phenomenon that SDL creates and manipulates. Effects are capitalised keywords drawn from the catalogue below. Each entry lists the keyword, its default physical manifestation, and common saving-throw category.

Effects do not inherently inflict damage or apply conditions — those outcomes are determined by the game system's rules for the effect type and intensity. SDL controls where, how large, and in what shape an effect appears; the mechanical consequences belong to the ruleset.

4.1 Elemental Effects
KeywordManifestationTypical Save
FireOpen flame, heat, combustionDEX
FrostIce crystals, sub-zero coldCON
IceSolid ice, structural cold massDEX / STR
WaterLiquid water, moistureSTR / DEX
SteamSuperheated vapourCON
AcidCorrosive liquid or vapourDEX / CON
EarthStone, soil, packed dirtDEX / STR
SandParticulate matter, abrasiveDEX / CON
MudDense wet earth, adhesiveSTR / DEX
AirCompressed atmosphere, windSTR
WindDirected air currentSTR / DEX
LightningElectrical discharge, boltDEX
ElectricityPersistent electrical fieldDEX / CON
ThunderConcussive shockwave, air-burstCON
LavaMolten rock, volcanic materialDEX / CON
MagmaSemi-solid igneous flowCON
SmokeDense obscuring combustion by-productCON
AshFine particulate, residue of fireCON
PlasmaIonised superheated gasDEX / CON
4.2 Physical Force Effects
KeywordManifestationTypical Save
ForceRaw invisible kinetic energySTR
GravityLocalised gravitational field (intensified or reversed)STR / DEX
PressureUniform crushing compressionCON / STR
VacuumSudden absence of air pressureCON
ShockwaveExpanding spherical blast frontDEX / STR
VibrationHigh-frequency mechanical oscillationCON
MagnetismAttractive or repulsive magnetic fieldSTR
WebAdhesive filament network, entanglingSTR / DEX
ThornConjured piercing barbsDEX
BladeRazor-edged cutting force fieldDEX
ChainConjured binding linksSTR
4.3 Light & Darkness Effects
KeywordManifestationTypical Save
LightVisible illumination (adjustable colour/intensity)
DaylightFull-spectrum sunlight-equivalent radianceCON (undead)
FlashInstantaneous blinding burst of lightCON
DarknessMagical unnatural shadow, extinguishes mundane lightWIS
ShadowPartial obscurement, dim quasi-material darknessWIS
BlindnessTargeted light suppression at a creature's eyesCON
PrismaticShifting multi-hued radiance with varied effects per colourMultiple
RadianceHoly or searing sacred luminanceCON / WIS
MirrorPerfectly reflective surface
InvisibilityBends light to conceal an area or creatureWIS (detect)
4.4 Mental & Psychic Effects
KeywordManifestationTypical Save
FearAura of dread, psychic terrorWIS
CharmCompulsive affection, social influenceWIS / CHA
SleepMagical unconsciousnessWIS / CON
ConfusionScrambled cognition, random behaviourWIS
DominationDirect mental control, puppet effectWIS
CompulsionIrresistible urge toward specific behaviourWIS
SilencePsychic sound-dampening field (also physical, see Sonic)WIS
MadnessProlonged psychic damage, sanity erosionWIS / INT
ScryRemote sensing, magical perception projectionWIS
TelepathyDirect mind-to-mind communication fieldWIS (resist)
SuggestionImplanted idea or post-hypnotic instructionWIS
MemoryAlters or retrieves specific memoriesWIS / INT
4.5 Arcane & Abstract Effects
KeywordManifestationTypical Save
ArcaneRaw magical energy, no specific elemental typeINT
IllusionFalse sensory data (visual by default)INT / WIS
GlamourAesthetic illusion, beauty/ugliness alterationWIS
MirageLarge-scale environmental illusionINT
PhantasmSemi-real thought-form, partly materialWIS / CON
DispelAnti-magic suppression waveINT (resist)
NullLocalised dead-magic zoneINT
CounterspellTargeted spell-interruption fieldINT
WardProtective barrier against specific effect types
RuneInscribed magical glyph, awaiting triggerINT
SigilPersistent marking of arcane authorityWIS
AuraPersistent field around a creature or object
CursePersistent malefic attunementWIS / CON
HexShort-duration targeted blightWIS
BlessingBeneficial attunement, divine favour
ConsecrationSanctified area effect, harmful to unholy beingsCON (evil)
DesecrationCorrupted ground, empowers undead / fiendsWIS
4.6 Transmutation Effects
KeywordManifestationTypical Save
PolymorphPhysical form transformation of targetWIS / CON
PetrifyConverts living tissue to stoneCON
RustRapid oxidation of metal
CorrodeGeneral material degradation
HardenIncreases structural integrity of target material
SoftenRenders rigid materials malleableSTR
GrowAccelerates natural growth (plants, creatures)
ShrinkReduces physical scale of targetCON
EnlargeMagnifies physical scale of targetCON
MeldFuses two materials togetherSTR
TransmuteConverts one substance into another specified substance
4.7 Conjuration Effects
KeywordManifestationTypical Save
SummonCalls a creature or entity into the areaWIS
BanishSends entity back to its plane of originCHA / WIS
GateOpens a two-way planar passageWIS
PortalOne-way spatial transit opening
TeleportInstantaneous displacement of targetWIS
DimensionLocalised warp in spatial geometryWIS / INT
AnchorFixes target in space, preventing teleportationSTR / WIS
WallGeneric physical or magical barrier conjurationSTR
BridgeConjured traversable structure
ObjectSimple inanimate conjured item
4.8 Necromantic Effects
KeywordManifestationTypical Save
NecroticLife-draining dark energyCON
UndeadAnimation of corpse or skeletal matterWIS (turning)
DrainSiphons life-force from target to casterCON
BlightWithers living tissue, kills plant lifeCON
PlagueContagious magical disease vectorCON
PoisonToxic substance, biological harmCON
WitherLocalised accelerated ageing / decayCON / WIS
BoneAnimated skeletal material, structuralSTR
SpectralGhostly semi-material manifestationCON / WIS
SoulManipulation of spiritual essenceWIS / CHA
Curse(see §4.5 — Curse spans Arcane and Necromantic)
4.9 Temporal Effects
KeywordManifestationTypical Save
HasteLocalised time acceleration for targetCON
SlowLocalised time deceleration for targetWIS
StasisComplete temporal suspension of targetCON / WIS
ForesightProbability-wave observation, brief future-glimpseWIS
RewindReverses local timeline by short intervalWIS / INT
AgingAccelerates biological age of targetCON
TimewarpDisrupts action-economy for a zoneWIS / INT
4.10 Dimensional Effects
KeywordManifestationTypical Save
PhasePartial ethereal state, passes through solid matterCON
EtherealFull shift to the Ethereal PlaneWIS
AstralProjection to the Astral PlaneWIS / INT
FoldSpatial compression, shortens distanceWIS / INT
PocketCreates a small extradimensional space
RiftUnstable tear between planes, chaoticWIS / CON
Mirror(also §4.3) Creates a planar reflection-spaceWIS
4.11 Natural Effects
KeywordManifestationTypical Save
EntangleRoots and vines spring from groundSTR / DEX
Thorn(also §4.2) Natural thorny growthDEX
BarkskinBark-like protective covering on target
SporeFungal cloud, disease or hallucinationCON
PollenSoporific or allergenic particulateCON
SwarmControlled mass of small creatures or insectsDEX / CON
MistDense fog bank, obscures vision
RainMagical precipitation
StormCombined wind, rain, and lightningDEX / STR
EarthquakeLocalised ground tremorDEX / STR
QuakeTargeted fissure or ground ruptureDEX
4.12 Sonic Effects
KeywordManifestationTypical Save
SoundProjected or amplified noise
Silence(also §4.4) Physical sound-dampening zone
ResonanceHarmonic vibration that can shatter materialsCON
ShoutDirectional burst of concussive soundCON / DEX
WhisperTargeted sound at extreme range, inaudible to others
DiscordCacophonous dissonance, disrupts concentrationCON / WIS
4.13 Composite Effects

Composite effects are predefined combinations of two or more primitive effects. They exist as named conveniences and behave as though both constituent effects were created simultaneously in the same spatial region. The constituent effects may be separately destroyed by specifying the constituent name.

KeywordConstituentsCommon Use
FirestormFire + Wind + ThunderWide-area devastation
IcestormIce + WindArea slow + damage
PlaguePoison + Blight + SporeSpreading disease
BloodfireFire + NecroticBurns life-force
StormwallWind + Lightning + ForceImpenetrable barrier
MiasmaPoison + Darkness + FearMorale-breaking cloud
FrostfireFire + FrostBurns and freezes simultaneously
VoidboltArcane + Gravity + DarknessSingularity projectile
ThornstormThorn + Wind + EarthWhirling debris
SoulfireFire + Soul + RadianceDamages spiritual essence

5. Core Data: Events

An Event is a detectable condition evaluated at runtime. Events are used as arguments to wait until, if, repeat…until, while, and foreach.

The general event syntax is:

<subject> <predicate> [<proximity>]

where subject is an object reference or creature type, predicate is one of the action keywords catalogued below, and proximity is an optional distance literal defining the radius within which the event must occur to trigger.

5.1 Creature Action Events

These predicates fire when the subject performs the named physical action.

PredicateTriggers when subject…
moveTakes any movement
approachMoves toward the spell's anchor point
fleeMoves away from the spell's anchor point
stopCeases all movement
chargeMoves toward a target at full speed in a straight line
runMoves at double normal speed
crawlMoves while prone
jumpLeaves the ground vertically or horizontally
landReturns to ground after airborne movement
climbMoves along a vertical surface
swimMoves through liquid
flyMoves through the air without ground contact
dodgeTakes the dodge action
hideAttempts to conceal itself
appearEnters the detectable proximity range from outside it
departLeaves the proximity range
enterCrosses the boundary of the effect's area
exitLeaves the effect's area
5.2 Creature State Events

These predicates fire when the subject enters or is in the named condition.

PredicateTriggers when subject…
aliveHas positive hit points
deadHit points reach zero or below
dyingIs making death-saving throws
woundedHas taken damage (below maximum hit points)
bloodiedIs at or below half maximum hit points
healedRecovers hit points
proneIs in the prone condition
standingIs upright and not prone
restrainedCannot move
frightenedIs under the frightened condition
charmedIs under the charmed condition
poisonedIs under the poisoned condition
stunnedIs under the stunned condition
paralysedIs unable to take actions
unconsciousIs not aware of surroundings
sleepingIs in natural or magical sleep
invisibleCannot be seen by normal vision
visibleCan be seen; breaks invisible state
burningIs on fire
frozenIs immobilised by cold
concentratingIs maintaining a concentration spell
5.3 Speech Events

Speech events use a string literal as predicate. The event fires if the subject vocalises the given phrase within the given proximity. The match is keyword-based (the phrase may appear anywhere in the utterance) and is case-insensitive.

<subject> "<phrase>" <proximity>
ExampleMeaning
me "off" 5'Caster says "off" (self-trigger, near)
orc "help" 30'Any orc says "help" within 30 feet
anyone "open sesame" 10'Any creature says the passphrase within 10 feet
target "surrender" 60'Designated target says "surrender"

The special subject keyword anyone matches any creature. me matches only the caster.

5.4 Combat Events
PredicateTriggers when subject…
attackMakes any attack roll
strikeLands a melee attack (hits)
missMakes an attack that fails to hit
critScores a critical hit
castBegins casting a spell
finishcastCompletes the casting of a spell
concentrateBegins concentrating on a spell
loseconcentrationFails a concentration check
blockSuccessfully blocks or parries an attack
drawDraws a weapon or readies an item
sheathePuts away a weapon
disarmedHas a weapon knocked away
saveSucceeds on a saving throw
failsaveFails a saving throw
takehitReceives any damage
killedby <subject2>Is killed by the specified second subject
5.5 Environmental Events
PredicateTriggers when…
dawnIn-game sunrise occurs
duskIn-game sunset occurs
darkAmbient light drops below dim-light threshold
brightAmbient light reaches bright-light threshold
rainPrecipitation begins in the area
windWind speed exceeds a significant threshold
earthquakeGround tremor begins
fire nearbyAn open flame comes within proximity
water nearbyA water source comes within proximity
dooropenA door or hatch in the area opens
doorcloseA door or hatch in the area closes
trap triggeredA mechanical or magical trap activates
5.6 Magical Events
Predicate / FormTriggers when…
magicdetectedAny magical aura is detected within proximity
spelldispelledA dispel effect removes a magical effect in the area
wardbreachedA ward or barrier effect is crossed or broken
runeactivatedA rune or glyph effect fires
effectcreated <EffectType>A specific effect type is created within proximity
effectdestroyed <name>The named effect is destroyed
interruptedThis script has been targeted by an interrupt operator (see §10.2)
5.7 Object Events
FormTriggers when…
<object> touchedAny creature makes physical contact with the named object
<object> touched by <subject>A specific subject touches the object
<object> brokenThe object's hit points reach zero
<object> movedThe object changes position
<object> openedA container object is opened
<object> closedA container object is closed
<object> droppedThe object falls or is released
<object> pickedupThe object is lifted from its resting place
5.8 Script (Self-Referential) Events
FormTriggers when…
interruptedAny interrupt targets this script
interrupted by <caster>A specific caster interrupts this script
ownerchangedA makeowner transfers the script's ownership
costfailedThe caster lacks resources to sustain the spell
outofrangeThe caster moves beyond the spell's maximum range
loopcount <N>The enclosing repeat loop has completed exactly N iterations
5.9 Temporal Events
FormTriggers when…
after <duration>The given time has elapsed since the event check began
rounds <N>N combat rounds have elapsed
turns <N>N initiative turns (one creature each) have elapsed [House Rule]
5.10 Logical Event Operators

Multiple event conditions may be combined using the following logical keywords:

KeywordBehaviourExample
andBoth conditions must be true simultaneously(orc 30') and (kobold 30')
orEither condition being true is sufficient(orc 30') or (kobold 30')
notInverts the truth of the following conditionnot (orc 30')
( … )Grouping for precedence(A and B) or C

Precedence (highest to lowest): not > and > or. Parentheses override precedence.


6. Basic Operators

Basic operators create, manipulate, or terminate a single effect instance. Each occupies one line.

6.1 create

create <Effect> [<name>]

Initialises a new effect instance at the caster's fingertip (a dimensionless point source) unless immediately followed by shape or scale. An optional identifier names the instance for subsequent operators. If no name is given, the instance is referred to by the SDL keyword it.

create Fire myflame
create Illusion
create Frost wall1

Cost: 1 unit. Composite effects cost 1 unit per constituent.

6.2 destroy

destroy [<name>]

Terminates and removes the named effect instance. If name is omitted, the most recently created effect (it) is destroyed.

destroy myflame
destroy

6.3 move

move [<name>] to <distance> pointdir
move [<name>] to lookat <target>
move [<name>] to <x>x <y>y [<z>z]
move [<name>] to <object>

Repositions the effect's anchor point. The effect's shape, scale, and orientation are preserved.

move myflame to lookat orc
move myflame to 10' pointdir
move myflame to 5'x 10'y 15'z
move myflame to target

6.4 rotate

rotate [<name>] <ang>x <ang>y <ang>z [origin <reference>]

Rotates the effect around the x, y, and z axes. Any axis may be omitted (treated as 0°). The optional origin clause sets the pivot point; without it the effect's own centre is the pivot.

rotate firewall 90y origin lookat orc
rotate it 0x 45y 0z
rotate barrier 180z origin me

6.5 scale

scale [<name>] <x>x <y>y <z>z
scale [<name>] <uniform>

Changes the physical size of the effect. Three-axis form sets independent dimensions; single-value form scales uniformly in all three axes. Pivot is the effect's geometric centre.

scale myflame 2'x 2'y 2'z
scale bolt 1'x 1'y 1'z
scale globe 10'

6.6 shape

shape [<name>]
  <pathop1>
  [<pathop2>]
  ...

Converts an effect into a 2D or 3D form using path sub-commands (Section 7). Any prior scaling is overridden; position is retained. The sub-commands are evaluated in order to build up the geometry.

shape myflame
  lineto 1"thick 10' pointdir
  lineto 1"thick 0'x 10'y 0z
  fill
scale myflame 10'x 10'y 1"z

6.7 clone NEW 2.0

clone <name> as <newname>

Creates an independent copy of an existing effect instance (same type, shape, scale, and position) under a new name. Changes to the original do not affect the clone and vice versa.

create Fire bolt
scale bolt 1'
clone bolt bolt2
move bolt to lookat orc
move bolt2 to lookat kobold

6.8 merge NEW 2.0

merge <name1> <name2> [as <newname>]

Combines two effect instances into one. The resulting effect occupies the union of their spatial extents and inherits the type of name1 unless a composite type is defined for the pair (see Section 4.13). The source effects are consumed; only the merged result persists.

create Fire A
create Frost B
merge A B as frostfire

6.9 tag NEW 2.0

tag [<name>] <label> [= <value>]

Attaches a string label (and optional value) to an effect instance as metadata. Tags may be tested in event conditions and are visible to interrupt operators. Common uses include marking an effect's "generation," tracking intensity levels, or signalling state to nested scripts.

tag bolt generation = 1
tag wall active

Testing a tag in an event: if (bolt tagged generation = 1) then …

6.10 emit NEW 2.0

emit [<name>] <Effect> [rate <N> per <duration>] [toward <reference>]

Causes an effect instance to continuously spawn particles or pulses of a secondary effect type. The optional rate clause sets emission frequency (default: continuous). The optional toward clause directs emission; without it, emission is omnidirectional.

create Fire torch
emit torch Smoke rate 1 per 6 sec
emit wall Acid rate 3 per 1 sec toward lookat orc

7. Path (Shape) Operators

Path operators are sub-commands and must appear inside a shape block. They define the 2D outline or 3D form of an effect. The implicit cursor starts at the effect's anchor point.

7.1 lineto

lineto <thickness>thick <distance> pointdir [smooth]
lineto <thickness>thick lookat <object> [smooth]
lineto <thickness>thick trace

Draws a line from the current cursor position. smooth renders the line as a Bézier curve rather than a straight segment. trace follows the caster's hand movement in real-time.

lineto 2"thick 10' pointdir
lineto 1"thick lookat orc smooth
lineto 1"thick trace

7.2 arcto NEW 2.0

arcto <thickness>thick <radius> <degrees> [cw | ccw]

Draws a circular arc from the current cursor position with the given radius and angular extent. cw (clockwise) and ccw (counter-clockwise) specify direction; default is ccw.

arcto 1"thick 5' 180 ccw
arcto 2"thick 10' 90 cw

7.3 fill

fill

Fills the closed polygon defined by the preceding lineto and arcto commands. The outline must form a closed loop (last vertex coincides with first) or SDL will close it automatically by drawing a straight line from the last cursor position back to the start.

7.4 surface

surface <thickness>thick [lookat] <object>

Conforms the effect to the outer surface of the named object with uniform thickness, like a second skin. Used for auras and coatings.

surface 1'thick lookat chest
surface 2"thick me

7.5 volume

volume [lookat] <object>

Fills the entire interior volume of the named object with the effect.

volume lookat barrel
volume me

7.6 extrude NEW 2.0

extrude <distance> [along <axis> | pointdir | lookat <object>]

Takes the 2D shape defined by preceding path operators and extrudes it into a 3D solid by projecting it the given distance along the specified direction. Converts a flat shape into a prism or irregular solid.

-- Create a fire wall with depth
shape mywall
  lineto 1"thick 20' pointdir
  fill
extrude 10'

7.7 sphere NEW 2.0

sphere <radius> [hollow]

Creates a spherical effect centred on the anchor point. hollow produces only the shell (useful for barriers); without it, the sphere is solid throughout.

sphere 20' hollow
sphere 5'

7.8 cone NEW 2.0

cone <length> <angle> [pointdir | lookat <object>]

Creates a cone-shaped effect emanating from the anchor point. angle is the full opening angle in degrees. Direction defaults to pointdir.

cone 30' 60 pointdir
cone 15' 90 lookat orc

7.9 ring NEW 2.0

ring <radius> <thickness>thick [<height>]

Creates a torus or ring-shaped effect centred on the anchor point. Optional height extrudes the ring into a cylindrical annulus.

ring 10' 1'thick
ring 5' 6"thick 3'

8. Flow Control Operators

8.1 halt

halt

Immediately stops execution of the current script. All active effects created by this script persist until individually destroyed, unless the game system's rules dictate otherwise.

8.2 if…then…else

if <event_expr>
then
  <operator1>
  [<operator2> …]
[else
  <operator1>
  …]

Evaluates the event expression and executes the then block if it is true, otherwise executes the optional else block. Nesting is permitted: an if may appear inside either block.

if (orc "charge" 20')
then
  create Electricity bolt
  move bolt to lookat orc
else
  create Fire bolt
  move bolt to lookat target

8.3 repeat…until

repeat
  <operator1>
  [<operator2> …]
until <event_expr>

Executes the enclosed block repeatedly. The until condition is evaluated after each iteration (do-while semantics). If multiple conditions follow until, any one of them terminates the loop.

8.4 wait

wait <duration>
wait until <event_expr>

Suspends script execution. The first form resumes after the duration elapses. The second form resumes as soon as any listed event condition becomes true. Resources are consumed throughout the wait.

wait 10 sec
wait until orc "help" 30'
wait until (orc dead) or (me "abort")

8.5 while NEW 2.0

while <event_expr>
  <operator1>
  [<operator2> …]
end

Evaluates the event expression before each iteration (while-do semantics). If the condition is false initially, the body is never executed. The block is terminated by end.

while not (orc dead) and (orc 30')
  move bolt to lookat orc
  wait 1 sec
end

8.6 for NEW 2.0

for <N> times
  <operator1>
  [<operator2> …]
end

Executes the enclosed block exactly N times, then continues execution past the end. N must be a positive integer literal.

for 3 times
  create Electricity pulse
  scale pulse 5'
  wait 1 sec
  destroy pulse
end

8.7 foreach NEW 2.0

foreach <creature-type> in <proximity> as <alias>
  <operator1>
  [<operator2> …]
end

Iterates over every creature of the given type within the given proximity at the time of evaluation. The alias keyword is bound to each creature in turn and may be used as an object reference within the block.

foreach orc in 30' as foe
  create Fire bolt
  move bolt to lookat foe
  wait 1 sec
  destroy bolt
end

8.8 skip NEW 2.0

skip [to <breakpoint>]

Inside a loop, skips the remainder of the current iteration and begins the next. Without the optional to clause, skips to the end of the innermost enclosing loop body. With the clause, skips to the named breakpoint label within the loop. Analogous to continue in conventional languages.


9. Event Operators (Runtime Detection)

Event operators are used as arguments to flow-control operators and do not appear as standalone lines. They are fully catalogued in Section 5. This section summarises their syntactic role.

9.1 Logical Operators

See Section 5.10. Precedence: not > and > or. Use parentheses to override.

9.2 interrupted

if interrupted [by <being>]
then …

Fires when this running script is targeted by an external interrupt operator. The optional by <being> clause tests whether a specific caster issued the interrupt.

9.3 General Event Syntax

<subject> <predicate> [<proximity>]

Subject is any object reference or creature type. Predicate is a keyword from Sections 5.1–5.9 or a string literal for speech detection. Proximity is an optional distance literal; if omitted, the event is detected at any range.


10. Special Operators

10.1 bind

bind [<spellname>] to touch <object>
bind [<spellname>] to <location_ref>

Anchors the spell's reference frame to an object or location. After binding, distance and direction arguments are relative to the bound object rather than the caster. A spell bound to a moving object tracks it automatically.

bind to touch staffend
bind to lookat door

10.2 interrupt

interrupt <spellname> at "<breakpoint>" [revert]
  <operator1>
  [<operator2> …]

Modifies a currently running spell at a named breakpoint. The new operator block replaces execution at that point. revert makes the change apply for one iteration only (inside a loop) before restoring the original code; without revert, the change is permanent for the spell's lifetime.

interrupt firewall at "main_loop" revert
  scale myflame 20'x 10'y 1"z

10.3 makeowner

makeowner <spellname> touch <newcaster>

Transfers ownership and resource obligation of a running script to another mage, who must physically touch the original caster. The new owner must have sufficient resources to maintain the spell.

10.4 range / power

range <spellname> <multiplier>
power <spellname> <multiplier>

Adjusts the effective maximum range or power (intensity) of an active spell by the given multiplier. Both operators increase resource cost multiplicatively. Multipliers must be positive non-zero numbers.

range firewall 2
power bolt 1.5

10.5 resume

resume [<spellname>] at "<breakpoint>"

Continues execution of a paused or interrupted script from the named breakpoint. Typically used inside an if interrupted block.

10.6 inscribe NEW 2.0

inscribe <spellname> on <object> [trigger <event_expr>]

Stores the named spell script into a physical object (scroll, rune stone, floor, door, etc.) as a dormant glyph. The optional trigger clause specifies the event that activates the inscribed spell; without it, the spell triggers when the object is touched. Inscribing consumes the spell points normally required to run it; those resources are locked in the object until the spell fires or is dispelled.

inscribe fireball on doorframe trigger (anyone enter 5')
inscribe torch on lantern trigger (anyone "light" 2')

10.7 link NEW 2.0

link <name1> to <name2> [mirror | inverse | sync]

Creates a live relationship between two effect instances:

create Fire left_flame
create Fire right_flame
link left_flame to right_flame inverse
move left_flame to 10' pointdir  -- right_flame moves -10' simultaneously

10.8 seal NEW 2.0

seal [<spellname>] [against <effect_type>] [duration <dur>]

Locks a spell script against external interrupt attempts. A sealed spell cannot be modified by another caster's interrupt unless that caster beats a contested magic check (game-system dependent). The optional against clause limits sealing to a specific effect type. The optional duration clause sets how long the seal holds; it persists permanently otherwise.

seal firewall duration 1 hr
seal ward against Dispel

10.9 mask NEW 2.0

mask [<name>] as <Effect> [to <creature_type>]

Causes an effect instance to appear as a different effect type when detected (magically or mundanely). The optional to clause limits the disguise to a specific category of observer; others see the true effect. Dispel or high-level detection magic may pierce the mask (game-system dependent).

create Necrotic field
mask field as Illusion       -- appears as a visual illusion to everyone
mask field as Blessing to human  -- appears as a blessing to humans only

11. Spell Points & Cost Evaluation

Every SDL script has a calculable Spell Point (SP) cost derived from what the script creates, how large and how long it persists, and how structurally complex the script itself is. Spell Points are the caster's finite magical resource. A caster cannot execute a script whose total cost exceeds their available SP pool.

Cost is evaluated in four layers — Effect, Area, Duration, and Structure — then combined by the formula in §11.8. Each layer is described in full below, followed by worked examples for every script in Section 14.

SDL spell point costs reflect the magical labour of constructing the effect, not game-system spell levels. The two scales are correlated but not identical; a D&D spell level represents additional constraints (verbal components, memorisation slots, caster level) that SDL does not model. The reference bands in §11.11 are advisory.

11.1 Overview of the Four Layers

LayerWhat it measuresHow it contributes
A — Effect TierThe intrinsic power of the magical phenomenonBase SP per create
B — Area BonusHow large a region the effect fillsAdded to Effect Tier
C — Duration AdjectiveHow the effect's lifetime is managed (instant, duration, concentrate, or lasting)Added to Effect Tier + Area, or paid per round
D — Harm SurchargeWhether the effect damages or harms in an area×1.5 multiplier on A+B+C, if applicable

These four layers together form the effect cost for a single create. A script that creates multiple effects sums their individual effect costs. The duration adjective — instant, duration, concentrate, or lasting — is declared directly on the create line, making the cost and lifetime of every effect readable without tracing the rest of the script. On top of effect costs, structural costs (§11.6) are added for flow-control operators, and special surcharges (§11.7) are added for advanced operators.

11.2 Layer A — Effect Tier

Every effect keyword in the Core Effects catalogue (Section 4) belongs to one of five tiers. The tier value is the base SP cost for a single create of that effect, before area or duration are considered.

Tier 1 — 1 SP: Ambient & Utility

Effects with no inherent danger and negligible physical force.

Light 1 SP
Sound 1 SP
Mist 1 SP
Rain 1 SP
Smoke 1 SP
Ash 1 SP
Whisper 1 SP
Tier 2 — 2 SP: Common Elemental & Enchantment

Frequently encountered effects; dangerous at scale but widely understood.

Fire 2 SP
Frost 2 SP
Ice 2 SP
Water 2 SP
Steam 2 SP
Air 2 SP
Wind 2 SP
Earth 2 SP
Sand 2 SP
Mud 2 SP
Force 2 SP
Web 2 SP
Shadow 2 SP
Darkness 2 SP
Sleep 2 SP
Fear 2 SP
Charm 2 SP
Suggestion 2 SP
Blessing 2 SP
Aura 2 SP
Illusion 2 SP
Glamour 2 SP
Silence 2 SP
Entangle 2 SP
Barkskin 2 SP
Spore 2 SP
Pollen 2 SP
Tier 3 — 3 SP: Advanced Elemental & Medium Arcane

Significantly more dangerous or magically complex; requires real expertise.

Acid 3 SP
Lightning 3 SP
Electricity 3 SP
Thunder 3 SP
Lava 3 SP
Magma 3 SP
Plasma 3 SP
Shockwave 3 SP
Vibration 3 SP
Magnetism 3 SP
Pressure 3 SP
Vacuum 3 SP
Flash 3 SP
Daylight 3 SP
Radiance 3 SP
Blindness 3 SP
Invisibility 3 SP
Phantasm 3 SP
Mirage 3 SP
Ward 3 SP
Rune 3 SP
Dispel 3 SP
Null 3 SP
Hex 3 SP
Curse 3 SP
Confusion 3 SP
Compulsion 3 SP
Polymorph 3 SP
Petrify 3 SP
Poison 3 SP
Blight 3 SP
Wither 3 SP
Spectral 3 SP
Storm 3 SP
Earthquake 3 SP
Quake 3 SP
Resonance 3 SP
Discord 3 SP
Shout 3 SP
Scry 3 SP
Mirror 3 SP
Sigil 3 SP
Madness 3 SP
Memory 3 SP
Telepathy 3 SP
Tier 4 — 5 SP: Severe & Forbidden

Reality-bending, life-altering, or planar effects. Demanding of caster and world alike.

Necrotic 5 SP
Drain 5 SP
Undead 5 SP
Soul 5 SP
Plague 5 SP
Domination 5 SP
Gravity 5 SP
Haste 5 SP
Slow 5 SP
Stasis 5 SP
Aging 5 SP
Timewarp 5 SP
Rewind 5 SP
Phase 5 SP
Ethereal 5 SP
Fold 5 SP
Pocket 5 SP
Summon 5 SP
Banish 5 SP
Gate 5 SP
Portal 5 SP
Teleport 5 SP
Dimension 5 SP
Anchor 5 SP
Consecration 5 SP
Desecration 5 SP
Swarm 5 SP
Tier 5 — 8 SP: Supreme

The most fundamental or dangerous effects in the catalogue; raw magical potential itself, and rifts in the fabric of reality.

Arcane 8 SP
Prismatic 8 SP
Foresight 8 SP
Astral 8 SP
Rift 8 SP
Composite Effects

Composite effect keywords (Section 4.13) cost the sum of their constituent tiers.

CompositeConstituentsCost
FirestormFire(2) + Wind(2) + Thunder(3)7 SP
IcestormIce(2) + Wind(2)4 SP
BloodfireFire(2) + Necrotic(5)7 SP
StormwallWind(2) + Lightning(3) + Force(2)7 SP
MiasmaPoison(3) + Darkness(2) + Fear(2)7 SP
FrostfireFire(2) + Frost(2)4 SP
VoidboltArcane(8) + Gravity(5) + Darkness(2)15 SP
ThornstormThorn(2) + Wind(2) + Earth(2)6 SP
SoulfireFire(2) + Soul(5) + Radiance(3)10 SP

11.3 Layer B — Area Bonus

The Area Bonus is added to the Effect Tier to account for how large a region the effect occupies. Larger areas cost significantly more. The bonus depends on whether the effect is a volume/sphere, a line, or a surface coating.

Spheres, Cubes, and Filled Volumes (by radius or half-dimension)

Radius / Half-sideArea BonusTypical use
Point source (0)+0Touch effects, single darts
Tiny (1–5')+2Small burst, Dispel target zone
Small (6–10')+4Acid splash, Flash
Medium (11–20')+7Fireball, Sleep, Web cube
Large (21–30')+10Fog Cloud, Spirit Guardians
Huge (31–50')+14Cloudkill, Time Stop field
Vast (>50')+14 (capped)Any effect beyond 50' radius

The area bonus is capped at +14. Effects beyond 50' radius do not cost more in area bonus — the Harm Surcharge and Duration Bonus handle the additional power of large lingering areas.

Lines (by length)

LengthArea BonusExample
≤20'+2Short Wall
21–60'+4Wall of Fire (60')
61–100'+6Lightning Bolt (100')
>100'+6 (capped)Any line beyond 100'

Surfaces & Volumes (objects)

Shape operator usedArea Bonus
surface (wraps one creature or object)+1
volume (fills one object's interior)+2

11.4 Layer C — Duration Adjective

Every effect created in a script carries exactly one duration adjective, declared directly on the create line. The adjective determines how the effect's lifetime is managed and how its SP cost is structured. Making it explicit on the line of creation means the cost and behaviour of any effect can be read without tracing the rest of the script.

Syntax

create <Effect> <name> instant
create <Effect> <name> duration <amount>
create <Effect> <name> concentrate
create <Effect> <name> lasting

If no adjective is given, the runtime infers from context — but explicit is always preferred and required for any effect that persists beyond the line of creation.

The Four Duration Adjectives

AdjectiveDuration BonusSP at cast Sustain / roundResult object
instant +0 Base cost only. Paid once. None. Closed the moment the effect fires.
duration <t> From table (§11.4a), based on t. Base + duration bonus. Paid once upfront. None. The caster is free to do other things. Open until t expires or the effect is destroyed.
concentrate +0 at cast. Base cost only. Paid once. ⌈(Tier + AreaBonus) ÷ 5⌉ SP per round, minimum 1. Paid each round concentration continues. Open and live — target references remain resolvable — for as long as concentration continues.
lasting +20. Base + 20. Paid once. Script then has no further relationship with the effect. None. SDL is done. Closed when the script halts. Target references immediately unresolvable.

11.4a Duration Bonus Table

This table is shared between duration and concentrate adjectives. For duration effects, the bonus is paid as a lump sum at cast. For concentrate effects, the equivalent cost is paid as a per-round installment — the same total for the same amount of time, spread across the rounds rather than charged upfront.

AmountDuration BonusEquivalent Concentration
Instant (≤2 sec)+0Use instant adjective instead
Fleeting (3–30 sec, ≤5 rounds)+1≈ 1 SP/round for up to 5 rounds
Brief (31 sec – 1 min, ≤10 rounds)+3≈ 1 SP/round for up to 10 rounds
Moderate (1–10 min, ≤100 rounds)+5≈ 1 SP/round for up to 100 rounds
Extended (10 min – 1 hr, ≤600 rounds)+8≈ 1 SP/round for up to 600 rounds
Long (1–8 hr, ≤4800 rounds)+12≈ 1 SP/round for up to 4800 rounds

The per-round concentration cost is ⌈(Tier + AreaBonus) ÷ 5⌉, minimum 1 SP per round. This is proportional to the effect's power, not a flat rate — concentrating on a Wall of Fire is more taxing than concentrating on a Fly. Over any given span of time, the total paid by concentrate approximates what duration would have cost for that same span, but concentrate has no declared ceiling: it continues as long as the caster keeps paying and the SP pool holds.

The economic trade-off: duration is cheaper in SP for a known, bounded time — you pay the lump sum and walk away. concentrate is more flexible but costs exclusivity: only one script may be concentrated on at a time. Over a long engagement, concentration can exceed what repeated fixed-duration casts would have cost; it pays for open-ended persistence and live targeting, not economy.

The lasting Adjective — No SDL Relationship

lasting is not "permanent" in the sense of indestructible. It means that SDL has no further relationship with the effect after the script halts. The effect exists in the world from the moment of creation, under entirely natural rules, until the world ends it — through damage, dispel, age, or circumstance.

Raise Dead does not make a creature immortal. Animate Dead's control binding can be broken by turning or dispel. A conjured wall can be demolished. lasting simply means the script is done and has no ongoing cost or awareness. The +20 duration bonus reflects that SDL is paying for all possible time upfront — since it cannot predict or manage when the effect ends.

-- lasting effects: SDL closes its relationship when the script halts
create Radiance ritual duration 1 min    -- ritual during casting
create Blessing spark lasting            -- the life itself; SDL is done
                                         -- the creature exists and can die again

Examples of Each Adjective

create Fire bolt instant             -- flash and gone; no ongoing cost
create Sleep cloud duration 1 min    -- runs for 1 minute; +5 bonus paid upfront
create Stasis binding concentrate    -- runs until concentration drops; 1 SP/round
create Undead binding lasting        -- control link sealed into the world; SDL done

11.5 Layer D — Harm Surcharge

An effect that both covers an area greater than a point and directly causes damage or a harmful involuntary condition is subject to the Harm Surcharge. The entire effect cost (Tier + Area + Duration Bonus) is multiplied by 1.5, rounded up. Point-source harmful effects do not receive the surcharge — the effect tier accounts for their danger.

Effects that trigger the Harm Surcharge when area > point

Fire, Frost, Ice, Acid, Lightning, Electricity, Thunder, Lava, Magma, Plasma, Force, Shockwave, Necrotic, Drain, Blight, Plague, Poison, Dispel (area), Radiance (area), Blade, Thorn, Chain, Web (restraining), Storm, Earthquake, Quake, Discord, Resonance, Shout, and all Composite effects.

Effects that do not trigger the surcharge (even when area > point)

Sleep, Charm, Suggestion, Fear (aura), Domination, Compulsion, Confusion, Silence, Light, Darkness, Shadow, Mist, Smoke, Illusion, Glamour, Mirage, Invisibility, Aura, Blessing, Ward, Rune, Consecration, Desecration, Haste, Slow, Stasis, Scry, Telepathy, Foresight, Phase, Ethereal, Astral, Pocket, Anchor.

11.5a Layer D₂ — Miracle Modifier

The Miracle Modifier (×3) applies to effects that override irreversible natural processes — death, permanent transformation, causality. Applied before the Harm Surcharge.

EffectCost = ⌈(Tier + AreaBonus + DurationBonus) × MiracleMultiplier × HarmMultiplier⌉

Always-Miracle Effects

EffectWhy always a miracle
RewindReverses local causality — undoes events already occurred
SoulDirect manipulation of spiritual essence beyond the material plane
ForesightReads probability-waves of events not yet occurred; bends fate

Contextual Miracle Effects

Any effect becomes a miracle when it is the primary create in a script reversing: death, permanent physical transformation (petrification, flesh-to-stone), or permanent ability drain or aging. The caster declares the miracle create at casting time. Only one create per script may bear the modifier unless the GM rules otherwise.

The Miracle Modifier applies to effects that work against natural law. If the physical world resists the casting, it is a miracle.

11.6 Structural Costs

Flat SP charges for flow-control and shaping operators, added after all effect costs. Operators that are purely positional or cosmetic cost 0 SP.

OperatorStructural Cost
move, scale, rotate, destroy, tag, halt, fixed wait0 SP
wait until <event>1 SP
ifthen1 SP
else1 SP (additional)
repeatuntil2 SP
whileend2 SP
for N timesend⌈N ÷ 3⌉ SP (min 1)
foreachend3 SP
shape block header1 SP
Each path sub-operator (lineto, arcto, fill, surface, volume, extrude, sphere, cone, ring)1 SP each
clone1 SP
merge2 SP
emit2 SP

11.7 Special Operator Surcharges

OperatorSurchargeNotes
bind+2 SPPer bind call
inscribe⌈inscribed spell cost × 1.5⌉ SPResources locked in object at inscription
interrupt+4 SPPaid by the interrupting caster
makeowner+3 SPPaid by original owner at transfer
range ×N+2 × (N − 1) SP
power ×N+3 × (N − 1) SP
resume+1 SPPer resume call
link+2 SPAny mode
seal+3 SPPer seal call
mask+2 SPPer mask call

11.8 The Total Cost Formula

CastCost  =  Σ EffectCosts  +  StructuralCosts  +  SpecialSurcharges

where for each `create` call:

  EffectCost  =  ⌈(Tier + AreaBonus + DurationBonus)
                  × MiracleMultiplier
                  × HarmMultiplier⌉

  DurationBonus  =  from §11.4a table, based on duration adjective:
                    instant         →  +0
                    duration <t>    →  bonus for time t
                    concentrate     →  +0 at cast; sustain paid per round (§11.10)
                    lasting         →  +20

  MiracleMultiplier  =  3.0 if miracle (§11.5a), else 1.0
  HarmMultiplier     =  1.5 if area > point AND harmful, else 1.0

CastCost is deducted from the pool when the script begins. For concentrate effects this is the base only — total SP accumulates per round until concentration ends (§11.10). Effects inside for N times loops are paid N×; effects inside repeat or while loops are paid 1× at cast.

11.9 The Result Object

Every SDL script produces a result object on termination — the sole mechanism by which information about what a spell achieved is made available. Result objects are private to the script that produced them. Their contents, including target references, do not escape into the game world.

Result Object Fields

result {
    status       -- return status code (§11.14)
    sp_estimated -- SP calculated statically at cast time
    sp_actual    -- SP truly consumed (finalised on termination)
    sp_refund    -- sp_estimated − sp_actual  (≥ 0; credited back to pool on close)
    count        -- number of targets successfully affected (integer)
    affected     -- set of target references: creatures/objects the effect landed on
    unaffected   -- set of target references: candidates the effect did not land on
    value        -- scalar integer (area covered, distance travelled, etc.)
}

Target Reference Privacy

Target references inside affected and unaffected are opaque handles. They resolve only within the script that produced the result object, or within a chained script that receives it as input while concentration is active (§11.10). When the result object closes, all target references become unresolvable. Operators acting on a stale reference return BLOCKED. Reacquisition is required.

Result Object Set Operations

OperationSyntaxReturns
Unionresult_a.affected union result_b.affectedAll targets hit by either
Intersectionresult_a.affected intersect result_b.affectedTargets hit by both
Differenceresult_a.affected minus result_b.affectedTargets hit by first, not second
Count compareresult_a.count > result_b.countBoolean
SP totalresult_a.sp_actual + result_b.sp_actualInteger

Iterating a Result Set

foreach result_a.affected as victim
  create Illusion zzz instant
  move zzz to lookat victim
  surface 1"thick lookat victim
  wait 1 min
  destroy zzz
end

The idiomatic SDL pattern for chaining a secondary effect onto the population a primary effect successfully landed on — the Sleep → Zzz marking made concrete.

11.10 Concentration

A concentrate adjective on a create line switches that effect to open-ended concentration mode. The effect persists for as long as the caster keeps paying the per-round sustain cost, with no declared ceiling. Concentration ends when the caster chooses to release it, when the SP pool is exhausted, or when an external interrupt breaks it.

Exclusivity

A caster may concentrate on only one script at a time. This is the defining cost of the concentrate adjective — not additional SP, but the sacrifice of all other concentration-based activity for the duration. Starting a new concentration script automatically releases the previous one.

Per-Round Sustain Cost

SustainPerRound  =  ⌈(Tier + AreaBonus) ÷ 5⌉   (minimum 1 SP per round)

The sustain rate is proportional to the effect's power — larger, more powerful effects are harder to hold. At the start of each combat round (every 6 seconds), this amount is deducted from the SP pool. If the pool cannot cover it, costfailed fires. If unhandled, the script closes with status EXHAUSTED.

Live Targeting During Concentration

While concentration is maintained, the result object remains open and all target references within its affected and unaffected sets remain resolvable. A subsequent foreach in the same script session may iterate these sets while concentration holds. The moment concentration ends the references go dark — the caster's live map of who was affected is erased. Releasing concentration on Sleep does not merely wake the creatures; it removes the caster's knowledge of exactly which ones they were.

Concentration Examples

-- Hold Person: Stasis(4) + surface(+1) + concentrate(+0) = 5; sustain ⌈5÷5⌉ = 1 SP/round
create Stasis binding concentrate
surface 1"thick lookat target
mask binding as Arcane
wait until (target save) or (me loseconcentration)
destroy binding

-- Fly: Air(2) + surface(+1) + concentrate(+0) = 3; sustain ⌈3÷5⌉ = 1 SP/round
create Air lift concentrate
surface 1"thick lookat target
wait until (me loseconcentration) or (after 10 min)
destroy lift

-- Wall of Fire: Fire(2) + line60'(+4) + concentrate(+0) = 6; ×1.5 harm = 9 cast
--              sustain ⌈6÷5⌉ = 2 SP/round
create Fire firewall concentrate
shape firewall
  lineto 1"thick 60' pointdir
  fill
wait until (me loseconcentration)
destroy firewall

11.11 Spell Point Pools & Recovery

Caster GradeSP PoolTypical capability
Novice20 SPCantrips and basic 1st-level effects
Apprentice40 SPConfident 2nd–3rd level effects
Journeyman65 SP4th–5th level effects, modest combinations
Adept95 SP6th–7th level, complex multi-effect scripts
Master130 SP8th–9th level, elaborate sustained constructs
Archmage180 SPSupreme spells; Wish, Meteor Swarm, Time Stop

Recovery [House Rule]: Full recovery after a long rest (8 hours). Short rest (1 hour) restores ⌊Pool ÷ 4⌋ SP. Two casters using makeowner may jointly fund a spell, each paying their share from their own pool.

11.12 Variable SP & Reconciliation

instant, duration, and lasting scripts have fixed SP costs deducted in full at cast. concentrate scripts have variable costs:

  1. At cast — deduct sp_estimated (the CastCost, with +0 duration bonus) from the pool.
  2. Each round — deduct SustainPerRound from the pool.
  3. On termination — finalise sp_actual = CastCost + total sustain paid. Credit sp_refund back to pool.

For duration scripts that end early — when an event fires before the maximum duration expires — the difference between estimated cost and actual execution cost is returned as sp_refund and credited back. A charm dispelled after 10 minutes returns the Long-bracket overpayment relative to the Moderate bracket.

sp_refund  =  sp_estimated − sp_actual   (≥ 0, always)
A script cannot cost more than estimated — the system charges maximum expected cost upfront. The refund mechanism ensures the caster never overpays for a spell that resolves faster than expected.

11.13 Saving Throws

When an SDL effect inflicts damage or imposes a condition, affected targets make a saving throw appropriate to the effect type (Section 4). The game system determines DCs and outcomes. The result object's affected set contains targets that failed their save; unaffected contains those that succeeded. The host populates these after resolving saves.

11.14 Return Status Codes

Every operator and every script termination sets a status code on the result object. Six codes. Intentionally generic — the caller knows what was attempted; the code names only the category of outcome. The value field carries the quantitative result when status alone is insufficient.

CodeMeaning
OKCompleted as intended.
BLOCKEDCould not reach the target — obstruction, antimagic, invalid surface, or stale target reference.
REFUSEDActively prevented — a seal held, an immune creature, a protected object.
EXHAUSTEDSP pool ran dry before the script could complete.
INTERRUPTEDTerminated by an external interrupt before natural completion.
TIMEOUTA wait until or loop hit its ceiling without the expected condition firing.
BLOCKED is a statement about the world, not a failure of the spell. A Fireball inside a Null zone returns BLOCKED with count = 0. The spell was cast correctly.

11.15 Reference SP Bands

SP Cost RangeApprox. D&D EquivalentExample scripts (cast cost)
1–5 SPCantripCure Wounds (5)
6–12 SP1st levelMagic Missile (7), Misty Step (8), Dispel Magic (9), Fly (8 + 1/rnd), Torch (7 + 1/rnd)
13–22 SP2nd levelSleep (14), Hold Person (11 + 1/rnd), Invisibility (14), Fireball (17), Lightning Bolt (17), Polymorph (16), Charm Person (22), Wall of Fire (15 + 2/rnd)
23–36 SP3rd levelUndead Sentry (27), Frost Nova (29), Banishment (21 + 1/rnd), Firewall (14 → now duration)
37–55 SP4th levelWeb (41), Raise Dead (45), Animate Dead (54)
56–80 SP5th levelSealed Ward (57)
81–110 SP6th–7th levelTime Stop (91)
111–150 SP8th–9th levelMeteor Swarm (135)
150+ SPLegendary / ArtifactWish (150 SP minimum enforced)
Concentration scripts show cast cost plus per-round sustain rate. Total SP is open-ended and depends entirely on how long concentration is maintained.

11.16 Worked Cost Examples

The following table gives the computed SP cost for every script in Section 14, with duration adjective noted for each primary effect. Concentrate scripts show base cast cost and per-round sustain. All others show a single total.

#Spell Primary Effect & Adjective Effect Cost Structural + Special Cast Cost
14.1Torch Fire concentrate
Tier 2 + point(0) + conc(+0) = 2; sustain ⌈2÷5⌉=1/rnd
2 SP baserepeat(2)+wait_until(1)+bind(2) = 5 7 SP + 1/rnd
14.2Firewall Fire duration 3 rounds
Tier 2 + line10'(+2) + brief(+3) = 7; ×1.5 harm = 11
11 SPshape(1)+lineto(1)+fill(1) = 3 14 SP
14.3Boltbox Fire instant / Electricity instant
Fire(2)+point+instant=2; Elec(3)+point+instant=3
5 SPrepeat(2)+if(1)+if(1)+else(1)+wait_until(1)+bind(2) = 8 13 SP + loop
14.4Alarm Rune Sound lasting
Tier 1 + large(+10) + lasting(+20) = 31
31 SPinscribe: ⌈31×1.5⌉=47 78 SP
14.5Frost Nova Frost instant + Fire duration fleeting
Frost(2)+medium(+7)+instant=9; ×1.5harm=14; Fire(2)+medium(+7)+fleeting(+1)=10
24 SPsphere(1)+sphere(1)+for(1)+link(2) = 5 29 SP
14.6Undead Sentry Fear duration moderate + Radiance instant
Fear(2)+large(+10)+moderate(+5)=17; Radiance(3)+point+instant=3
20 SPsphere(1)+repeat(2)+foreach(3)+if(1) = 7 27 SP
14.7Sealed Ward Necrotic lasting + Necrotic burst instant
Necrotic(5)+tiny(+2)+lasting(+20)=27; ×1.5harm=41; burst(5)+medium(+7)+instant=12; ×1.5harm=18
59 SPsphere(1)+wait_until(1)+sphere(1)+bind(2)+mask(2)+seal(3) = 10 69 SP
14.8Fireball Fire streak instant + Fire blast instant
streak(2)+point+instant=2; blast(2)+medium(+7)+instant=9; ×1.5harm=14
16 SPsphere(1) = 1 17 SP
14.9Magic Missile Force instant ×3
Force(2)+point+instant=2; ×3 iterations=6
6 SPfor(1) = 1 7 SP
14.10Sleep Sleep duration 1 min
Sleep(2)+medium(+7)+brief(+3)=12 → moderate bracket: Sleep(2)+medium(+7)+moderate(+5)=14
14 SPsphere(1) = 1 15 SP
14.11Charm Person Charm duration 1 hr
Charm(2)+surface(+1)+long(+12)=15
15 SPsurface(1)+wait_until(1)+mask(2)+seal(3) = 7 22 SP
14.12Web Web duration 1 hr
Web(2)+medium(+7)+long(+12)=21; ×1.5harm=32
32 SPshape(1)+4×lineto(4)+fill(1)+extrude(1)+wait_until(1)+if(1) = 9 41 SP
14.13Hold Person Stasis concentrate
Stasis(4)+surface(+1)+conc(+0)=5; sustain ⌈5÷5⌉=1/rnd
5 SP basesurface(1)+repeat(2)+mask(2) = 5 11 SP + 1/rnd
14.14Lightning Bolt Lightning instant
Lightning(3)+line100'(+6)+instant=9; ×1.5harm=14
14 SPshape(1)+lineto(1)+fill(1) = 3 17 SP
14.15Polymorph Polymorph duration 1 hr
Polymorph(3)+surface(+1)+long(+12)=16
16 SPsurface(1)+wait_until(1)+mask(2) = 4 20 SP
14.16Invisibility Invisibility duration 1 hr
Invisibility(3)+surface(+1)+long(+12)=16
16 SPsurface(1)+wait_until(1) = 2 18 SP
14.17Fly Air concentrate
Air(2)+surface(+1)+conc(+0)=3; sustain ⌈3÷5⌉=1/rnd
3 SP basesurface(1)+repeat(2) = 3 8 SP + 1/rnd
14.18Dispel Magic Dispel instant
Dispel(3)+tiny(+2)+instant=5; ×1.5harm=8
8 SPsphere(1) = 1 9 SP
14.19Wall of Fire Fire concentrate
Fire(2)+line60'(+4)+conc(+0)=6; ×1.5harm=9; sustain ⌈6÷5⌉=2/rnd
9 SP baseshape(1)+lineto(1)+fill(1)+repeat(2) = 5 15 SP + 2/rnd
14.20Cure Wounds Blessing instant
Blessing(2)+surface(+1)+instant=3
3 SPsurface(1) = 1 4 SP
14.21Raise Dead Radiance duration 1 min (miracle) + Blessing lasting (miracle)
Radiance(3)+surface(+1)+moderate(+5)=9; ×3miracle=27; Blessing(2)+surface(+1)+lasting(+20)=23; ×3miracle=69
96 SPsurface(1)+for(1)+surface(1)+power×2(3) = 6 102 SP
14.22Animate Dead Necrotic instant + Undead binding lasting
Necrotic(5)+surface(+1)+instant=6; Undead(4)+surface(+1)+lasting(+20)=25
31 SPsurface(1)+surface(1)+wait_until(1)+if(1)+surface(1)+surface(1)+wait_until(1)+2×seal(6) = 13 44 SP
14.23Banishment Dimension concentrate + Rift instant
Dimension(4)+tiny(+2)+conc(+0)=6; sustain ⌈6÷5⌉=2/rnd; Rift(8)+tiny(+2)+instant=10; ×1.5harm=15
21 SP basesphere(1)+repeat(2)+if(1)+else(1) = 5 26 SP + 2/rnd
14.24Misty Step Mist instant ×2
Mist(1)+surface(+1)+instant=2; ×2=4
4 SPsurface(1)+surface(1) = 2 6 SP
14.25Meteor Swarm Firestorm instant ×4 + Fire blast instant ×4
Firestorm(7)+point+instant=7→×4=28; Fire(2)+huge(+14)+instant=16; ×1.5harm=24→×4=96
124 SPforeach(3)+4×sphere(4) = 7 131 SP
14.26Time Stop Stasis duration fleeting + 2× Timewarp instant
Stasis(4)+vast(+14)+fleeting(+1)=19; ×1.5harm=29; 2×Timewarp(4)+vast(+14)+instant=18 each→36
65 SP3×sphere(3)+wait_until(1) = 4 69 SP
14.27Wish Prismatic duration brief + Arcane wave instant + Fire blast instant + Arcane fatigue duration fleeting
Prismatic(8)+surface(+1)+brief(+3)=12; Arcane(8)+small(+4)+instant=12; ×1.5harm=18; Fire(2)+medium(+7)+instant=9; ×1.5harm=14; Arcane(8)+surface(+1)+fleeting(+1)=10
54 SPsurface(1)+sphere(1)+for(2)+sphere(1)+surface(1)+seal(3) = 9 63 → 150 minimum
Special Rule — Wish: The SDL formula calculates Wish at 63 SP. The minimum cost is enforced at 150 SP regardless of script content. Casting Wish also permanently reduces the caster's SP Pool maximum by ⌊Pool ÷ 10⌋ [House Rule].
Note on Raise Dead (14.21): The Blessing that marks the returned life now carries the lasting adjective — the creature exists in the world indefinitely, with SDL having no further relationship with it. Applying the miracle modifier to a lasting effect is what makes Raise Dead so expensive (102 SP): SDL is paying for the creature's entire potential future existence at the miracle rate. This is the correct behaviour. The creature can still die again; SDL is simply done.

12. Error Conditions

The following conditions cause the SDL parser or runtime to generate an error. The behaviour on error (halt, skip, or propagate) is implementation-defined; the most common convention is immediate script termination with the error code visible to the caster.

ErrorCause
NO_DECLARATIONScript does not begin with a valid <name>: declaration.
UNKNOWN_KEYWORDA token is not a valid operator, sub-operator, effect name, or event predicate.
UNKNOWN_EFFECTAn effect name is not in the Core Effects catalogue (Section 4).
UNDEFINED_NAMEAn operator references an effect name that was never created in this script.
DUPLICATE_NAMEA create assigns a name already in use by a live effect in this script.
SHAPE_OUTSIDEA path sub-operator (lineto, fill, etc.) appears outside a shape block.
UNCLOSED_SHAPEA shape block has no path sub-operators or is empty.
UNMATCHED_BLOCKA compound operator (if, repeat, while, for, foreach) is missing its closing keyword or delimiter.
BAD_DISTANCEA distance literal has an unrecognised unit or is negative.
BAD_DURATIONA duration literal has an unrecognised unit or is negative.
BAD_ANGLEAn angle literal has an unrecognised axis suffix.
RESERVED_IDENTIFIERAn identifier matches a reserved word (Section 1.4).
SELF_INTERRUPTA script attempts to interrupt itself.
SEALED_TARGETAn interrupt targets a sealed spell and the caster fails the contest.
MERGE_TYPE_CONFLICTA merge combines two effect types that have no defined composite (a warning in lenient mode).
INSCRIBE_COST_INSUFFICIENTThe caster lacks the resources needed to lock into the inscribe operation.
INFINITE_LOOPA repeat or while loop has executed beyond the implementation's safety limit without an exit condition triggering. [House Rule]
RESOURCE_EXHAUSTEDOngoing resource cost cannot be met; spell terminates if costfailed event is unhandled.
OUT_OF_RANGEAn operator attempts to position an effect beyond the caster's maximum range; terminates if outofrange event is unhandled.

13. Formal Grammar (EBNF)

The following Extended Backus–Naur Form grammar describes the complete SDL syntax. Terminals are shown in monospace; the symbol | denotes alternatives; { … } zero or more repetitions; [ … ] optional; ( … ) grouping.

script         ::= declaration { line }
declaration    ::= identifier ":"

line           ::= comment
                 | operator_line

comment        ::= ( "#" | "//" ) { any_char }

operator_line  ::= basic_op
                 | shape_op
                 | flow_op
                 | special_op

-- Basic operators
basic_op       ::= create_op | destroy_op | move_op | rotate_op
                 | scale_op  | shape_block | clone_op | merge_op
                 | tag_op    | emit_op

create_op      ::= "create" effect_name [ identifier ]
destroy_op     ::= "destroy" [ identifier ]
move_op        ::= "move" [ identifier ] "to" move_target
move_target    ::= distance "pointdir"
                 | "lookat" object_ref
                 | coord_expr
                 | object_ref
rotate_op      ::= "rotate" [ identifier ] angle_axis { angle_axis }
                   [ "origin" object_ref ]
scale_op       ::= "scale" [ identifier ] ( coord_expr | distance )
shape_block    ::= "shape" [ identifier ] { path_op }
clone_op       ::= "clone" identifier "as" identifier
merge_op       ::= "merge" identifier identifier [ "as" identifier ]
tag_op         ::= "tag" [ identifier ] string_lit [ "=" string_lit ]
emit_op        ::= "emit" [ identifier ] effect_name
                   [ "rate" integer "per" duration ]
                   [ "toward" object_ref ]

-- Path (shape) sub-operators
path_op        ::= lineto_op | arcto_op | "fill" | surface_op
                 | volume_op | extrude_op | sphere_op | cone_op | ring_op

lineto_op      ::= "lineto" distance "thick" line_target [ "smooth" ]
line_target    ::= distance "pointdir" | "lookat" object_ref | "trace"
arcto_op       ::= "arcto" distance "thick" distance integer [ "cw" | "ccw" ]
surface_op     ::= "surface" distance "thick" [ "lookat" ] object_ref
volume_op      ::= "volume" [ "lookat" ] object_ref
extrude_op     ::= "extrude" distance
                   [ "along" ( "x" | "y" | "z" ) | "pointdir" | "lookat" object_ref ]
sphere_op      ::= "sphere" distance [ "hollow" ]
cone_op        ::= "cone" distance integer [ "pointdir" | "lookat" object_ref ]
ring_op        ::= "ring" distance distance "thick" [ distance ]

-- Flow control
flow_op        ::= halt_op | if_op | repeat_op | wait_op
                 | while_op | for_op | foreach_op | skip_op

halt_op        ::= "halt"
if_op          ::= "if" event_expr "then" { operator_line }
                   [ "else" { operator_line } ]
repeat_op      ::= "repeat" { operator_line } "until" event_expr
wait_op        ::= "wait" ( duration | "until" event_expr )
while_op       ::= "while" event_expr { operator_line } "end"
for_op         ::= "for" integer "times" { operator_line } "end"
foreach_op     ::= "foreach" creature_type "in" distance "as" identifier
                   { operator_line } "end"
skip_op        ::= "skip" [ "to" string_lit ]

-- Special operators
special_op     ::= bind_op | interrupt_op | makeowner_op
                 | range_op | power_op | resume_op
                 | inscribe_op | link_op | seal_op | mask_op

bind_op        ::= "bind" [ identifier ] "to"
                   ( "touch" object_ref | location_ref )
interrupt_op   ::= "interrupt" identifier "at" string_lit [ "revert" ]
                   { operator_line }
makeowner_op   ::= "makeowner" identifier "touch" object_ref
range_op       ::= "range" identifier number
power_op       ::= "power" identifier number
resume_op      ::= "resume" [ identifier ] "at" string_lit
inscribe_op    ::= "inscribe" identifier "on" object_ref
                   [ "trigger" event_expr ]
link_op        ::= "link" identifier "to" identifier
                   [ "mirror" | "inverse" | "sync" ]
seal_op        ::= "seal" [ identifier ]
                   [ "against" effect_name ]
                   [ "duration" duration ]
mask_op        ::= "mask" [ identifier ] "as" effect_name
                   [ "to" creature_type ]

-- Events
event_expr     ::= event_term { ( "and" | "or" ) event_term }
event_term     ::= [ "not" ] event_atom
                 | "(" event_expr ")"

event_atom     ::= creature_event | speech_event | state_event
                 | combat_event | env_event | magic_event
                 | object_event | script_event | temporal_event
                 | "interrupted" [ "by" object_ref ]

creature_event ::= object_ref creature_predicate [ distance ]
speech_event   ::= object_ref string_lit [ distance ]
state_event    ::= object_ref state_predicate
combat_event   ::= object_ref combat_predicate
env_event      ::= env_predicate
magic_event    ::= magic_predicate [ effect_name | identifier ]
object_event   ::= object_ref object_predicate [ "by" object_ref ]
script_event   ::= script_predicate [ object_ref | integer ]
temporal_event ::= "after" duration | "rounds" integer | "turns" integer

-- Terminals
effect_name    ::= (see Section 4 catalogue)
creature_type  ::= identifier  -- any creature-kind name
object_ref     ::= "me" | "target" | "pointdir" | "anyone"
                 | creature_type | identifier
location_ref   ::= distance "pointdir" | "lookat" object_ref | coord_expr
coord_expr     ::= distance "x" [ distance "y" [ distance "z" ] ]
angle_axis     ::= integer ( "x" | "y" | "z" )
distance       ::= number ( "'" | '"' | "m" | "sq" )
duration       ::= number ( "sec" | "s" | "rounds" | "rnd" | "min" | "hr" | "days" )
                 | "permanent"
identifier     ::= letter { letter | digit | "_" }
string_lit     ::= '"' { any_char } '"'
integer        ::= digit { digit }
number         ::= integer [ "." integer ]

14. Example Scripts

This section contains annotated SDL scripts for all of the following spells. Entries 14.1–14.7 are original SDL demonstrations; entries 14.8–14.27 are SDL renderings of the twenty most iconic spells from Dungeons & Dragons, demonstrating how established game-spell mechanics map to SDL constructs.

D&D spell mechanics (ranges, areas, saving throws, damage dice) are described in the annotations for flavour and context. Actual mechanical outcomes remain the province of your game system's ruleset; SDL governs only the spatial and temporal behaviour of the magical effects.

14.1 Torch Spell

torch:
bind to touch staffend      -- special: +2 SP
create Fire flame concentrate    -- tier 2 + point(0) + conc(+0) = 2; sustain ⌈2÷5⌉=1 SP/rnd
scale flame 1"x 1"y 1"z     -- free

repeat                       -- structural: +2 SP
  move flame to staffend     -- free
  wait 6 sec                 -- free (fixed duration)
until me "off"               -- wait-until event: +1 SP

# Effects: 7  |  Structural: repeat(2) + wait-until(1) = 3  |  Special: bind(2)
# TOTAL: 7 SP base + 1 SP/round

Binds the script to the staff tip, creates a small flame, and repositions it every 6 seconds. Ends when the caster says "off."

⟁ SPELL COST7 SP + 1/rnd≈ 1st level

Fire concentrate(2) + repeat(2) + wait_until(1) + bind(2)

14.2 Firewall

firewall:
create Fire myflame          -- tier 2 + line≤10'(+2) + brief(+3) = 7; ×1.5 harm = ⌈10.5⌉ = 11 SP
move myflame to 30' pointdir -- free
shape myflame                -- structural: +1 SP
  lineto 1"thick 10' pointdir  -- structural: +1 SP
  fill                         -- structural: +1 SP
scale myflame 10'x 10'y 1"z -- free
wait 3 rounds                -- free (fixed duration)
destroy myflame              -- free

# Effects: 11  |  Structural: shape(1) + lineto(1) + fill(1) = 3  |  Special: none
# TOTAL: 14 SP

Creates a 10×10-foot firewall 30 feet away, sustains it for 3 rounds, then dispels it.

⟁ SPELL COST14 SP≈ 2nd level

Fire×harm(11) + shape/lineto/fill(3)

14.3 Adaptive Boltbox

boltbox:
bind to touch crate          -- special: +2 SP
repeat                       -- structural: +2 SP
  if (orc or kobold) 30'     -- structural: +1 SP (if)
  then
    if orc 30'               -- structural: +1 SP (nested if)
    then
      create Fire bolt       -- tier 2 + point(0) + instant(0) = 2 SP (no harm: point-source)
      move bolt to lookat orc  -- free
    else                     -- structural: +1 SP
      create Electricity bolt  -- tier 3 + point(0) + instant(0) = 3 SP
      move bolt to lookat kobold -- free
    scale bolt 1'x 1'y 1'z  -- free
    wait 2 sec               -- free (fixed duration)
    destroy bolt             -- free
  wait 1 sec                 -- free (fixed duration)
until me "off"               -- wait-until event: +1 SP (on repeat's until clause)

# Effects: Fire instant(2) + Elec instant(3) = 5
# Structural: repeat(2) + if(1) + if(1) + else(1) + wait-until(1) = 6
# Special: bind(2)
# TOTAL: 13 SP

Fires appropriate elemental bolts at approaching enemies until dismissed.

⟁ SPELL COST13 SP≈ 2nd level

Fire(2) + Elec(3) + flow(6) + bind(2)

14.4 Alarm Rune

alarmrune:
create Sound chime           -- tier 1 + large(+10) + permanent(+20) = 31 SP
scale chime 30'              -- free
inscribe alarmrune on doorway trigger (anyone enter 5')
                             -- special: ⌈31 × 1.5⌉ = 47 SP (locks effect cost into object)
halt                         -- free

# Effects: 31  |  Structural: none  |  Special: inscribe(47)
# TOTAL: 78 SP

Inscribes a sound effect into a doorway. When any creature crosses the threshold, the chime fires once. The caster's resources are locked in at inscription and freed when the rune triggers.

⟁ SPELL COST78 SP≈ 6th–7th level

Sound(31) + inscribe×1.5(47)

14.5 Frost Nova with Linked Afterburn

frostnova:
create Frost wave            -- tier 2 + medium≤20'(+7) + instant(0) = 9; ×1.5 harm = ⌈13.5⌉ = 14 SP
sphere 15'                   -- structural: +1 SP
wait 1 sec                   -- free (fixed duration)
destroy wave                 -- free

create Fire embers           -- tier 2 + medium≤20'(+7) + fleeting(+1) = 10 SP (no harm: hollow ring, visual)
sphere 15' hollow            -- structural: +1 SP
link embers to wave sync     -- special: +2 SP
scale embers 1"              -- free

for 3 times                  -- structural: ⌈3/3⌉ = 1 SP
  scale embers 5'            -- free
  wait 2 sec                 -- free (fixed duration)
end
destroy embers               -- free

# Effects: Frost×harm(14) + Fire embers(10) = 24
# Structural: sphere(1) + sphere(1) + for(1) = 3
# Special: link(2)
# TOTAL: 29 SP

Expands a frost burst, then creates a ring of embers that pulses outward three times.

⟁ SPELL COST29 SP≈ 3rd level

Frost×harm(14) + Fire embers(10) + structure(3) + link(2)

14.6 Undead Sentry

sentry:
create Fear aura             -- tier 2 + large≤30'(+10) + moderate(+5) = 17 SP (no harm: condition/aura)
sphere 20' hollow            -- structural: +1 SP

repeat                       -- structural: +2 SP
  foreach undead in 20' as minion   -- structural: +3 SP
    if minion approach 10'   -- structural: +1 SP
    then
      create Radiance bolt   -- tier 3 + point(0) + instant(0) = 3 SP (no harm: point-source)
      move bolt to lookat minion -- free
      scale bolt 1'          -- free
      wait 1 sec             -- free (fixed duration)
      destroy bolt           -- free
  wait 2 sec                 -- free (fixed duration)
until me "dismiss"           -- wait-until event: +1 SP

destroy aura                 -- free

# Effects: Fear aura(17) + Radiance bolt(3) = 20
# Structural: sphere(1) + repeat(2) + foreach(3) + if(1) + wait-until(1) = 8
# Special: none
# TOTAL: 26 SP base + 2 SP/round

Maintains a fear aura and automatically fires holy bolts at any undead that approach within 10 feet.

⟁ SPELL COST28 SP≈ 3rd level

Fear aura(17) + Radiance bolt(3) + structure(8)

14.7 Sealed, Masked Ward

hidden_ward:
bind to touch chest          -- special: +2 SP
create Necrotic trap         -- tier 5 + tiny≤5'(+2) + long(+12) = 19; ×1.5 harm = ⌈28.5⌉ = 29 SP
sphere 5' hollow             -- structural: +1 SP
mask trap as Aura to human   -- special: +2 SP
seal hidden_ward against Dispel duration 1 hr  -- special: +3 SP

wait until anyone touched chest  -- structural: +1 SP (wait-until)
destroy trap                 -- free
create Necrotic burst        -- tier 5 + medium≤20'(+7) + instant(0) = 12; ×1.5 harm = 18 SP
sphere 10'                   -- structural: +1 SP
scale burst 10'              -- free
wait 1 sec                   -- free (fixed duration)
destroy burst                -- free
halt                         -- free

# Effects: Necrotic trap×harm(29) + Necrotic burst×harm(18) = 47
# Structural: sphere(1) + wait-until(1) + sphere(1) = 3
# Special: bind(2) + mask(2) + seal(3) = 7
# TOTAL: 57 SP

Creates a necrotic sphere around a chest that appears as a harmless aura to humans, sealed against dispel for one hour. When touched, it detonates.

⟁ SPELL COST57 SP≈ 5th level

Necrotic sphere×harm(29) + burst×harm(18) + structure(3) + bind/mask/seal(7)

14.8 Fireball (D&D 3rd-level Evocation)

A bright streak races from the caster's finger to a point within 150 feet, then detonates into a 20-foot-radius sphere of roaring flame. Every creature in the area makes a Dexterity saving throw, taking 8d6 fire damage on a failure or half on a success. The blast ignites flammable objects that aren't being worn or carried.

fireball:
# streak travels to target point
create Fire streak instant       -- tier 2 + point(0) + instant(0) = 2 SP
scale streak 6"x 6"y 6"z    -- free
move streak to 150' pointdir -- free

# detonate into 20-ft sphere
destroy streak               -- free
create Fire blast instant        -- tier 2 + medium≤20'(+7) + instant = 9; ×1.5harm = 14 SP
move blast to 150' pointdir  -- free
sphere 20'                   -- structural: +1 SP

# instantaneous — hold one frame then collapse
wait 1 sec                   -- free (fixed duration)
destroy blast                -- free

# Effects: streak(2) + blast×harm(14) = 16
# Structural: sphere(1) = 1
# Special: none
# TOTAL: 17 SP

Notes: The streak is a small moving fire point; sphere 20' inside the shape context expands the blast to the canonical 20-foot radius. The spell is instantaneous — the SDL hold of 1 second represents the visual flash lingering before the smoke clears.

⟁ SPELL COST17 SP≈ 3rd level

Fire streak(2) + blast×harm(14) + sphere(1)

14.9 Magic Missile (D&D 1st-level Evocation)

Three glowing darts of magical force streak unerringly toward the target. Each dart deals 1d4+1 force damage. The darts always hit — no attack roll, no saving throw. Additional darts are created for each spell-slot level above 1st.

magic_missile:
# create three force darts and fire simultaneously
for 3 times                  -- structural: ⌈3/3⌉ = 1 SP; create inside ×3
  create Force dart instant      -- tier 2 + point + instant = 2 SP × 3 = 6 SP total
  scale dart 4"x 4"y 4"z    -- free
  move dart to lookat target -- free
  wait 1 sec                 -- free (fixed duration)
  destroy dart               -- free
end

# variant: upcast at 2nd level adds a 4th dart — use 'for 4 times' etc.

# Effects: 3× Force(2) = 6  |  Structural: for(1) = 1  |  Special: none
# TOTAL: 7 SP

Notes: The for 3 times loop fires the darts sequentially with minimal delay. For simultaneous dart flight, three separate named effects (dart1, dart2, dart3) could be created and destroyed in the same tick; the loop form above is the more readable idiom. The Force effect guarantees the hit — saving throws are not part of the SDL description.

⟁ SPELL COST7 SP≈ 1st level

3× Force(6) + for(1)

14.10 Sleep (D&D 1st-level Enchantment)

A cloud of soporific magic settles over a 20-foot-radius sphere centred on a point within 90 feet. The spell affects creatures cumulatively by ascending current hit points, putting them to sleep until the spell ends, they take damage, or someone wakes them. It has no effect on undead or creatures immune to charm.

sleep:
create Sleep cloud duration 1 min    -- tier 2 + medium≤20'(+7) + moderate(+5) = 14 SP
move cloud to 90' pointdir   -- free
sphere 20'                   -- structural: +1 SP

# spell duration: 1 minute
wait 1 min                   -- free (fixed duration; duration already costed above)
destroy cloud                -- free

# Effects: Sleep(12) = 12  |  Structural: sphere(1) = 1  |  Special: none
# TOTAL: 15 SP

Notes: The Sleep effect envelops the sphere. Which creatures succumb and in what order is a game-system determination; SDL simply places and sustains the effect for its full duration.

⟁ SPELL COST15 SP≈ 2nd level

Sleep duration(14) + sphere(1)

14.11 Charm Person (D&D 1st-level Enchantment)

One humanoid the caster can see within 30 feet must succeed on a Wisdom saving throw or be charmed for up to 1 hour. The target regards the caster as a friendly acquaintance. The charm ends if the caster or companions harm the target.

charm_person:
create Charm glamour duration 1 hr    -- tier 2 + surface(+1) + long(+12) = 15 SP
surface 1"thick lookat target  -- structural: +1 SP
mask glamour as Aura          -- special: +2 SP  -- the effect is invisible to observers
seal charm_person duration 1 hr  -- special: +3 SP

# charm breaks if target takes damage
wait until (target takehit) or (after 1 hr)  -- structural: +1 SP (wait-until)
destroy glamour              -- free
halt                         -- free

# Effects: Charm duration 1hr(15)  |  Structural: surface(1) + wait-until(1) = 2  |  Special: mask(2)+seal(3)=5
# TOTAL: 22 SP

Notes: The Charm effect is applied as an invisible surface coating on the target. mask … as Aura makes it imperceptible to bystanders. The wait until event list captures both the damage-break and the natural expiry.

⟁ SPELL COST22 SP≈ 2nd level

Charm(15) + structure(2) + mask/seal(5)

14.12 Web (D&D 2nd-level Conjuration)

A thick tangle of sticky webs fills a 20-foot cube originating from a point within 60 feet. The area is difficult terrain for the duration; any creature starting its turn in the webs or entering them must make a Dexterity saving throw or be restrained. Webs are flammable — a Fire effect burns them away in one round.

web:
create Web mass duration 1 hr        -- tier 2 + medium≤20'(+7) + long(+12) = 21; ×1.5harm = 32 SP
move mass to 60' pointdir    -- free
shape mass                   -- structural: +1 SP
  lineto 1"thick 20' pointdir  -- structural: +1 SP
  lineto 1"thick 0'x 20'y 0z  -- structural: +1 SP
  lineto 1"thick -20' pointdir -- structural: +1 SP
  lineto 1"thick 0'x -20'y 0z -- structural: +1 SP
  fill                         -- structural: +1 SP
extrude 20'                  -- structural: +1 SP

# webs last 1 hour or until burned
wait until (effectcreated Fire) or (after 1 hr)  -- structural: +1 SP (wait-until)

if effectcreated Fire        -- structural: +1 SP (if)
then
  # fire burns through in 1 round
  wait 6 sec                 -- free (fixed duration)
destroy mass                 -- free

# Effects: Web×harm(32) = 32
# Structural: shape(1) + 4×lineto(4) + fill(1) + extrude(1) + wait-until(1) + if(1) = 9
# Special: none
# TOTAL: 41 SP

Notes: The shape block defines a 20×20-foot square base; extrude 20' gives the cube its depth. The effectcreated Fire event watches for any fire effect entering the area — when detected it counts one round (6 seconds) before destroying the webs.

⟁ SPELL COST41 SP≈ 4th level

Web×harm(32) + structure(9)

14.13 Hold Person (D&D 2nd-level Enchantment)

One humanoid within 60 feet must succeed on a Wisdom saving throw or become paralysed for up to 1 minute. The target may repeat the save at the end of each of its turns. Concentration required.

hold_person:
create Stasis binding concentrate    -- tier 4 + surface(+1) + conc(+0) = 5; sustain ⌈5÷5⌉=1 SP/rnd
surface 1"thick lookat target  -- structural: +1 SP
mask binding as Arcane       -- special: +2 SP

# duration: up to 1 min, broken if target succeeds save each round
# or if caster loses concentration
repeat                       -- structural: +2 SP
  wait 6 sec                 -- free (fixed duration)
until (target save) or (me loseconcentration) or (after 1 min)
                             -- wait-until event counted with repeat: included above

destroy binding              -- free

# Effects: Stasis concentrate(5)  |  Structural: surface(1) + repeat(2) = 3  |  Special: mask(2) = 2
# TOTAL: 11 SP base + 1 SP/round

Notes: Stasis coats the target as an invisible surface. Each pass through the repeat loop represents one round; the target save event fires when the target's repeated saving throw finally succeeds. The me loseconcentration event handles disruption.

⟁ SPELL COST11 SP + 1/rnd≈ 2nd level (concentration)

Stasis concentrate(5) + structure(3) + mask(2)

14.14 Lightning Bolt (D&D 3rd-level Evocation)

A bolt of lightning, 5 feet wide and 100 feet long, erupts from the caster. Each creature in the line makes a Dexterity save, taking 8d6 lightning damage on a failure or half on a success. The bolt ignites flammable objects and can bounce off stone walls at the DM's option.

lightning_bolt:
create Lightning bolt instant        -- tier 3 + line≤100'(+6) + instant = 9; ×1.5harm = 14 SP
move bolt to me              -- free
shape bolt                   -- structural: +1 SP
  lineto 6"thick 100' pointdir  -- structural: +1 SP
  fill                          -- structural: +1 SP

# instantaneous flash
wait 1 sec                   -- free (fixed duration)
destroy bolt                 -- free

# Effects: Lightning×harm(14) = 14
# Structural: shape(1) + lineto(1) + fill(1) = 3
# Special: none
# TOTAL: 17 SP

Notes: The shape is a 6-inch-thick line (canonical 5-foot lane rendered in SDL inches for visual accuracy) extending 100 feet in the caster's facing direction. The spell is instantaneous; the 1-second hold represents the visual arc before dissipation.

⟁ SPELL COST17 SP≈ 3rd level

Lightning×harm(14) + shape/lineto/fill(3)

14.15 Polymorph (D&D 4th-level Transmutation)

One creature within 60 feet that fails a Wisdom saving throw is transformed into a beast of the caster's choice with a Challenge Rating no greater than the target's own. The transformation lasts up to 1 hour or until the target drops to 0 hit points, at which point it reverts.

polymorph:
create Polymorph shell duration 1 hr    -- tier 3 + surface(+1) + long(+12) = 16 SP
surface 2"thick lookat target  -- structural: +1 SP
mask shell as Aura           -- special: +2 SP

# hold for up to 1 hour; collapses if target dies or is dispelled
wait until (target dead) or (effectcreated Dispel) or (after 1 hr)
                             -- structural: +1 SP (wait-until)

destroy shell                -- free

# Effects: Polymorph duration 1hr(16)  |  Structural: surface(1) + wait-until(1) = 2  |  Special: mask(2) = 2
# TOTAL: 20 SP

Notes: The Polymorph effect wraps the target's body. When target dead fires (the beast form reaching 0 HP) the script ends the transformation. A Dispel event from an opposing mage also ends it prematurely.

⟁ SPELL COST20 SP≈ 2nd–3rd level

Polymorph duration 1hr(16) + structure(2) + mask(2)

14.16 Invisibility (D&D 2nd-level Illusion)

A creature the caster touches becomes invisible until the spell ends or until the target attacks or casts a spell. Anything the target is wearing or carrying is also invisible. Duration: 1 hour.

invisibility:
create Invisibility veil duration 1 hr    -- tier 3 + surface(+1) + long(+12) = 16 SP
surface 1"thick lookat target  -- structural: +1 SP

# veil ends if target attacks, casts, or an hour passes
wait until (target attack) or (target cast) or (after 1 hr)
                             -- structural: +1 SP (wait-until)

destroy veil                 -- free

# Effects: Invisibility duration 1hr(16)  |  Structural: surface(1) + wait-until(1) = 2
# TOTAL: 18 SP

Notes: The Invisibility surface covers the target entirely. The target attack and target cast combat events (Section 5.4) break the spell the instant the target acts offensively, matching the canonical rule.

⟁ SPELL COST18 SP≈ 2nd–3rd level

Invisibility duration 1hr(16) + structure(2)

14.17 Fly (D&D 3rd-level Transmutation)

A willing creature the caster touches gains a flying speed of 60 feet for up to 10 minutes. Concentration required; the target descends safely if the spell ends mid-flight.

fly:
create Air lift concentrate          -- tier 2 + surface(+1) + conc(+0) = 3; sustain ⌈3÷5⌉=1 SP/rnd
surface 1"thick lookat target  -- structural: +1 SP
tag lift flight = active     -- free

repeat                       -- structural: +2 SP
  move lift to lookat target   -- free  -- tracks the flying creature
  wait 1 sec                   -- free (fixed duration)
until (me loseconcentration) or (after 10 min)
                             -- wait-until event: included in repeat(2) above

destroy lift                 -- free

# Effects: Air concentrate(3)  |  Structural: surface(1) + repeat(2) = 3
# TOTAL: 8 SP base + 1 SP/round

Notes: The Air effect enveloping the target represents the magical levitation field. The repeat loop keeps the field tracking the target as they move. On concentration loss the SDL ends naturally; game rules handle the graceful descent.

⟁ SPELL COST8 SP + 1/rnd≈ 1st level (concentration)

Air concentrate(3) + structure(3)

14.18 Dispel Magic (D&D 3rd-level Abjuration)

Choose one creature, object, or magical effect within 120 feet. Any spell of 3rd level or lower ends automatically. For spells of 4th level or higher, the caster makes an ability check, DC 10 + the spell's level.

dispel_magic:
create Dispel wave instant           -- tier 3 + tiny≤5'(+2) + instant = 5; ×1.5harm = 8 SP
move wave to lookat target   -- free
sphere 5'                    -- structural: +1 SP

# instantaneous suppression pulse
wait 1 sec                   -- free (fixed duration)
destroy wave                 -- free

# Effects: Dispel×harm(8) = 8  |  Structural: sphere(1) = 1  |  Special: none
# TOTAL: 9 SP

Notes: The Dispel effect is a small sphere centred on the target. Whether it actually terminates any given spell is a game-system ability check; SDL simply delivers the effect. To suppress an entire area rather than a single target, replace lookat target with an anchor point and increase the sphere radius.

⟁ SPELL COST9 SP≈ 1st level

Dispel×harm(8) + sphere(1)

14.19 Wall of Fire (D&D 4th-level Evocation)

A wall of fire rises from the ground, 60 feet long, 20 feet high, and 1 foot thick, in any direction within 120 feet. One side of the wall (chosen at casting) deals 5d8 fire damage to creatures that end their turn within 10 feet; passing through deals the same. Duration: Concentration, up to 1 minute.

wall_of_fire:
create Fire firewall concentrate     -- tier 2 + line≤60'(+4) + conc(+0) = 6; ×1.5harm=9; sustain ⌈6÷5⌉=2 SP/rnd
move firewall to 120' pointdir  -- free
shape firewall               -- structural: +1 SP
  lineto 1"thick 60' pointdir  -- structural: +1 SP
  fill                         -- structural: +1 SP
scale firewall 60'x 20'y 1'z -- free

# concentration: up to 1 min
repeat                       -- structural: +2 SP
  wait 6 sec                 -- free (fixed duration)
until (me loseconcentration) or (after 1 min)
                             -- wait-until event included in repeat(2) above

destroy firewall             -- free

# Effects: Fire wall×harm(17) = 17
# Structural: shape(1) + lineto(1) + fill(1) + repeat(2) = 5
# Special: none
# TOTAL: 15 SP base + 2 SP/round

Notes: The shape block draws the 60-foot base line; the scale sets the canonical dimensions (60 wide × 20 tall × 1 deep). The hot side and damage zone are game-system mechanics; SDL positions and sustains the structure.

⟁ SPELL COST15 SP + 2/rnd≈ 2nd–3rd level (concentration)

Fire concentrate×harm(9) + structure(6)

14.20 Cure Wounds (D&D 1st-level Evocation)

The caster touches a living creature. That creature regains 1d8 + spellcasting-modifier hit points. No effect on undead or constructs.

cure_wounds:
create Blessing glow instant         -- tier 2 + surface(+1) + instant = 3 SP
surface 2"thick lookat target  -- structural: +1 SP
tag glow healing = active    -- free

# instantaneous pulse — one frame of golden light
wait 1 sec                   -- free (fixed duration)
destroy glow                 -- free

# Effects: Blessing instant(3)  |  Structural: surface(1) = 1
# TOTAL: 4 SP

Notes: Cure Wounds has no area, no duration, and no moving parts — it is a single touch. The SDL renders this as a momentary Blessing surface on the target, flickering gold before vanishing. The hit point recovery is a game-system consequence of the effect landing.

⟁ SPELL COST4 SP≈ Cantrip

Blessing instant(3) + surface(1)

14.21 Raise Dead (D&D 5th-level Necromancy)

The caster touches a dead creature that has been dead no longer than 10 days. The creature returns to life with 1 hit point. The spell closes all wounds, neutralises poisons and diseases, and reverses the cause of death unless it was old age. The ritual takes 1 minute to perform.

raise_dead:
# 1-minute ritual: build the effect gradually
create Radiance ritual duration 1 min    -- tier 3 + surface(+1) + moderate(+5) = 9; ×3 MIRACLE = 27 SP
surface 2"thick lookat target  -- structural: +1 SP
tag ritual phase = 1         -- free

# first 30 seconds: soft golden pulse, building in intensity
for 3 times                  -- structural: ⌈3/3⌉ = 1 SP
  scale ritual 1.5'          -- free
  wait 10 sec                -- free (fixed duration)
  scale ritual 1'            -- free
end

# final surge
tag ritual phase = 2         -- free
power raise_dead 2           -- special: +3 × (2−1) = 3 SP
scale ritual 3'              -- free
wait 6 sec                   -- free (fixed duration)

destroy ritual               -- free

# brief moment of silence before the returned life
wait 2 sec                   -- free (fixed duration)

# life-spark: Blessing flicker marks the return
create Blessing spark lasting            -- tier 2 + surface(+1) + lasting(+20) = 23; ×3 MIRACLE = 69 SP
surface 1"thick lookat target  -- structural: +1 SP
wait 2 sec                   -- free (fixed duration)
destroy spark                -- free

# Effects: Radiance duration×miracle(27) + Blessing lasting×miracle(69) = 96 SP
# Structural: surface(1) + for(1) + surface(1) = 3
# Special: power ×2 (+3) = 3
# TOTAL: 102 SP

Notes: The 1-minute ritual is modelled in three 10-second pulsing loops followed by a final power surge. The Radiance effect represents the divine or necromantic energy knitting the body back together; the Blessing spark marks the actual moment of revival.

⟁ SPELL COST102 SP≈ 7th level

Radiance duration×miracle(27) + Blessing lasting×miracle(69) + structure(3) + power(3)

14.22 Animate Dead (D&D 3rd-level Necromancy)

This spell creates undead servants. Choose a pile of bones or a corpse within 10 feet. The remains become a skeleton or zombie under the caster's control for 24 hours, after which it must be re-commanded or becomes an independent undead.

animate_dead:
create Necrotic animforce instant    -- tier 5 + surface(+1) + instant = 6 SP
surface 2"thick lookat target  -- structural: +1 SP

# binding takes 1 round (6 seconds)
wait 6 sec                   -- free (fixed duration)
destroy animforce            -- free

# mark the newly raised servant
create Undead binding lasting        -- tier 4 + surface(+1) + lasting(+20) = 25 SP
surface 1"thick lookat target  -- structural: +1 SP
tag binding master = me      -- free
seal animate_dead duration 24 hr  -- special: +3 SP

# re-command within 24 hours or binding expires
wait until (after 24 hr) or (me "arise again" 30')  -- structural: +1 SP (wait-until)

if me "arise again" 30'      -- structural: +1 SP (if)
then
  # reset the 24-hour timer
  destroy binding            -- free
  create Undead binding lasting    -- tier 4 + surface(+1) + lasting(+20) = 25 SP (re-command branch)
  surface 1"thick lookat target  -- structural: +1 SP
  tag binding master = me    -- free
  seal animate_dead duration 24 hr  -- special: +3 SP (second seal)
  wait until (after 24 hr) or (me "arise again" 30')  -- structural: +1 SP

destroy binding              -- free

# Effects: Necrotic instant(6) + Undead lasting(25) + Undead lasting re-cmd(25) = 56 SP
# Structural: surface(1)+wait-until(1)+if(1)+surface(1)+wait-until(1) = 5
# Special: 2×seal(6)
# TOTAL: 67 SP

Notes: The Necrotic surface animates the remains; the Undead binding represents the ongoing command relationship. The seal protects the control link, and tag binding master = me records ownership. The inner loop handles a single re-command; a full implementation would use repeat.

⟁ SPELL COST67 SP≈ 5th level

Necrotic instant(6) + 2×Undead lasting(50) + structure(5) + 2×seal(6)

14.23 Banishment (D&D 4th-level Abjuration)

One creature within 60 feet that fails a Charisma saving throw is banished. If the target is native to the current plane it is transported to a harmless demi-plane for the duration (Concentration, up to 1 minute); if it is from another plane it is sent home permanently if concentration is held for the full minute.

banishment:
create Dimension cage concentrate    -- tier 4 + tiny≤5'(+2) + conc(+0) = 6; sustain ⌈6÷5⌉=2 SP/rnd
move cage to lookat target   -- free
sphere 5'                    -- structural: +1 SP
tag cage target = target     -- free

# concentration: up to 1 minute
repeat                       -- structural: +2 SP
  wait 6 sec                 -- free (fixed duration)
until (me loseconcentration) or (after 1 min)
                             -- wait-until included in repeat(2) above

if after 1 min               -- structural: +1 SP (if)
then
  # full minute held — permanent banishment for extraplanar targets
  create Rift exit instant       -- tier 8 + tiny≤5'(+2) + instant = 10; ×1.5harm = 15 SP
  move exit to lookat target -- free
  scale exit 5'              -- free
  wait 2 sec                 -- free (fixed duration)
  destroy exit               -- free
  destroy cage               -- free
else                         -- structural: +1 SP
  # concentration broken — target snaps back
  destroy cage               -- free

halt                         -- free

# Effects: Dimension cage concentrate(6) + Rift exit instant×harm(15) = 21 SP
# Structural: sphere(1) + repeat(2) + if(1) + else(1) = 5
# TOTAL: 26 SP base + 2 SP/round

Notes: The Dimension cage envelops the target. If concentration is maintained for the full minute, the Rift opens to permanently send an extraplanar creature home. Dropping concentration early simply collapses the cage and returns a native creature.

⟁ SPELL COST26 SP + 2/rnd≈ 3rd level (concentration)

Dimension concentrate(6) + Rift instant×harm(15) + structure(5)

14.24 Misty Step (D&D 2nd-level Conjuration)

Surrounded by silver mist, the caster teleports up to 30 feet to an unoccupied space they can see. Bonus action. Instantaneous.

misty_step:
# origin mist: brief visual at departure point
create Mist departure instant        -- tier 1 + surface(+1) + instant = 2 SP
surface 2"thick me           -- structural: +1 SP
scale departure 3'           -- free

wait 1 sec                   -- free (fixed duration)

# disappear
destroy departure            -- free

# arrival mist: brief visual at destination
create Mist arrival instant          -- tier 1 + surface(+1) + instant = 2 SP
move arrival to 30' pointdir -- free
surface 2"thick arrival      -- structural: +1 SP
scale arrival 3'             -- free

wait 1 sec                   -- free (fixed duration)
destroy arrival              -- free

# Effects: Mist instant(2) + Mist instant(2) = 4 SP
# Structural: 2×surface(2) = 2
# TOTAL: 6 SP

Notes: Two Mist pulses — one at the origin and one at the destination — represent the silver flash. The actual teleportation of the caster's body is a game-system outcome; SDL models only the visual magical phenomena at each location.

⟁ SPELL COST6 SP≈ 1st level

2× Mist instant(2+2) + structure(2)

14.25 Meteor Swarm (D&D 9th-level Evocation)

Blazing orbs of fire plummet to the ground at four points the caster can see within 1 mile. Each point suffers a 40-foot-radius explosion dealing 20d6 fire and 20d6 bludgeoning damage. Creatures make a Dexterity save (half damage on success). The mightiest evocation spell in the standard ruleset.

meteor_swarm:
# four simultaneous impact points — create all before detonating
create Firestorm m1 instant          -- Firestorm(7) + point + instant = 7 SP
create Firestorm m2          -- 8 SP
create Firestorm m3          -- 8 SP
create Firestorm m4          -- 8 SP  [4 streaks total = 32 SP]

# position all four meteors high above target zones before impact
move m1 to 200'x 0y 300'z   -- free  -- above impact zone 1
move m2 to -100'x 150'y 300'z -- free
move m3 to 100'x -150'y 300'z -- free
move m4 to -200'x 0y 300'z  -- free

# streaks fall simultaneously — scale as falling bolts
scale m1 4'x 4'y 50'z       -- free
scale m2 4'x 4'y 50'z       -- free
scale m3 4'x 4'y 50'z       -- free
scale m4 4'x 4'y 50'z       -- free

wait 2 sec                   -- free (fixed duration)

# impact: all four detonate into 40-ft spheres
foreach Firestorm in 1000' as mx  -- structural: +3 SP
  destroy mx                 -- free
end

create Fire blast1 instant           -- tier 2 + huge≤40'(+14) + instant = 16; ×1.5harm = 24 SP
move blast1 to 200'x 0y 0z  -- free
sphere 40'                   -- structural: +1 SP

create Fire blast2           -- 24 SP
move blast2 to -100'x 150'y 0z -- free
sphere 40'                   -- structural: +1 SP

create Fire blast3           -- 24 SP
move blast3 to 100'x -150'y 0z -- free
sphere 40'                   -- structural: +1 SP

create Fire blast4           -- 24 SP
move blast4 to -200'x 0y 0z -- free
sphere 40'                   -- structural: +1 SP  [4 blasts×harm = 96 SP]

# craters persist briefly
wait 3 sec                   -- free (fixed duration)
destroy blast1               -- free
destroy blast2               -- free
destroy blast3               -- free
destroy blast4               -- free

# Effects: 4×Firestorm instant(28) + 4×Fire blast×harm(96) = 124 SP
# Structural: foreach(3) + 4×sphere(4) = 7
# TOTAL: 131 SP

Notes: Each meteor is a Firestorm composite (Fire + Wind + Thunder) falling from altitude, scaled as a long narrow pillar to suggest a streaking fireball. On impact each becomes an independent 40-foot blast sphere. The foreach cleanup pattern simultaneously removes all four falling streaks before the ground detonations appear.

⟁ SPELL COST131 SP≈ 9th level

4× Firestorm instant(28) + 4× Fire blast×harm(96) + foreach/spheres(7)

14.26 Time Stop (D&D 9th-level Transmutation)

The caster briefly stops the flow of time for everyone but themselves. No time passes for other creatures while the caster takes 1d4+1 turns. The effect ends if the caster affects another creature or object, or if a spell that affects another creature is cast.

time_stop:
# create the stasis field — all creatures except the caster
create Stasis worldfreeze duration fleeting    -- tier 4 + vast(+14) + fleeting(+1) = 19; ×1.5harm = 29 SP
sphere 300' hollow           -- structural: +1 SP  -- enormous radius, excluding caster at centre
tag worldfreeze caster = me  -- free

# the caster acts freely during the frozen interval
# SDL models the visual: everything shimmers to a halt

# visual shimmer on initiation
create Timewarp sheen instant        -- tier 4 + vast(+14) + instant = 18 SP
sphere 300' hollow           -- structural: +1 SP
wait 1 sec                   -- free (fixed duration)
destroy sheen                -- free

# stasis holds for the duration of the caster's free turns
# (1d4+1 turns = 6-30 seconds; use a moderate hold)
wait 18 sec                  -- free (fixed duration)

# ends early if caster targets another creature
# (effectcreated event fires when caster's next spell lands)
wait until (effectcreated Arcane) or (after 18 sec)  -- structural: +1 SP (wait-until)

destroy worldfreeze          -- free

# time resumes: brief ripple
create Timewarp ripple instant       -- tier 4 + vast(+14) + instant = 18 SP
sphere 300' hollow           -- structural: +1 SP
wait 1 sec                   -- free (fixed duration)
destroy ripple               -- free

# Effects: Stasis duration×harm(29) + 2×Timewarp instant(18×2=36) = 65 SP
# Structural: 3×sphere(3) + wait_until(1) = 4
# TOTAL: 69 SP

Notes: The Stasis sphere excludes the caster's position (the hollow qualifier leaves the centre empty). Timewarp pulses at start and end mark the visual signature of time resuming. The 18-second wait approximates three average free turns; a game-system implementation would hook into the initiative counter instead.

⟁ SPELL COST69 SP≈ 5th level

Stasis duration×harm(29) + 2×Timewarp instant(36) + structure(4)

14.27 Wish (D&D 9th-level Conjuration)

The most powerful spell a mortal can cast. By speaking aloud, the caster can alter reality itself. Safe use duplicates any spell of 8th level or lower. Wider uses risk permanent Constitution loss, the inability to cast Wish again, and other calamities. SDL can only model the magical manifestation, not the reality-altering outcome.

wish:
# Wish has no fixed spatial form — the effect takes any shape
# This script models a canonical "duplicate Fireball" safe use,
# followed by the signature visual: a cascade of all effect types.

# Phase 1: the utterance — prismatic aura surrounds the caster
create Prismatic corona duration brief    -- tier 8 + surface(+1) + brief(+3) = 12 SP
surface 3"thick me           -- structural: +1 SP
seal wish against Dispel     -- special: +3 SP

# Phase 2: the wish propagates outward as a wave of raw arcane energy
create Arcane wave instant            -- tier 8 + small(+4) + instant = 12; ×1.5harm = 18 SP
                             -- (grows from 5' to 60'; max reached is huge, but initial create at 5')
move wave to me              -- free
sphere 5' hollow             -- structural: +1 SP

for 6 times                  -- structural: ⌈6/3⌉ = 2 SP
  scale wave 10'             -- free
  wait 1 sec                 -- free (fixed duration)
end

destroy corona               -- free

# Phase 3: deliver the duplicated effect (Fireball at a target point)
create Fire wish_blast instant        -- tier 2 + medium≤20'(+7) + instant = 9; ×1.5harm = 14 SP
move wish_blast to 150' pointdir -- free
sphere 20'                   -- structural: +1 SP
wait 1 sec                   -- free (fixed duration)
destroy wish_blast           -- free

destroy wave                 -- free

# aftermath: lingering Arcane shimmer — the cost of reality-alteration
create Arcane fatigue duration fleeting    -- tier 8 + surface(+1) + fleeting(+1) = 10 SP
surface 2"thick me           -- structural: +1 SP
wait 10 sec                  -- free (fixed duration)
destroy fatigue              -- free

halt                         -- free

# Effects: Prismatic duration(12) + Arcane instant×harm(18) + Fire instant×harm(14) + Arcane fatigue(10) = 54 SP
# Structural: surface(1)+sphere(1)+for(2)+sphere(1)+surface(1) = 6
# Special: seal(3)
# Script total: 63 SP  — Wish Rule enforces minimum 150 SP (see §11.16)
# TOTAL: 150 SP (minimum enforced)

Notes: Wish is modelled in three phases: the Prismatic corona of the utterance, an Arcane shockwave propagating outward (the reality-bending pulse), and the delivered effect (here: a Fireball). The seal reflects that Wish cannot be dispelled mid-utterance. The Arcane fatigue aura represents the canonical enfeeblement that follows casting. A different safe use would simply swap the delivered effect in Phase 3.

⟁ SPELL COST150 SP≈ 9th level (Wish Rule)  (structural floor 68 SP; minimum enforced by Wish Rule)

Script total 68 SP; Wish minimum enforced at 150 SP (§11.13)


15. Quick Reference

15.1 Operator Summary

OperatorCategoryOne-line summary
createBasicInitialise a new effect instance
destroyBasicTerminate an effect instance
moveBasicReposition an effect
rotateBasicRotate an effect around axes
scaleBasicResize an effect
shapeBasicDefine geometry via path sub-ops
cloneBasicCopy an effect under a new name
mergeBasicCombine two effects into one
tagBasicAttach metadata label to an effect
emitBasicSpawn secondary effect particles
linetoPathDraw a line segment
arctoPathDraw a circular arc
fillPathFill enclosed polygon
surfacePathCoat an object's outer surface
volumePathFill an object's interior
extrudePathProject a 2D shape into 3D
spherePathCreate a spherical shape
conePathCreate a conical shape
ringPathCreate a torus/ring shape
haltFlowStop script execution
if…then…elseFlowConditional branching
repeat…untilFlowPost-condition loop
waitFlowPause for time or event
whileFlowPre-condition loop
forFlowFixed-count loop
foreachFlowIterate over creatures in range
skipFlowContinue to next loop iteration
bindSpecialAnchor spell to object/location
interruptSpecialModify a running spell
makeownerSpecialTransfer spell ownership
rangeSpecialScale spell range by multiplier
powerSpecialScale spell power by multiplier
resumeSpecialContinue from a breakpoint
inscribeSpecialStore spell in an object as a glyph
linkSpecialCreate live relationship between effects
sealSpecialProtect spell from external interrupt
maskSpecialDisguise an effect as another type

15.2 Effect Type Quick Index

Fire Elemental
Frost Elemental
Ice Elemental
Water Elemental
Steam Elemental
Acid Elemental
Earth Elemental
Sand Elemental
Mud Elemental
Air Elemental
Wind Elemental
Lightning Elemental
Electricity Elemental
Thunder Elemental
Lava Elemental
Magma Elemental
Smoke Elemental
Ash Elemental
Plasma Elemental
Force Physical
Gravity Physical
Pressure Physical
Vacuum Physical
Shockwave Physical
Vibration Physical
Magnetism Physical
Web Physical
Thorn Physical
Blade Physical
Chain Physical
Light Light
Daylight Light
Flash Light
Darkness Light
Shadow Light
Blindness Light
Prismatic Light
Radiance Light
Mirror Light
Invisibility Light
Fear Mental
Charm Mental
Sleep Mental
Confusion Mental
Domination Mental
Compulsion Mental
Silence Mental
Madness Mental
Scry Mental
Telepathy Mental
Suggestion Mental
Memory Mental
Arcane Arcane
Illusion Arcane
Glamour Arcane
Mirage Arcane
Phantasm Arcane
Dispel Arcane
Null Arcane
Counterspell Arcane
Ward Arcane
Rune Arcane
Sigil Arcane
Aura Arcane
Curse Arcane
Hex Arcane
Blessing Arcane
Consecration Arcane
Desecration Arcane
Polymorph Trans.
Petrify Trans.
Rust Trans.
Corrode Trans.
Harden Trans.
Soften Trans.
Grow Trans.
Shrink Trans.
Enlarge Trans.
Meld Trans.
Transmute Trans.
Summon Conjur.
Banish Conjur.
Gate Conjur.
Portal Conjur.
Teleport Conjur.
Dimension Conjur.
Anchor Conjur.
Wall Conjur.
Bridge Conjur.
Object Conjur.
Necrotic Necro.
Undead Necro.
Drain Necro.
Blight Necro.
Plague Necro.
Poison Necro.
Wither Necro.
Bone Necro.
Spectral Necro.
Soul Necro.
Haste Temporal
Slow Temporal
Stasis Temporal
Foresight Temporal
Rewind Temporal
Aging Temporal
Timewarp Temporal
Phase Dimens.
Ethereal Dimens.
Astral Dimens.
Fold Dimens.
Pocket Dimens.
Rift Dimens.
Entangle Natural
Barkskin Natural
Spore Natural
Pollen Natural
Swarm Natural
Mist Natural
Rain Natural
Storm Natural
Earthquake Natural
Quake Natural
Sound Sonic
Resonance Sonic
Shout Sonic
Whisper Sonic
Discord Sonic
Firestorm Composite
Icestorm Composite
Bloodfire Composite
Stormwall Composite
Miasma Composite
Frostfire Composite
Voidbolt Composite
Thornstorm Composite
Soulfire Composite

End of SDL Reference Manual v2.0  ·  "Magic is nothing more than well-structured intent."