[RPG] How does a spell resolve when the target changes places before the spell is finished

pathfinder-1espellstargeting

Here's what happened:

We've reached the end of the campaign, with only the last wave of minions standing between us and the dark sorcerer who's been flooding the local farms and villages with undead. As it comes to find out, literally the only thing between he and us were his minions. From the other side of the room, a perception check tells us that he's beginning to cast a spell. Spellcraft check tells the group wizard that it's an empowered chain-lightning spell, and after a quick taunt, he insures that it's him who will be the primary target of the spell.

Well, here's the hitch. He's prepared a dimension door spell, and has ready-action "teleport away if I'm attacked." The DM makes the call, and a spell that he knows will harm him falls under 'getting attacked' for the purposes of the condition of the readied action.

So, he teleports… behind the sorcerer. But, a few people in the group take issue with this.
Here are the two sides of the argument, as they were presented in the group.

His side: The caster no longer knew where he was (this was also a topic of debate, but that's a different issue) and casters aren't allowed to choose 'that guy I know is within range of my spell, even though I have no idea where he is' after the rogue uses a ring of invisibility to vanish.

Other side: He was still within range of the spell, the spell caster had already chosen him as the target of the spell, and the spell specifically states that it goes from the caster's finger, to the target, and doesn't just affect an area.

Well, the GM ruled that, because of the specific circumstances, the spell would fail. The way he saw it, the lightning was shooting towards him, with him vanishing right before it hits him.

All that said, what is the actual rule on this? When a spell specifically targets a thing/creature, and then that thing/creature vanishes at the last instant, but stays within range of the spell, does the spell still activate? I can see this working for chain lightning, and other damaging spells, but what about spells like hold person?

This situation occurred while playing pathfinder, to be specific.

Best Answer

A spell is resolved - and the target is determined - when the spell comes into effect, not when spellcasting is "starting".

So in the example the sorcerer could still cast the spell, just another target would be determined if they are no longer aware of where the wizard is. The only way to stop the spell being cast (Spell resistance, saving throws, etc are another matter) would be to counterspell or disrupt (Concentration checks) the spell itself - removing the (intended) target before the spell is complete simply means that the caster (the sorcerer in this case) is free to choose a new target.

Ie. Even though the sorcerer had taunted the wizard the spell target hadn't yet been determined.

This is usually most relevant when a spell takes more than a simple action to cast (such as sleep, a one round to cast spell) but when reactionary effects get in the way spellcasters can still choose their target if their original one vanishes before their spell can take effect.

It's detailed in the Casting Time section of the Magic rules of Pathfinder, but the most important line of it is:

You make all pertinent decisions about a spell (range, target, area, effect, version, and so forth) when the spell comes into effect.

So, in the fraction of a moment where the wizard teleports away the spell's effect has not been determined - the wizard hasn't made a saving throw. So the sorcerer is still free to target anyone else they want. If there are no relevant targets of course (say, charm animal and all the animals vanish into the ether on a joyride) then obviously the spell will fail through lack of targets.