Commit Graph

15 Commits

Author SHA1 Message Date
ctan 56310b191a fix(rules): mirror image rolled image count with dynamic images/(images+1) concealment miss chance, bleed cantrip gated on the SRD dying-target eligibility, bane -1 fear-scoped penalty via a dedicated bane condition (SRD spells/mirror-image.md, spells/bleed.md, spells/bane.md) 2026-09-19 13:22:19 +02:00
ctan f31cc88124 fix(rules): pinned creatures cannot attack (definition corrected; apply-gap documented) 2026-09-16 19:38:49 +02:00
ctan 68a03a34f6 fix(rules): confused creatures make no attacks of opportunity (simplification documented) 2026-09-16 19:30:08 +02:00
ctan def8533197 fix(rules): nauseated creatures are denied attacks of opportunity 2026-09-16 19:25:35 +02:00
ctan 6220edcfd7 fix(rules): fatigued -2 Dex now costs -1 AC and -1 Reflex 2026-09-16 19:22:00 +02:00
ctan bfe0b767a9 fix(rules): exhausted -6 Dex now costs -3 AC and -3 Reflex 2026-09-16 19:20:00 +02:00
ctan 317f91a07f fix(rules): entangled casting needs DC 15+level concentration; add -4 dex_skills 2026-09-16 19:17:10 +02:00
ctan 9aee4f6f6b fix(rules): correct P2/P3 PF1e conformance bugs (flanking, touch, blinded, disabled, death, maneuvers, DR, sneak) 2026-09-10 21:45:50 +02:00
ctan 5afe495c4a fix(rules): correct P1 PF1e conformance bugs (area saves, concentration, prone, slots, helpless, nauseated) 2026-09-10 20:52:28 +02:00
ctan 91f70f19ca feat(conditions): add bleeding and confused rules 2026-09-10 18:15:35 +02:00
ctan b3bff85215 feat(conditions): add blinded/invisible/helpless/fascinated combat rules 2026-09-10 18:00:41 +02:00
ctan 97f4429c2b feat(combat): add concealment miss chance, sneak attack, and Precise Shot 2026-09-10 10:22:50 +02:00
ctan 4d7f1b8233 feat(loaders): map 8-PC feats 2026-09-04 23:02:18 +02:00
ctan 828afc15c0 feat(spells): add spell system with 10 combat spells, cast_spell action
Spells are SpellSpec dataclasses with typed effects: DamageEffect
(dice + types, half-on-save), ConditionEffect (condition lookup +
save negates), HealEffect (capped at hp_max), BuffEffect (transient
StatModifiers). Range categories (personal/touch/close/medium/long)
scale with caster level via spell_range_ft. JSON loader
(load_spell/load_spell_registry) reads data/spells/*.json.

The engine integrates spells via Action(kind='cast_spell') and
_cast_spell: range check, line-of-effect gate, save resolution
(resolve_save), effect application (_apply_spell_effects with DR
via _apply_dr_for_types), transcript logging. The spell_registry
is passed to CombatEngine; Combatant.spells holds known spell names.

- spells.py: SpellSpec, 4 effect types, SpellRange/SaveType literals,
  spell_range_ft, JSON loader (uses Json type from foundry.py)
- conditions.py: CONDITIONS_BY_NAME registry for condition lookup
- combat.py: cast_spell Action kind, _execute_cast_spell dispatch,
  _cast_spell (range/LoE/save/effects/log), _apply_spell_effects,
  _apply_dr_for_types, _save_label helper, SpellSpec/BuffEffect/etc
  imports, spell_registry parameter on CombatEngine
- models.py: spells field on Combatant
- data/spells/: 10 spells (Magic Missile, Burning Hands, Fireball,
  Lightning Bolt, Acid Arrow, Cure Light/Moderate Wounds, Hold Person,
  Fear, Bull's Strength)
- tests/test_spells.py: 29 tests (loading, range, damage/save/condition/
  heal/buff/DR, out-of-range, unknown spell, dispatch, DC scaling)
- pyproject.toml: PLR0913 ignore for combat.py (CombatEngine.__init__)
- README.md: spells.py architecture section, Sorts removed from
  non-modeled list, 336 tests
2026-08-17 22:49:50 +02:00
ctan a32444f804 feat(conditions): add condition system with 18 PF1e conditions 2026-08-17 22:49:50 +02:00