[WOE] Implement Redtooth Vanguard (#10957)

This commit is contained in:
Susucre 2023-08-23 01:44:51 +02:00 committed by GitHub
parent cdf42487a2
commit 1cd07c1cc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,57 @@
package mage.cards.r;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterEnchantmentPermanent;
import java.util.UUID;
/**
* @author Susucr
*/
public final class RedtoothVanguard extends CardImpl {
private static final FilterEnchantmentPermanent filter = new FilterEnchantmentPermanent("an enchantment");
static {
filter.add(TargetController.YOU.getControllerPredicate());
}
public RedtoothVanguard(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(3);
this.toughness = new MageInt(1);
// Trample
this.addAbility(TrampleAbility.getInstance());
// Whenever an enchantment enters the battlefield under your control, you may pay 2. If you do, return Redtooth Vanguard from your graveyard to your hand.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(
Zone.GRAVEYARD,
new DoIfCostPaid(
new ReturnSourceFromGraveyardToHandEffect(),
new GenericManaCost(2)
),
filter, false, SetTargetPointer.NONE, null, true
));
}
private RedtoothVanguard(final RedtoothVanguard card) {
super(card);
}
@Override
public RedtoothVanguard copy() {
return new RedtoothVanguard(this);
}
}

View file

@ -114,6 +114,7 @@ public final class WildsOfEldraine extends ExpansionSet {
cards.add(new SetCardInfo("Ratcatcher Trainee", 144, Rarity.COMMON, mage.cards.r.RatcatcherTrainee.class));
cards.add(new SetCardInfo("Realm-Scorcher Hellkite", 145, Rarity.MYTHIC, mage.cards.r.RealmScorcherHellkite.class));
cards.add(new SetCardInfo("Redcap Gutter-Dweller", 146, Rarity.RARE, mage.cards.r.RedcapGutterDweller.class));
cards.add(new SetCardInfo("Redtooth Vanguard", 180, Rarity.UNCOMMON, mage.cards.r.RedtoothVanguard.class));
cards.add(new SetCardInfo("Restless Bivouac", 257, Rarity.RARE, mage.cards.r.RestlessBivouac.class));
cards.add(new SetCardInfo("Restless Cottage", 258, Rarity.RARE, mage.cards.r.RestlessCottage.class));
cards.add(new SetCardInfo("Restless Fortress", 259, Rarity.RARE, mage.cards.r.RestlessFortress.class));