How would I check if an entity has Both a specific potion effect AND has a chosen duration left?
My attempt at this looks like:
/execute at @e[nbt={active_effects:[{id:"minecraft:speed"}, {duration:2}]}] run summon pig ~ ~2 ~
where, when there is 2 ticks left on the speed effect, it summons a pig at the entity
Continue to help post