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

Open
krbz999 opened this issue Dec 5, 2024 · 1 comment · May be fixed by #5007
Open

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

krbz999 opened this issue Dec 5, 2024 · 1 comment · May be fixed by #5007

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.

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 a pull request may close this issue.

2 participants