Improve PF2e stat block action icons, triggers, and tag handling
- Replace unicode action cost chars with custom SVG icons (diamond
with chevron for actions, outlined diamond for free, curved arrow
for reaction) rendered inline via ActivityCost on TraitBlock
- Add activity icons to attacks (all Strikes default to single action)
- Add trigger/effect rendering for reaction abilities (bold labels)
- Fix nested tag stripping ({@b ...{@spell ...}...}) by looping
- Move icon after ability name to match AoN format
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,8 +14,15 @@ export interface TraitListItem {
|
||||
readonly text: string;
|
||||
}
|
||||
|
||||
export interface ActivityCost {
|
||||
readonly number: number;
|
||||
readonly unit: "action" | "free" | "reaction";
|
||||
}
|
||||
|
||||
export interface TraitBlock {
|
||||
readonly name: string;
|
||||
readonly activity?: ActivityCost;
|
||||
readonly trigger?: string;
|
||||
readonly segments: readonly TraitSegment[];
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ export {
|
||||
createPlayerCharacter,
|
||||
} from "./create-player-character.js";
|
||||
export {
|
||||
type ActivityCost,
|
||||
type AnyCreature,
|
||||
type BestiaryIndex,
|
||||
type BestiaryIndexEntry,
|
||||
|
||||
Reference in New Issue
Block a user