forked from External/mage
[DSK] Implement Untimely Malfunction
This commit is contained in:
parent
3654436587
commit
c2f4e7ba08
2 changed files with 54 additions and 0 deletions
53
Mage.Sets/src/mage/cards/u/UntimelyMalfunction.java
Normal file
53
Mage.Sets/src/mage/cards/u/UntimelyMalfunction.java
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
package mage.cards.u;
|
||||
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.common.ChooseNewTargetsTargetEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.combat.CantBlockTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.other.NumberOfTargetsPredicate;
|
||||
import mage.target.TargetSpell;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class UntimelyMalfunction extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("spell with a single target");
|
||||
|
||||
static {
|
||||
filter.add(new NumberOfTargetsPredicate(1));
|
||||
}
|
||||
|
||||
public UntimelyMalfunction(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}");
|
||||
|
||||
// Choose one --
|
||||
// * Destroy target artifact.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
|
||||
|
||||
// * Change the target of target spell or ability with a single target.
|
||||
this.getSpellAbility().addMode(new Mode(new ChooseNewTargetsTargetEffect(true, true)).addTarget(new TargetSpell(filter)));
|
||||
|
||||
// * One or two target creatures can't block this turn.
|
||||
this.getSpellAbility().addMode(new Mode(new CantBlockTargetEffect(Duration.EndOfTurn)).addTarget(new TargetCreaturePermanent(1, 2)));
|
||||
}
|
||||
|
||||
private UntimelyMalfunction(final UntimelyMalfunction card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UntimelyMalfunction copy() {
|
||||
return new UntimelyMalfunction(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -101,6 +101,7 @@ public final class DuskmournHouseOfHorror extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Trapped in the Screen", 36, Rarity.COMMON, mage.cards.t.TrappedInTheScreen.class));
|
||||
cards.add(new SetCardInfo("Twitching Doll", 201, Rarity.RARE, mage.cards.t.TwitchingDoll.class));
|
||||
cards.add(new SetCardInfo("Tyvar, the Pummeler", 202, Rarity.MYTHIC, mage.cards.t.TyvarThePummeler.class));
|
||||
cards.add(new SetCardInfo("Untimely Malfunction", 161, Rarity.UNCOMMON, mage.cards.u.UntimelyMalfunction.class));
|
||||
cards.add(new SetCardInfo("Unwanted Remake", 39, Rarity.UNCOMMON, mage.cards.u.UnwantedRemake.class));
|
||||
cards.add(new SetCardInfo("Unwilling Vessel", 81, Rarity.UNCOMMON, mage.cards.u.UnwillingVessel.class));
|
||||
cards.add(new SetCardInfo("Valgavoth's Faithful", 121, Rarity.UNCOMMON, mage.cards.v.ValgavothsFaithful.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue