Skip to content

fix: include weapon tags and on-hit effects in NPC scan export (#3431)#3563

Merged
jarena3 merged 1 commit into
massif-press:devfrom
code-monki:fix/misc-issues-with-feature-details-in-scan-#3431
Jun 11, 2026
Merged

fix: include weapon tags and on-hit effects in NPC scan export (#3431)#3563
jarena3 merged 1 commit into
massif-press:devfrom
code-monki:fix/misc-issues-with-feature-details-in-scan-#3431

Conversation

@code-monki

Copy link
Copy Markdown

Summary

The Active Mode Scan export's feature-detail path dropped key NPC weapon details:

  • Weapon tags were omitted (e.g. Armor Piercing / tg_ap), so the Demolisher's Demolition Hammer AP tag never appeared.
  • On Attack / On Hit / On Crit / On Miss effect text was omitted, so third-party attack descriptions (e.g. Nosferatu's "The Bite") were dropped.
  • An off-by-one in the per-tier attack-count index reported the wrong "Attacks/Activation" value.
  • mapNpcWeaponStats was invoked for every feature, including non-weapons.

Changes

All scoped to src/classes/Statblock.ts:

  • Guard mapNpcWeaponStats with feature instanceof NpcWeapon so weapon-only details are skipped for non-weapon features (it's now called via the refactored getFeatures path with an item as NpcWeapon cast).
  • Fix the per-tier attack-count index (Attacks[tier] -> Attacks[tier - 1]).
  • Append non-hidden weapon tags.
  • Append On Attack/Hit/Crit/Miss effect text via a small mapNpcWeaponEffect helper (HTML stripped, mirroring existing detail formatting).

Notes

  • Rebased onto the latest dev (8b4a83767); applies cleanly with no conflicts.
  • The change integrates with the recent feature-detail refactor (getFeatures / GenerateNPC(..., includeFeatures)) and improves both the detailed-feature code paths.

Test plan

  • Statblock.ts is type-clean (no new vue-tsc/tsc errors introduced by this change).
  • Manual: Scan-export an NPC with a tagged weapon (e.g. Demolisher's Demolition Hammer) and confirm the AP tag now appears.
  • Manual: Scan-export an NPC with on-hit effect text (e.g. Nosferatu's "The Bite") and confirm the effect text now appears.
  • Manual: Confirm per-tier "Attacks/Activation" matches the selected tier.

Closes #3431

Made with Cursor

…f-press#3431)

The Active Mode Scan export's feature-detail path omitted weapon tags
(e.g. Armor Piercing/tg_ap) and the OnAttack/OnHit/OnCrit/OnMiss effect
text, so details like the Demolisher's Demolition Hammer AP tag and
third-party attack descriptions (e.g. Nosferatu's "The Bite") were
dropped. Also corrects an off-by-one in the per-tier attack count index.

Co-authored-by: Cursor <cursoragent@cursor.com>
@netlify

netlify Bot commented Jun 7, 2026

Copy link
Copy Markdown

👷 Deploy request for cc-dev-preview pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 02eb5cc

@jarena3 jarena3 merged commit 3ec7146 into massif-press:dev Jun 11, 2026
1 check passed
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.

3 participants