fix(rules): helpless Dex-0 AC adds exactly -5 on flat-footed base; touch base strips full Dex mod when helpless (no negative-Dex double count)

This commit is contained in:
2026-09-16 21:32:19 +02:00
parent e0bf484394
commit cc9fba3b52
2 changed files with 79 additions and 11 deletions
+14 -8
View File
@@ -2707,9 +2707,11 @@ class CombatEngine:
PF1e (CRB): a prone defender takes -4 AC against melee attacks but
gains +4 AC against ranged attacks; a helpless defender (paralyzed,
asleep, unconscious, helpless) has an effective Dexterity score of 0,
so its whole Dex modifier gives way to the Dex-0 penalty (-5) —
flat-footed AC already drops a positive Dex bonus, a native Dex
penalty must still be replaced."""
so its whole Dex modifier gives way to the Dex-0 penalty (-5). The
flat-footed base already excludes ALL Dex (bonus and penalty alike),
so the mod is exactly -5 there; on the touch base the stored Dex
modifier is stripped at the base (see resolve_attack) before this
-5 is added."""
mods = self._stat_modifiers(target, "ac")
if self._has_condition_named(target, "prone"):
mods.append(
@@ -2718,8 +2720,7 @@ class CombatEngine:
)
)
if self._is_helpless(target):
dex_penalty = min(0, target.combatant.abilities.dex_mod)
mods.append(StatModifier(target="ac", value=_DEX_ZERO_MOD - dex_penalty))
mods.append(StatModifier(target="ac", value=_DEX_ZERO_MOD))
return mods
def resolve_attack(
@@ -2804,9 +2805,14 @@ class CombatEngine:
):
base_ac = full_ac_base
elif denies_dex:
base_ac = (
target.combatant.ac.touch - max(0, target.combatant.abilities.dex_mod)
)
# A flat-footed defender loses only a POSITIVE Dex bonus (a
# Dex penalty stays on touch AC); a HELPLESS defender has an
# effective Dex score of 0, so its whole stored Dex modifier
# is stripped here and the exact -5 Dex-0 penalty is added by
# _attack_ac_mods.
dex_mod = target.combatant.abilities.dex_mod
strip = dex_mod if self._is_helpless(target) else max(0, dex_mod)
base_ac = target.combatant.ac.touch - strip
else:
base_ac = target.combatant.ac.touch
else: