If an ability targets something controlled by the “defending player” of an attacking creature and the defending player for that creature changes before that ability resolves, the ability won’t resolve because its target has become illegal.

Artwork
Loading artwork…
Portal Mage
Commander Masters · #112 · EN
Nonfoil—Foil—
Card rules
Flash
When this creature enters during the declare attackers step, you may reselect which player or permanent target attacking creature is attacking. (It can't attack its controller or their permanents.)
2/2
Uncommon · Illustrated by Yongjae Choi
Format legality
Commander Legal
Duel Legal
Legacy Legal
Oathbreaker Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Modern Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
Pioneer Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
You may cast Portal Mage outside of a declare attackers step. If Portal Mage enters the battlefield outside of a declare attackers step, its ability simply doesn’t trigger.
Reselecting which player or planeswalker a creature is attacking ignores all requirements, restrictions, and costs associated with attacking.
Reselecting which player or planeswalker a creature is attacking doesn’t cause “whenever this creature attacks” abilities to trigger. Notably, the Curses in this set (such as Curse of Vitality) won’t trigger while Portal Mage’s ability is resolving.
If you reselect which player or planeswalker an attacking creature is attacking, that creature is still considered to have attacked the player or planeswalker as declared, but it is now attacking the new player or planeswalker.