Persistent damage displayed as compact tags with damage type icon and formula (e.g., Flame + "2d6"). Supports fire, bleed, acid, cold, electricity, poison, and mental types. One instance per type, added via sub-picker in the condition picker. PF2e only, persists across reload. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
20 lines
546 B
TypeScript
20 lines
546 B
TypeScript
import {
|
|
type CombatantId,
|
|
type DomainError,
|
|
type DomainEvent,
|
|
type PersistentDamageType,
|
|
removePersistentDamage,
|
|
} from "@initiative/domain";
|
|
import type { EncounterStore } from "./ports.js";
|
|
import { runEncounterAction } from "./run-encounter-action.js";
|
|
|
|
export function removePersistentDamageUseCase(
|
|
store: EncounterStore,
|
|
combatantId: CombatantId,
|
|
damageType: PersistentDamageType,
|
|
): DomainEvent[] | DomainError {
|
|
return runEncounterAction(store, (encounter) =>
|
|
removePersistentDamage(encounter, combatantId, damageType),
|
|
);
|
|
}
|