[AFR] Implemented Loyal Warhound

This commit is contained in:
Daniel Bomar 2021-07-07 14:17:40 -05:00
parent 7f68cef222
commit 3d5c88d162
No known key found for this signature in database
GPG key ID: C86C8658F4023918
2 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,60 @@
package mage.cards.l;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.OpponentControlsMoreCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.constants.SubType;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInLibrary;
/**
*
* @author weirddan455
*/
public final class LoyalWarhound extends CardImpl {
private static final FilterCard filter = new FilterCard("basic Plains card");
static {
filter.add(SuperType.BASIC.getPredicate());
filter.add(SubType.PLAINS.getPredicate());
}
public LoyalWarhound(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.DOG);
this.power = new MageInt(3);
this.toughness = new MageInt(1);
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// When Loyal Warhound enters the battlefield, if an opponent controls more lands than you,
// search your library for a basic Plains card, put it onto the battlefield tapped, then shuffle.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), true, true)),
new OpponentControlsMoreCondition(StaticFilters.FILTER_LANDS),
"When {this} enters the battlefield, if an opponent controls more lands than you, "
+ "search your library for a basic Plains card, put it onto the battlefield tapped, then shuffle."
));
}
private LoyalWarhound(final LoyalWarhound card) {
super(card);
}
@Override
public LoyalWarhound copy() {
return new LoyalWarhound(this);
}
}

View file

@ -137,6 +137,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet {
cards.add(new SetCardInfo("Leather Armor", 248, Rarity.COMMON, mage.cards.l.LeatherArmor.class));
cards.add(new SetCardInfo("Lightfoot Rogue", 111, Rarity.UNCOMMON, mage.cards.l.LightfootRogue.class));
cards.add(new SetCardInfo("Lolth, Spider Queen", 112, Rarity.MYTHIC, mage.cards.l.LolthSpiderQueen.class));
cards.add(new SetCardInfo("Loyal Warhound", 23, Rarity.RARE, mage.cards.l.LoyalWarhound.class));
cards.add(new SetCardInfo("Lurking Roper", 194, Rarity.UNCOMMON, mage.cards.l.LurkingRoper.class));
cards.add(new SetCardInfo("Magic Missile", 154, Rarity.UNCOMMON, mage.cards.m.MagicMissile.class));
cards.add(new SetCardInfo("Manticore", 113, Rarity.COMMON, mage.cards.m.Manticore.class));