diff --git a/Mage.Sets/src/mage/cards/l/LoyalWarhound.java b/Mage.Sets/src/mage/cards/l/LoyalWarhound.java new file mode 100644 index 00000000000..a7b1ea1eeb0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LoyalWarhound.java @@ -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); + } +} diff --git a/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java b/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java index e6907977b2d..27facebd698 100644 --- a/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java +++ b/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java @@ -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));