Render structured list and table entries in stat block traits
Stat block traits containing 5etools list (e.g. Confusing Burble d4 effects) or table entries were silently dropped. The adapter now produces structured TraitSegment[] instead of flat text, preserving lists and tables as first-class data. The stat block component renders labeled list items inline (bold label + flowing text) matching the 5etools layout. Also fixes support for the singular "entry" field on list items and bumps the bestiary cache version to force re-normalize. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -46,10 +46,30 @@ const GOBLIN: Creature = {
|
||||
skills: "Stealth +6",
|
||||
senses: "darkvision 60 ft., passive Perception 9",
|
||||
languages: "Common, Goblin",
|
||||
traits: [{ name: "Nimble Escape", text: "Disengage or Hide as bonus." }],
|
||||
actions: [{ name: "Scimitar", text: "Melee: +4 to hit, 5 slashing." }],
|
||||
bonusActions: [{ name: "Nimble", text: "Disengage or Hide." }],
|
||||
reactions: [{ name: "Redirect", text: "Redirect attack to ally." }],
|
||||
traits: [
|
||||
{
|
||||
name: "Nimble Escape",
|
||||
segments: [{ type: "text", value: "Disengage or Hide as bonus." }],
|
||||
},
|
||||
],
|
||||
actions: [
|
||||
{
|
||||
name: "Scimitar",
|
||||
segments: [{ type: "text", value: "Melee: +4 to hit, 5 slashing." }],
|
||||
},
|
||||
],
|
||||
bonusActions: [
|
||||
{
|
||||
name: "Nimble",
|
||||
segments: [{ type: "text", value: "Disengage or Hide." }],
|
||||
},
|
||||
],
|
||||
reactions: [
|
||||
{
|
||||
name: "Redirect",
|
||||
segments: [{ type: "text", value: "Redirect attack to ally." }],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const DRAGON: Creature = {
|
||||
@@ -75,8 +95,16 @@ const DRAGON: Creature = {
|
||||
legendaryActions: {
|
||||
preamble: "The dragon can take 3 legendary actions.",
|
||||
entries: [
|
||||
{ name: "Detect", text: "Wisdom (Perception) check." },
|
||||
{ name: "Tail Attack", text: "Tail attack." },
|
||||
{
|
||||
name: "Detect",
|
||||
segments: [
|
||||
{ type: "text" as const, value: "Wisdom (Perception) check." },
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Tail Attack",
|
||||
segments: [{ type: "text" as const, value: "Tail attack." }],
|
||||
},
|
||||
],
|
||||
},
|
||||
spellcasting: [
|
||||
|
||||
Reference in New Issue
Block a user