mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Implemented The Magic Mirror
This commit is contained in:
parent
0799040a1f
commit
0dabd08984
5 changed files with 72 additions and 1 deletions
|
@ -14,6 +14,7 @@ import mage.abilities.keyword.ProwessAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterInstantOrSorceryCard;
|
||||
|
||||
/**
|
||||
|
@ -29,7 +30,7 @@ public final class BedlamReveler extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// Bedlam Reveler costs {1} less to cast for each instant or sorcery card in your graveyard.
|
||||
Ability ability = new SimpleStaticAbility(Zone.ALL, new SourceCostReductionForEachCardInGraveyardEffect(new FilterInstantOrSorceryCard()));
|
||||
Ability ability = new SimpleStaticAbility(Zone.ALL, new SourceCostReductionForEachCardInGraveyardEffect(StaticFilters.FILTER_CARD_INSTANT_AND_SORCERY));
|
||||
ability.setRuleAtTheTop(true);
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
62
Mage.Sets/src/mage/cards/t/TheMagicMirror.java
Normal file
62
Mage.Sets/src/mage/cards/t/TheMagicMirror.java
Normal file
|
@ -0,0 +1,62 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect;
|
||||
import mage.abilities.effects.common.cost.SourceCostReductionForEachCardInGraveyardEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TheMagicMirror extends CardImpl {
|
||||
|
||||
private static final DynamicValue xValue = new CountersSourceCount(CounterType.KNOWLEDGE);
|
||||
|
||||
public TheMagicMirror(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}{U}{U}{U}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
|
||||
// This spell costs {1} less to cast for each instant and sorcery card in your graveyard.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL, new SourceCostReductionForEachCardInGraveyardEffect(
|
||||
StaticFilters.FILTER_CARD_INSTANT_AND_SORCERY
|
||||
)).setRuleAtTheTop(true));
|
||||
|
||||
// You have no maximum hand size.
|
||||
this.addAbility(new SimpleStaticAbility(new MaximumHandSizeControllerEffect(
|
||||
Integer.MAX_VALUE, Duration.WhileOnBattlefield,
|
||||
MaximumHandSizeControllerEffect.HandSizeModification.SET
|
||||
)));
|
||||
|
||||
// At the beginning of your upkeep, put a knowledge counter on The Magic Mirror, then draw a card for each knowledge counter on The Magic Mirror.
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(
|
||||
new AddCountersSourceEffect(CounterType.KNOWLEDGE.createInstance())
|
||||
.setText("put a knowledge counter on {this},"),
|
||||
TargetController.YOU, false
|
||||
);
|
||||
ability.addEffect(new DrawCardSourceControllerEffect(xValue).concatBy("then"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private TheMagicMirror(final TheMagicMirror card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TheMagicMirror copy() {
|
||||
return new TheMagicMirror(this);
|
||||
}
|
||||
}
|
|
@ -173,6 +173,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Syr Konrad, the Grim", 107, Rarity.UNCOMMON, mage.cards.s.SyrKonradTheGrim.class));
|
||||
cards.add(new SetCardInfo("Taste of Death", 320, Rarity.RARE, mage.cards.t.TasteOfDeath.class));
|
||||
cards.add(new SetCardInfo("The Circle of Loyalty", 9, Rarity.MYTHIC, mage.cards.t.TheCircleOfLoyalty.class));
|
||||
cards.add(new SetCardInfo("The Magic Mirror", 51, Rarity.MYTHIC, mage.cards.t.TheMagicMirror.class));
|
||||
cards.add(new SetCardInfo("The Royal Scions", 199, Rarity.MYTHIC, mage.cards.t.TheRoyalScions.class));
|
||||
cards.add(new SetCardInfo("Thorn Mammoth", 323, Rarity.RARE, mage.cards.t.ThornMammoth.class));
|
||||
cards.add(new SetCardInfo("Thornwood Falls", 313, Rarity.COMMON, mage.cards.t.ThornwoodFalls.class));
|
||||
|
|
|
@ -67,6 +67,7 @@ public enum CounterType {
|
|||
INTERVENTION("intervention"),
|
||||
ISOLATION("isolation"),
|
||||
JAVELIN("javelin"),
|
||||
KNOWLEDGE("knowledge"),
|
||||
KI("ki"),
|
||||
LANDMARK("landmark"),
|
||||
LEVEL("level"),
|
||||
|
|
|
@ -139,6 +139,12 @@ public final class StaticFilters {
|
|||
FILTER_CARD_INSTANT_OR_SORCERY.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterInstantOrSorceryCard FILTER_CARD_INSTANT_AND_SORCERY = new FilterInstantOrSorceryCard("instant and sorcery card");
|
||||
|
||||
static {
|
||||
FILTER_CARD_INSTANT_AND_SORCERY.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterPermanent FILTER_PERMANENT = new FilterPermanent();
|
||||
|
||||
static {
|
||||
|
|
Loading…
Reference in a new issue