replace various cards with surveil errata

This commit is contained in:
Evan Kranzler 2022-10-15 10:03:38 -04:00
parent 32263a2792
commit 4a685a098d
20 changed files with 140 additions and 535 deletions

View file

@ -1,15 +1,10 @@
package mage.cards.c;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
@ -22,8 +17,10 @@ public final class Consider extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}");
// Look at the top card of your library. You may put that card into your graveyard.
this.getSpellAbility().addEffect(new SurveilEffect(1));
// Draw a card.
this.getSpellAbility().addEffect(new ConsiderEffect());
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).concatBy("<br>"));
}
private Consider(final Consider card) {
@ -35,36 +32,3 @@ public final class Consider extends CardImpl {
return new Consider(this);
}
}
class ConsiderEffect extends OneShotEffect {
ConsiderEffect() {
super(Outcome.Benefit);
staticText = "Look at the top card of your library. " +
"You may put that card into your graveyard.<br>Draw a card";
}
private ConsiderEffect(final ConsiderEffect effect) {
super(effect);
}
@Override
public ConsiderEffect copy() {
return new ConsiderEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Card card = player.getLibrary().getFromTop(game);
player.lookAtCards("Top card of your library", card, game);
if (player.chooseUse(Outcome.AIDontUseIt, "Put the top card of your library into your graveyard?", source, game)) {
player.moveCards(card, Zone.GRAVEYARD, source, game);
}
player.drawCards(1, source, game);
return true;
}
}

View file

@ -1,23 +1,22 @@
package mage.cards.c;
import java.util.UUID;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.PutCards;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public final class ContingencyPlan extends CardImpl {
public ContingencyPlan(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{U}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}");
// Look at the top five cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order.
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(5, Integer.MAX_VALUE, PutCards.GRAVEYARD, PutCards.TOP_ANY));
this.getSpellAbility().addEffect(new SurveilEffect(5));
}
private ContingencyPlan(final ContingencyPlan card) {

View file

@ -1,24 +1,18 @@
package mage.cards.c;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
*
* @author weirddan455
*/
public final class CruelWitness extends CardImpl {
@ -35,7 +29,9 @@ public final class CruelWitness extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Whenever you cast a noncreature spell, look at the top card of your library. You may put that card into your graveyard.
this.addAbility(new SpellCastControllerTriggeredAbility(new CruelWitnessEffect(), StaticFilters.FILTER_SPELL_A_NON_CREATURE, false));
this.addAbility(new SpellCastControllerTriggeredAbility(
new SurveilEffect(1), StaticFilters.FILTER_SPELL_A_NON_CREATURE, false
));
}
private CruelWitness(final CruelWitness card) {
@ -47,36 +43,3 @@ public final class CruelWitness extends CardImpl {
return new CruelWitness(this);
}
}
class CruelWitnessEffect extends OneShotEffect {
public CruelWitnessEffect() {
super(Outcome.Benefit);
staticText = "look at the top card of your library. You may put that card into your graveyard";
}
private CruelWitnessEffect(final CruelWitnessEffect effect) {
super(effect);
}
@Override
public CruelWitnessEffect copy() {
return new CruelWitnessEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Card topCard = controller.getLibrary().getFromTop(game);
if (topCard != null) {
controller.lookAtCards("Top card of your library", topCard, game);
if (controller.chooseUse(Outcome.AIDontUseIt, "Put the top card of your library into your graveyard?", source, game)) {
controller.moveCards(topCard, Zone.GRAVEYARD, source, game);
}
return true;
}
}
return false;
}
}

View file

@ -1,11 +1,10 @@
package mage.cards.c;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.PutCards;
import java.util.UUID;
@ -18,7 +17,7 @@ public final class Curate extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
// Look at the top two cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order.
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(2, Integer.MAX_VALUE, PutCards.GRAVEYARD, PutCards.TOP_ANY));
this.getSpellAbility().addEffect(new SurveilEffect(2));
// Draw a card.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).concatBy("<br>"));

View file

@ -1,16 +1,10 @@
package mage.cards.e;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.cards.Card;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCreatureOrPlaneswalker;
import java.util.UUID;
@ -26,7 +20,7 @@ public final class EatToExtinction extends CardImpl {
// Exile target creature or planeswalker. Look at the top card of your library. You may put that card into your graveyard.
this.getSpellAbility().addEffect(new ExileTargetEffect());
this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalker());
this.getSpellAbility().addEffect(new EatToExtinctionEffect());
this.getSpellAbility().addEffect(new SurveilEffect(1));
}
private EatToExtinction(final EatToExtinction card) {
@ -38,34 +32,3 @@ public final class EatToExtinction extends CardImpl {
return new EatToExtinction(this);
}
}
class EatToExtinctionEffect extends OneShotEffect {
EatToExtinctionEffect() {
super(Outcome.Benefit);
staticText = "Look at the top card of your library. You may put that card into your graveyard.";
}
private EatToExtinctionEffect(final EatToExtinctionEffect effect) {
super(effect);
}
@Override
public EatToExtinctionEffect copy() {
return new EatToExtinctionEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null || player.getLibrary().size() == 0) {
return false;
}
Card card = player.getLibrary().getFromTop(game);
player.lookAtCards("Top card of your library", card, game);
if (player.chooseUse(Outcome.AIDontUseIt, "Put the top card of your library into your graveyard?", source, game)) {
player.moveCards(card, Zone.GRAVEYARD, source, game);
}
return true;
}
}

View file

@ -1,44 +1,37 @@
package mage.cards.e;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
import mage.cards.Card;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
*
* @author jeffwadsworth
*/
public final class EtherwroughtPage extends CardImpl {
public EtherwroughtPage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}{W}{U}{B}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{W}{U}{B}");
// At the beginning of your upkeep, choose one - You gain 2 life; or look at the top card of your library, then you may put that card into your graveyard; or each opponent loses 1 life.
Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), TargetController.YOU, false);
Ability ability = new BeginningOfUpkeepTriggeredAbility(
new GainLifeEffect(2), TargetController.YOU, false
);
// or look at the top card of your library, then you may put that card into your graveyard;
Mode mode = new Mode(new EtherwroughtPageEffect());
ability.addMode(mode);
ability.addMode(new Mode(new SurveilEffect(1)));
// or each opponent loses 1 life
Mode mode1 = new Mode(new LoseLifeOpponentsEffect(1));
ability.addMode(mode1);
ability.addMode(new Mode(new LoseLifeOpponentsEffect(1)));
this.addAbility(ability);
}
@ -51,38 +44,3 @@ public final class EtherwroughtPage extends CardImpl {
return new EtherwroughtPage(this);
}
}
class EtherwroughtPageEffect extends OneShotEffect {
public EtherwroughtPageEffect() {
super(Outcome.DrawCard);
this.staticText = "look at the top card of your library. You may put that card into your graveyard";
}
public EtherwroughtPageEffect(final EtherwroughtPageEffect effect) {
super(effect);
}
@Override
public EtherwroughtPageEffect copy() {
return new EtherwroughtPageEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null && controller.getLibrary().hasCards()) {
Card card = controller.getLibrary().getFromTop(game);
if (card != null) {
CardsImpl cards = new CardsImpl();
cards.add(card);
controller.lookAtCards("Etherwrought Page", cards, game);
if (controller.chooseUse(Outcome.Neutral, "Put that card into your graveyard?", source, game)) {
return controller.moveCards(card, Zone.GRAVEYARD, source, game);
}
return true;
}
}
return false;
}
}

View file

@ -1,19 +1,22 @@
package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author fireshoes
@ -33,15 +36,17 @@ public final class GrimFlayer extends CardImpl {
// Whenever Grim Flayer deals combat damage to a player, look at the top three cards of your library.
// Put any number of them into your graveyard and the rest back on top of your library in any order.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
new LookLibraryAndPickControllerEffect(3, Integer.MAX_VALUE, PutCards.GRAVEYARD, PutCards.TOP_ANY),
false));
new SurveilEffect(3), false
));
// <i>Delirium</i> &mdash; Grim Flayer gets +2/+2 as long as there are four or more card types among cards in your graveyard.
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield),
DeliriumCondition.instance,
"{this} gets +2/+2 as long as there are four or more card types among cards in your graveyard"))
.setAbilityWord(AbilityWord.DELIRIUM).addHint(CardTypesInGraveyardHint.YOU));
this.addAbility(new SimpleStaticAbility(
new ConditionalContinuousEffect(
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield),
DeliriumCondition.instance, "{this} gets +2/+2 as long as there are " +
"four or more card types among cards in your graveyard"
)
).setAbilityWord(AbilityWord.DELIRIUM).addHint(CardTypesInGraveyardHint.YOU));
}
private GrimFlayer(final GrimFlayer card) {

View file

@ -1,21 +1,15 @@
package mage.cards.l;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapTargetCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.abilities.keyword.DefenderAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
@ -37,7 +31,7 @@ public final class LarderZombie extends CardImpl {
// Tap three untapped creatures you control: Look at the top card of your library. You may put it into your graveyard.
this.addAbility(new SimpleActivatedAbility(
new LarderZombieEffect(),
new SurveilEffect(1),
new TapTargetCost(new TargetControlledPermanent(
3, StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURES
))
@ -53,34 +47,3 @@ public final class LarderZombie extends CardImpl {
return new LarderZombie(this);
}
}
class LarderZombieEffect extends OneShotEffect {
LarderZombieEffect() {
super(Outcome.Benefit);
staticText = "look at the top card of your library. You may put it into your graveyard";
}
private LarderZombieEffect(final LarderZombieEffect effect) {
super(effect);
}
@Override
public LarderZombieEffect copy() {
return new LarderZombieEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Card card = player.getLibrary().getFromTop(game);
player.lookAtCards("Top card of your library", card, game);
if (player.chooseUse(Outcome.AIDontUseIt, "Put the top card of your library into your graveyard?", source, game)) {
player.moveCards(card, Zone.GRAVEYARD, source, game);
}
return true;
}
}

View file

@ -1,17 +1,16 @@
package mage.cards.n;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.PutCards;
import mage.constants.SubType;
import java.util.UUID;
/**
*
* @author stravant
*/
public final class NagaOracle extends CardImpl {
@ -26,8 +25,7 @@ public final class NagaOracle extends CardImpl {
// When Naga Oracle enters the battlefield, look at the top three cards of your library. Put any number of them into your graveyard
// and the rest back on top of your library in any order.
addAbility(new EntersBattlefieldTriggeredAbility(
new LookLibraryAndPickControllerEffect(3, Integer.MAX_VALUE, PutCards.GRAVEYARD, PutCards.TOP_ANY)));
addAbility(new EntersBattlefieldTriggeredAbility(new SurveilEffect(3)));
}
private NagaOracle(final NagaOracle card) {

View file

@ -1,12 +1,11 @@
package mage.cards.o;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.abilities.keyword.FlashbackAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.PutCards;
import java.util.UUID;
@ -19,7 +18,7 @@ public final class OtherworldlyGaze extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}");
// Look at the top three cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order.
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(3, Integer.MAX_VALUE, PutCards.GRAVEYARD, PutCards.TOP_ANY));
this.getSpellAbility().addEffect(new SurveilEffect(3));
// Flashback {1}{U}
this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{1}{U}")));

View file

@ -1,38 +1,30 @@
package mage.cards.r;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
*
* @author Wehk
*/
public final class RummagingWizard extends CardImpl {
public RummagingWizard(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// {2}{U}: Look at the top card of your library. You may put that card into your graveyard.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RummagingWizardLookLibraryEffect(), new ManaCostsImpl<>("{2}{U}")));
this.addAbility(new SimpleActivatedAbility(new SurveilEffect(1), new ManaCostsImpl<>("{2}{U}")));
}
private RummagingWizard(final RummagingWizard card) {
@ -44,41 +36,3 @@ public final class RummagingWizard extends CardImpl {
return new RummagingWizard(this);
}
}
class RummagingWizardLookLibraryEffect extends OneShotEffect {
public RummagingWizardLookLibraryEffect() {
super(Outcome.DrawCard);
this.staticText = "look at the top card of your library. You may put that card into your graveyard";
}
public RummagingWizardLookLibraryEffect(final RummagingWizardLookLibraryEffect effect) {
super(effect);
}
@Override
public RummagingWizardLookLibraryEffect copy() {
return new RummagingWizardLookLibraryEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
if (controller.getLibrary().hasCards()) {
Card card = controller.getLibrary().getFromTop(game);
if (card != null) {
CardsImpl cards = new CardsImpl();
cards.add(card);
controller.lookAtCards("Rummaging Wizard", cards, game);
if (controller.chooseUse(Outcome.Neutral, "Put that card into your graveyard?", source, game)) {
return controller.moveCards(card, Zone.GRAVEYARD, source, game);
}
}
}
return true;
}
return false;
}
}

View file

@ -1,6 +1,5 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility;
@ -10,25 +9,21 @@ import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.abilities.hint.common.DifferentManaValuesInGraveHint;
import mage.cards.Card;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.abilities.keyword.MenaceAbility;
import mage.abilities.keyword.LifelinkAbility;
import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
*
* @author weirddan455
*/
public final class SanguineSpy extends CardImpl {
@ -48,7 +43,7 @@ public final class SanguineSpy extends CardImpl {
this.addAbility(LifelinkAbility.getInstance());
// {1}, Sacrifice another creature: Look at the top card of your library. You may put that card into your graveyard.
Ability ability = new SimpleActivatedAbility(new SanguineSpyEffect(), new GenericManaCost(1));
Ability ability = new SimpleActivatedAbility(new SurveilEffect(1), new GenericManaCost(1));
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE));
this.addAbility(ability);
@ -57,9 +52,8 @@ public final class SanguineSpy extends CardImpl {
new BeginningOfYourEndStepTriggeredAbility(
new DoIfCostPaid(new DrawCardSourceControllerEffect(1), new PayLifeCost(2)),
false
),
DifferentManaValuesInGraveCondition.FIVE,
"At the beginning of your end step, if there are five or more mana values among cards in your graveyard, you may pay 2 life. If you do, draw a card."
), DifferentManaValuesInGraveCondition.FIVE, "At the beginning of your end step, if there are " +
"five or more mana values among cards in your graveyard, you may pay 2 life. If you do, draw a card."
).addHint(DifferentManaValuesInGraveHint.instance));
}
@ -72,37 +66,3 @@ public final class SanguineSpy extends CardImpl {
return new SanguineSpy(this);
}
}
class SanguineSpyEffect extends OneShotEffect {
public SanguineSpyEffect() {
super(Outcome.Benefit);
this.staticText = "Look at the top card of your library. You may put that card into your graveyard";
}
private SanguineSpyEffect(final SanguineSpyEffect effect) {
super(effect);
}
@Override
public SanguineSpyEffect copy() {
return new SanguineSpyEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Card card = player.getLibrary().getFromTop(game);
if (card == null) {
return false;
}
player.lookAtCards("Top card of your library", card, game);
if (player.chooseUse(Outcome.AIDontUseIt, "Put the top card of your library into your graveyard?", source, game)) {
player.moveCards(card, Zone.GRAVEYARD, source, game);
}
return true;
}
}

