From 46a798fba6b0641b9b78a0b07ba8c02f3b8f7f0a Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 22 Mar 2015 22:44:43 +0100 Subject: [PATCH] * Leyline of Singularity - Fixed that also lands wrongly became legendary. --- .../sets/guildpact/LeylineOfSingularity.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/sets/guildpact/LeylineOfSingularity.java b/Mage.Sets/src/mage/sets/guildpact/LeylineOfSingularity.java index 8e419bd530..8a886b44a1 100644 --- a/Mage.Sets/src/mage/sets/guildpact/LeylineOfSingularity.java +++ b/Mage.Sets/src/mage/sets/guildpact/LeylineOfSingularity.java @@ -27,9 +27,7 @@ */ package mage.sets.guildpact; -import java.util.Iterator; import java.util.UUID; -import mage.MageObjectReference; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.common.SimpleStaticAbility; @@ -45,6 +43,8 @@ import mage.constants.SubLayer; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.Game; import mage.game.permanent.Permanent; @@ -54,16 +54,21 @@ import mage.game.permanent.Permanent; */ public class LeylineOfSingularity extends CardImpl { + private static final FilterPermanent filter = new FilterPermanent("nonland permanents"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); + } + public LeylineOfSingularity(UUID ownerId) { super(ownerId, 29, "Leyline of Singularity", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}"); this.expansionSetCode = "GPT"; - - this.color.setBlue(true); - + // If Leyline of Singularity is in your opening hand, you may begin the game with it on the battlefield. this.addAbility(LeylineAbility.getInstance()); + // All nonland permanents are legendary. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetSupertypeAllEffect(Duration.WhileOnBattlefield, new FilterControlledPermanent()))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetSupertypeAllEffect(Duration.WhileOnBattlefield, filter))); }