diff --git a/Mage.Sets/src/mage/cards/c/CarnivorousCanopy.java b/Mage.Sets/src/mage/cards/c/CarnivorousCanopy.java new file mode 100644 index 0000000000..63bde2716f --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CarnivorousCanopy.java @@ -0,0 +1,64 @@ +package mage.cards.c; + +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.SourceTargetsPermanentCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.counter.ProliferateEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.filter.predicate.mageobject.ManaValuePredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * + * @author AhmadYProjects + */ +public final class CarnivorousCanopy extends CardImpl { + private static final FilterPermanent filter = new FilterPermanent("artifact, enchantment, or creature with flying"); + private static final FilterPermanent filter2 = new FilterPermanent(); + + + static { + filter.add(Predicates.or( + CardType.ARTIFACT.getPredicate(), + CardType.ENCHANTMENT.getPredicate(), + Predicates.and( + CardType.CREATURE.getPredicate(), + new AbilityPredicate(FlyingAbility.class)) + ) + ); + filter2.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4)); + + } + + private static final Condition condition = new SourceTargetsPermanentCondition(filter2); + + public CarnivorousCanopy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}"); + + + // Destroy target artifact, enchantment, or creature with flying. If that permanent's mana value was 3 or less, proliferate. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ProliferateEffect(), condition)); + + } + + private CarnivorousCanopy(final CarnivorousCanopy card) { + super(card); + } + + @Override + public CarnivorousCanopy copy() { + return new CarnivorousCanopy(this); + } +} diff --git a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java index 879ce8eb52..4ed79bbed3 100644 --- a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java +++ b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java @@ -56,6 +56,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet { cards.add(new SetCardInfo("Bring the Ending", 44, Rarity.COMMON, mage.cards.b.BringTheEnding.class)); cards.add(new SetCardInfo("Cacophony Scamp", 124, Rarity.UNCOMMON, mage.cards.c.CacophonyScamp.class)); cards.add(new SetCardInfo("Cankerbloom", 161, Rarity.UNCOMMON, mage.cards.c.Cankerbloom.class)); + cards.add(new SetCardInfo("Carnivorous Canopy", 162, Rarity.COMMON, mage.cards.c.CarnivorousCanopy.class)); cards.add(new SetCardInfo("Capricious Hellraiser", 125, Rarity.MYTHIC, mage.cards.c.CapriciousHellraiser.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Capricious Hellraiser", 310, Rarity.MYTHIC, mage.cards.c.CapriciousHellraiser.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Capricious Hellraiser", 353, Rarity.MYTHIC, mage.cards.c.CapriciousHellraiser.class, NON_FULL_USE_VARIOUS));