diff --git a/Mage.Sets/src/mage/cards/m/MaestrosConfluence.java b/Mage.Sets/src/mage/cards/m/MaestrosConfluence.java new file mode 100644 index 0000000000..cd3ab2d332 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MaestrosConfluence.java @@ -0,0 +1,94 @@ +package mage.cards.m; + +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.abilities.effects.common.combat.GoadTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.FilterCard; +import mage.filter.StaticFilters; +import mage.filter.common.FilterInstantOrSorceryCard; +import mage.filter.predicate.mageobject.MonocoloredPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPlayer; +import mage.target.common.TargetCardInYourGraveyard; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MaestrosConfluence extends CardImpl { + + private static final FilterCard filter + = new FilterInstantOrSorceryCard("monocolored instant or sorcery card from your graveyard"); + + static { + filter.add(MonocoloredPredicate.instance); + } + + public MaestrosConfluence(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}{B}{R}"); + + // Choose three. You may choose the same mode more than once. + this.getSpellAbility().getModes().setMinModes(3); + this.getSpellAbility().getModes().setMaxModes(3); + this.getSpellAbility().getModes().setEachModeMoreThanOnce(true); + + // • Return target monocolored instant or sorcery card from your graveyard to your hand. + this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter)); + + // • Target creature gets -3/-3 until end of turn. + this.getSpellAbility().addMode(new Mode( + new BoostTargetEffect(-3, -3) + ).addTarget(new TargetCreaturePermanent())); + + // • Goad each creature target player controls. + this.getSpellAbility().addMode(new Mode(new MaestrosConfluenceEffect()).addTarget(new TargetPlayer())); + } + + private MaestrosConfluence(final MaestrosConfluence card) { + super(card); + } + + @Override + public MaestrosConfluence copy() { + return new MaestrosConfluence(this); + } +} + +class MaestrosConfluenceEffect extends OneShotEffect { + + MaestrosConfluenceEffect() { + super(Outcome.Benefit); + staticText = "goad each creature target player controls"; + } + + private MaestrosConfluenceEffect(final MaestrosConfluenceEffect effect) { + super(effect); + } + + @Override + public MaestrosConfluenceEffect copy() { + return new MaestrosConfluenceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (Permanent permanent : game.getBattlefield().getActivePermanents( + StaticFilters.FILTER_CONTROLLED_CREATURE, source.getFirstTarget(), source, game + )) { + game.addEffect(new GoadTargetEffect().setTargetPointer(new FixedTarget(permanent, game)), source); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/NewCapennaCommander.java b/Mage.Sets/src/mage/sets/NewCapennaCommander.java index 8d832273e0..4c98130e6c 100644 --- a/Mage.Sets/src/mage/sets/NewCapennaCommander.java +++ b/Mage.Sets/src/mage/sets/NewCapennaCommander.java @@ -31,6 +31,7 @@ public final class NewCapennaCommander extends ExpansionSet { cards.add(new SetCardInfo("Damning Verdict", 15, Rarity.RARE, mage.cards.d.DamningVerdict.class)); cards.add(new SetCardInfo("Extravagant Replication", 25, Rarity.RARE, mage.cards.e.ExtravagantReplication.class)); cards.add(new SetCardInfo("Kitt Kanto, Mayhem Diva", 4, Rarity.MYTHIC, mage.cards.k.KittKantoMayhemDiva.class)); + cards.add(new SetCardInfo("Maestros Confluence", 75, Rarity.RARE, mage.cards.m.MaestrosConfluence.class)); cards.add(new SetCardInfo("Spellbinding Soprano", 53, Rarity.RARE, mage.cards.s.SpellbindingSoprano.class)); cards.removeIf(setCardInfo -> unfinished.contains(setCardInfo.getName())); // remove when shield counters are implemented