refactor(loaders): unify combatant loader, migrate PC features/spells

Rename monster.py → combatant.py with _KNOWN_FEATS lookup table
that resolves feat name strings to AbilitySpec constants (Power Attack,
Iron Will, Toughness, Weapon Focus, etc.). Unknown feats produce
minimal AbilitySpec (data preserved for future implementation).

Migrate all 8 PC JSONs (data/pcs/) with complete feat/spell lists
extracted from Foundry sheets — including traits, racial abilities,
and all spells. Monsters (goblin, orc) unchanged (no feats/spells).

Update all imports, add backward-compatible aliases (load_monster,
MonsterLoadError), update CLI to use load_combatant.

Gate: 377 tests, ruff clean, basedpyright clean.
This commit is contained in:
2026-08-17 22:49:50 +02:00
parent e9e8c26d50
commit c88d8fd6f4
14 changed files with 421 additions and 96 deletions
+74 -1
View File
@@ -119,5 +119,78 @@
"count": 1
}
],
"source": "fiches_personnages/tammara_sheet.json"
"source": "fiches_personnages/tammara_sheet.json",
"features": [
"Weapon Focus (Pistol)",
"Rapid Reload (Pistol)",
"Gunsmithing",
"Skill Focus (Perception)",
"Point-Blank Shot",
"Precise Shot",
"Dazzling Display",
"Fortified Drinker (Cayden Cailean)",
"Fate's Favored",
"Lonely",
"Larger Than Life",
"6. Vert - Yes Mistress",
"Focused Study (trait racial humain — remplace le bonus feat)"
],
"spells": [
"Create Water",
"Light",
"Detect Magic",
"Bleed",
"Detect Poison",
"Enhanced Diplomacy",
"Guidance",
"Mending",
"Purify Food and Drink",
"Read Magic",
"Spark",
"Resistance",
"Stabilize",
"Virtue",
"Create Alcool",
"Abundant Ammunition",
"Air Bubble",
"Bane",
"Bless",
"Cure Light Wounds",
"Divine Favor",
"Doom",
"Endure Elements",
"Enhance Water",
"Face of the Devourer",
"Forbid Action",
"Hide from Undead",
"Protection from Evil",
"Protection from Law",
"Sanctuary",
"Shield of Faith",
"Obscuring Mist",
"Weapon of Awe",
"Tears to Wine",
"Surmount Affliction",
"Suppress Charms and Compulsions",
"Stave Off Corruption",
"Status",
"Restoration, Lesser",
"Cure Moderate Wounds",
"Spear of Purity",
"Silence",
"Shard of Chaos",
"Protection from Law, Communal",
"Protection from Evil, Communal",
"Owl's Wisdom",
"Bull's Strength",
"Bear's Endurance",
"Masterwork Transformation",
"Spiritual Weapon",
"Make Whole",
"Ironskin",
"Delay Disease",
"Delay Poison",
"Aid",
"Drunkard's Breath"
]
}