Files
initiative/packages/application/src/remove-persistent-damage-use-case.ts
Lukas 4b1c1deda2
All checks were successful
CI / check (push) Successful in 2m39s
CI / build-image (push) Successful in 19s
Add PF2e persistent damage condition tags
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>
2026-04-11 12:09:31 +02:00

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),
);
}