diff --git a/Mage.Sets/src/mage/cards/c/CorrosiveOoze.java b/Mage.Sets/src/mage/cards/c/CorrosiveOoze.java index 244750d0e4..c3eda26765 100644 --- a/Mage.Sets/src/mage/cards/c/CorrosiveOoze.java +++ b/Mage.Sets/src/mage/cards/c/CorrosiveOoze.java @@ -27,26 +27,19 @@ */ package mage.cards.c; -import java.util.LinkedList; import java.util.UUID; import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.Mode; import mage.abilities.common.BlocksOrBecomesBlockedTriggeredAbility; import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.DestroyAllAttachedEquipmentEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.Outcome; import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.EquippedPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; /** * @@ -82,4 +75,4 @@ public class CorrosiveOoze extends CardImpl { public CorrosiveOoze copy() { return new CorrosiveOoze(this); } -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/DestroyAllAttachedEquipmentEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DestroyAllAttachedEquipmentEffect.java index bd3d34e65b..b55a48f3e9 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DestroyAllAttachedEquipmentEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DestroyAllAttachedEquipmentEffect.java @@ -1,5 +1,8 @@ package mage.abilities.effects.common; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.constants.Outcome; @@ -8,15 +11,10 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - /** * * @author Quercitron */ - public class DestroyAllAttachedEquipmentEffect extends OneShotEffect { public DestroyAllAttachedEquipmentEffect() { @@ -37,9 +35,9 @@ public class DestroyAllAttachedEquipmentEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - Permanent target = game.getPermanent(source.getFirstTarget()); - if (target != null) { - List attachments = new ArrayList<>(target.getAttachments()); + Permanent targetPermanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (targetPermanent != null) { + List attachments = new ArrayList<>(targetPermanent.getAttachments()); for (UUID attachmentId : attachments) { Permanent attachment = game.getPermanent(attachmentId); if (attachment != null && attachment.hasSubtype(SubType.EQUIPMENT, game)) {