Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weapons making spell attacks use the incorrect ability when set to "Default" #4830

Closed
krbz999 opened this issue Dec 5, 2024 · 1 comment · Fixed by #5007
Closed

Weapons making spell attacks use the incorrect ability when set to "Default" #4830

krbz999 opened this issue Dec 5, 2024 · 1 comment · Fixed by #5007
Assignees
Labels
bug Functionality which is not working as intended system: advancement
Milestone

Comments

@krbz999
Copy link
Contributor

krbz999 commented Dec 5, 2024

repro:

  • create a weapon
  • create an Attack activity.
  • set activity to be Melee (default) and Attack Classification: Spell
  • in the Attack Details, notice that the default is "Spellcasting"
  • when on an actor, notice that the modifier does not correspond to its spellcasting ability
  • change to Spellcasting on the activity explicitly (modifier is now correct)
@roth-michael
Copy link
Contributor

Problem here's in AttackActivityData's availableAbilities getter, which begins:

// Defer to item if available
if ( this.item.system.availableAbilities ) return this.item.system.availableAbilities;

A weapon whose type is in CONFIG.DND5E.weaponTypeMap will always return the default for melee or ranged (or both, if finesse), so it'll return early with the (potentially incorrect) ability.

@arbron arbron added this to the D&D5E 4.3.0 milestone Feb 3, 2025
@arbron arbron added bug Functionality which is not working as intended system: advancement labels Feb 3, 2025
arbron added a commit that referenced this issue Feb 3, 2025
…k type (#5007)

* only defer to item activity if matching attack type

* Apply suggestions from code review

Co-authored-by: Jeff Hitchcock <[email protected]>

---------

Co-authored-by: Jeff Hitchcock <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality which is not working as intended system: advancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants