Primordial Magic DSL Example

An example automaton that creates a small burst of fire.

# Program start
start ->                    # 0;

# Gather energy
set R1 => 2 : Fire          # 3;
set R2 => 1 : Water         # 5;

# Wait until a target is chosen then execute the rest, this sets TARGET register
on target jump target       # 10;

target ->                   # 10;

# Combine Fire and Water to get Fire and Energy
set R1, R2 => R1 + R2       # 15;

# Combine Energy with Direction to get Force
set R2 => R2 + TARGET       # 19;

# Apply force to fire to gain a missile
set R1 => R1 + R2           # 23;

# Release the energy of the missile to finish the spell
release R1                  # 24;

Tags

Last updated Mon, 06-09-2021 20:23 by Brian Bors
Created Mon, 25-03-2013 21:21 by Anonymous

Recent Changes