EoUNT duration appears to be ending at SoUNT instead
Closed this issue · 3 comments
Leaving a note for myself as much as filing a bug: it seems like the "End of User's Next Turn" duration instead causes effects to expire at the start of the user's next turn.
I thought this was probably my doing, since I've been messing so much with the turn-passing function in the last few editions. But then it seemed to also be the case in a recent combat I ran with my group, which was still under Foundry v10 because we were mid-combat when the update dropped. (And since updated to v11, so I can't really double-check.) So, I think it has been a problem since before I started messing with it.
Can I get anybody to confirm this in their own environment?
"End of User's Next Turn" seems to work fine in my environment, but "Start/End of Target's Next Turn" gets deleted on the user's turn instead of the target's. Submitted a fix for that.
Hmm, I noticed that actor.newActiveEffect and related async methods return undefined instead of a promise. I wonder if that is part of the problem because downstream await might not work as expected. Do the effects actually have the correct end time set after transfer?
I haven't tested extensively yet, but after a few quick attempts it looks like the new version with (after your PR) has fixed this for me. I'll hammer on it a bit more to try and make sure, but it's looking good for now!