feat: add support for stat templates
Introduces a new `template` stat type that allows for table-based lookups via CSV blocks in markdown files. When a template stat is rolled, it uses a dice expression defined in the template to select an entry, applies a label, and automatically updates associated modifier stats using relative values.
This commit is contained in:
@@ -6,6 +6,7 @@ import { diceSource } from "./sources/dice.js";
|
||||
import { linksSource } from "./sources/links.js";
|
||||
import { sparkTablesSource } from "./sources/spark-tables.js";
|
||||
import { statsSource } from "./sources/stats.js";
|
||||
import { templatesSource } from "./sources/templates.js";
|
||||
import type { CompletionSource, CompletionsPayload } from "./types.js";
|
||||
|
||||
export type {
|
||||
@@ -14,6 +15,7 @@ export type {
|
||||
LinkCompletion,
|
||||
SparkTableCompletion,
|
||||
StatDef,
|
||||
StatTemplate,
|
||||
} from "./types.js";
|
||||
|
||||
/** Registered sources — open for extension */
|
||||
@@ -22,6 +24,7 @@ const sources: CompletionSource[] = [
|
||||
linksSource,
|
||||
sparkTablesSource,
|
||||
statsSource,
|
||||
templatesSource,
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user