fix(rules): cap reposition and drag by size category

PF1e (APG Reposition / Drag): "You can only reposition/drag an opponent
that is no more than one size category larger than you" — the same cap the
SRD puts on trip/bull rush/overrun. reposition and drag join
_SIZE_RESTRICTED_MANEUVERS, so a two-categories-larger target is rejected
outright (no roll, no AoO). README updated.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-09-12 10:58:13 +02:00
parent 5a848fd07c
commit 57a597babd
3 changed files with 25 additions and 16 deletions
+10 -6
View File
@@ -284,9 +284,12 @@ _SIZE_ORDER: tuple[str, ...] = (
"gargantuan", "colossal",
)
# PF1e (SRD Trip / Bull Rush / Overrun): "You can only [affect] an opponent
# who is no more than one size category larger than you."
_SIZE_RESTRICTED_MANEUVERS: frozenset[str] = frozenset({"trip", "bull_rush", "overrun"})
# PF1e (SRD Trip / Bull Rush / Overrun; APG Reposition / Drag): "You can only
# [affect/reposition/drag] an opponent [who is] no more than one size category
# larger than you."
_SIZE_RESTRICTED_MANEUVERS: frozenset[str] = frozenset(
{"trip", "bull_rush", "overrun", "reposition", "drag"}
)
def _size_rank(size: str) -> int:
@@ -4001,9 +4004,10 @@ class CombatEngine:
"overrun", "dirty_trick", "steal", "reposition", "drag",
):
return
# PF1e (SRD Trip / Bull Rush / Overrun): "You can only [affect] an
# opponent who is no more than one size category larger than you."
# The attempt is illegal outright: no roll, no provoked AoO.
# PF1e (SRD Trip / Bull Rush / Overrun; APG Reposition / Drag): "You
# can only [affect] an opponent who is no more than one size category
# larger than you." The attempt is illegal outright: no roll, no
# provoked AoO.
if maneuver in _SIZE_RESTRICTED_MANEUVERS and (
_size_rank(target.combatant.size) - _size_rank(state.combatant.size)
>= _MANEUVER_MAX_SIZE_DIFF