View file

@ -1,26 +1,22 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.abilities.keyword.TransformAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SuperType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.UUID;
/**
* @author LevelX2
*/
@ -34,9 +30,13 @@ public final class SearchForAzcanta extends CardImpl {
this.addSuperType(SuperType.LEGENDARY);
// At the beginning of your upkeep, look at the top card of your library. You may put it into your graveyard. Then if you have seven or more cards in your graveyard, you may transform Search for Azcanta.
Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SearchForAzcantaLookLibraryEffect(), TargetController.YOU, false);
this.addAbility(ability);
Ability ability = new BeginningOfUpkeepTriggeredAbility(
new SurveilEffect(1, false),
TargetController.YOU, false
);
ability.addEffect(new SearchForAzcantaEffect());
this.addAbility(new TransformAbility());
this.addAbility(ability);
}
private SearchForAzcanta(final SearchForAzcanta card) {
@ -49,42 +49,30 @@ public final class SearchForAzcanta extends CardImpl {
}
}
class SearchForAzcantaLookLibraryEffect extends OneShotEffect {
class SearchForAzcantaEffect extends OneShotEffect {
public SearchForAzcantaLookLibraryEffect() {
public SearchForAzcantaEffect() {
super(Outcome.DrawCard);
this.staticText = "look at the top card of your library. You may put that card into your graveyard. "
+ "Then if you have seven or more cards in your graveyard, you may transform {this}.";
this.staticText = "Then if you have seven or more cards in your graveyard, you may transform {this}.";
}
public SearchForAzcantaLookLibraryEffect(final SearchForAzcantaLookLibraryEffect effect) {
public SearchForAzcantaEffect(final SearchForAzcantaEffect effect) {
super(effect);
}
@Override
public SearchForAzcantaLookLibraryEffect copy() {
return new SearchForAzcantaLookLibraryEffect(this);
public SearchForAzcantaEffect copy() {
return new SearchForAzcantaEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = source.getSourceObject(game);
if (controller != null && sourceObject != null) {
if (controller.getLibrary().hasCards()) {
Card card = controller.getLibrary().getFromTop(game);
if (card != null) {
controller.lookAtCards(sourceObject.getIdName(), new CardsImpl(card), game);
if (controller.chooseUse(Outcome.Neutral, "Put that card into your graveyard?", source, game)) {
controller.moveCards(card, Zone.GRAVEYARD, source, game);
}
if (controller.getGraveyard().size() > 6 && controller.chooseUse(Outcome.Neutral, "Transform " + sourceObject.getLogName() + "?", source, game)) {
new TransformSourceEffect().apply(game, source);
}
}
}
return true;
}
return false;
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
return controller != null
&& permanent != null
&& controller.getGraveyard().size() >= 7
&& controller.chooseUse(outcome, "Transform " + permanent.getName() + '?', source, game)
&& permanent.transform(source, game);
}
}

View file

@ -1,16 +1,15 @@
package mage.cards.s;
import java.util.UUID;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.PutCards;
import mage.constants.TargetController;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public final class SultaiAscendancy extends CardImpl {
@ -21,8 +20,8 @@ public final class SultaiAscendancy extends CardImpl {
// At the beginning of your upkeep, look at the top two cards of your library.
// Put any number of them into your graveyard and the rest back on top of your library in any order.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
new LookLibraryAndPickControllerEffect(2, Integer.MAX_VALUE, PutCards.GRAVEYARD, PutCards.TOP_ANY),
TargetController.YOU, false));
new SurveilEffect(2), TargetController.YOU, false
));
}
private SultaiAscendancy(final SultaiAscendancy card) {

View file

@ -1,23 +1,22 @@
package mage.cards.t;
import java.util.UUID;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.PutCards;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public final class TaigamsScheming extends CardImpl {
public TaigamsScheming(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{U}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}");
// Look at the top five cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(5, Integer.MAX_VALUE, PutCards.GRAVEYARD, PutCards.TOP_ANY));
this.getSpellAbility().addEffect(new SurveilEffect(5));
}
private TaigamsScheming(final TaigamsScheming card) {

View file

@ -1,34 +1,26 @@
package mage.cards.t;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
*
* @author cbt33
*/
public final class ThinkTank extends CardImpl {
public ThinkTank(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
// At the beginning of your upkeep, look at the top card of your library. You may put that card into your graveyard.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ThinkTankLookLibraryEffect(), TargetController.YOU, false));
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
new SurveilEffect(1), TargetController.YOU, false
));
}
private ThinkTank(final ThinkTank card) {
@ -40,41 +32,3 @@ public final class ThinkTank extends CardImpl {
return new ThinkTank(this);
}
}
class ThinkTankLookLibraryEffect extends OneShotEffect {
public ThinkTankLookLibraryEffect() {
super(Outcome.DrawCard);
this.staticText = "look at the top card of your library. You may put that card into your graveyard";
}
public ThinkTankLookLibraryEffect(final ThinkTankLookLibraryEffect effect) {
super(effect);
}
@Override
public ThinkTankLookLibraryEffect copy() {
return new ThinkTankLookLibraryEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
if (controller.getLibrary().hasCards()) {
Card card = controller.getLibrary().getFromTop(game);
if (card != null) {
CardsImpl cards = new CardsImpl();
cards.add(card);
controller.lookAtCards("Think Tank", cards, game);
if (controller.chooseUse(Outcome.Neutral, "Put that card into your graveyard?", source, game)) {
return controller.moveCards(card, Zone.GRAVEYARD, source, game);
}
}
}
return true;
}
return false;
}
}

View file

@ -10,23 +10,20 @@ import mage.abilities.costs.Cost;
import mage.abilities.costs.common.ExileFromGraveCost;
import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.costs.mana.VariableManaCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.abilities.effects.mana.BasicManaEffect;
import mage.abilities.mana.ActivatedManaAbilityImpl;
import mage.abilities.mana.conditional.ManaCondition;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
/**
* @author TheElk801
@ -38,7 +35,7 @@ public final class TitansNest extends CardImpl {
// At the beginning of your upkeep, look at the top card of your library. You may put that card into your graveyard.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
new TitansNestEffect(), TargetController.YOU, false
new SurveilEffect(1), TargetController.YOU, false
));
// Exile a card from your graveyard: Add {C}. Spend this mana only to cast a colored spell without {X} in its mana cost.
@ -55,44 +52,12 @@ public final class TitansNest extends CardImpl {
}
}
class TitansNestEffect extends OneShotEffect {
TitansNestEffect() {
super(Outcome.Benefit);
staticText = "look at the top card of your library. You may put that card into your graveyard";
}
private TitansNestEffect(final TitansNestEffect effect) {
super(effect);
}
@Override
public TitansNestEffect copy() {
return new TitansNestEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Card card = player.getLibrary().getFromTop(game);
if (card == null) {
return false;
}
player.lookAtCards("", card, game);
return player.chooseUse(outcome, "Put " + card.getName() + " into your graveyard?", source, game)
&& player.moveCards(card, Zone.GRAVEYARD, source, game);
}
}
class TitansNestManaAbility extends ActivatedManaAbilityImpl {
TitansNestManaAbility() {
super(Zone.BATTLEFIELD, (BasicManaEffect) new BasicManaEffect(
new TitansNestConditionalMana(), new CardsInControllerGraveyardCount())
.setText("Add {C}. Spend this mana only to cast a spell that's one or more colors without {X} in its mana cost."),
new TitansNestConditionalMana(), new CardsInControllerGraveyardCount())
.setText("Add {C}. Spend this mana only to cast a spell that's one or more colors without {X} in its mana cost."),
new ExileFromGraveCost(new TargetCardInYourGraveyard()));
this.netMana.add(Mana.ColorlessMana(1));
}

View file

@ -9,16 +9,13 @@ import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.continuous.SetBasePowerSourceEffect;
import mage.cards.Card;
import mage.abilities.effects.keyword.SurveilEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
@ -43,7 +40,7 @@ public final class UurgSpawnOfTurg extends CardImpl {
// At the beginning of your upkeep, look at the top card of your library. You may put that card into your graveyard.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
new UurgSpawnOfTurgEffect(), TargetController.YOU, false
new SurveilEffect(1), TargetController.YOU, false
));
// {B}{G}, Sacrifice a land: You gain 2 life.
@ -61,37 +58,3 @@ public final class UurgSpawnOfTurg extends CardImpl {
return new UurgSpawnOfTurg(this);
}
}
class UurgSpawnOfTurgEffect extends OneShotEffect {
UurgSpawnOfTurgEffect() {
super(Outcome.Benefit);
staticText = "look at the top card of your library. You may put that card into your graveyard";
}
private UurgSpawnOfTurgEffect(final UurgSpawnOfTurgEffect effect) {
super(effect);
}
@Override
public UurgSpawnOfTurgEffect copy() {
return new UurgSpawnOfTurgEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller == null) {
return false;
}
Card topCard = controller.getLibrary().getFromTop(game);
if (topCard == null) {
return false;
}
controller.lookAtCards("Top card of your library", topCard, game);
if (controller.chooseUse(Outcome.AIDontUseIt, "Put the top card of your library into your graveyard?", source, game)) {
controller.moveCards(topCard, Zone.GRAVEYARD, source, game);
}
return true;
}
}

View file

@ -12,8 +12,8 @@ import mage.util.CardUtil;
*/
public class ScryEffect extends OneShotEffect {
protected int scryNumber;
protected boolean showEffectHint;
protected final int scryNumber;
protected final boolean showEffectHint;
public ScryEffect(int scryNumber) {
this(scryNumber, true);
@ -48,14 +48,16 @@ public class ScryEffect extends OneShotEffect {
private void setText() {
StringBuilder sb = new StringBuilder("scry ").append(scryNumber);
if (showEffectHint) {
if (scryNumber == 1) {
sb.append(". <i>(Look at the top card of your library. You may put that card on the bottom of your library.)</i>");
} else {
sb.append(". <i>(Look at the top ");
sb.append(CardUtil.numberToText(scryNumber));
sb.append(" cards of your library, then put any number of them on the bottom of your library and the rest on top in any order.)</i>");
}
if (!showEffectHint) {
staticText = sb.toString();
return;
}
if (scryNumber == 1) {
sb.append(". <i>(Look at the top card of your library. You may put that card on the bottom of your library.)</i>");
} else {
sb.append(". <i>(Look at the top ");
sb.append(CardUtil.numberToText(scryNumber));
sb.append(" cards of your library, then put any number of them on the bottom of your library and the rest on top in any order.)</i>");
}
staticText = sb.toString();
}

View file

@ -8,22 +8,28 @@ import mage.players.Player;
import mage.util.CardUtil;
/**
*
* @author TheElk801
*/
public class SurveilEffect extends OneShotEffect {
protected int surveilNumber;
protected final int surveilNumber;
protected final boolean showEffectHint;
public SurveilEffect(int scryNumber) {
public SurveilEffect(int surveilNumber) {
this(surveilNumber, true);
}
public SurveilEffect(int surveilNumber, boolean showEffectHint) {
super(Outcome.Benefit);
this.surveilNumber = scryNumber;
this.surveilNumber = surveilNumber;
this.showEffectHint = showEffectHint;
this.setText();
}
public SurveilEffect(final SurveilEffect effect) {
super(effect);
this.surveilNumber = effect.surveilNumber;
this.showEffectHint = effect.showEffectHint;
}
@Override
@ -42,6 +48,10 @@ public class SurveilEffect extends OneShotEffect {
private void setText() {
StringBuilder sb = new StringBuilder("surveil ").append(surveilNumber);
if (!showEffectHint) {
staticText = sb.toString();
return;
}
if (surveilNumber == 1) {
sb.append(". <i>(Look at the top card of your library. You may put that card into your graveyard.)</i>");
} else {