From 9408830bea63ff803a7b712a11a4dca0abc199cf Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 3 Jun 2022 21:08:39 -0400 Subject: [PATCH] [CLB] Implemented Venture Forth --- Mage.Sets/src/mage/cards/v/VentureForth.java | 86 +++++++++++++++++++ .../CommanderLegendsBattleForBaldursGate.java | 1 + 2 files changed, 87 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/v/VentureForth.java diff --git a/Mage.Sets/src/mage/cards/v/VentureForth.java b/Mage.Sets/src/mage/cards/v/VentureForth.java new file mode 100644 index 0000000000..d603c6912e --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VentureForth.java @@ -0,0 +1,86 @@ +package mage.cards.v; + +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ExileSpellEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.SuspendAbility; +import mage.cards.*; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class VentureForth extends CardImpl { + + public VentureForth(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}"); + + // Exile cards from the top of your library until you exile a land card. Put that onto the battlefield and the rest on the bottom of your library in a random order. Exile Venture Forth with three time counters on it. + this.getSpellAbility().addEffect(new VentureForthEffect()); + this.getSpellAbility().addEffect(new ExileSpellEffect()); + this.getSpellAbility().addEffect(new AddCountersSourceEffect( + CounterType.TIME.createInstance(), StaticValue.get(3), false, true + ).setText("with three time counters on it")); + this.getSpellAbility().addTarget(new TargetPermanent()); + + // Suspend 3—{1}{G} + this.addAbility(new SuspendAbility(3, new ManaCostsImpl<>("{1}{G}"), this)); + } + + private VentureForth(final VentureForth card) { + super(card); + } + + @Override + public VentureForth copy() { + return new VentureForth(this); + } +} + +class VentureForthEffect extends OneShotEffect { + + VentureForthEffect() { + super(Outcome.Benefit); + staticText = "exile cards from the top of your library until you exile a land card. Put that card " + + "onto the battlefield and the rest on the bottom of your library in a random order"; + } + + private VentureForthEffect(final VentureForthEffect effect) { + super(effect); + } + + @Override + public VentureForthEffect copy() { + return new VentureForthEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + Cards cards = new CardsImpl(); + for (Card card : player.getLibrary().getCards(game)) { + player.moveCards(card, Zone.EXILED, source, game); + if (card.isLand(game)) { + player.moveCards(card, Zone.BATTLEFIELD, source, game); + break; + } + cards.add(card); + } + player.putCardsOnBottomOfLibrary(cards, game, source, false); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java index 7eca2428fb..76d14a059a 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java +++ b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java @@ -566,6 +566,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet { cards.add(new SetCardInfo("Valiant Changeling", 711, Rarity.UNCOMMON, mage.cards.v.ValiantChangeling.class)); cards.add(new SetCardInfo("Vault of the Archangel", 927, Rarity.RARE, mage.cards.v.VaultOfTheArchangel.class)); cards.add(new SetCardInfo("Vengeful Ancestor", 812, Rarity.RARE, mage.cards.v.VengefulAncestor.class)); + cards.add(new SetCardInfo("Venture Forth", 683, Rarity.RARE, mage.cards.v.VentureForth.class)); cards.add(new SetCardInfo("Veteran Soldier", 48, Rarity.UNCOMMON, mage.cards.v.VeteranSoldier.class)); cards.add(new SetCardInfo("Vexing Puzzlebox", 343, Rarity.MYTHIC, mage.cards.v.VexingPuzzlebox.class)); cards.add(new SetCardInfo("Vicious Battlerager", 155, Rarity.COMMON, mage.cards.v.ViciousBattlerager.class));