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:
+17
-1
@@ -81,5 +81,21 @@
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
"source": "fiches_personnages/esha_sheet.json"
|
||||
"source": "fiches_personnages/esha_sheet.json",
|
||||
"features": [
|
||||
"Mounted Combat",
|
||||
"Stealth Synergy",
|
||||
"Point-Blank Shot",
|
||||
"Precise Shot",
|
||||
"Alertness",
|
||||
"Adopted",
|
||||
"Thoroughbred (Human; Keleshite)",
|
||||
"Vagabond Child (Urban)",
|
||||
"Whispering Wind",
|
||||
"Breeze-Kissed",
|
||||
"Like the Wind"
|
||||
],
|
||||
"spells": [
|
||||
"Unseen Servant"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -63,5 +63,11 @@
|
||||
}
|
||||
],
|
||||
"source": "fiches_personnages/harvie_sheet.json",
|
||||
"speed_fly_ft": 80
|
||||
"speed_fly_ft": 80,
|
||||
"features": [
|
||||
"Friendly Face",
|
||||
"Fey-touched",
|
||||
"Animal (race)"
|
||||
],
|
||||
"spells": []
|
||||
}
|
||||
|
||||
@@ -62,5 +62,11 @@
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
"source": "fiches_personnages/ierlieth_sheet.json"
|
||||
"source": "fiches_personnages/ierlieth_sheet.json",
|
||||
"features": [
|
||||
"Toughness",
|
||||
"Power Attack",
|
||||
"Drake (race)"
|
||||
],
|
||||
"spells": []
|
||||
}
|
||||
|
||||
+10
-1
@@ -62,5 +62,14 @@
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
"source": "fiches_personnages/jeanne_sheet.json"
|
||||
"source": "fiches_personnages/jeanne_sheet.json",
|
||||
"features": [
|
||||
"Combat Reflexes",
|
||||
"Alertness",
|
||||
"Armor Proficiency (Light)",
|
||||
"Armor Proficiency (Medium)",
|
||||
"Thoroughbred (Human; Keleshite)",
|
||||
"Animal (race)"
|
||||
],
|
||||
"spells": []
|
||||
}
|
||||
|
||||
+39
-1
@@ -117,5 +117,43 @@
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
"source": "fiches_personnages/misty_sheet.json"
|
||||
"source": "fiches_personnages/misty_sheet.json",
|
||||
"features": [
|
||||
"Plot Armor",
|
||||
"Harmonic Spell",
|
||||
"Weapon Finesse",
|
||||
"Axe to Grind (combat)",
|
||||
"Spell Vulnerability (divination; drawback)",
|
||||
"Born Damned (race: tiefling)",
|
||||
"Gifted Adept (dispel magic; magic)",
|
||||
"Prehensile Tail (tiefling daemon-spawn)",
|
||||
"Scaled Skin (electricity) (tiefling daemon-spawn)",
|
||||
"Maw or Claw (Bite) (tiefling daemon-spawn)"
|
||||
],
|
||||
"spells": [
|
||||
"Prestidigitation",
|
||||
"Oath of Anonymity",
|
||||
"Detect Magic",
|
||||
"Read Magic",
|
||||
"Disrupt Undead",
|
||||
"Ray of Frost",
|
||||
"Summon Instrument",
|
||||
"Mage Hand",
|
||||
"Open/Close",
|
||||
"Arcane Mark",
|
||||
"Acid Splash",
|
||||
"Grasp",
|
||||
"Shield",
|
||||
"Cure Light Wounds",
|
||||
"Color Spray",
|
||||
"Saving Finale",
|
||||
"Vanish",
|
||||
"Shocking Grasp",
|
||||
"Burning Hands",
|
||||
"Alarm",
|
||||
"Scorching Ray",
|
||||
"Bladed Dash",
|
||||
"Mirror Image",
|
||||
"Heroism"
|
||||
]
|
||||
}
|
||||
|
||||
+44
-1
@@ -63,5 +63,48 @@
|
||||
"range_increment_ft": 10
|
||||
}
|
||||
],
|
||||
"source": "fiches_personnages/nairda_sheet.json"
|
||||
"source": "fiches_personnages/nairda_sheet.json",
|
||||
"features": [
|
||||
"Brew Potion",
|
||||
"Craft Wondrous Item",
|
||||
"Extra Hex",
|
||||
"Eschew Materials",
|
||||
"Half-Forgotten Secrets (Dhampir; Ajibachana)",
|
||||
"Orange - Lazy Ass",
|
||||
"Pingre"
|
||||
],
|
||||
"spells": [
|
||||
"Arcane Mark",
|
||||
"Bleed",
|
||||
"Dancing Lights",
|
||||
"Daze",
|
||||
"Detect Fiendish Presence",
|
||||
"Detect Magic",
|
||||
"Detect Poison",
|
||||
"Grasp",
|
||||
"Guidance",
|
||||
"Light",
|
||||
"Mending",
|
||||
"Message",
|
||||
"Putrefy Food and Drink",
|
||||
"Read Magic",
|
||||
"Resistance",
|
||||
"Spark",
|
||||
"Stabilize",
|
||||
"Touch of Fatigue",
|
||||
"Comprehend Languages",
|
||||
"Charm Person",
|
||||
"Ill Omen",
|
||||
"Inflict Light Wounds",
|
||||
"Sleep",
|
||||
"Hex Vulnerability",
|
||||
"Deja Vu",
|
||||
"Unseen Servant",
|
||||
"Ray of Enfeeblement",
|
||||
"Web",
|
||||
"Blindness/Deafness",
|
||||
"Ice Slick",
|
||||
"Darkness",
|
||||
"Flurry of Snowballs"
|
||||
]
|
||||
}
|
||||
|
||||
+32
-1
@@ -83,5 +83,36 @@
|
||||
}
|
||||
],
|
||||
"source": "fiches_personnages/oni_sheet.json",
|
||||
"notes": "Armes placeholder Foundry sans dégâts encodés omises : 'une Pioche' (non maîtrisée) et 'Weapon' (à remplacer par la vraie arme)."
|
||||
"notes": "Armes placeholder Foundry sans dégâts encodés omises : 'une Pioche' (non maîtrisée) et 'Weapon' (à remplacer par la vraie arme).",
|
||||
"features": [
|
||||
"Summon Good Monster",
|
||||
"Sacred Summons",
|
||||
"Selective Channeling",
|
||||
"Extremely Fashionable",
|
||||
"Exalted of the Society (Cleric, Pathfinder Society)",
|
||||
"Bitter",
|
||||
"Ambitious"
|
||||
],
|
||||
"spells": [
|
||||
"Guidance",
|
||||
"Detect Magic",
|
||||
"Stabilize",
|
||||
"Read Magic",
|
||||
"Detect Poison",
|
||||
"Purify Food and Drink",
|
||||
"Summon Monster I",
|
||||
"Shield of Faith",
|
||||
"Forbid Action",
|
||||
"Cure Light Wounds",
|
||||
"Hidden Diplomacy",
|
||||
"Protection from Evil",
|
||||
"Bless",
|
||||
"Summon Monster II",
|
||||
"Cure Moderate Wounds",
|
||||
"Sound Burst",
|
||||
"Suppress Charms and Compulsions",
|
||||
"Delay Poison",
|
||||
"Ironskin",
|
||||
"Restoration, Lesser"
|
||||
]
|
||||
}
|
||||
|
||||
+74
-1
@@ -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"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user