foundryvtt / pf2e

A community contributed game system for Pathfinder Second Edition.
https://foundryvtt.com/packages/pf2e
Apache License 2.0
399 stars 333 forks source link

Effect Expirations on Initiative Counts other than "now" #1387

Closed cswendrowski closed 11 months ago

cswendrowski commented 3 years ago

In GitLab by @j.darien.riffe on May 5, 2021, 23:33

If I understand the intent, effects expire either when starting or leaving the initiative count on which they are created, call it the "caster's initiative." It would be helpful to trigger expiration on other initiatives, most commonly the "target's" initiative count. I can't immediately think of use cases related to spells, but martial abilities inflict conditions until the start/end of the target's turn all the time.

cswendrowski commented 3 years ago

In GitLab by @nikolaj-a on May 5, 2021, 23:42

Adding a note in here so I don't forget.

This should be fairly easy to implement by adding a field to the effect to indicate whether to use the target's initiative or the current initiative as the offset. This field would then be queried in the code that calculates the initiative value when dragged to a token or actor.

https://gitlab.com/hooking/foundry-vtt---pathfinder-2e/-/blob/master/src/pf2e.ts#L174