Persistent player character templates (name, AC, HP, color, icon) with full CRUD, bestiary-style search to add PCs to encounters with pre-filled stats, and color/icon visual distinction in combatant rows. Also stops the stat block panel from auto-opening when adding a creature. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
22 lines
453 B
TypeScript
22 lines
453 B
TypeScript
import type {
|
|
Creature,
|
|
CreatureId,
|
|
Encounter,
|
|
PlayerCharacter,
|
|
} from "@initiative/domain";
|
|
|
|
export interface EncounterStore {
|
|
get(): Encounter;
|
|
save(encounter: Encounter): void;
|
|
}
|
|
|
|
export interface BestiarySourceCache {
|
|
getCreature(creatureId: CreatureId): Creature | undefined;
|
|
isSourceCached(sourceCode: string): boolean;
|
|
}
|
|
|
|
export interface PlayerCharacterStore {
|
|
getAll(): PlayerCharacter[];
|
|
save(characters: PlayerCharacter[]): void;
|
|
}
|