foundryvtt / dnd5e

An implementation of the 5th Edition game system for Foundry Virtual Tabletop (http://foundryvtt.com).
MIT License
341 stars 227 forks source link

Fire dnd5e.preRollAbilityTest on initiative checks #2654

Closed JPMeehan closed 3 weeks ago

JPMeehan commented 1 year ago

Initiative checks are ability tests RAW, so anything that modifies an ability test should also fire for the default-dexterity check as part of initiative

arbron commented 1 year ago

The problem is that initiative rolls don't have the same configuration information available at the time of rolling as ability checks due to how Foundry is set up, so we'd end up calling the hook with different or less information which could cause issues for consumers of the API.

We do have dnd5e.preRollInitiative and dnd5e.rollInitiative, so you can modify them if necessary by registering two hooks.