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

Incorrect spell slot being consumed #1267

Closed
RainbowEncoder opened this issue Sep 14, 2023 · 0 comments · Fixed by #1268
Closed

Incorrect spell slot being consumed #1267

RainbowEncoder opened this issue Sep 14, 2023 · 0 comments · Fixed by #1268
Labels
bug Something isn't working

Comments

@RainbowEncoder
Copy link

Describe the bug
When casting a spell with multiple levels of spell slots available the spell is cast as if you selected the next level up.

To Reproduce

  1. Have a spell caster character with multiple spell slot levels available
  2. Cast a spell below the highest level
  3. In the Cast Spell dialogue select a spell slot below the highest and confirm

Expected behaviour
The spell is cast using the selected spell slot at the selected level

Technical details

  • OS: Windows 10
  • Browser: Vivaldi (Chromium-based)
  • Foundry Version: v11.308
  • SFRPG Version: v0.25.2

Additional context
My own investigations pointed to a change in the spell-cast.hbs to fix Pre-select triggered level for variable level spell #664

That incremented the values of the select options of the Spell Slot selector menu by one. However within actor.js it assumes that the value from the select will be a 0-based index of available spell slots but it's now returning a 1-based index. Thus it's treating it as if you choose the next level of spell slot.

I think the cause of the confusion is that it's trying to set the default by spell level but the values are an index and not spell level but for a level 1+ variable spell a 1-based index and spell level would align

@RainbowEncoder RainbowEncoder added the bug Something isn't working label Sep 14, 2023
LebombJames added a commit that referenced this issue Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant