benknoble / frosthaven-manager

GUI Frosthaven Scenario Manager
https://benknoble.github.io/frosthaven-manager
Other
6 stars 2 forks source link

Replace certain magic text in monster abilities with text + icons #15

Open benknoble opened 2 years ago

benknoble commented 2 years ago

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.

benknoble commented 9 months ago

Depends on #66

benknoble commented 8 months ago

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.

benknoble commented 7 months ago

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.