forked from open5e/open5e
-
Notifications
You must be signed in to change notification settings - Fork 0
WIP: Directive Interfaces
Max Rothman edited this page Jun 26, 2016
·
7 revisions
.. spell:: Burning Hands
:level: 1
:school: evocation
:casting-time: 1 action
:range: self
:area: 15 foot cone
:components: V, S
:duration: instantaneous
As you hold your hands with thumbs touching and fingers spread, a thin sheet of flames shoots forth from your
outstretched fingertips. Each creature in a 15 foot Cone must make a Dexterity saving throw. A creature takes 3d6
fire damage on a failed save, or half as much damage on a successful one.
The fire ignites any flammable objects in the area that aren’t being worn or carried.
- uses existing directive parser, so less fiddly
- easy to implement
- can't nest options, so forces us to flatten interface and parse some things out
- potentially more difficult to get semantic markup (have to parse option text, e.g. 15 foot cone into
{num: 15, unit: feet, shape: cone}
) - how to handle "at higher levels"? That section could potentially contain markup, and I don't think options can contain markup (verify) and I think they can only be 1 line (also verify)
.. spell:: Burning Hands
level: 1
school: evocation
components: {verbal: true, somatic: true}
range:
type: self
shape: {range: {num: 15}, shape: cone}
casting_time:
num: 1
unit: action
duration:
type: instantaneous
text: |
As you hold your hands with thumbs touching and fingers spread, a thin sheet of flames shoots forth from your outstretched fingertips. Each creature in a 15 foot Cone must make a Dexterity saving throw. A creature takes 3d6 fire damage on a failed save, or half as much damage on a successful one.
The fire ignites any flammable objects in the area that aren’t being worn or carried.
damage: {base: 3d6}
save: {ability: dex, description: "half damage"}
higher_levels:
text: "When you cast this spell using a spell slot of 2nd level or higher, the damage increases by 1d6 for each slot level above 1st."
levels:
2: { damage: 4d6, description: null }
...
- No syntax highlighting
- syntax in syntax is finicky
- have to write parser
- no syntax highlighting