2 Commits

Author SHA1 Message Date
4cdb048dfc refactor(story2): immutable dealDamage, reference guard, negative damage validation, spec precision
- dealDamage returns new Character instead of mutating in-place
- SelfDamageForbidden uses reference equality (this === target)
- Negative damage throws at the boundary
- Removed duplicate Health.maxHealthForLevel (Level.ts is source of truth)
- Allium spec uses max(0, ...) for health floor precision
- New property: NegativeDamageForbidden (11 total properties)
2026-06-13 15:44:46 +01:00
fc2cf73b34 feat: story 2 — Characters can Deal Damage to Characters
- Allium spec: damage-and-health.allium
- 5 fast-check properties: damage reduces health, health non-negative,
  death at zero, self-damage forbidden, dead cannot take damage
- Character.createWithHealth factory for testing with arbitrary health
- Character.dealDamage(target, damage) method
2026-06-13 15:28:34 +01:00