xdy / xdy-pf2e-workbench

Random assortment of possibly useful doodads, thingumabobs and whatchamacallits for the foundry vtt pf2e system.
Other
22 stars 37 forks source link

fix: Unify apply persistent damage/healing, add roll options #1404

Closed xyzzy42 closed 1 month ago

xyzzy42 commented 1 month ago

Now that there are REs that can trigger on damage-received and healing-received, having the right roll options set when taking the damage/healing matters. The auto apply feature wasn't getting any of them. Fix that.

Combine the persistent healing and damage functions, since a lot of the code is shared.

Use the heal flavor i18n identifier from PF2e system, so that the translations don't need to also be added to the module and kept up to date with every language in the pf2e system.

Move the hook to preCreateChatMessage. This way it only runs on the single client of the user who is sending the notification, which is typically the GM. The system already figures out a user to send the damage roll, so we can just have the same user apply the damage too.

xdy commented 1 month ago

Looks good, merged.

github-actions[bot] commented 1 month ago

:tada: This issue has been resolved in version 6.7.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: