39839dc594
fix Allium specs syntax + implement Changing Level story
...
- Fix Allium spec syntax: type→value, enum for Status, remove implies chaining
- Fix factions.spec: add missing type declarations (Health, Level, Status)
- Fix magical-objects.spec: add type declarations, use .value for Health access,
remove entity inheritance syntax, remove invalid invariants
- Implement Changing Level: add totalDamageTaken + factionsJoined to Character
- Add level-up logic in dealDamage() and joinFaction()
- Add Level.damageThresholdForLevel() static method
- Fix changing-level.spec.ts properties: handle target survival, compute
expected level from threshold crossings
2026-06-15 07:55:39 +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
11919c742a
feat: Magical Objects story — weapons and healing items
...
- MagicalWeapon: fixed damage, owner-only, self-destructs at 0 HP
- HealingObject: heals characters up to both caps, self-destructs at 0 HP
- 18 fast-check properties covering rules and invariants
- Allium spec with entities, rules, and invariants
- Character.createWithHealthAndStatus factory method for status-aware creation
2026-06-13 22:13:06 +01:00
38ea78f91e
feat(story2): level-based damage modifiers — diff method, 50% scaling for level gaps, transcripts
2026-06-13 16:08:50 +01:00