diff --git a/Mage.Sets/src/mage/cards/f/FloweringOfTheWhiteTree.java b/Mage.Sets/src/mage/cards/f/FloweringOfTheWhiteTree.java new file mode 100644 index 0000000000..f6baaf8c92 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FloweringOfTheWhiteTree.java @@ -0,0 +1,61 @@ +package mage.cards.f; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.WardAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SuperType; +import mage.filter.StaticFilters; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FloweringOfTheWhiteTree extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonlegendary creatures"); + + static { + filter.add(Predicates.not(SuperType.LEGENDARY.getPredicate())); + } + + public FloweringOfTheWhiteTree(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}{W}"); + + this.supertype.add(SuperType.LEGENDARY); + + // Legendary creatures you control get +2/+1 and have ward {1}. + Ability ability = new SimpleStaticAbility(new BoostControlledEffect( + 2, 1, Duration.WhileOnBattlefield, + StaticFilters.FILTER_CREATURE_LEGENDARY + )); + ability.addEffect(new GainAbilityControlledEffect( + new WardAbility(new GenericManaCost(1)), Duration.WhileOnBattlefield, + StaticFilters.FILTER_CREATURES_LEGENDARY + ).setText("and have ward {1}")); + this.addAbility(ability); + + // Nonlegendary creatures you control get +1/+1. + this.addAbility(new SimpleStaticAbility(new BoostControlledEffect( + 1, 1, Duration.WhileOnBattlefield, filter + ))); + } + + private FloweringOfTheWhiteTree(final FloweringOfTheWhiteTree card) { + super(card); + } + + @Override + public FloweringOfTheWhiteTree copy() { + return new FloweringOfTheWhiteTree(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java index 24f0f693ba..5c1717e137 100644 --- a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java +++ b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java @@ -48,6 +48,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet { cards.add(new SetCardInfo("Fangorn, Tree Shepherd", 166, Rarity.RARE, mage.cards.f.FangornTreeShepherd.class)); cards.add(new SetCardInfo("Fiery Inscription", 126, Rarity.UNCOMMON, mage.cards.f.FieryInscription.class)); cards.add(new SetCardInfo("Fire of Orthanc", 127, Rarity.COMMON, mage.cards.f.FireOfOrthanc.class)); + cards.add(new SetCardInfo("Flowering of the White Tree", 15, Rarity.RARE, mage.cards.f.FloweringOfTheWhiteTree.class)); cards.add(new SetCardInfo("Foray of Orcs", 128, Rarity.UNCOMMON, mage.cards.f.ForayOfOrcs.class)); cards.add(new SetCardInfo("Forest", 270, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Frodo Baggins", 205, Rarity.UNCOMMON, mage.cards.f.FrodoBaggins.class)); diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 71f6c920e5..7e88c8058d 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -1089,13 +1089,20 @@ public final class StaticFilters { FILTER_PERMANENT_LEGENDARY.setLockedFilter(true); } - public static final FilterCreaturePermanent FILTER_CREATURE_LEGENDARY = new FilterCreaturePermanent(); + public static final FilterCreaturePermanent FILTER_CREATURE_LEGENDARY = new FilterCreaturePermanent("legendary creature"); static { FILTER_CREATURE_LEGENDARY.add(SuperType.LEGENDARY.getPredicate()); FILTER_CREATURE_LEGENDARY.setLockedFilter(true); } + public static final FilterCreaturePermanent FILTER_CREATURES_LEGENDARY = new FilterCreaturePermanent("legendary creatures"); + + static { + FILTER_CREATURES_LEGENDARY.add(SuperType.LEGENDARY.getPredicate()); + FILTER_CREATURES_LEGENDARY.setLockedFilter(true); + } + public static final FilterCard FILTER_CARD_ARTIFACT_OR_CREATURE = new FilterCard("artifact or creature card"); static {