mirror of
https://github.com/correl/mage.git
synced 2024-12-29 03:00:15 +00:00
[ONE]Implement Carnivorous canopy (#9946)
* Carnivorous Canopy added * Ability with condition added. Card tested. --------- Co-authored-by: AhmadYProjects <yousufa@kean.edu> Co-authored-by: Evan Kranzler <theelk801@gmail.com>
This commit is contained in:
parent
9716f153b8
commit
9b91f1f93c
2 changed files with 65 additions and 0 deletions
64
Mage.Sets/src/mage/cards/c/CarnivorousCanopy.java
Normal file
64
Mage.Sets/src/mage/cards/c/CarnivorousCanopy.java
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue