foundryvtt / pf2e

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

Familiar effects not expiring at master's turn #14504

Closed reonZ closed 6 months ago

reonZ commented 7 months ago

https://github.com/foundryvtt/pf2e/blob/master/src/module/item/abstract-effect/helpers.ts#L35

I believe that this part should be

const atTurnStart = () => startInitiative === currentInitiative && combatant.actor === fightyActor;

because effect.origin will always return the familiar and therefor never use its master as the fighty actor

CarlosFdez commented 6 months ago

That logic looks like it'd cause incorrect expiration for effects that players grant to other players.

What familiar effect are you having trouble with?

reonZ commented 6 months ago

You are right, i confused myself while looking at all the parts that involve combat turn simulation for familiars. What i was testing was persistent damage on the familiar, and they would not trigger during master's turn, but that is handled by another part of the code.