diff --git a/Mage.Sets/src/mage/cards/p/PresumedDead.java b/Mage.Sets/src/mage/cards/p/PresumedDead.java new file mode 100644 index 00000000000..0018d6ecc0c --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PresumedDead.java @@ -0,0 +1,81 @@ +package mage.cards.p; + +import mage.abilities.Ability; +import mage.abilities.common.DiesSourceTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author xenohedron + */ +public final class PresumedDead extends CardImpl { + + public PresumedDead(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); + + // Until end of turn, target creature gets +2/+0 and gains "When this creature dies, return it to the battlefield under its owner's control and suspect it." + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new BoostTargetEffect(2, 0, Duration.EndOfTurn) + .setText("Until end of turn, target creature gets +2/+0")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(new DiesSourceTriggeredAbility(new PresumedDeadEffect())) + .setText("and gains \"When this creature dies, return it to the battlefield under its owner's control and suspect it.\"")); + + } + + private PresumedDead(final PresumedDead card) { + super(card); + } + + @Override + public PresumedDead copy() { + return new PresumedDead(this); + } +} + +class PresumedDeadEffect extends OneShotEffect { + + PresumedDeadEffect() { + super(Outcome.Benefit); + staticText = "return it to the battlefield under its owner's control and suspect it"; + } + + private PresumedDeadEffect(final PresumedDeadEffect effect) { + super(effect); + } + + @Override + public PresumedDeadEffect copy() { + return new PresumedDeadEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Card card = game.getCard(source.getSourceId()); + if (controller == null || card == null) { + return false; + } + controller.moveCards(card, Zone.BATTLEFIELD, source, game, false, false, true, null); + game.getState().processAction(game); + Permanent permanent = game.getPermanent(card.getId()); + if (permanent != null) { + permanent.setSuspected(true, game, source); + } + return true; + } + +} diff --git a/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java b/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java index c82b32a16eb..186070a876c 100644 --- a/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java +++ b/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java @@ -177,6 +177,7 @@ public final class MurdersAtKarlovManor extends ExpansionSet { cards.add(new SetCardInfo("Pick Your Poison", 170, Rarity.COMMON, mage.cards.p.PickYourPoison.class)); cards.add(new SetCardInfo("Plains", 272, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Pompous Gadabout", 171, Rarity.UNCOMMON, mage.cards.p.PompousGadabout.class)); + cards.add(new SetCardInfo("Presumed Dead", 100, Rarity.UNCOMMON, mage.cards.p.PresumedDead.class)); cards.add(new SetCardInfo("Private Eye", 223, Rarity.UNCOMMON, mage.cards.p.PrivateEye.class)); cards.add(new SetCardInfo("Public Thoroughfare", 265, Rarity.COMMON, mage.cards.p.PublicThoroughfare.class)); cards.add(new SetCardInfo("Push // Pull", 250, Rarity.UNCOMMON, mage.cards.p.PushPull.class));