diff --git a/Mage.Sets/src/mage/cards/t/TwitchingDoll.java b/Mage.Sets/src/mage/cards/t/TwitchingDoll.java new file mode 100644 index 00000000000..26f72276014 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TwitchingDoll.java @@ -0,0 +1,58 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.CountersSourceCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.AnyColorManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.game.permanent.token.Spider22Token; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TwitchingDoll extends CardImpl { + + private static final DynamicValue xValue = new CountersSourceCount(); + + public TwitchingDoll(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.SPIDER); + this.subtype.add(SubType.TOY); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {T}: Add one mana of any color. Put a nest counter on Twitching Doll. + Ability ability = new AnyColorManaAbility(); + ability.addEffect(new AddCountersSourceEffect(CounterType.OMEN.createInstance())); + this.addAbility(ability); + + // {T}, Sacrifice Twitching Doll: Create a 2/2 green Spider creature token with reach for each counter on Twitching Doll. Activate only as a sorcery. + ability = new ActivateAsSorceryActivatedAbility( + new CreateTokenEffect(new Spider22Token(), xValue), new TapSourceCost() + ); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + private TwitchingDoll(final TwitchingDoll card) { + super(card); + } + + @Override + public TwitchingDoll copy() { + return new TwitchingDoll(this); + } +} diff --git a/Mage.Sets/src/mage/sets/DuskmournHouseOfHorror.java b/Mage.Sets/src/mage/sets/DuskmournHouseOfHorror.java index d7f95911c88..ccb63eb0e74 100644 --- a/Mage.Sets/src/mage/sets/DuskmournHouseOfHorror.java +++ b/Mage.Sets/src/mage/sets/DuskmournHouseOfHorror.java @@ -60,6 +60,7 @@ public final class DuskmournHouseOfHorror extends ExpansionSet { cards.add(new SetCardInfo("The Jolly Balloon Man", 219, Rarity.RARE, mage.cards.t.TheJollyBalloonMan.class)); cards.add(new SetCardInfo("The Wandering Rescuer", 41, Rarity.MYTHIC, mage.cards.t.TheWanderingRescuer.class)); cards.add(new SetCardInfo("Toby, Beastie Befriender", 35, Rarity.RARE, mage.cards.t.TobyBeastieBefriender.class)); + cards.add(new SetCardInfo("Twitching Doll", 417, Rarity.RARE, mage.cards.t.TwitchingDoll.class)); cards.add(new SetCardInfo("Tyvar, the Pummeler", 408, Rarity.MYTHIC, mage.cards.t.TyvarThePummeler.class)); cards.add(new SetCardInfo("Unwanted Remake", 39, Rarity.UNCOMMON, mage.cards.u.UnwantedRemake.class)); cards.add(new SetCardInfo("Unwilling Vessel", 81, Rarity.UNCOMMON, mage.cards.u.UnwillingVessel.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/Spider22Token.java b/Mage/src/main/java/mage/game/permanent/token/Spider22Token.java new file mode 100644 index 00000000000..03b7410fb77 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/Spider22Token.java @@ -0,0 +1,31 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.abilities.keyword.ReachAbility; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author TheElk801 + */ +public final class Spider22Token extends TokenImpl { + + public Spider22Token() { + super("Spider Token", "2/2 green Spider creature token with reach"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add(SubType.SPIDER); + power = new MageInt(2); + toughness = new MageInt(2); + + this.addAbility(ReachAbility.getInstance()); + } + + private Spider22Token(final Spider22Token token) { + super(token); + } + + public Spider22Token copy() { + return new Spider22Token(this); + } +}