[DSK] Implement Unwanted Remake

This commit is contained in:
theelk801 2024-09-01 10:52:49 -04:00
parent b6c5e5e507
commit ae8ab5c165
2 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,69 @@
package mage.cards.u;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.keyword.ManifestDreadEffect;
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.players.Player;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class UnwantedRemake extends CardImpl {
public UnwantedRemake(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}");
// Destroy target creature. Its controller manifests dread.
this.getSpellAbility().addEffect(new UnwantedRemakeEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
private UnwantedRemake(final UnwantedRemake card) {
super(card);
}
@Override
public UnwantedRemake copy() {
return new UnwantedRemake(this);
}
}
class UnwantedRemakeEffect extends OneShotEffect {
UnwantedRemakeEffect() {
super(Outcome.Benefit);
staticText = "destroy target creature. Its controller manifests dread";
}
private UnwantedRemakeEffect(final UnwantedRemakeEffect effect) {
super(effect);
}
@Override
public UnwantedRemakeEffect copy() {
return new UnwantedRemakeEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
if (permanent == null) {
return false;
}
Player player = game.getPlayer(permanent.getControllerId());
permanent.destroy(source, game);
if (player != null) {
ManifestDreadEffect.doManifestDread(player, source, game);
}
return true;
}
}

View file

@ -40,6 +40,7 @@ public final class DuskmournHouseOfHorror extends ExpansionSet {
cards.add(new SetCardInfo("Swamp", 274, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));
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("Unwanted Remake", 39, Rarity.UNCOMMON, mage.cards.u.UnwantedRemake.class));
cards.add(new SetCardInfo("Winter, Misanthropic Guide", 240, Rarity.RARE, mage.cards.w.WinterMisanthropicGuide.class));
cards.add(new SetCardInfo("Zimone, All-Questioning", 241, Rarity.RARE, mage.cards.z.ZimoneAllQuestioning.class));
}