houserules/packages/chess/src/modifiers
Joey Yakimowich-Payne cbe4a4b5f6
feat(ui): custom modifier editor
T3 Wave 4 (T25). 3-column visual primitive composer for authoring
custom modifier descriptors from the 15 T3 effect primitives.

- Left palette: 15 primitives grouped by category (State / Mechanic /
  Advanced); click adds to the descriptor's primitive list.
- Center tree: shows current primitives[]; click selects, delete
  button per node.
- Right inspector: parameter form per selected primitive. Introspects
  the primitive's Zod schema to render typed inputs (number / string /
  boolean / enum / array). Falls back to a JSON textarea for complex
  param shapes (e.g. nested EffectPrimitiveNode arrays).
- Header: descriptor name/description inputs + Save/Load library +
  live validation status from validateCustomDescriptor.
- Open from ModifierProfileEditor's header via the new + Custom
  Modifier button (data-testid open-custom-modifier-editor).

Type widening: ModifierKindId gains '| (string & {})' so the kind
field on TypeModifier/InstanceModifier accepts custom descriptor ids
without losing literal-completion on built-in kinds. The
applyCollectedContributions dispatcher already handles arbitrary
strings via its custom-registry fallback (T22).

Lint cleanup: replaced 4 'as any' casts on Zod internals with named
ZodObjectInternal / ZodWrappedDefInternal / ZodEnumDefInternal
structural shapes — auditable in one place if Zod renames _def.

E2E + extended tests deferred to T29; T26 (panel kind-dropdown
extension) and T27 (multi-profile lobby) shipped separately.
2026-04-19 20:17:33 -06:00
..
custom feat(engine): apply custom modifier descriptors + multi-profile stacking 2026-04-19 18:12:19 -06:00
descriptors refactor(modifiers): use baseAttr for preset source mapping 2026-04-19 14:02:32 -06:00
primitives feat(engine): advanced effect primitives (aura/triggers/conditional) 2026-04-19 17:42:09 -06:00
apply.test.ts feat(engine): apply profile at game start 2026-04-18 22:42:27 -06:00
apply.ts feat(engine): aura effect computation + onAfterMove hook 2026-04-19 20:05:38 -06:00
auras.test.ts feat(engine): aura effect computation + onAfterMove hook 2026-04-19 20:05:38 -06:00
auras.ts feat(engine): aura effect computation + onAfterMove hook 2026-04-19 20:05:38 -06:00
index.ts feat(engine): wire all 6 descriptor side-effect imports in modifiers/index.ts 2026-04-18 22:25:23 -06:00
library.test.ts feat(engine): modifier-profile library persistence (v1) 2026-04-18 22:30:02 -06:00
library.ts feat(engine): modifier-profile library persistence (v1) 2026-04-18 22:30:02 -06:00
reconcile.test.ts feat(engine): hot-swap reconciliation 2026-04-18 22:48:31 -06:00
reconcile.ts feat(engine): apply custom modifier descriptors + multi-profile stacking 2026-04-19 18:12:19 -06:00
registry.test.ts feat(engine): modifier registry pattern 2026-04-18 22:11:16 -06:00
registry.ts refactor(modifiers): remove double-casts in registry and schema 2026-04-19 14:00:10 -06:00
schema.test.ts feat(engine): damage-resistance modifier descriptor 2026-04-18 22:22:31 -06:00
schema.ts refactor(modifiers): remove double-casts in registry and schema 2026-04-19 14:00:10 -06:00
source.test.ts feat(ui): enhanced modifier source chain in pinned panel 2026-04-19 09:22:49 -06:00
source.ts refactor(modifiers): use baseAttr for preset source mapping 2026-04-19 14:02:32 -06:00
types.ts feat(ui): custom modifier editor 2026-04-19 20:17:33 -06:00
validate.test.ts feat(engine): profile legality validator 2026-04-18 22:33:09 -06:00
validate.ts feat(engine): profile legality validator 2026-04-18 22:33:09 -06:00