Skip to content

Block If

Block If blocks are a more advanced version of if else blocks. Main difference is the ability to add content spanning multiple lines.

::: @perception is 18 [#block-if (@perception >= 15)] You can see a glimmering rock a couple of feet to the left of you. Before you reach for it you put on a glove. Better to be safe than sorry. [/block-if]

You can see a glimmering rock a couple of feet to the left of you.

Before you reach for it you put on a glove. Better to be safe than sorry.

Content

Unlike if else, block ifs do not support [#else] and [#else-if] blocks. They can however contain if else blocks.

::: @perception is 15, @luck is 1 You are trekking through a dense forest. The path is narrow and overgrown. [#block-if (@perception >= 10)] You spot a patch of peculiar mushrooms growing by the side of the path. They glow faintly in the twilight. [#if (@luck >= 5)] You decide to take a closer look at the mushrooms. Who knows, they might be valuable! [#else-if (@luck >= 2)] You cautiously approach the mushrooms, keeping a wary eye out for any danger. [#else] Something about those mushrooms seems off. You decide to steer clear. [/if] [/block-if]

You are trekking through a dense forest. The path is narrow and overgrown.

You spot a patch of peculiar mushrooms growing by the side of the path. They glow faintly in the twilight. Something about those mushrooms seems off. You decide to steer clear.


Interpolation and markdown is also supported.

::: @awareness is 15, @companion is "woodland fairy" [#block-if (@awareness >= 10)] You wake with a start. The fire has died down to embers, and you hear a faint snoring sound. You look around and see your {{ @companion }} curled up in a ball, using a tiny acorn as a pillow. _"How adorable!"_ you think to yourself. [/block-if]

You wake with a start. The fire has died down to embers, and you hear a faint snoring sound. You look around and see your woodland fairy curled up in a ball, using a tiny acorn as a pillow. “How adorable!” you think to yourself.

See also