fix(rules): distinguish natural reach from reach weapons
PF1e CRB 'Big and Little Creatures in Combat': a creature's natural reach is a disk (a Large creature still threatens and strikes adjacent squares), while a reach weapon doubles the wielder's natural reach but 'can't strike at their natural reach or less' (a ring whose dead zone is the natural reach). The engine keyed the ring off reach_ft > 5, so reach-10 natural attacks (giant belostomatid bite/claw, mounted hooves) wrongly got a 5-ft dead zone. AttackSpec gains reach_weapon (parsed from the combatant JSON); the disk-vs-ring rule is centralized in _melee_reach_zone_cells and applied consistently to weapon selection, melee usability, threatened squares and charge end placement. Esha's Lance is the only reach weapon in the shipped data; Large natural attackers keep the default (disk). Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -702,9 +702,10 @@ def test_observation_enriched_pair_existing_keys_preserved() -> None:
|
||||
def make_reach_combatant(cid: str, *, reach_ft: int = 10) -> Combatant:
|
||||
"""Build a combatant whose melee weapon has the requested reach.
|
||||
|
||||
``reach_ft=10`` is a typical reach weapon (e.g. longspear): threatens
|
||||
the ring at 2 squares (5-10-5) and NOT the 1-square dead zone.
|
||||
``reach_ft=5`` is a non-reach melee weapon: threatens the disk of 1 cell.
|
||||
``reach_ft=10`` is a typical reach weapon (e.g. longspear, flagged
|
||||
``reach_weapon=True``): threatens the ring at 2 squares (5-10-5) and
|
||||
NOT the 1-square dead zone. ``reach_ft=5`` is a non-reach melee weapon:
|
||||
threatens the disk of 1 cell.
|
||||
"""
|
||||
attack = AttackSpec(
|
||||
id=f"{cid}-w",
|
||||
@@ -713,6 +714,7 @@ def make_reach_combatant(cid: str, *, reach_ft: int = 10) -> Combatant:
|
||||
attack_bonus=5,
|
||||
damage=[DamageComponent(formula=parse_dice("1d8"), types=["piercing"])],
|
||||
reach_ft=reach_ft,
|
||||
reach_weapon=reach_ft > 5,
|
||||
)
|
||||
return Combatant(
|
||||
id=cid,
|
||||
|
||||
Reference in New Issue
Block a user