mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
* Opalescence - minor changes.
This commit is contained in:
parent
3a63108ff3
commit
2aad58b04a
1 changed files with 8 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue