From b245dd036f7d2be32b6bce378cfebe607fe2df5b Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 31 Oct 2022 09:44:25 -0400 Subject: [PATCH] [BRO] Implemented Thran Spider --- Mage.Sets/src/mage/cards/t/ThranSpider.java | 66 +++++++++++++++++++ Mage.Sets/src/mage/sets/TheBrothersWar.java | 1 + .../common/CreateTokenTargetEffect.java | 6 +- 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/cards/t/ThranSpider.java diff --git a/Mage.Sets/src/mage/cards/t/ThranSpider.java b/Mage.Sets/src/mage/cards/t/ThranSpider.java new file mode 100644 index 0000000000..f5a6a0f115 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/ThranSpider.java @@ -0,0 +1,66 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.CreateTokenTargetEffect; +import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.PutCards; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.game.permanent.token.PowerstoneToken; +import mage.target.common.TargetOpponent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ThranSpider extends CardImpl { + + public ThranSpider(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); + + this.subtype.add(SubType.SPIDER); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Reach + this.addAbility(ReachAbility.getInstance()); + + // When Thran Spider enters the battlefield, you and target opponent each create a tapped Powerstone token. + Ability ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect( + new PowerstoneToken(), 1, true + ).setText("you")); + ability.addEffect(new CreateTokenTargetEffect( + new PowerstoneToken(), 1, true + ).setText("and target opponent each create a tapped Powerstone token")); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + + // {7}: Look at the top four cards of your library. You may reveal an artifact card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. + this.addAbility(new SimpleActivatedAbility( + new LookLibraryAndPickControllerEffect( + 4, 1, + StaticFilters.FILTER_CARD_ARTIFACT_AN, + PutCards.HAND, PutCards.BOTTOM_RANDOM + ), new GenericManaCost(7) + )); + } + + private ThranSpider(final ThranSpider card) { + super(card); + } + + @Override + public ThranSpider copy() { + return new ThranSpider(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheBrothersWar.java b/Mage.Sets/src/mage/sets/TheBrothersWar.java index 787cc960c7..d2d9e7e4af 100644 --- a/Mage.Sets/src/mage/sets/TheBrothersWar.java +++ b/Mage.Sets/src/mage/sets/TheBrothersWar.java @@ -75,6 +75,7 @@ public final class TheBrothersWar extends ExpansionSet { cards.add(new SetCardInfo("Teferi, Temporal Pilgrim", 66, Rarity.MYTHIC, mage.cards.t.TeferiTemporalPilgrim.class)); cards.add(new SetCardInfo("The Mightstone and Weakstone", "238a", Rarity.RARE, mage.cards.t.TheMightstoneAndWeakstone.class)); cards.add(new SetCardInfo("Third Path Savant", 67, Rarity.COMMON, mage.cards.t.ThirdPathSavant.class)); + cards.add(new SetCardInfo("Thran Spider", 254, Rarity.RARE, mage.cards.t.ThranSpider.class)); cards.add(new SetCardInfo("Titania, Gaea Incarnate", "256b", Rarity.MYTHIC, mage.cards.t.TitaniaGaeaIncarnate.class)); cards.add(new SetCardInfo("Titania, Voice of Gaea", 193, Rarity.MYTHIC, mage.cards.t.TitaniaVoiceOfGaea.class)); cards.add(new SetCardInfo("Tocasia's Onulet", 39, Rarity.COMMON, mage.cards.t.TocasiasOnulet.class)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenTargetEffect.java index 49384ac7d2..7277e40da4 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenTargetEffect.java @@ -27,7 +27,11 @@ public class CreateTokenTargetEffect extends OneShotEffect { } public CreateTokenTargetEffect(Token token, int amount) { - this(token, StaticValue.get(amount)); + this(token, amount, false); + } + + public CreateTokenTargetEffect(Token token, int amount, boolean tapped) { + this(token, StaticValue.get(amount), tapped, false); } public CreateTokenTargetEffect(Token token, DynamicValue amount) {