Skip to content

Fix Power Attack CMB penalty and off-hand damage; switch its temp bonus rows together - #7777

Open
liao1994 wants to merge 4 commits into
PCGen:masterfrom
liao1994:feature/power_attack_cmb_temp_bonus_switching
Open

liao1994 wants to merge 4 commits into
PCGen:masterfrom
liao1994:feature/power_attack_cmb_temp_bonus_switching

Conversation

@liao1994

@liao1994 liao1994 commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #7776. Follow-up to #7762. Four commits, best reviewed one by one; details are in the commit messages.

  1. Unticked equipment temp bonuses leave the sheet (general fix in setCalcEquipmentList).
  2. Data: Power Attack gets TEMPBONUS:PC|VAR|CMB|-floor(PowerAttackModifier), as Combat Expertise does.
  3. Data: Off-Hand damage + → *, as Natural Secondary does (typo from DATA-2845).
  4. Power Attack's rows move together: applying a variant adds the CMB row; ticking or unticking any row does all of them; removing the last variant removes the CMB row, and removing the CMB row removes the variants.

Why:

  • Not one row like Haste: Haste is the same for every attack. Power Attack's damage depends on how each weapon is used, which no character-wide flat damage bonus can express, so only the CMB part is a Haste-style row.
  • Commit 4: Power Attack is one choice per turn, so its rows shouldn't disagree. PCGen has no precedent for linked rows; drop commit 4 if unwanted, commits 1–3 stand alone. In all bundled data only Power Attack is linked. Side effect: re-applying an applied but unticked bonus switches it back on. Old saves link once a Power Attack row is applied again.

Tests: 6 new in PowerAttackNaturalAttackTest (14 total), covering CMB, off-hand damage, and attack, damage and CMB through the facade in each on/off state.

@LegacyKing: the data changes are one line each, in commits 2 and 3.

🤖 Generated with Claude Code

liao1994 and others added 4 commits November 1, 2026 01:27
Unticking a temporary bonus on the character sheet adds it to the temp bonus
filter, which removes character-wide bonuses (Haste, Mage Armor, ...). A bonus
applied to equipment lives on a temporary copy of the item, though, and
setCalcEquipmentList added every copy from tempBonusItemList regardless of the
filter, so e.g. an unticked "Power Attack (Natural Primary) [Bite]" still showed
an extra Bite line with the Power Attack numbers.

Leave out temporary bonus items whose bonuses are all filtered
(PlayerCharacter.hasActiveTempBonusOn); ticking the bonus again brings the copy
back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Power Attack's penalty applies to "all melee attack rolls and combat maneuver
checks" (CRB p.131), but the data only put it on the weapon variants' attack
rolls, so CMB (grapple, trip, ...) never changed.

Give the Power Attack feat a character-wide temporary bonus,
TEMPBONUS:PC|VAR|CMB|-floor(PowerAttackModifier), the same way Combat Expertise
handles CMB. It shows up as "Power Attack" on the Temporary Bonuses tab, next to
the weapon variants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Power Attack's damage bonus is halved with an off-hand weapon (CRB p.131), but
Power Attack (Off-Hand) gave half the base plus the modifier,
(PowerAttackDamageBase/2)+PowerAttackModifier, i.e. +3 instead of +2 at BAB +6
and +2 instead of +1 at BAB +1. The DATA-2845 change (bf20bf4) replaced
2*PowerAttackModifier with PowerAttackDamageBase*PowerAttackModifier for Mythic
Power Attack, and used "+" for the halved off-hand variant, which until then was
plain PowerAttackModifier.

Use (PowerAttackDamageBase/2)*PowerAttackModifier, as Power Attack (Natural
Secondary) does since PCGen#7762.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Power Attack is one choice per turn: its penalty applies to all melee attack
rolls and combat maneuver checks. PCGen splits it into a character-wide temporary
bonus (the penalty to combat maneuver checks) and per-weapon variants granted
through ABILITY tokens, because the bonuses depend on the weapon. On the
Temporary Bonuses tab and the character sheet those rows were independent, so
the character-wide part had to be found and applied separately, and the rows
could disagree.

Link the rows of an ability's character-wide temporary bonus with the equipment
temporary bonuses of the abilities it grants:

- Applying such an equipment bonus (e.g. a Power Attack variant to the bite) also
  applies the granting ability's character-wide bonus if it is not applied yet,
  and switches all the linked rows on.
- Switching any linked row on or off switches all of them.
- Removing the last equipment bonus removes the character-wide bonus; removing
  the character-wide bonus removes the equipment bonuses. Removing one of several
  equipment bonuses only removes that one.

TempBonusHelper.grantsAbility reads the grant from the ABILITY token's lists, so
the rule is not specific to Power Attack. In the Pathfinder data, Power Attack is
the only ability with a character-wide temporary bonus that grants abilities with
equipment temporary bonuses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG][DATA][PF1] Power Attack: CMB not penalized, off-hand damage not halved; unticked equipment temp bonuses stay on the sheet

2 participants