✨feature: Initial code setup
This commit is contained in:
@@ -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[];
|
||||
};
|
||||
Reference in New Issue
Block a user