diff --git a/Mage.Sets/src/mage/cards/s/SophiaDoggedDetective.java b/Mage.Sets/src/mage/cards/s/SophiaDoggedDetective.java new file mode 100644 index 00000000000..455390b654e --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SophiaDoggedDetective.java @@ -0,0 +1,71 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsDamageToAPlayerAllTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.abilities.effects.keyword.InvestigateEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SetTargetPointer; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.counters.CounterType; +import mage.filter.common.FilterArtifactPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.game.permanent.token.FoodToken; +import mage.game.permanent.token.TinyToken; + +import java.util.UUID; + +/** + * @author PurpleCrowbar + */ +public final class SophiaDoggedDetective extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.DOG, "Dog you control"); + private static final FilterArtifactPermanent filter2 = new FilterArtifactPermanent("artifact token"); + + static { + filter2.add(TokenPredicate.TRUE); + } + + public SophiaDoggedDetective(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}{U}"); + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN, SubType.DETECTIVE); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // When Sophia, Dogged Detective enters the battlefield, create Tiny, a legendary 2/2 green Dog Detective creature token with trample. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new TinyToken()))); + + // {1}, Sacrifice an artifact token: Put a +1/+1 counter on each Dog you control. + Ability ability = new SimpleActivatedAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), new GenericManaCost(1)); + ability.addCost(new SacrificeTargetCost(filter2)); + this.addAbility(ability); + + // Whenever a Dog you control deals combat damage to a player, create a Food token, then investigate. + ability = new DealsDamageToAPlayerAllTriggeredAbility( + new CreateTokenEffect(new FoodToken()), filter, false, SetTargetPointer.NONE, true + ).setTriggerPhrase("Whenever a Dog you control deals combat damage to a player, "); + ability.addEffect(new InvestigateEffect(false).concatBy(", then")); + this.addAbility(ability); + } + + private SophiaDoggedDetective(final SophiaDoggedDetective card) { + super(card); + } + + @Override + public SophiaDoggedDetective copy() { + return new SophiaDoggedDetective(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java b/Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java index bb26d265511..9214b282fb4 100644 --- a/Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java +++ b/Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java @@ -240,6 +240,8 @@ public final class MurdersAtKarlovManorCommander extends ExpansionSet { cards.add(new SetCardInfo("Smuggler's Share", 84, Rarity.RARE, mage.cards.s.SmugglersShare.class)); cards.add(new SetCardInfo("Sol Ring", 237, Rarity.UNCOMMON, mage.cards.s.SolRing.class)); cards.add(new SetCardInfo("Solemn Simulacrum", 238, Rarity.RARE, mage.cards.s.SolemnSimulacrum.class)); + cards.add(new SetCardInfo("Sophia, Dogged Detective", 8, Rarity.MYTHIC, mage.cards.s.SophiaDoggedDetective.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Sophia, Dogged Detective", 319, Rarity.MYTHIC, mage.cards.s.SophiaDoggedDetective.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Soul Snare", 85, Rarity.UNCOMMON, mage.cards.s.SoulSnare.class)); cards.add(new SetCardInfo("Spectacular Showdown", 162, Rarity.RARE, mage.cards.s.SpectacularShowdown.class)); cards.add(new SetCardInfo("Sphinx of the Second Sun", 118, Rarity.MYTHIC, mage.cards.s.SphinxOfTheSecondSun.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/TinyToken.java b/Mage/src/main/java/mage/game/permanent/token/TinyToken.java new file mode 100644 index 00000000000..64280f4b720 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/TinyToken.java @@ -0,0 +1,34 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.abilities.keyword.TrampleAbility; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; + +/** + * @author PurpleCrowbar + */ +public final class TinyToken extends TokenImpl { + + public TinyToken() { + super("Tiny", "Tiny, a legendary 2/2 green Dog Detective creature token with trample"); + supertype.add(SuperType.LEGENDARY); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add(SubType.DOG, SubType.DETECTIVE); + power = new MageInt(2); + toughness = new MageInt(2); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + } + + private TinyToken(final TinyToken token) { + super(token); + } + + public TinyToken copy() { + return new TinyToken(this); + } +}