4 Commits

Author SHA1 Message Date
692bd7305b add example tests for damage 2026-06-14 20:52:31 +01:00
bc64293ba4 phase 2: move Character, HealingObject, MagicalObject, MagicalWeapon into directories 2026-06-14 11:44:42 +01:00
fc260dc97c phase 1: refactor directory structure (value-objects, factions, characters) 2026-06-14 11:36:37 +01:00
f6605bbbfd feat: implement story 3 (Factions) with Allium spec and fast-check properties
- Add .pi/specs/story-3-factions.allium with formal spec for faction rules
- Add src/factions.spec.ts with 26 fast-check properties covering:
  - joinFaction / leaveFaction (add, remove, idempotent, dead no-op)
  - isAllyOf (shared factions, symmetry, self-not-ally)
  - dealDamage blocks ally damage
  - healAlly (allies only, capped, dead no-op)
- Implement Character methods: joinFaction, leaveFaction, isAllyOf, healAlly
- Modify dealDamage to check ally status before applying damage
2026-06-13 22:36:43 +01:00