From 6923d4b8125155a8337fdf78bf2ee5ac2aaf1700 Mon Sep 17 00:00:00 2001 From: jeffwadsworth Date: Fri, 13 Aug 2021 14:43:02 -0500 Subject: [PATCH] - Fixed #8123 and added "blinked" code as well. --- Mage.Sets/src/mage/cards/g/GlamerSpinners.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/cards/g/GlamerSpinners.java b/Mage.Sets/src/mage/cards/g/GlamerSpinners.java index 8247d9755d..584b8d4ed0 100644 --- a/Mage.Sets/src/mage/cards/g/GlamerSpinners.java +++ b/Mage.Sets/src/mage/cards/g/GlamerSpinners.java @@ -84,10 +84,12 @@ class GlamerSpinnersEffect extends OneShotEffect { 5/1/2008 You may target a permanent that has no Auras enchanting it. 5/1/2008 When the ability resolves, you choose the permanent that will be receiving the Auras. It can't be the targeted permanent, it must have the same controller as the targeted permanent, and it must be able to be enchanted by all the Auras attached to the targeted permanent. If you can't choose a permanent that meets all those criteria, the Auras won't move. */ + Permanent targetPermanent = game.getPermanent(getTargetPointer().getFirst(game, source)); Player controller = game.getPlayer(source.getControllerId()); - Permanent sourcePermanent = (Permanent) source.getSourceObject(game); - if (targetPermanent != null && controller != null && sourcePermanent != null) { + Permanent glamerSpinners = game.getPermanent(source.getSourceId()); + if (controller != null + && glamerSpinners != null) { boolean passed = true; FilterPermanent filterChoice = new FilterPermanent("a different permanent with the same controller as the target to attach the enchantments to"); filterChoice.add(new ControllerIdPredicate(targetPermanent.getControllerId())); @@ -98,8 +100,8 @@ class GlamerSpinnersEffect extends OneShotEffect { LinkedList auras = new LinkedList<>(); auras.addAll(targetPermanent.getAttachments()); - - if (chosenPermanentToAttachAuras.canChoose(source.getSourceId(), source.getControllerId(), game) + if (source.getSourceObjectZoneChangeCounter() == glamerSpinners.getZoneChangeCounter(game) // not blinked + && chosenPermanentToAttachAuras.canChoose(source.getSourceId(), source.getControllerId(), game) && controller.choose(Outcome.Neutral, chosenPermanentToAttachAuras, source.getSourceId(), game)) { Permanent permanentToAttachAuras = game.getPermanent(chosenPermanentToAttachAuras.getFirstTarget()); if (permanentToAttachAuras != null) { @@ -134,12 +136,11 @@ class GlamerSpinnersEffect extends OneShotEffect { } return true; } - game.informPlayers(sourcePermanent.getLogName() + ": No enchantments were moved from the target permanent."); + game.informPlayers("Glamer Spinners" + ": No enchantments were moved from the target permanent."); } } return true; } - return false; } }