Files
initiative/packages/domain/src/index.ts
Lukas 91703ddebc
All checks were successful
CI / check (push) Successful in 45s
CI / build-image (push) Successful in 18s
Add player character management feature
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>
2026-03-12 18:11:08 +01:00

111 lines
2.6 KiB
TypeScript

export { type AddCombatantSuccess, addCombatant } from "./add-combatant.js";
export { type AdjustHpSuccess, adjustHp } from "./adjust-hp.js";
export { advanceTurn } from "./advance-turn.js";
export { resolveCreatureName } from "./auto-number.js";
export {
type ClearEncounterSuccess,
clearEncounter,
} from "./clear-encounter.js";
export {
CONDITION_DEFINITIONS,
type ConditionDefinition,
type ConditionId,
VALID_CONDITION_IDS,
} from "./conditions.js";
export {
type CreatePlayerCharacterSuccess,
createPlayerCharacter,
} from "./create-player-character.js";
export {
type BestiaryIndex,
type BestiaryIndexEntry,
type BestiarySource,
type Creature,
type CreatureId,
creatureId,
type DailySpells,
type LegendaryBlock,
proficiencyBonus,
type SpellcastingBlock,
type TraitBlock,
} from "./creature-types.js";
export {
type DeletePlayerCharacterSuccess,
deletePlayerCharacter,
} from "./delete-player-character.js";
export {
type EditCombatantSuccess,
editCombatant,
} from "./edit-combatant.js";
export {
type EditPlayerCharacterSuccess,
editPlayerCharacter,
} from "./edit-player-character.js";
export type {
AcSet,
CombatantAdded,
CombatantRemoved,
CombatantUpdated,
ConcentrationEnded,
ConcentrationStarted,
ConditionAdded,
ConditionRemoved,
CurrentHpAdjusted,
DomainEvent,
EncounterCleared,
InitiativeSet,
MaxHpSet,
PlayerCharacterCreated,
PlayerCharacterDeleted,
PlayerCharacterUpdated,
RoundAdvanced,
RoundRetreated,
TurnAdvanced,
TurnRetreated,
} from "./events.js";
export { deriveHpStatus, type HpStatus } from "./hp-status.js";
export {
calculateInitiative,
formatInitiativeModifier,
type InitiativeResult,
} from "./initiative.js";
export {
type PlayerCharacter,
type PlayerCharacterId,
type PlayerCharacterList,
type PlayerColor,
type PlayerIcon,
playerCharacterId,
VALID_PLAYER_COLORS,
VALID_PLAYER_ICONS,
} from "./player-character-types.js";
export {
type RemoveCombatantSuccess,
removeCombatant,
} from "./remove-combatant.js";
export { retreatTurn } from "./retreat-turn.js";
export { rollInitiative } from "./roll-initiative.js";
export { type SetAcSuccess, setAc } from "./set-ac.js";
export { type SetHpSuccess, setHp } from "./set-hp.js";
export {
type SetInitiativeSuccess,
setInitiative,
} from "./set-initiative.js";
export {
type ToggleConcentrationSuccess,
toggleConcentration,
} from "./toggle-concentration.js";
export {
type ToggleConditionSuccess,
toggleCondition,
} from "./toggle-condition.js";
export {
type Combatant,
type CombatantId,
combatantId,
createEncounter,
type DomainError,
type Encounter,
isDomainError,
} from "./types.js";