diff --git a/data/pcs/harvie.json b/data/pcs/harvie.json index be329f0..6e759f6 100644 --- a/data/pcs/harvie.json +++ b/data/pcs/harvie.json @@ -7,7 +7,7 @@ "dex_score": 15, "con_score": 12, "int_score": 2, - "wis_score": 12, + "wis_score": 14, "cha_score": 6 }, "hp_max": 15, @@ -25,48 +25,49 @@ "ref": 5, "will": 2 }, - "attacks": [ - { - "id": "harvie:bite", - "name": "Bite", - "kind": "melee", - "attack_bonus": 3, - "damage": [ - { - "formula": "1d4", - "types": [ - "piercing" - ] - } - ], - "damage_bonus": 0, - "crit_range": 20, - "crit_mult": 2, - "reach_ft": 5, - "count": 1, - "natural": true - }, - { - "id": "harvie:claw", - "name": "Claw", - "kind": "melee", - "attack_bonus": 3, - "damage": [ - { - "formula": "1d3", - "types": [ - "slashing" - ] - } - ], - "damage_bonus": 0, - "crit_range": 20, - "crit_mult": 2, - "reach_ft": 5, - "count": 1, - "natural": true - } - ], + "attacks": [ + { + "id": "harvie:bite", + "name": "Bite", + "kind": "melee", + "attack_bonus": 2, + "damage": [ + { + "formula": "1d4", + "types": [ + "piercing" + ] + } + ], + "damage_bonus": 0, + "crit_range": 20, + "crit_mult": 2, + "reach_ft": 5, + "count": 1, + "natural": true, + "secondary": true + }, + { + "id": "harvie:talons", + "name": "Talons", + "kind": "melee", + "attack_bonus": 2, + "damage": [ + { + "formula": "1d4", + "types": [ + "slashing" + ] + } + ], + "damage_bonus": 0, + "crit_range": 20, + "crit_mult": 2, + "reach_ft": 5, + "count": 2, + "natural": true + } + ], "source": "fiches_personnages/harvie_sheet.json", "features": [ "Friendly Face", diff --git a/tests/test_monster_loader.py b/tests/test_monster_loader.py index 08d79ce..2de0fd4 100644 --- a/tests/test_monster_loader.py +++ b/tests/test_monster_loader.py @@ -7,7 +7,7 @@ from pathlib import Path import pytest -from pf1e_simulator.dice import DiceExpr +from pf1e_simulator.dice import DiceExpr, parse_dice from pf1e_simulator.loaders.combatant import CombatantLoadError, load_combatant MONSTERS_DIR = Path(__file__).resolve().parents[1] / "data" / "monsters" @@ -42,6 +42,16 @@ def test_pc_sheets_golden_spots() -> None: harvie = load_combatant(PCS_DIR / "harvie.json") assert harvie.size == "Small" assert harvie.speed_fly_ft == 80 + # Sheet pins (fiches_personnages/harvie_sheet.json): Wis 14 (Will +2 + # implies it), "2x Talons" primary +2 1d4 slashing, Bite secondary -3 + # 1d4 piercing (stored as base +2 with the engine's runtime -5). + assert harvie.abilities.wis_score == 14 + bite, talons = harvie.attacks + assert (bite.name, bite.attack_bonus, bite.secondary) == ("Bite", 2, True) + assert bite.damage[0].formula == parse_dice("1d4") + assert (talons.name, talons.attack_bonus, talons.count) == ("Talons", 2, 2) + assert talons.damage[0].formula == parse_dice("1d4") + assert talons.damage[0].types == ["slashing"] oni = load_combatant(PCS_DIR / "oni.json") assert "Pioche" in oni.notes