Larkinabout / fvtt-token-action-hud-pf2e

Token Action HUD is a repositionable HUD of actions for a selected token.
10 stars 15 forks source link

Spell casting does not use the proper rank as of PF2e 5.12.0 #108

Closed Silvertower closed 7 months ago

Silvertower commented 7 months ago

token-action-hud uses 'level' when calling spellcasting.cast() but needs to use 'rank' due to a breaking change.

From roll-handler.js:

        await spellcasting.cast(spell, {
            message: !expend,
            consume: true,
            level: Number(level)
        })

To fix, change it to:

        await spellcasting.cast(spell, {
            message: !expend,
            consume: true,
            rank: Number(level)
        })

As a temporary workaround, this can be fixed in token-action-hud-pf2e.min.js by replacing the following (entire) string:

l.cast(c,{message:!o,consume:!0,level:Number(a)})

With:

l.cast(c,{message:!o,consume:!0,rank:Number(a)})