[CLB] Implemented Emerald Dragon

This commit is contained in:
Evan Kranzler 2022-05-24 19:35:37 -04:00
parent 0d1fac2506
commit 9ac8c430dc
2 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,69 @@
package mage.cards.e;
import mage.MageInt;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.AdventureCard;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterStackObject;
import mage.filter.predicate.Predicate;
import mage.game.Game;
import mage.game.stack.StackAbility;
import mage.game.stack.StackObject;
import mage.target.common.TargetActivatedOrTriggeredAbility;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class EmeraldDragon extends AdventureCard {
private static final FilterStackObject filter
= new FilterStackObject("activated or triggered ability from a noncreature source");
static {
filter.add(EmeraldDragonPredicate.instance);
}
public EmeraldDragon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.INSTANT}, "{4}{G}{G}", "Dissonant Wave", "{2}{G}");
this.subtype.add(SubType.DRAGON);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Trample
this.addAbility(TrampleAbility.getInstance());
// Dissonant Wave
// Counter target activated or triggered ability from a noncreature source.
this.getSpellCard().getSpellAbility().addEffect(new CounterTargetEffect());
this.getSpellAbility().addTarget(new TargetActivatedOrTriggeredAbility(filter));
}
private EmeraldDragon(final EmeraldDragon card) {
super(card);
}
@Override
public EmeraldDragon copy() {
return new EmeraldDragon(this);
}
}
enum EmeraldDragonPredicate implements Predicate<StackObject> {
instance;
@Override
public boolean apply(StackObject input, Game game) {
return input instanceof StackAbility
&& !((StackAbility) input).getSourceObject(game).isCreature(game);
}
}

View file

@ -66,6 +66,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
cards.add(new SetCardInfo("Elminster", 274, Rarity.MYTHIC, mage.cards.e.Elminster.class));
cards.add(new SetCardInfo("Elminster's Simulacrum", 561, Rarity.MYTHIC, mage.cards.e.ElminstersSimulacrum.class));
cards.add(new SetCardInfo("Elturel Survivors", 172, Rarity.RARE, mage.cards.e.ElturelSurvivors.class));
cards.add(new SetCardInfo("Emerald Dragon", 229, Rarity.UNCOMMON, mage.cards.e.EmeraldDragon.class));
cards.add(new SetCardInfo("Erinis, Gloom Stalker", 230, Rarity.UNCOMMON, mage.cards.e.ErinisGloomStalker.class));
cards.add(new SetCardInfo("Faceless One", 1, Rarity.SPECIAL, mage.cards.f.FacelessOne.class));
cards.add(new SetCardInfo("Fang Dragon", 173, Rarity.COMMON, mage.cards.f.FangDragon.class));