diff --git a/Mage.Sets/src/mage/cards/f/FatefulAbsence.java b/Mage.Sets/src/mage/cards/f/FatefulAbsence.java new file mode 100644 index 0000000000..5a291dfcc4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FatefulAbsence.java @@ -0,0 +1,67 @@ +package mage.cards.f; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.ClueArtifactToken; +import mage.target.common.TargetCreatureOrPlaneswalker; + +/** + * + * @author weirddan455 + */ +public final class FatefulAbsence extends CardImpl { + + public FatefulAbsence(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}"); + + // Destroy target creature or planeswalker. Its controller investigates. + this.getSpellAbility().addEffect(new FatefulAbsenceEffect()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalker()); + } + + private FatefulAbsence(final FatefulAbsence card) { + super(card); + } + + @Override + public FatefulAbsence copy() { + return new FatefulAbsence(this); + } +} + +class FatefulAbsenceEffect extends OneShotEffect { + + public FatefulAbsenceEffect() { + super(Outcome.DestroyPermanent); + staticText = "Destroy target creature or planeswalker. Its controller investigates"; + } + + private FatefulAbsenceEffect(final FatefulAbsenceEffect effect) { + super(effect); + } + + @Override + public FatefulAbsenceEffect copy() { + return new FatefulAbsenceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent == null) { + return false; + } + UUID controllerId = permanent.getControllerId(); + permanent.destroy(source, game, false); + new ClueArtifactToken().putOntoBattlefield(1, game, source, controllerId); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index 2d9cfd1ab4..855c3a6fda 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -86,6 +86,7 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Falkenrath Perforator", 136, Rarity.COMMON, mage.cards.f.FalkenrathPerforator.class)); cards.add(new SetCardInfo("Falkenrath Pit Fighter", 137, Rarity.RARE, mage.cards.f.FalkenrathPitFighter.class)); cards.add(new SetCardInfo("Famished Foragers", 138, Rarity.COMMON, mage.cards.f.FamishedForagers.class)); + cards.add(new SetCardInfo("Fateful Absence", 18, Rarity.RARE, mage.cards.f.FatefulAbsence.class)); cards.add(new SetCardInfo("Festival Crasher", 140, Rarity.COMMON, mage.cards.f.FestivalCrasher.class)); cards.add(new SetCardInfo("Field of Ruin", 262, Rarity.UNCOMMON, mage.cards.f.FieldOfRuin.class)); cards.add(new SetCardInfo("Firmament Sage", 53, Rarity.UNCOMMON, mage.cards.f.FirmamentSage.class));