Skip to content

Commit

Permalink
[MKC] Implement Case of the Shifting Visage
Browse files Browse the repository at this point in the history
  • Loading branch information
PurpleCrowbar committed Feb 25, 2024
1 parent b0c3371 commit f47243d
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
59 changes: 59 additions & 0 deletions Mage.Sets/src/mage/cards/c/CaseOfTheShiftingVisage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package mage.cards.c;

import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.CaseAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.CardsInControllerGraveyardCondition;
import mage.abilities.condition.common.SolvedSourceCondition;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.effects.common.CopyTargetSpellEffect;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterCreatureSpell;
import mage.filter.predicate.Predicates;

import java.util.UUID;

/**
* @author PurpleCrowbar
*/
public final class CaseOfTheShiftingVisage extends CardImpl {

private static final FilterCreatureSpell filter = new FilterCreatureSpell("a nonlegendary creature spell");

static {
filter.add(Predicates.not(SuperType.LEGENDARY.getPredicate()));
}

public CaseOfTheShiftingVisage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}{U}");
this.subtype.add(SubType.CASE);

// At the beginning of your upkeep, surveil 1.
Ability initialAbility = new BeginningOfUpkeepTriggeredAbility(new SurveilEffect(1, false), TargetController.YOU, false);
// To solve — There are fifteen or more cards in your graveyard.
Condition toSolveCondition = new CardsInControllerGraveyardCondition(15);
// Solved — Whenever you cast a nonlegendary creature spell, copy that spell.
Ability solvedAbility = new ConditionalTriggeredAbility(new SpellCastControllerTriggeredAbility(
new CopyTargetSpellEffect(true).setText("copy that spell. <i>(The copy becomes a token.)</i>"), filter, false, SetTargetPointer.SPELL
), SolvedSourceCondition.SOLVED, null);

this.addAbility(new CaseAbility(initialAbility, toSolveCondition, solvedAbility)
.addHint(new ValueHint("Cards in your graveyard", new CardsInControllerGraveyardCount())));
}

private CaseOfTheShiftingVisage(final CaseOfTheShiftingVisage card) {
super(card);
}

@Override
public CaseOfTheShiftingVisage copy() {
return new CaseOfTheShiftingVisage(this);
}
}
1 change: 1 addition & 0 deletions Mage.Sets/src/mage/sets/MurdersAtKarlovManorCommander.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ private MurdersAtKarlovManorCommander() {
cards.add(new SetCardInfo("Brash Taunter", 148, Rarity.RARE, mage.cards.b.BrashTaunter.class));
cards.add(new SetCardInfo("Broodhatch Nantuko", 167, Rarity.UNCOMMON, mage.cards.b.BroodhatchNantuko.class));
cards.add(new SetCardInfo("Canopy Vista", 252, Rarity.RARE, mage.cards.c.CanopyVista.class));
cards.add(new SetCardInfo("Case of the Shifting Visage", 19, Rarity.RARE, mage.cards.c.CaseOfTheShiftingVisage.class));
cards.add(new SetCardInfo("Castle Ardenvale", 253, Rarity.RARE, mage.cards.c.CastleArdenvale.class));
cards.add(new SetCardInfo("Chaos Warp", 149, Rarity.RARE, mage.cards.c.ChaosWarp.class));
cards.add(new SetCardInfo("Choked Estuary", 254, Rarity.RARE, mage.cards.c.ChokedEstuary.class));
Expand Down

0 comments on commit f47243d

Please sign in to comment.