feat(data): transpose Foundry PC sheets into data/pcs

All 8 sheets from fiches_personnages/ converted to the strict Combatant
JSON schema (data/monsters convention) so the CLI can run PCs directly:

  --side players data/pcs/esha.json

- id derived from the file stem; source field points at the original sheet
- oni: placeholder attacks without encoded damage ('une Pioche', 'Weapon')
  left out, documented in notes (pick stats ambiguous light/heavy in the
  rules KB; no identification possible for 'Weapon')
- README: PC section now documents data/pcs usage
- tests: parametrized load check + golden spots for the 8 PC files
This commit is contained in:
2026-08-17 22:49:50 +02:00
parent cd7f4f7042
commit 7297494e56
10 changed files with 736 additions and 5 deletions
+37
View File
@@ -11,6 +11,43 @@ from pf1e_simulator.dice import DiceExpr
from pf1e_simulator.loaders.monster import MonsterLoadError, load_monster
MONSTERS_DIR = Path(__file__).resolve().parents[1] / "data" / "monsters"
PCS_DIR = Path(__file__).resolve().parents[1] / "data" / "pcs"
@pytest.mark.parametrize(
"stem",
["esha", "harvie", "ierlieth", "jeanne", "misty", "nairda", "oni", "tammara"],
)
def test_pc_sheet_loads(stem: str) -> None:
"""Every transposed PC sheet loads through the strict monster JSON path."""
combatant = load_monster(PCS_DIR / f"{stem}.json")
assert combatant.attacks
assert combatant.hp_max >= 1
assert combatant.ac.total >= 10
assert combatant.speed_land_ft >= 0
def test_pc_sheets_golden_spots() -> None:
esha = load_monster(PCS_DIR / "esha.json")
assert esha.name == "Esha Randu"
assert [a.name for a in esha.attacks] == [
"Lance",
"Composite Shortbow +3",
"Earth Breaker",
]
assert esha.attacks[0].reach_ft == 10
assert esha.attacks[1].range_increment_ft == 70
harvie = load_monster(PCS_DIR / "harvie.json")
assert harvie.size == "Small"
assert harvie.speed_fly_ft == 80
oni = load_monster(PCS_DIR / "oni.json")
assert "Pioche" in oni.notes
assert "Weapon" in oni.notes
tammara = load_monster(PCS_DIR / "tammara.json")
assert tammara.initiative_mod == 7
def _write(tmp_path: Path, payload: dict[str, object]) -> Path: