[MKM] Implement Curious Cadaver

This commit is contained in:
theelk801 2023-12-06 18:21:49 -05:00
parent 6a29580d4f
commit 62aad2bc25
3 changed files with 58 additions and 2 deletions

View file

@ -0,0 +1,49 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.common.SacrificePermanentTriggeredAbility;
import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CuriousCadaver extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.CLUE, "a Clue");
public CuriousCadaver(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{B}");
this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.DETECTIVE);
this.power = new MageInt(3);
this.toughness = new MageInt(1);
// Flying
this.addAbility(FlyingAbility.getInstance());
// When you sacrifice a Clue, return Curious Cadaver from your graveyard to your hand.
this.addAbility(new SacrificePermanentTriggeredAbility(
Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), filter, false, false
));
}
private CuriousCadaver(final CuriousCadaver card) {
super(card);
}
@Override
public CuriousCadaver copy() {
return new CuriousCadaver(this);
}
}

View file

@ -22,6 +22,7 @@ public final class MurdersAtKarlovManor extends ExpansionSet {
this.hasBoosters = false; // temporary
cards.add(new SetCardInfo("Benthic Criminologists", 40, Rarity.COMMON, mage.cards.b.BenthicCriminologists.class));
cards.add(new SetCardInfo("Curious Cadaver", 194, Rarity.UNCOMMON, mage.cards.c.CuriousCadaver.class));
cards.add(new SetCardInfo("Deduce", 52, Rarity.COMMON, mage.cards.d.Deduce.class));
cards.add(new SetCardInfo("Fanatical Strength", 159, Rarity.COMMON, mage.cards.f.FanaticalStrength.class));
cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));

View file

@ -32,8 +32,14 @@ public class SacrificePermanentTriggeredAbility extends TriggeredAbilityImpl {
}
public SacrificePermanentTriggeredAbility(Effect effect, FilterPermanent filter, boolean setTargetPointer, boolean optional) {
super(Zone.BATTLEFIELD, effect, optional);
setLeavesTheBattlefieldTrigger(true);
this(Zone.BATTLEFIELD, effect, filter, setTargetPointer, optional);
}
public SacrificePermanentTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean setTargetPointer, boolean optional) {
super(zone, effect, optional);
if (Zone.BATTLEFIELD.match(zone)) {
setLeavesTheBattlefieldTrigger(true);
}
this.filter = filter;
this.setTargetPointer = setTargetPointer;
setTriggerPhrase("Whenever you sacrifice " + CardUtil.addArticle(filter.getMessage()) + ", ");