Files
ttrpg_manager/src/lib/rules/index.ts
T
NilsBriggen 0b356adf82 Combat: condition dropdown picker with tag chips
- System-aware condition list (5e PHB / pf2e) in src/lib/rules/conditions.ts
- Dropdown replaces free-text input; non-valued conditions add instantly,
  valued ones (Exhaustion, Frightened N, etc.) show a value field, plus Custom
- Already-applied conditions disabled in the list; chips remain click-to-remove
- New e2e covering preset + valued add and tag removal

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 00:44:37 +02:00

23 lines
668 B
TypeScript

import type { RulesSystem, SystemId } from './types';
import { dnd5e } from './dnd5e';
import { pf2e } from './pf2e';
const SYSTEMS: Record<SystemId, RulesSystem> = {
'5e': dnd5e,
pf2e,
};
export function getSystem(id: SystemId): RulesSystem {
return SYSTEMS[id];
}
export const SYSTEM_OPTIONS: { id: SystemId; label: string }[] = [
{ id: '5e', label: dnd5e.label },
{ id: 'pf2e', label: pf2e.label },
];
export * from './types';
export { abilityModifier, ABILITY_ABBR, ABILITY_LABELS, formatDamage } from './abilities';
export { applyRest } from './rest';
export { getConditions, CONDITIONS_5E, CONDITIONS_PF2E, type ConditionDef } from './conditions';