From 2aad58b04a73b37be4addf825d274772802158ec Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 21 Aug 2014 00:59:11 +0200 Subject: [PATCH] * Opalescence - minor changes. --- .../src/mage/sets/urzasdestiny/Opalescence.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Mage.Sets/src/mage/sets/urzasdestiny/Opalescence.java b/Mage.Sets/src/mage/sets/urzasdestiny/Opalescence.java index b75ab8a106..160efa4d4f 100644 --- a/Mage.Sets/src/mage/sets/urzasdestiny/Opalescence.java +++ b/Mage.Sets/src/mage/sets/urzasdestiny/Opalescence.java @@ -28,24 +28,23 @@ package mage.sets.urzasdestiny; import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Rarity; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousEffectImpl; import mage.cards.CardImpl; +import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Layer; import static mage.constants.Layer.PTChangingEffects_7; import static mage.constants.Layer.TypeChangingEffects_4; import mage.constants.Outcome; +import mage.constants.Rarity; import mage.constants.SubLayer; import mage.constants.Zone; import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate; - +import mage.filter.predicate.permanent.AnotherPredicate; import mage.game.Game; import mage.game.permanent.Permanent; @@ -81,6 +80,7 @@ class OpalescenceEffect extends ContinuousEffectImpl { private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent("Each other non-Aura enchantment"); static { filter.add(Predicates.not(new SubtypePredicate("Aura"))); + filter.add(new AnotherPredicate()); } public OpalescenceEffect() { @@ -103,9 +103,9 @@ class OpalescenceEffect extends ContinuousEffectImpl { case TypeChangingEffects_4: if (sublayer == SubLayer.NA) { objects.clear(); - for(Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, game)){ - if(permanent != null && !permanent.getId().equals(source.getSourceId())){ - objects.add(permanent.getId()); + for(Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)){ + objects.add(permanent.getId()); + if (!permanent.getCardType().contains(CardType.CREATURE)) { permanent.getCardType().add(CardType.CREATURE); } } @@ -138,4 +138,4 @@ class OpalescenceEffect extends ContinuousEffectImpl { return layer == Layer.PTChangingEffects_7 || layer == Layer.TypeChangingEffects_4; } -} \ No newline at end of file +}