Open benknoble opened 2 years ago
Depends on #66
With 8d514e1, we can add (case insensititve) "Consume [Element]" substitutions. Still missing "wild" element icons, among other things.
This probably requires first changing the protocol of monster-ability-ability->text
and monster-ability-ability->extras
to come to a unified format (and single function).
I think ideally this would look something like monster-ability->rich-text
where the result contract matches the contract on @content
for rich-text-display
.
That would eliminate the "AoE" buttons and some related processing code. It probably wouldn't be even as big a change for the existing web code.
The current aoe processing only handles one image replacement. In order to do more, I either want some kind of string-split on regexes that keeps all the matches, so I can post-process those, or I want to drive a loop over append-map
(which may be slow but would be easier to program). Investigate the performance of the latter on complicated ability cards.
If we specified the magic text (some kind of markup, or maybe list of magic strings), this would enable (for example) "consume fire" to turn into an icon for consuming fire in the card display and would have the side effect of standardizing ability card notation.