diff --git a/Mage.Sets/src/mage/cards/d/DeathbellowWarCry.java b/Mage.Sets/src/mage/cards/d/DeathbellowWarCry.java new file mode 100644 index 00000000000..4997c51fd99 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DeathbellowWarCry.java @@ -0,0 +1,74 @@ +package mage.cards.d; + +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.target.common.TargetCardInLibrary; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DeathbellowWarCry extends CardImpl { + + public DeathbellowWarCry(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{R}{R}{R}"); + + // Search your library for up to four Minotaur creature cards with different names, put them onto the battlefield, then shuffle your library. + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new DeathbellowWarCryTarget())); + } + + private DeathbellowWarCry(final DeathbellowWarCry card) { + super(card); + } + + @Override + public DeathbellowWarCry copy() { + return new DeathbellowWarCry(this); + } +} + +class DeathbellowWarCryTarget extends TargetCardInLibrary { + + private static final FilterCard filter + = new FilterCreatureCard("Minotaur creature cards with different names"); + + static { + filter.add(new SubtypePredicate(SubType.MINOTAUR)); + } + + DeathbellowWarCryTarget() { + super(0, 4, filter); + } + + private DeathbellowWarCryTarget(final DeathbellowWarCryTarget target) { + super(target); + } + + @Override + public DeathbellowWarCryTarget copy() { + return new DeathbellowWarCryTarget(this); + } + + @Override + public boolean canTarget(UUID id, Cards cards, Game game) { + Card card = cards.get(id, game); + return card != null + && filter.match(card, game) + && this + .getTargets() + .stream() + .map(game::getCard) + .map(Card::getName) + .noneMatch(card.getName()::equals); + } +} diff --git a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java index 239f20647b7..c0c9fce670a 100644 --- a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java +++ b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java @@ -30,6 +30,7 @@ public final class TherosBeyondDeath extends ExpansionSet { cards.add(new SetCardInfo("Ashiok, Sculptor of Fears", 274, Rarity.MYTHIC, mage.cards.a.AshiokSculptorOfFears.class)); cards.add(new SetCardInfo("Commanding Presence", 7, Rarity.UNCOMMON, mage.cards.c.CommandingPresence.class)); cards.add(new SetCardInfo("Daxos, Blessed by the Sun", 9, Rarity.UNCOMMON, mage.cards.d.DaxosBlessedByTheSun.class)); + cards.add(new SetCardInfo("Deathbellow War Cry", 294, Rarity.RARE, mage.cards.d.DeathbellowWarCry.class)); cards.add(new SetCardInfo("Eidolon of Philosophy", 48, Rarity.COMMON, mage.cards.e.EidolonOfPhilosophy.class)); cards.add(new SetCardInfo("Elspeth, Sun's Nemesis", 14, Rarity.MYTHIC, mage.cards.e.ElspethSunsNemesis.class)); cards.add(new SetCardInfo("Elspeth, Undaunted Hero", 270, Rarity.MYTHIC, mage.cards.e.ElspethUndauntedHero.class));