[MID] Implemented Fateful Absence

This commit is contained in:
Daniel Bomar 2021-09-10 16:07:43 -05:00
parent 2a044c470d
commit 33516a1518
No known key found for this signature in database
GPG key ID: C86C8658F4023918
2 changed files with 68 additions and 0 deletions

View file

@ -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;
}
}

View file

@ -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 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("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("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("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("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)); cards.add(new SetCardInfo("Firmament Sage", 53, Rarity.UNCOMMON, mage.cards.f.FirmamentSage.class));