feat(rules): add alignment field to Combatant with axis gating flags

Adds the PF1e two-axis alignment code (LG/NG/CG/LN/N/CN/LE/NE/CE,
default N) to the Combatant model with a strict validator, derived
is_lawful/is_chaotic/is_good/is_evil properties, exposure in the
observation snapshot, and alignment values for all monsters and PCs
sourced from the bestiary KB and the Foundry sheets.
This commit is contained in:
2026-09-20 11:49:04 +02:00
parent 40088e1869
commit f9e51e377a
20 changed files with 265 additions and 2 deletions
+2
View File
@@ -237,6 +237,8 @@ def load_combatant(path: Path) -> Combatant:
``_resolve_feat``. ``spells`` are passed through as-is (list of strings).
The ``aware`` flag (SRD "Surprise") is a plain boolean of the
``Combatant`` schema (default ``true``), so it parses directly here.
The ``alignment`` code (SRD "Alignment") is a plain string of the schema
(default ``"N"``), so a JSON ``alignment`` key loads directly too.
"""
try:
raw = path.read_text(encoding="utf-8")