mirror of
https://github.com/correl/mage.git
synced 2024-11-22 03:00:11 +00:00
[LTR] Implement Mirror of Galadriel
This commit is contained in:
parent
1022ee73d6
commit
1c074cdc92
2 changed files with 77 additions and 0 deletions
76
Mage.Sets/src/mage/cards/m/MirrorOfGaladriel.java
Normal file
76
Mage.Sets/src/mage/cards/m/MirrorOfGaladriel.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.CostAdjuster;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.InfoEffect;
|
||||
import mage.abilities.effects.keyword.ScryEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MirrorOfGaladriel extends CardImpl {
|
||||
|
||||
public MirrorOfGaladriel(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
|
||||
// {5}, {T}: Scry 1, then draw a card. This ability costs {1} less to activate for each legendary creature you control.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new ScryEffect(1, false), new GenericManaCost(5)
|
||||
);
|
||||
ability.addEffect(new DrawCardSourceControllerEffect(1));
|
||||
ability.addEffect(new InfoEffect(
|
||||
"This ability costs {1} less to activate for each legendary creature you control."
|
||||
));
|
||||
ability.setCostAdjuster(MirrorOfGaladrielAdjuster.instance);
|
||||
this.addAbility(ability.addHint(MirrorOfGaladrielAdjuster.getHint()));
|
||||
}
|
||||
|
||||
private MirrorOfGaladriel(final MirrorOfGaladriel card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MirrorOfGaladriel copy() {
|
||||
return new MirrorOfGaladriel(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum MirrorOfGaladrielAdjuster implements CostAdjuster {
|
||||
instance;
|
||||
private static final Hint hint = new ValueHint(
|
||||
"Legendary creatures you control",
|
||||
new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE_LEGENDARY)
|
||||
);
|
||||
|
||||
public static Hint getHint() {
|
||||
return hint;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void adjustCosts(Ability ability, Game game) {
|
||||
int value = game.getBattlefield().count(
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURE_LEGENDARY,
|
||||
ability.getControllerId(), ability, game
|
||||
);
|
||||
if (value > 0) {
|
||||
CardUtil.reduceCost(ability, value);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -94,6 +94,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Minas Tirith", 256, Rarity.RARE, mage.cards.m.MinasTirith.class));
|
||||
cards.add(new SetCardInfo("Mines of Moria", 257, Rarity.RARE, mage.cards.m.MinesOfMoria.class));
|
||||
cards.add(new SetCardInfo("Mirkwood Spider", 178, Rarity.COMMON, mage.cards.m.MirkwoodSpider.class));
|
||||
cards.add(new SetCardInfo("Mirror of Galadriel", 244, Rarity.UNCOMMON, mage.cards.m.MirrorOfGaladriel.class));
|
||||
cards.add(new SetCardInfo("Morgul-Knife Wound", 98, Rarity.COMMON, mage.cards.m.MorgulKnifeWound.class));
|
||||
cards.add(new SetCardInfo("Moria Marauder", 138, Rarity.RARE, mage.cards.m.MoriaMarauder.class));
|
||||
cards.add(new SetCardInfo("Mount Doom", 258, Rarity.MYTHIC, mage.cards.m.MountDoom.class));
|
||||
|
|
Loading…
Reference in a new issue