feature: Initial code setup

This commit is contained in:
Keith Solomon
2026-03-15 10:26:20 -05:00
parent e052544989
commit e303373441
18 changed files with 3329 additions and 0 deletions
+81
View File
@@ -0,0 +1,81 @@
export type DiceKind = "d3" | "d6" | "2d6" | "d66";
export type ContentReferenceType =
| "table"
| "weapon"
| "manoeuvre"
| "armour"
| "item"
| "potion"
| "scroll"
| "creature"
| "room"
| "service";
export type ContentReference = {
type: ContentReferenceType;
id: string;
};
export type RuleEffectType =
| "gain-xp"
| "gain-gold"
| "heal"
| "take-damage"
| "modify-shift"
| "modify-discipline"
| "modify-precision"
| "apply-status"
| "remove-status"
| "add-item"
| "remove-item"
| "start-combat"
| "reveal-exit"
| "move-level"
| "log-only";
export type RuleEffectTarget = "self" | "enemy" | "room" | "campaign";
export type RuleEffect = {
type: RuleEffectType;
amount?: number;
statusId?: string;
target?: RuleEffectTarget;
referenceId?: string;
notes?: string;
};
export type RollResult = {
diceKind: DiceKind;
rolls: number[];
primary?: number;
secondary?: number;
total?: number;
modifier?: number;
modifiedTotal?: number;
clamped?: boolean;
};
export type LogEntryType =
| "system"
| "roll"
| "combat"
| "loot"
| "room"
| "town"
| "progression";
export type LogEntry = {
id: string;
at: string;
type: LogEntryType;
text: string;
relatedIds?: string[];
};
export type ActionResolution = {
success: boolean;
effects: RuleEffect[];
logEntries: LogEntry[];
warnings?: string[];
};