forked from magefree/mage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MKC] Implement Case of the Shifting Visage
- Loading branch information
1 parent
b0c3371
commit f47243d
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters