Open mrombout opened 1 year ago
After looking around most of the time the current solution is actually good enough since the major variation is just different number of differently named attributes. In many cases, it's even displayed in the Fighting Fantasy style as well.
Therefore, maybe let's think this over a bit before going around and changing things.
As a first start, let's get rid of the :asciihero-combat-attributes:
though because I don't think attributes are a good way to track this. This dependency between and attributes and what you are able to declare in the combat block is just annoying (as long as we don't have a VSCode plugin to help with autocompletion).
When rendering the table, it should just look through all the enemies, and create a combined table of all the enemies with all the attributes. Leaving the cells empty when an enemy doesn't have a certain attribute defined.
At the moment a combat block can be defined as:
But this is proving to be rather inflexible, and I suspect it doesn't scale well to other more advanced formats such as Dungeons & Dragons.
Perhaps it might be a better idea to turn it into a Block extension (see https://github.com/ggrossetie/asciidoctor-chart/blob/master/src/asciidoctor-chart.js for a reference) containing YAML. This YAML must follow a dedicated schema to make sure that the code can process it, but allows much more flexibility.
Different templates (and even custom ones) could use this extra metadata to render different styles of combat blocks. For example such block could look like:
Alternative (or additionally) it might be nicer to be able to declare the data of enemies somewhere else and just refer to them in the combat. This would allow to easily re-use enemy stats in multiple locations.
The
:asciihero-combat-attributes:
attribute would also have to go, because it's too restricting.Combat block references
Fighting Fantasy
Single enemy
Multiple enemies
The World of Lone Wolf (Project Aon EPUB)
It's Fighting Fantasy style, same as the main series Lone Wolf.
Way of the Tiger
Single enemy
Multiple enemies
Sagas of the Demonspawn
This is effectively just a statblock.
Sagard the Barbarian
Real Life Gamebooks
Proteus
Middle-Earth Quest
Horror Classics
This series actually uses different types of section. It would be interesting to look at support for that too.
Golden Dragon
Fatemaster
Fabled Lands
DestinyQuest
5# Solo Adventures
Use D&D statblocks.