- Added Scrying Glass and Metathrane Elite.

This commit is contained in:
Jeff 2018-11-16 16:14:10 -06:00
parent c4d13ab37a
commit ed7c32f9e8
3 changed files with 302 additions and 166 deletions

View file

@ -0,0 +1,47 @@
package mage.cards.m;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.EnchantedSourceCondition;
import mage.abilities.decorator.ConditionalRestrictionEffect;
import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect;
import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
/**
*
* @author jeffwadsworth
*/
public final class MetathranElite extends CardImpl {
private static final String rule = "{this} is unblockable as long as it's enchanted.";
public MetathranElite(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}");
this.subtype.add(SubType.METATHRAN);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// Metathran Elite is unblockable as long as it's enchanted.
ConditionalRestrictionEffect effect = new ConditionalRestrictionEffect(
new CantBeBlockedSourceEffect(), new EnchantedSourceCondition());
effect.setText(rule);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
}
public MetathranElite(final MetathranElite card) {
super(card);
}
@Override
public MetathranElite copy() {
return new MetathranElite(this);
}
}

View file

@ -0,0 +1,87 @@
package mage.cards.s;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.choices.ChoiceColor;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetOpponent;
/**
*
* @author jeffwadsworth
*/
public final class ScryingGlass extends CardImpl {
public ScryingGlass(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
// {3}, {tap}: Choose a number greater than 0 and a color. Target opponent reveals his or her hand. If that opponent reveals exactly the chosen number of cards of the chosen color, you draw a card.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryingGlassEffect(), new ManaCostsImpl("{3}"));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetOpponent());
this.addAbility(ability);
}
public ScryingGlass(final ScryingGlass card) {
super(card);
}
@Override
public ScryingGlass copy() {
return new ScryingGlass(this);
}
}
class ScryingGlassEffect extends OneShotEffect {
public ScryingGlassEffect() {
super(Outcome.Neutral);
staticText = "Choose a number greater than 0 and a color. Target opponent reveals his or her hand. If that opponent reveals exactly the chosen number of cards of the chosen color, you draw a card";
}
public ScryingGlassEffect(final ScryingGlassEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Player targetOpponent = game.getPlayer(source.getFirstTarget());
ChoiceColor color = new ChoiceColor();
int amount = 0;
if (controller != null
&& targetOpponent != null) {
amount = controller.getAmount(1, Integer.MAX_VALUE, "Choose a number", game);
controller.choose(Outcome.Discard, color, game);
FilterCard filter = new FilterCard();
filter.add(new ColorPredicate(color.getColor()));
targetOpponent.revealCards(source, targetOpponent.getHand(), game);
if (targetOpponent.getHand().count(filter, game) == amount) {
game.informPlayers(controller.getName() + " has chosen the exact number and color of the revealed cards from " + targetOpponent.getName() + "'s hand. They draw a card.");
controller.drawCards(1, game);
return true;
} else {
game.informPlayers(controller.getName() + " has chosen incorrectly and will not draw a card.");
}
}
return false;
}
@Override
public ScryingGlassEffect copy() {
return new ScryingGlassEffect(this);
}
}

View file

@ -98,6 +98,7 @@ public final class UrzasDestiny extends ExpansionSet {
cards.add(new SetCardInfo("Masticore", 134, Rarity.RARE, mage.cards.m.Masticore.class));
cards.add(new SetCardInfo("Mental Discipline", 37, Rarity.COMMON, mage.cards.m.MentalDiscipline.class));
cards.add(new SetCardInfo("Metalworker", 135, Rarity.RARE, mage.cards.m.Metalworker.class));
cards.add(new SetCardInfo("Metathran Elite", 38, Rarity.UNCOMMON, mage.cards.m.MetathranElite.class));
cards.add(new SetCardInfo("Metathran Soldier", 39, Rarity.COMMON, mage.cards.m.MetathranSoldier.class));
cards.add(new SetCardInfo("Momentum", 113, Rarity.UNCOMMON, mage.cards.m.Momentum.class));
cards.add(new SetCardInfo("Multani's Decree", 114, Rarity.COMMON, mage.cards.m.MultanisDecree.class));
@ -129,6 +130,7 @@ public final class UrzasDestiny extends ExpansionSet {
cards.add(new SetCardInfo("Scent of Jasmine", 17, Rarity.COMMON, mage.cards.s.ScentOfJasmine.class));
cards.add(new SetCardInfo("Scent of Nightshade", 69, Rarity.COMMON, mage.cards.s.ScentOfNightshade.class));
cards.add(new SetCardInfo("Scour", 18, Rarity.UNCOMMON, mage.cards.s.Scour.class));
cards.add(new SetCardInfo("Scrying Glass", 137, Rarity.RARE, mage.cards.s.ScryingGlass.class));
cards.add(new SetCardInfo("Serra Advocate", 19, Rarity.UNCOMMON, mage.cards.s.SerraAdvocate.class));
cards.add(new SetCardInfo("Sigil of Sleep", 46, Rarity.COMMON, mage.cards.s.SigilOfSleep.class));
cards.add(new SetCardInfo("Skittering Horror", 70, Rarity.COMMON, mage.cards.s.SkitteringHorror.class));