separate 'you may play'|'you may cast' AsThoughtEffect approuvers

Also, reworked Gonti, Lord of Luxury and checks it now works properly with Zoetic Cavern.
This commit is contained in:
Susucre 2024-04-13 12:10:53 +02:00 committed by GitHub
parent 31295eb645
commit c77634c843
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
142 changed files with 464 additions and 531 deletions

View file

@ -21,7 +21,6 @@ import java.util.Set;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author credman0 * @author credman0
*/ */
public class AminatousAugury extends CardImpl { public class AminatousAugury extends CardImpl {
@ -129,7 +128,7 @@ class AminatousAuguryEffect extends OneShotEffect {
class AminatousAuguryCastFromExileEffect extends AsThoughEffectImpl { class AminatousAuguryCastFromExileEffect extends AsThoughEffectImpl {
AminatousAuguryCastFromExileEffect() { AminatousAuguryCastFromExileEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.PlayForFree); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.PlayForFree);
staticText = "Cast this card without paying its mana cost"; staticText = "Cast this card without paying its mana cost";
} }

View file

@ -119,7 +119,7 @@ class ArvinoxTheMindFlailExileEffect extends OneShotEffect {
class ArvinoxTheMindFlailCastFromExileEffect extends AsThoughEffectImpl { class ArvinoxTheMindFlailCastFromExileEffect extends AsThoughEffectImpl {
ArvinoxTheMindFlailCastFromExileEffect() { ArvinoxTheMindFlailCastFromExileEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit);
} }
private ArvinoxTheMindFlailCastFromExileEffect(final ArvinoxTheMindFlailCastFromExileEffect effect) { private ArvinoxTheMindFlailCastFromExileEffect(final ArvinoxTheMindFlailCastFromExileEffect effect) {

View file

@ -56,7 +56,7 @@ public final class AssembleThePlayers extends CardImpl {
class AssembleThePlayersPlayTopEffect extends AsThoughEffectImpl { class AssembleThePlayersPlayTopEffect extends AsThoughEffectImpl {
AssembleThePlayersPlayTopEffect() { AssembleThePlayersPlayTopEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "Once each turn, you may cast a creature spell with power 2 or less from the top of your library"; staticText = "Once each turn, you may cast a creature spell with power 2 or less from the top of your library";
} }

View file

@ -100,7 +100,7 @@ class AuthorOfShadowsEffect extends OneShotEffect {
ExileZone exileZone = game.getExile().createZone(exileZoneId, exileZoneName); ExileZone exileZone = game.getExile().createZone(exileZoneId, exileZoneName);
game.getExile().moveToAnotherZone(card, game, exileZone); game.getExile().moveToAnotherZone(card, game, exileZone);
CardUtil.makeCardPlayable(game, source, card, Duration.Custom, true); CardUtil.makeCardPlayable(game, source, card, true, Duration.Custom, true);
return true; return true;
} }
} }

View file

@ -1,7 +1,6 @@
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
@ -12,11 +11,7 @@ import mage.abilities.keyword.FlashbackAbility;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AsThoughEffectType; import mage.constants.*;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
@ -24,8 +19,9 @@ import mage.game.events.ZoneChangeEvent;
import mage.players.Player; import mage.players.Player;
import mage.watchers.common.CastFromGraveyardWatcher; import mage.watchers.common.CastFromGraveyardWatcher;
import java.util.UUID;
/** /**
*
* @author spjspj & L_J * @author spjspj & L_J
*/ */
public final class BosiumStrip extends CardImpl { public final class BosiumStrip extends CardImpl {
@ -53,7 +49,7 @@ public final class BosiumStrip extends CardImpl {
class BosiumStripCastFromGraveyardEffect extends AsThoughEffectImpl { class BosiumStripCastFromGraveyardEffect extends AsThoughEffectImpl {
BosiumStripCastFromGraveyardEffect() { BosiumStripCastFromGraveyardEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
staticText = "Until end of turn, if the top card of your graveyard is an instant or sorcery card, you may cast that card"; staticText = "Until end of turn, if the top card of your graveyard is an instant or sorcery card, you may cast that card";
} }

View file

@ -98,7 +98,7 @@ class BrainstealerDragonExileEffect extends OneShotEffect {
player.moveCards(cards, Zone.EXILED, source, game); player.moveCards(cards, Zone.EXILED, source, game);
for (Card card : cards.getCards(game)) { for (Card card : cards.getCards(game)) {
CardUtil.makeCardPlayable( CardUtil.makeCardPlayable(
game, source, card, Duration.Custom, true, game, source, card, false, Duration.Custom, true,
source.getControllerId(), null source.getControllerId(), null
); );
} }

View file

@ -143,7 +143,7 @@ class BreechesBrazenPlundererEffect extends OneShotEffect {
return false; return false;
} }
for (Card card : cards.getCards(game)) { for (Card card : cards.getCards(game)) {
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, true); CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, true);
} }
return true; return true;
} }

View file

@ -1,12 +1,5 @@
package mage.cards.c; package mage.cards.c;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import mage.MageObjectReference; import mage.MageObjectReference;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.CaseAbility; import mage.abilities.common.CaseAbility;
@ -18,17 +11,8 @@ import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.hint.common.CaseSolvedHint; import mage.abilities.hint.common.CaseSolvedHint;
import mage.cards.Card; import mage.cards.*;
import mage.cards.Cards; import mage.constants.*;
import mage.cards.CardsImpl;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.WatcherScope;
import mage.constants.Zone;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
@ -39,6 +23,8 @@ import mage.target.common.TargetOpponentsCreaturePermanent;
import mage.util.CardUtil; import mage.util.CardUtil;
import mage.watchers.Watcher; import mage.watchers.Watcher;
import java.util.*;
/** /**
* Case of the Burning Masks {1}{R}{R} * Case of the Burning Masks {1}{R}{R}
* Enchantment - Case * Enchantment - Case
@ -64,7 +50,7 @@ public final class CaseOfTheBurningMasks extends CardImpl {
new SacrificeSourceCost().setText("sacrifice this Case"), SolvedSourceCondition.SOLVED); new SacrificeSourceCost().setText("sacrifice this Case"), SolvedSourceCondition.SOLVED);
this.addAbility(new CaseAbility(initialAbility, CaseOfTheBurningMasksCondition.instance, solvedAbility) this.addAbility(new CaseAbility(initialAbility, CaseOfTheBurningMasksCondition.instance, solvedAbility)
.addHint(new CaseOfTheBurningMasksHint()), .addHint(new CaseOfTheBurningMasksHint()),
new CaseOfTheBurningMasksWatcher()); new CaseOfTheBurningMasksWatcher());
} }
@ -189,7 +175,7 @@ class CaseOfTheBurningMasksEffect extends OneShotEffect {
card = game.getCard(target.getFirstTarget()); card = game.getCard(target.getFirstTarget());
} }
if (card != null) { if (card != null) {
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, false);
} }
return true; return true;
} }

View file

@ -90,7 +90,7 @@ class CavesOfChaosAdventurerEffect extends OneShotEffect {
Zone.EXILED, TargetController.YOU, Duration.EndOfTurn, true Zone.EXILED, TargetController.YOU, Duration.EndOfTurn, true
).setTargetPointer(new FixedTarget(card, game)), source); ).setTargetPointer(new FixedTarget(card, game)), source);
} else { } else {
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, false);
} }
return true; return true;
} }

View file

@ -30,7 +30,6 @@ import java.util.Set;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author weirddan455 * @author weirddan455
*/ */
public final class CemeteryIlluminator extends CardImpl { public final class CemeteryIlluminator extends CardImpl {
@ -53,7 +52,7 @@ public final class CemeteryIlluminator extends CardImpl {
// Once each turn, you may cast a spell from the top of your library if it shares a card type with a card exiled with Cemetery Illuminator. // Once each turn, you may cast a spell from the top of your library if it shares a card type with a card exiled with Cemetery Illuminator.
this.addAbility(new SimpleStaticAbility(new CemeteryIlluminatorPlayTopEffect()) this.addAbility(new SimpleStaticAbility(new CemeteryIlluminatorPlayTopEffect())
.setIdentifier(MageIdentifier.OnceEachTurnCastWatcher) .setIdentifier(MageIdentifier.OnceEachTurnCastWatcher)
.addHint(OnceEachTurnCastWatcher.getHint()), .addHint(OnceEachTurnCastWatcher.getHint()),
new OnceEachTurnCastWatcher()); new OnceEachTurnCastWatcher());
} }
@ -106,7 +105,7 @@ class CemeteryIlluminatorExileEffect extends OneShotEffect {
class CemeteryIlluminatorPlayTopEffect extends AsThoughEffectImpl { class CemeteryIlluminatorPlayTopEffect extends AsThoughEffectImpl {
CemeteryIlluminatorPlayTopEffect() { CemeteryIlluminatorPlayTopEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "Once each turn, you may cast a spell from the top of your library if it shares a card type with a card exiled with {this}"; staticText = "Once each turn, you may cast a spell from the top of your library if it shares a card type with a card exiled with {this}";
} }

View file

@ -64,7 +64,7 @@ public final class ChainerNightmareAdept extends CardImpl {
class ChainerNightmareAdeptContinuousEffect extends AsThoughEffectImpl { class ChainerNightmareAdeptContinuousEffect extends AsThoughEffectImpl {
ChainerNightmareAdeptContinuousEffect() { ChainerNightmareAdeptContinuousEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
staticText = "you may cast a creature spell from your graveyard this turn"; staticText = "you may cast a creature spell from your graveyard this turn";
} }
@ -95,6 +95,7 @@ class ChainerNightmareAdeptContinuousEffect extends AsThoughEffectImpl {
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
throw new IllegalArgumentException("Wrong code usage: can't call applies method on empty affectedAbility"); throw new IllegalArgumentException("Wrong code usage: can't call applies method on empty affectedAbility");
} }
@Override @Override
public boolean applies(UUID objectId, Ability affectedAbility, Ability source, Game game, UUID playerId) { public boolean applies(UUID objectId, Ability affectedAbility, Ability source, Game game, UUID playerId) {
ChainerNightmareAdeptWatcher watcher = game.getState().getWatcher(ChainerNightmareAdeptWatcher.class); ChainerNightmareAdeptWatcher watcher = game.getState().getWatcher(ChainerNightmareAdeptWatcher.class);

View file

@ -108,7 +108,7 @@ class ChandraHopesBeaconPlayEffect extends AsThoughEffectImpl {
private final Set<MageObjectReference> morSet = new HashSet<>(); private final Set<MageObjectReference> morSet = new HashSet<>();
ChandraHopesBeaconPlayEffect(Cards cards, Game game) { ChandraHopesBeaconPlayEffect(Cards cards, Game game) {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.UntilEndOfYourNextTurn, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.UntilEndOfYourNextTurn, Outcome.Benefit);
cards.stream() cards.stream()
.map(uuid -> new MageObjectReference(uuid, game)) .map(uuid -> new MageObjectReference(uuid, game))
.forEach(morSet::add); .forEach(morSet::add);

View file

@ -142,7 +142,7 @@ class ChandraLegacyOfFireExileEffect extends OneShotEffect {
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, count)); Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, count));
player.moveCards(cards, Zone.EXILED, source, game); player.moveCards(cards, Zone.EXILED, source, game);
for (Card card : cards.getCards(game)) { for (Card card : cards.getCards(game)) {
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, false);
} }
return true; return true;
} }

View file

@ -27,7 +27,7 @@ import java.util.*;
* @author Xanderhall, xenohedron * @author Xanderhall, xenohedron
*/ */
public final class ChissGoriaForgeTyrant extends CardImpl { public final class ChissGoriaForgeTyrant extends CardImpl {
public ChissGoriaForgeTyrant(UUID ownerId, CardSetInfo setInfo) { public ChissGoriaForgeTyrant(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{R}{R}{R}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{R}{R}{R}");
this.supertype.add(SuperType.LEGENDARY); this.supertype.add(SuperType.LEGENDARY);
@ -105,7 +105,7 @@ class ChissGoriaForgeTyrantCanPlayEffect extends AsThoughEffectImpl {
private final Set<MageObjectReference> morSet = new HashSet<>(); private final Set<MageObjectReference> morSet = new HashSet<>();
ChissGoriaForgeTyrantCanPlayEffect(Set<MageObjectReference> morSet) { ChissGoriaForgeTyrantCanPlayEffect(Set<MageObjectReference> morSet) {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
this.morSet.addAll(morSet); this.morSet.addAll(morSet);
} }
@ -131,10 +131,10 @@ class ChissGoriaForgeTyrantCanPlayEffect extends AsThoughEffectImpl {
} }
UUID objectIdToCast = CardUtil.getMainCardId(game, sourceId); UUID objectIdToCast = CardUtil.getMainCardId(game, sourceId);
Card card = game.getCard(objectIdToCast); Card card = game.getCard(objectIdToCast);
return (card != null && card.isArtifact(game) return (card != null && card.isArtifact(game)
&& morSet.stream().anyMatch(mor -> mor.refersTo(objectIdToCast, game)) && morSet.stream().anyMatch(mor -> mor.refersTo(objectIdToCast, game))
&& ChissGoriaForgeTyrantWatcher.checkRef(source, morSet, game)); && ChissGoriaForgeTyrantWatcher.checkRef(source, morSet, game));
} }
} }
@ -159,10 +159,10 @@ class ChissGoriaForgeTyrantAffinityEffect extends ContinuousEffectImpl {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
if (!ChissGoriaForgeTyrantWatcher.checkRef(source, morSet, game)) { if (!ChissGoriaForgeTyrantWatcher.checkRef(source, morSet, game)) {
discard(); discard();
return false; return false;
} }
for (Card card : game.getExile().getAllCardsByRange(game, source.getControllerId())) { for (Card card : game.getExile().getAllCardsByRange(game, source.getControllerId())) {
if (morSet.contains(new MageObjectReference(card, game)) && card.isArtifact(game)) { if (morSet.contains(new MageObjectReference(card, game)) && card.isArtifact(game)) {

View file

@ -28,14 +28,13 @@ import java.util.Set;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author htrajan * @author htrajan
*/ */
public final class ConspiracyTheorist extends CardImpl { public final class ConspiracyTheorist extends CardImpl {
public ConspiracyTheorist(UUID ownerId, CardSetInfo setInfo) { public ConspiracyTheorist(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SHAMAN); this.subtype.add(SubType.SHAMAN);
this.power = new MageInt(2); this.power = new MageInt(2);
@ -43,7 +42,7 @@ public final class ConspiracyTheorist extends CardImpl {
// Whenever Conspiracy Theorist attacks, you may pay {1} and discard a card. If you do, draw a card. // Whenever Conspiracy Theorist attacks, you may pay {1} and discard a card. If you do, draw a card.
this.addAbility(new AttacksTriggeredAbility(new DoIfCostPaid(new DrawCardSourceControllerEffect(1), this.addAbility(new AttacksTriggeredAbility(new DoIfCostPaid(new DrawCardSourceControllerEffect(1),
new CompositeCost(new ManaCostsImpl<>("{1}"), new DiscardCardCost(), "pay {1} and discard a card")) new CompositeCost(new ManaCostsImpl<>("{1}"), new DiscardCardCost(), "pay {1} and discard a card"))
.setText("you may pay {1} and discard a card. If you do, draw a card"), false)); .setText("you may pay {1} and discard a card. If you do, draw a card"), false));
// Whenever you discard one or more nonland cards, you may exile one of them from your graveyard. If you do, you may cast it this turn. // Whenever you discard one or more nonland cards, you may exile one of them from your graveyard. If you do, you may cast it this turn.
@ -121,13 +120,13 @@ class ConspiracyTheoristEffect extends OneShotEffect {
CardsImpl cards = new CardsImpl(discardedCards); CardsImpl cards = new CardsImpl(discardedCards);
TargetCard target = new TargetCard(Zone.GRAVEYARD, new FilterCard("card to exile")); TargetCard target = new TargetCard(Zone.GRAVEYARD, new FilterCard("card to exile"));
boolean validTarget = cards.stream() boolean validTarget = cards.stream()
.anyMatch(card -> target.canTarget(card, game)); .anyMatch(card -> target.canTarget(card, game));
if (validTarget && controller.chooseUse(Outcome.Benefit, "Exile a card?", source, game)) { if (validTarget && controller.chooseUse(Outcome.Benefit, "Exile a card?", source, game)) {
if (controller.choose(Outcome.Benefit, cards, target, source, game)) { if (controller.choose(Outcome.Benefit, cards, target, source, game)) {
Card card = cards.get(target.getFirstTarget(), game); Card card = cards.get(target.getFirstTarget(), game);
if (card != null && controller.moveCards(card, Zone.EXILED, source, game)) { if (card != null && controller.moveCards(card, Zone.EXILED, source, game)) {
// you may cast it this turn // you may cast it this turn
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false); CardUtil.makeCardPlayable(game, source, card, true, Duration.EndOfTurn, false);
} }
} }
} }

View file

@ -107,7 +107,7 @@ class CourtOfLocthwainFirstEffect extends OneShotEffect {
if (game.getState().getZone(card.getId()) == Zone.EXILED) { if (game.getState().getZone(card.getId()) == Zone.EXILED) {
CardUtil.makeCardPlayable( CardUtil.makeCardPlayable(
game, source, card, Duration.EndOfGame, game, source, card, false, Duration.EndOfGame,
true, controller.getId(), null true, controller.getId(), null
); );
} }
@ -160,7 +160,7 @@ class CourtOfLocthwainCastForFreeEffect extends AsThoughEffectImpl {
private final MageObjectReference mor; private final MageObjectReference mor;
public CourtOfLocthwainCastForFreeEffect(MageObjectReference mor) { public CourtOfLocthwainCastForFreeEffect(MageObjectReference mor) {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
this.mor = mor; this.mor = mor;
} }

View file

@ -91,7 +91,7 @@ class CovetousUrgeEffect extends OneShotEffect {
if (card.getSpellAbility() == null) { if (card.getSpellAbility() == null) {
return true; return true;
} }
CardUtil.makeCardPlayable(game, source, card, Duration.Custom, true); CardUtil.makeCardPlayable(game, source, card, true, Duration.Custom, true);
return true; return true;
} }
} }

View file

@ -115,7 +115,7 @@ class CunningRhetoricEffect extends OneShotEffect {
UUID exileZoneId = CardUtil.getExileZoneId(game, sourceObject.getId(), sourceObject.getZoneChangeCounter(game)); UUID exileZoneId = CardUtil.getExileZoneId(game, sourceObject.getId(), sourceObject.getZoneChangeCounter(game));
opponent.moveCardsToExile(card, source, game, true, exileZoneId, sourceObject.getIdName()); opponent.moveCardsToExile(card, source, game, true, exileZoneId, sourceObject.getIdName());
CardUtil.makeCardPlayable(game, source, card, Duration.Custom, true); CardUtil.makeCardPlayable(game, source, card, false, Duration.Custom, true);
return true; return true;
} }
} }

View file

@ -160,7 +160,7 @@ class CurseOfHospitalityEffect extends OneShotEffect {
if (player == null) { if (player == null) {
return true; return true;
} }
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, true, player.getId(), null); CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, true, player.getId(), null);
return true; return true;
} }
} }

View file

@ -90,7 +90,7 @@ class DaxosOfMeletisEffect extends OneShotEffect {
if (card.getSpellAbility() != null) { if (card.getSpellAbility() != null) {
// allow to cast the card // allow to cast the card
// and you may spend mana as though it were mana of any color to cast it // and you may spend mana as though it were mana of any color to cast it
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, true); CardUtil.makeCardPlayable(game, source, card, true, Duration.EndOfTurn, true);
} }
} }
return true; return true;

View file

@ -108,7 +108,7 @@ class DeadMansChestEffect extends OneShotEffect {
class DeadMansChestCastFromExileEffect extends AsThoughEffectImpl { class DeadMansChestCastFromExileEffect extends AsThoughEffectImpl {
DeadMansChestCastFromExileEffect() { DeadMansChestCastFromExileEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit);
staticText = "You may cast nonland cards from among them as long as they remain exiled"; staticText = "You may cast nonland cards from among them as long as they remain exiled";
} }

View file

@ -107,7 +107,7 @@ class ExpensiveTasteEffect extends OneShotEffect {
} }
exileZones.add(exileZoneId); exileZones.add(exileZoneId);
// allow to cast the card // allow to cast the card
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfGame, false, controller.getId(), null); CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfGame, false, controller.getId(), null);
// For as long as that card remains exiled, you may look at it // For as long as that card remains exiled, you may look at it
ContinuousEffect effect = new MayLookAtTargetCardEffect(controller.getId()); ContinuousEffect effect = new MayLookAtTargetCardEffect(controller.getId());
effect.setTargetPointer(new FixedTarget(card.getId(), game)); effect.setTargetPointer(new FixedTarget(card.getId(), game));

View file

@ -29,7 +29,6 @@ import mage.watchers.common.SpellsCastWatcher;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author weirddan455 * @author weirddan455
*/ */
public final class Demilich extends CardImpl { public final class Demilich extends CardImpl {
@ -98,7 +97,7 @@ enum DemilichValue implements DynamicValue {
class DemilichPlayEffect extends AsThoughEffectImpl { class DemilichPlayEffect extends AsThoughEffectImpl {
DemilichPlayEffect() { DemilichPlayEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
this.staticText = "You may cast {this} from your graveyard by exiling four instant and/or sorcery cards from your graveyard in addition to paying its other costs"; this.staticText = "You may cast {this} from your graveyard by exiling four instant and/or sorcery cards from your graveyard in addition to paying its other costs";
} }

View file

@ -72,7 +72,7 @@ public final class DemonicEmbrace extends CardImpl {
class DemonicEmbracePlayEffect extends AsThoughEffectImpl { class DemonicEmbracePlayEffect extends AsThoughEffectImpl {
DemonicEmbracePlayEffect() { DemonicEmbracePlayEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
staticText = "You may cast {this} from your graveyard by paying 3 life and discarding a card in addition to paying its other costs"; staticText = "You may cast {this} from your graveyard by paying 3 life and discarding a card in addition to paying its other costs";
} }

View file

@ -92,7 +92,7 @@ class DireFleetDaredevilEffect extends OneShotEffect {
Card card = game.getCard(targetCard.getId()); Card card = game.getCard(targetCard.getId());
if (card != null) { if (card != null) {
// you may play and spend any mana // you may play and spend any mana
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, true); CardUtil.makeCardPlayable(game, source, card, true, Duration.EndOfTurn, true);
// exile from graveyard // exile from graveyard
ContinuousEffect effect = new ThatSpellGraveyardExileReplacementEffect(false); ContinuousEffect effect = new ThatSpellGraveyardExileReplacementEffect(false);
effect.setTargetPointer(new FixedTarget(card, game)); effect.setTargetPointer(new FixedTarget(card, game));

View file

@ -102,7 +102,7 @@ class DraugrNecromancerReplacementEffect extends ReplacementEffectImpl {
class DraugrNecromancerCastFromExileEffect extends AsThoughEffectImpl { class DraugrNecromancerCastFromExileEffect extends AsThoughEffectImpl {
DraugrNecromancerCastFromExileEffect() { DraugrNecromancerCastFromExileEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "You may cast spells from among cards in exile your opponents own with ice counters on them"; staticText = "You may cast spells from among cards in exile your opponents own with ice counters on them";
} }

View file

@ -1,17 +1,16 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.AsThoughEffectImpl;
import mage.cards.Card;
import mage.constants.*;
import mage.abilities.keyword.FlashAbility; import mage.abilities.keyword.FlashAbility;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.NamePredicate; import mage.filter.predicate.mageobject.NamePredicate;
@ -20,8 +19,9 @@ import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent; import mage.game.events.ZoneChangeEvent;
import mage.watchers.Watcher; import mage.watchers.Watcher;
import java.util.UUID;
/** /**
*
* @author weirddan455 * @author weirddan455
*/ */
public final class EbondeathDracolich extends CardImpl { public final class EbondeathDracolich extends CardImpl {
@ -61,7 +61,7 @@ public final class EbondeathDracolich extends CardImpl {
class EbondeathDracolichEffect extends AsThoughEffectImpl { class EbondeathDracolichEffect extends AsThoughEffectImpl {
EbondeathDracolichEffect() { EbondeathDracolichEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
this.staticText = "You may cast {this} from your graveyard if a creature not named Ebondeath, Dracolich died this turn"; this.staticText = "You may cast {this} from your graveyard if a creature not named Ebondeath, Dracolich died this turn";
} }

View file

@ -68,7 +68,7 @@ class EcstaticBeautyEffect extends OneShotEffect {
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 3)); Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 3));
player.moveCards(cards, Zone.EXILED, source, game); player.moveCards(cards, Zone.EXILED, source, game);
for (Card card : cards.getCards(game)) { for (Card card : cards.getCards(game)) {
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, false);
if (card.getAbilities(game).containsClass(SuspendAbility.class)) { if (card.getAbilities(game).containsClass(SuspendAbility.class)) {
card.addCounters(CounterType.TIME.createInstance(4), source, game); card.addCounters(CounterType.TIME.createInstance(4), source, game);
} }

View file

@ -106,7 +106,7 @@ class ElderBrainEffect extends OneShotEffect {
player.drawCards(cards.size(), source, game); player.drawCards(cards.size(), source, game);
for (Card card : cards.getCards(game)) { for (Card card : cards.getCards(game)) {
CardUtil.makeCardPlayable( CardUtil.makeCardPlayable(
game, source, card, Duration.Custom, game, source, card, false, Duration.Custom,
true, controller.getId(), null true, controller.getId(), null
); );
} }

View file

@ -19,7 +19,6 @@ import mage.util.CardUtil;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author L_J * @author L_J
*/ */
public final class ElkinBottle extends CardImpl { public final class ElkinBottle extends CardImpl {
@ -66,7 +65,7 @@ class ElkinBottleExileEffect extends OneShotEffect {
Card card = controller.getLibrary().getFromTop(game); Card card = controller.getLibrary().getFromTop(game);
if (card != null) { if (card != null) {
controller.moveCardsToExile(card, source, game, true, source.getSourceId(), CardUtil.createObjectRealtedWindowTitle(source, game, null)); controller.moveCardsToExile(card, source, game, true, source.getSourceId(), CardUtil.createObjectRealtedWindowTitle(source, game, null));
CardUtil.makeCardPlayable(game, source, card, Duration.UntilYourNextUpkeepStep, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.UntilYourNextUpkeepStep, false);
} }
return true; return true;
} }

View file

@ -63,7 +63,7 @@ public final class EmryLurkerOfTheLoch extends CardImpl {
class EmryLurkerOfTheLochPlayEffect extends AsThoughEffectImpl { class EmryLurkerOfTheLochPlayEffect extends AsThoughEffectImpl {
EmryLurkerOfTheLochPlayEffect() { EmryLurkerOfTheLochPlayEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
staticText = "Choose target artifact card in your graveyard. You may cast that card this turn."; staticText = "Choose target artifact card in your graveyard. You may cast that card this turn.";
} }

View file

@ -70,7 +70,7 @@ class EruthTormentedProphetEffect extends ReplacementEffectImpl {
Set<Card> cards = player.getLibrary().getTopCards(game, 2); Set<Card> cards = player.getLibrary().getTopCards(game, 2);
player.moveCards(cards, Zone.EXILED, source, game); player.moveCards(cards, Zone.EXILED, source, game);
for (Card card : cards) { for (Card card : cards) {
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, false);
} }
return true; return true;
} }

View file

@ -16,7 +16,6 @@ import mage.game.Game;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class EternalScourge extends CardImpl { public final class EternalScourge extends CardImpl {
@ -49,7 +48,7 @@ public final class EternalScourge extends CardImpl {
class EternalScourgePlayEffect extends AsThoughEffectImpl { class EternalScourgePlayEffect extends AsThoughEffectImpl {
EternalScourgePlayEffect() { EternalScourgePlayEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
staticText = "You may cast {this} from exile"; staticText = "You may cast {this} from exile";
} }

View file

@ -34,14 +34,13 @@ import java.util.UUID;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
*
* @author Susucr * @author Susucr
*/ */
public final class ExtraordinaryJourney extends CardImpl { public final class ExtraordinaryJourney extends CardImpl {
public ExtraordinaryJourney(UUID ownerId, CardSetInfo setInfo) { public ExtraordinaryJourney(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{X}{X}{U}{U}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{X}{X}{U}{U}");
// When Extraordinary Journey enters the battlefield, exile up to X target creatures. For each of those cards, its owner may play it for as long as it remains exiled. // When Extraordinary Journey enters the battlefield, exile up to X target creatures. For each of those cards, its owner may play it for as long as it remains exiled.
Ability ability = new EntersBattlefieldTriggeredAbility(new ExtraordinaryJourneyEffect()); Ability ability = new EntersBattlefieldTriggeredAbility(new ExtraordinaryJourneyEffect());
@ -100,7 +99,7 @@ class ExtraordinaryJourneyEffect extends OneShotEffect {
// exile up to X target creatures. // exile up to X target creatures.
Effect effect = new ExileTargetEffect().setTargetPointer(new FixedTargets(permanents, game)); Effect effect = new ExileTargetEffect().setTargetPointer(new FixedTargets(permanents, game));
if(!effect.apply(game, source)) { if (!effect.apply(game, source)) {
return false; return false;
} }
game.getState().applyEffects(game); game.getState().applyEffects(game);
@ -127,11 +126,11 @@ class ExtraordinaryJourneyEffect extends OneShotEffect {
); );
ExileZone zone = game.getState().getExile().createZone(exileZoneId, exileZoneName); ExileZone zone = game.getState().getExile().createZone(exileZoneId, exileZoneName);
for(Card card : cards) { for (Card card : cards) {
if (card.getOwnerId().equals(owner.getId())) { if (card.getOwnerId().equals(owner.getId())) {
game.getExile().moveToAnotherZone(card, game, zone); game.getExile().moveToAnotherZone(card, game, zone);
CardUtil.makeCardPlayable( CardUtil.makeCardPlayable(
game, source, card, Duration.Custom, game, source, card, false, Duration.Custom,
false, card.getOwnerId(), null false, card.getOwnerId(), null
); );
} }
@ -147,7 +146,7 @@ class ExtraordinaryJourneyTriggeredAbility extends TriggeredAbilityImpl {
ExtraordinaryJourneyTriggeredAbility() { ExtraordinaryJourneyTriggeredAbility() {
super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1, "you"), false); super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1, "you"), false);
setTriggerPhrase("Whenever one or more nontoken creatures enter the battlefield, " setTriggerPhrase("Whenever one or more nontoken creatures enter the battlefield, "
+ "if one or more of them entered from exile or was cast from exile, "); + "if one or more of them entered from exile or was cast from exile, ");
setTriggersOnceEachTurn(true); setTriggersOnceEachTurn(true);
} }
@ -168,25 +167,25 @@ class ExtraordinaryJourneyTriggeredAbility extends TriggeredAbilityImpl {
@Override @Override
public boolean checkTrigger(GameEvent event, Game game) { public boolean checkTrigger(GameEvent event, Game game) {
EntersTheBattlefieldEvent zEvent = (EntersTheBattlefieldEvent) event; EntersTheBattlefieldEvent zEvent = (EntersTheBattlefieldEvent) event;
if(zEvent == null){ if (zEvent == null) {
return false; return false;
} }
Permanent permanent = zEvent.getTarget(); Permanent permanent = zEvent.getTarget();
if(permanent == null || !permanent.isCreature(game)) { if (permanent == null || !permanent.isCreature(game)) {
return false; return false;
} }
Zone fromZone = zEvent.getFromZone(); Zone fromZone = zEvent.getFromZone();
if(fromZone == Zone.EXILED) { if (fromZone == Zone.EXILED) {
// Directly from exile // Directly from exile
return true; return true;
} }
if(fromZone == Zone.STACK) { if (fromZone == Zone.STACK) {
// Get spell in the stack. // Get spell in the stack.
Spell spell = game.getSpellOrLKIStack(permanent.getId()); Spell spell = game.getSpellOrLKIStack(permanent.getId());
if(spell != null && spell.getFromZone() == Zone.EXILED) { if (spell != null && spell.getFromZone() == Zone.EXILED) {
// Creature was cast from exile // Creature was cast from exile
return true; return true;
} }

View file

@ -49,7 +49,7 @@ public final class FalcoSparaPactweaver extends CardImpl {
this.addAbility(new EntersBattlefieldAbility( this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.SHIELD.createInstance(1)), new AddCountersSourceEffect(CounterType.SHIELD.createInstance(1)),
"with a shield counter on it. <i>(If it would be dealt damage " "with a shield counter on it. <i>(If it would be dealt damage "
+ "or destroyed, remove a shield counter from it instead.)</i>" + "or destroyed, remove a shield counter from it instead.)</i>"
)); ));
// You may look at the top card of your library any time. // You may look at the top card of your library any time.
@ -75,7 +75,7 @@ public final class FalcoSparaPactweaver extends CardImpl {
class FalcoSparaPactweaverEffect extends AsThoughEffectImpl { class FalcoSparaPactweaverEffect extends AsThoughEffectImpl {
FalcoSparaPactweaverEffect() { FalcoSparaPactweaverEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.AIDontUseIt); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.AIDontUseIt);
staticText = "you may cast spells from the top of your library by removing " staticText = "you may cast spells from the top of your library by removing "
+ "a counter from a creature you control in addition to paying their other costs"; + "a counter from a creature you control in addition to paying their other costs";
} }

View file

@ -92,7 +92,7 @@ class FeldonRonomExcavatorEffect extends OneShotEffect {
card = game.getCard(target.getFirstTarget()); card = game.getCard(target.getFirstTarget());
} }
if (card != null) { if (card != null) {
CardUtil.makeCardPlayable(game, source, card, Duration.UntilEndOfYourNextTurn, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.UntilEndOfYourNextTurn, false);
} }
return true; return true;
} }

View file

@ -72,7 +72,7 @@ class FeralEncounterEffect extends LookLibraryAndPickControllerEffect {
boolean result = putPickedCards.moveCards(player, pickedCards, source, game); boolean result = putPickedCards.moveCards(player, pickedCards, source, game);
pickedCards.retainZone(Zone.EXILED, game); pickedCards.retainZone(Zone.EXILED, game);
for (Card card : pickedCards.getCards(game)) { for (Card card : pickedCards.getCards(game)) {
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false); CardUtil.makeCardPlayable(game, source, card, true, Duration.EndOfTurn, false);
} }
result |= putLookedCards.moveCards(player, otherCards, source, game); result |= putLookedCards.moveCards(player, otherCards, source, game);
return result; return result;

View file

@ -16,7 +16,6 @@ import mage.filter.common.FilterControlledPermanent;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.target.TargetCard; import mage.target.TargetCard;
import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetDiscard; import mage.target.common.TargetDiscard;
import mage.util.CardUtil; import mage.util.CardUtil;
@ -89,7 +88,7 @@ class FiendOfTheShadowsEffect extends OneShotEffect {
card, CardUtil.getExileZoneId(game, source), CardUtil.getSourceName(game, source), card, CardUtil.getExileZoneId(game, source), CardUtil.getSourceName(game, source),
source, game, Zone.HAND, true source, game, Zone.HAND, true
); );
CardUtil.makeCardPlayable(game, source, card, Duration.Custom, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.Custom, false);
return true; return true;
} }
} }

View file

@ -25,23 +25,22 @@ import mage.util.CardUtil;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author Susucr * @author Susucr
*/ */
public final class FiresOfMountDoom extends CardImpl { public final class FiresOfMountDoom extends CardImpl {
public FiresOfMountDoom(UUID ownerId, CardSetInfo setInfo) { public FiresOfMountDoom(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}");
this.supertype.add(SuperType.LEGENDARY); this.supertype.add(SuperType.LEGENDARY);
// When Fires of Mount Doom enters the battlefield, it deals 2 damage to target creature // When Fires of Mount Doom enters the battlefield, it deals 2 damage to target creature
// an opponent controls. Destroy all Equipment attached to that creature. // an opponent controls. Destroy all Equipment attached to that creature.
TriggeredAbility trigger = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)); TriggeredAbility trigger = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2));
trigger.addEffect( trigger.addEffect(
new DestroyAllAttachedToTargetEffect( new DestroyAllAttachedToTargetEffect(
StaticFilters.FILTER_PERMANENT_EQUIPMENT, StaticFilters.FILTER_PERMANENT_EQUIPMENT,
"that creature") "that creature")
); );
trigger.addTarget(new TargetOpponentsCreaturePermanent()); trigger.addTarget(new TargetOpponentsCreaturePermanent());
this.addAbility(trigger); this.addAbility(trigger);
@ -49,9 +48,9 @@ public final class FiresOfMountDoom extends CardImpl {
// {2}{R}: Exile the top card of your library. You may play that card this turn. // {2}{R}: Exile the top card of your library. You may play that card this turn.
// When you play a card this way, Fires of Mount Doom deals 2 damage to each player. // When you play a card this way, Fires of Mount Doom deals 2 damage to each player.
this.addAbility(new SimpleActivatedAbility( this.addAbility(new SimpleActivatedAbility(
Zone.BATTLEFIELD, Zone.BATTLEFIELD,
new FiresOfMountDoomEffect(), new FiresOfMountDoomEffect(),
new ManaCostsImpl<>("{2}{R}"))); new ManaCostsImpl<>("{2}{R}")));
} }
private FiresOfMountDoom(final FiresOfMountDoom card) { private FiresOfMountDoom(final FiresOfMountDoom card) {
@ -69,7 +68,7 @@ class FiresOfMountDoomEffect extends OneShotEffect {
FiresOfMountDoomEffect() { FiresOfMountDoomEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
this.staticText = "exile the top card of your library. You may play that card this turn. " + this.staticText = "exile the top card of your library. You may play that card this turn. " +
"When you play a card this way, Fires of Mount Doom deals 2 damage to each player"; "When you play a card this way, Fires of Mount Doom deals 2 damage to each player";
} }
private FiresOfMountDoomEffect(final FiresOfMountDoomEffect effect) { private FiresOfMountDoomEffect(final FiresOfMountDoomEffect effect) {
@ -85,7 +84,7 @@ class FiresOfMountDoomEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source); MageObject sourceObject = game.getObject(source);
if(controller == null || sourceObject == null){ if (controller == null || sourceObject == null) {
return false; return false;
} }
@ -95,7 +94,7 @@ class FiresOfMountDoomEffect extends OneShotEffect {
} }
controller.moveCardsToExile(card, source, game, true, source.getSourceId(), sourceObject.getIdName()); controller.moveCardsToExile(card, source, game, true, source.getSourceId(), sourceObject.getIdName());
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, false);
game.addDelayedTriggeredAbility(new FiresOfMountDoomDelayedTriggeredAbility(card.getId()), source); game.addDelayedTriggeredAbility(new FiresOfMountDoomDelayedTriggeredAbility(card.getId()), source);
return true; return true;
} }
@ -129,7 +128,7 @@ class FiresOfMountDoomDelayedTriggeredAbility extends DelayedTriggeredAbility {
public boolean checkEventType(GameEvent event, Game game) { public boolean checkEventType(GameEvent event, Game game) {
GameEvent.EventType type = event.getType(); GameEvent.EventType type = event.getType();
return type == GameEvent.EventType.PLAY_LAND return type == GameEvent.EventType.PLAY_LAND
|| type == GameEvent.EventType.SPELL_CAST; || type == GameEvent.EventType.SPELL_CAST;
} }
@Override @Override

View file

@ -86,10 +86,10 @@ class GalesRedirectionEffect extends RollDieWithResultTableEffect {
} }
if (result >= 15) { if (result >= 15) {
game.addEffect(new PlayFromNotOwnHandZoneTargetEffect( game.addEffect(new PlayFromNotOwnHandZoneTargetEffect(
Zone.EXILED, TargetController.YOU, Duration.Custom, true Zone.EXILED, TargetController.YOU, Duration.Custom, true, true
).setTargetPointer(new FixedTarget(card, game)), source); ).setTargetPointer(new FixedTarget(card, game)), source);
} else if (result >= 1) { } else if (result >= 1) {
CardUtil.makeCardPlayable(game, source, card, Duration.Custom, true); CardUtil.makeCardPlayable(game, source, card, true, Duration.Custom, true);
} }
return true; return true;
} }

View file

@ -25,7 +25,6 @@ import java.util.Set;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public class GlimpseTheCosmos extends CardImpl { public class GlimpseTheCosmos extends CardImpl {
@ -66,7 +65,7 @@ public class GlimpseTheCosmos extends CardImpl {
class GlimpseTheCosmosPlayEffect extends AsThoughEffectImpl { class GlimpseTheCosmosPlayEffect extends AsThoughEffectImpl {
GlimpseTheCosmosPlayEffect() { GlimpseTheCosmosPlayEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
staticText = "As long as you control a Giant, you may cast {this} from your graveyard by paying {U} rather than paying its mana cost"; staticText = "As long as you control a Giant, you may cast {this} from your graveyard by paying {U} rather than paying its mana cost";
} }

View file

@ -74,7 +74,7 @@ class GoblinResearcherEffect extends OneShotEffect {
} }
player.moveCards(card, Zone.EXILED, source, game); player.moveCards(card, Zone.EXILED, source, game);
CardUtil.makeCardPlayable( CardUtil.makeCardPlayable(
game, source, card, Duration.Custom, false, game, source, card, false, Duration.Custom, false,
source.getControllerId(), GoblinResearcherCondition.instance source.getControllerId(), GoblinResearcherCondition.instance
); );
return true; return true;

View file

@ -4,25 +4,18 @@ import mage.MageInt;
import mage.MageObject; import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.ExileFaceDownYouMayPlayAsLongAsExiledTargetEffect;
import mage.abilities.effects.AsThoughManaEffect;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.asthought.MayLookAtTargetCardEffect;
import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.*; import mage.cards.*;
import mage.constants.*; import mage.constants.*;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.game.Game; import mage.game.Game;
import mage.players.ManaPoolItem;
import mage.players.Player; import mage.players.Player;
import mage.target.TargetCard; import mage.target.TargetCard;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
import mage.util.CardUtil;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID; import java.util.UUID;
/** /**
@ -61,8 +54,6 @@ public final class GontiLordOfLuxury extends CardImpl {
class GontiLordOfLuxuryEffect extends OneShotEffect { class GontiLordOfLuxuryEffect extends OneShotEffect {
private static final String VALUE_PREFIX = "ExileZones";
public GontiLordOfLuxuryEffect() { public GontiLordOfLuxuryEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
this.staticText = "look at the top four cards of target opponent's library, exile one of them face down, then put the rest on the bottom of that library in a random order. You may look at and cast that card for as long as it remains exiled, and you may spend mana as though it were mana of any type to cast that spell"; this.staticText = "look at the top four cards of target opponent's library, exile one of them face down, then put the rest on the bottom of that library in a random order. You may look at and cast that card for as long as it remains exiled, and you may spend mana as though it were mana of any type to cast that spell";
@ -90,126 +81,14 @@ class GontiLordOfLuxuryEffect extends OneShotEffect {
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to exile")); TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to exile"));
controller.choose(outcome, topCards, target, source, game); controller.choose(outcome, topCards, target, source, game);
Card card = game.getCard(target.getFirstTarget()); Card card = game.getCard(target.getFirstTarget());
if (card == null) { if (card != null) {
controller.putCardsOnBottomOfLibrary(topCards, game, source, false); new ExileFaceDownYouMayPlayAsLongAsExiledTargetEffect(true, CastManaAdjustment.AS_THOUGH_ANY_MANA_TYPE)
return true; .setTargetPointer(new FixedTarget(card, game))
} .apply(game, source);
topCards.remove(card);
// move card to exile
UUID exileZoneId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
card.setFaceDown(true, game);
if (controller.moveCardsToExile(card, source, game, false, exileZoneId, sourceObject.getIdName())) {
card.setFaceDown(true, game);
Set<UUID> exileZones = (Set<UUID>) game.getState().getValue(VALUE_PREFIX + source.getSourceId().toString());
if (exileZones == null) {
exileZones = new HashSet<>();
game.getState().setValue(VALUE_PREFIX + source.getSourceId().toString(), exileZones);
}
exileZones.add(exileZoneId);
// allow to cast the card
ContinuousEffect effect = new GontiLordOfLuxuryCastFromExileEffect();
effect.setTargetPointer(new FixedTarget(card.getId(), game));
game.addEffect(effect, source);
// and you may spend mana as though it were mana of any color to cast it
effect = new GontiLordOfLuxurySpendAnyManaEffect();
effect.setTargetPointer(new FixedTarget(card.getId(), game));
game.addEffect(effect, source);
// For as long as that card remains exiled, you may look at it
effect = new MayLookAtTargetCardEffect(controller.getId());
effect.setTargetPointer(new FixedTarget(card.getId(), game));
game.addEffect(effect, source);
} }
topCards.retainZone(Zone.LIBRARY, game);
// then put the rest on the bottom of that library in a random order // then put the rest on the bottom of that library in a random order
controller.putCardsOnBottomOfLibrary(topCards, game, source, false); controller.putCardsOnBottomOfLibrary(topCards, game, source, false);
return true; return true;
} }
} }
class GontiLordOfLuxuryCastFromExileEffect extends AsThoughEffectImpl {
GontiLordOfLuxuryCastFromExileEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit);
staticText = "You may cast that card for as long as it remains exiled, and you may spend mana as though it were mana of any color to cast that spell";
}
private GontiLordOfLuxuryCastFromExileEffect(final GontiLordOfLuxuryCastFromExileEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
return true;
}
@Override
public GontiLordOfLuxuryCastFromExileEffect copy() {
return new GontiLordOfLuxuryCastFromExileEffect(this);
}
@Override
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
UUID targetId = getTargetPointer().getFirst(game, source);
if (targetId == null) {
this.discard(); // card is no longer in the origin zone, effect can be discarded
return false;
}
Card theCard = game.getCard(objectId);
if (theCard == null || theCard.isLand(game)) {
return false;
}
objectId = theCard.getMainCard().getId(); // for split cards
if (objectId.equals(targetId)
&& affectedControllerId.equals(source.getControllerId())) {
Card card = game.getCard(objectId);
// TODO: Allow to cast Zoetic Cavern face down
return card != null;
}
return false;
}
}
class GontiLordOfLuxurySpendAnyManaEffect extends AsThoughEffectImpl implements AsThoughManaEffect {
public GontiLordOfLuxurySpendAnyManaEffect() {
super(AsThoughEffectType.SPEND_OTHER_MANA, Duration.Custom, Outcome.Benefit);
staticText = "you may spend mana as though it were mana of any color to cast it";
}
private GontiLordOfLuxurySpendAnyManaEffect(final GontiLordOfLuxurySpendAnyManaEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
return true;
}
@Override
public GontiLordOfLuxurySpendAnyManaEffect copy() {
return new GontiLordOfLuxurySpendAnyManaEffect(this);
}
@Override
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
Card theCard = game.getCard(objectId);
if (theCard == null) {
return false;
}
objectId = theCard.getMainCard().getId(); // for split cards
if (objectId.equals(((FixedTarget) getTargetPointer()).getTarget())
&& game.getState().getZoneChangeCounter(objectId) <= ((FixedTarget) getTargetPointer()).getZoneChangeCounter() + 1) {
// if the card moved from exile to spell the zone change counter is increased by 1 (effect must applies before and on stack, use isCheckPlayableMode?)
return source.isControlledBy(affectedControllerId);
} else if (((FixedTarget) getTargetPointer()).getTarget().equals(objectId)) {
// object has moved zone so effect can be discarded
this.discard();
}
return false;
}
@Override
public ManaType getAsThoughManaType(ManaType manaType, ManaPoolItem mana, UUID affectedControllerId, Ability source, Game game) {
return mana.getFirstAvailable();
}
}

View file

@ -1,7 +1,6 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.CantBlockAbility; import mage.abilities.common.CantBlockAbility;
@ -14,14 +13,15 @@ import mage.constants.*;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game; import mage.game.Game;
import java.util.UUID;
/** /**
*
* @author BetaSteward * @author BetaSteward
*/ */
public final class Gravecrawler extends CardImpl { public final class Gravecrawler extends CardImpl {
public Gravecrawler(UUID ownerId, CardSetInfo setInfo) { public Gravecrawler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.ZOMBIE);
this.power = new MageInt(2); this.power = new MageInt(2);
@ -54,7 +54,7 @@ class GravecrawlerPlayEffect extends AsThoughEffectImpl {
} }
public GravecrawlerPlayEffect() { public GravecrawlerPlayEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
staticText = "You may cast {this} from your graveyard as long as you control a Zombie"; staticText = "You may cast {this} from your graveyard as long as you control a Zombie";
} }

View file

@ -152,7 +152,7 @@ class GrenzoHavocRaiserEffect extends OneShotEffect {
if (card.getSpellAbility() != null) { if (card.getSpellAbility() != null) {
// allow to cast the card // allow to cast the card
// and you may spend mana as though it were mana of any color to cast it // and you may spend mana as though it were mana of any color to cast it
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, true); CardUtil.makeCardPlayable(game, source, card, true, Duration.EndOfTurn, true);
} }
} }
return true; return true;

View file

@ -83,7 +83,7 @@ class GrinningTotemSearchAndExileEffect extends OneShotEffect {
if (card != null) { if (card != null) {
UUID exileZoneId = CardUtil.getCardExileZoneId(game, source); UUID exileZoneId = CardUtil.getCardExileZoneId(game, source);
you.moveCardsToExile(card, source, game, true, exileZoneId, CardUtil.getSourceName(game, source)); you.moveCardsToExile(card, source, game, true, exileZoneId, CardUtil.getSourceName(game, source));
CardUtil.makeCardPlayable(game, source, card, Duration.UntilYourNextUpkeepStep, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.UntilYourNextUpkeepStep, false);
game.addDelayedTriggeredAbility(new GrinningTotemDelayedTriggeredAbility(exileZoneId), source); game.addDelayedTriggeredAbility(new GrinningTotemDelayedTriggeredAbility(exileZoneId), source);
} }
targetOpponent.shuffleLibrary(source, game); targetOpponent.shuffleLibrary(source, game);

View file

@ -2,7 +2,6 @@
package mage.cards.h; package mage.cards.h;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.DiesSourceTriggeredAbility; import mage.abilities.common.DiesSourceTriggeredAbility;
@ -17,14 +16,15 @@ import mage.constants.*;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import java.util.UUID;
/** /**
*
* @author Mainiack11 * @author Mainiack11
*/ */
public final class HaakonStromgaldScourge extends CardImpl { public final class HaakonStromgaldScourge extends CardImpl {
public HaakonStromgaldScourge(UUID ownerId, CardSetInfo setInfo) { public HaakonStromgaldScourge(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
this.supertype.add(SuperType.LEGENDARY); this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.KNIGHT); this.subtype.add(SubType.KNIGHT);
@ -59,7 +59,7 @@ public final class HaakonStromgaldScourge extends CardImpl {
class HaakonStromgaldScourgePlayEffect extends AsThoughEffectImpl { class HaakonStromgaldScourgePlayEffect extends AsThoughEffectImpl {
HaakonStromgaldScourgePlayEffect() { HaakonStromgaldScourgePlayEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
staticText = "You may cast {this} from your graveyard"; staticText = "You may cast {this} from your graveyard";
} }
@ -103,12 +103,12 @@ class HaakonStromgaldScourgePlayEffect2 extends ContinuousRuleModifyingEffectImp
public HaakonStromgaldScourgePlayEffect2 copy() { public HaakonStromgaldScourgePlayEffect2 copy() {
return new HaakonStromgaldScourgePlayEffect2(this); return new HaakonStromgaldScourgePlayEffect2(this);
} }
@Override @Override
public boolean checksEventType(GameEvent event, Game game) { public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.CAST_SPELL; return event.getType() == GameEvent.EventType.CAST_SPELL;
} }
@Override @Override
public boolean applies(GameEvent event, Ability source, Game game) { public boolean applies(GameEvent event, Ability source, Game game) {
Card card = game.getCard(event.getSourceId()); Card card = game.getCard(event.getSourceId());
@ -122,8 +122,8 @@ class HaakonStromgaldScourgePlayEffect2 extends ContinuousRuleModifyingEffectImp
class HaakonPlayKnightsFromGraveyardEffect extends AsThoughEffectImpl { class HaakonPlayKnightsFromGraveyardEffect extends AsThoughEffectImpl {
public HaakonPlayKnightsFromGraveyardEffect () { public HaakonPlayKnightsFromGraveyardEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "As long as {this} is on the battlefield, you may cast Knight spells from your graveyard"; staticText = "As long as {this} is on the battlefield, you may cast Knight spells from your graveyard";
} }
@ -142,7 +142,7 @@ class HaakonPlayKnightsFromGraveyardEffect extends AsThoughEffectImpl {
} }
@Override @Override
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
if (affectedControllerId.equals(source.getControllerId())) { if (affectedControllerId.equals(source.getControllerId())) {
Card knightToCast = game.getCard(objectId); Card knightToCast = game.getCard(objectId);
return knightToCast != null return knightToCast != null

View file

@ -1,6 +1,5 @@
package mage.cards.h; package mage.cards.h;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.ActivatedAbility; import mage.abilities.ActivatedAbility;
@ -13,14 +12,7 @@ import mage.abilities.effects.OneShotEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AsThoughEffectType; import mage.constants.*;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.SubLayer;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreatureCard;
import mage.game.Game; import mage.game.Game;
@ -28,8 +20,9 @@ import mage.game.events.GameEvent;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.common.TargetCardInGraveyard; import mage.target.common.TargetCardInGraveyard;
import java.util.UUID;
/** /**
*
* @author BetaSteward * @author BetaSteward
*/ */
public final class HavengulLich extends CardImpl { public final class HavengulLich extends CardImpl {
@ -66,7 +59,7 @@ public final class HavengulLich extends CardImpl {
class HavengulLichPlayEffect extends AsThoughEffectImpl { class HavengulLichPlayEffect extends AsThoughEffectImpl {
HavengulLichPlayEffect() { HavengulLichPlayEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
staticText = "You may cast target creature card in a graveyard this turn"; staticText = "You may cast target creature card in a graveyard this turn";
} }

View file

@ -124,7 +124,7 @@ class HeadlinerScarlettExileEffect extends OneShotEffect {
controller.moveCardsToExile(card, source, game, false, exileId, exileName); controller.moveCardsToExile(card, source, game, false, exileId, exileName);
if (game.getState().getZone(card.getId()) == Zone.EXILED) { if (game.getState().getZone(card.getId()) == Zone.EXILED) {
card.setFaceDown(true, game); card.setFaceDown(true, game);
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, false);
ContinuousEffect effect = new HeadlinerScarlettLookEffect(controller.getId()); ContinuousEffect effect = new HeadlinerScarlettLookEffect(controller.getId());
effect.setTargetPointer(new FixedTarget(card, game)); effect.setTargetPointer(new FixedTarget(card, game));
game.addEffect(effect, source); game.addEffect(effect, source);

View file

@ -77,7 +77,7 @@ class HeartlessConscriptionEffect extends OneShotEffect {
game.getState().processAction(game); game.getState().processAction(game);
cards.retainZone(Zone.EXILED, game); cards.retainZone(Zone.EXILED, game);
for (Card card : cards.getCards(game)) { for (Card card : cards.getCards(game)) {
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfGame, true); CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfGame, true);
} }
return true; return true;
} }

View file

@ -123,7 +123,7 @@ class HedonistsTrovePlayLandEffect extends AsThoughEffectImpl {
class HedonistsTroveCastNonlandCardsEffect extends AsThoughEffectImpl { class HedonistsTroveCastNonlandCardsEffect extends AsThoughEffectImpl {
HedonistsTroveCastNonlandCardsEffect() { HedonistsTroveCastNonlandCardsEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "You may cast spells from among cards exiled with {this}. " staticText = "You may cast spells from among cards exiled with {this}. "
+ "You can't cast more than one spell this way each turn."; + "You can't cast more than one spell this way each turn.";
} }

View file

@ -62,7 +62,7 @@ class HelbruteEffect extends AsThoughEffectImpl {
} }
public HelbruteEffect() { public HelbruteEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
this.staticText = "you may cast {this} from your graveyard by exiling another " + this.staticText = "you may cast {this} from your graveyard by exiling another " +
"creature card from your graveyard in addition to paying its other costs."; "creature card from your graveyard in addition to paying its other costs.";
} }

View file

@ -95,7 +95,7 @@ class HoardingBroodlordEffect extends OneShotEffect {
if (card != null) { if (card != null) {
player.moveCards(card, Zone.EXILED, source, game); player.moveCards(card, Zone.EXILED, source, game);
card.setFaceDown(true, game); card.setFaceDown(true, game);
CardUtil.makeCardPlayable(game, source, card, Duration.Custom, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.Custom, false);
} }
return true; return true;
} }

View file

@ -91,7 +91,7 @@ class HostageTakerExileEffect extends OneShotEffect {
UUID exileId = CardUtil.getCardExileZoneId(game, source); UUID exileId = CardUtil.getCardExileZoneId(game, source);
controller.moveCardToExileWithInfo(card, exileId, permanent.getIdName(), source, game, Zone.BATTLEFIELD, true); controller.moveCardToExileWithInfo(card, exileId, permanent.getIdName(), source, game, Zone.BATTLEFIELD, true);
// allow to cast the card and you may spend mana as though it were mana of any color to cast it // allow to cast the card and you may spend mana as though it were mana of any color to cast it
CardUtil.makeCardPlayable(game, source, card, Duration.Custom, true); CardUtil.makeCardPlayable(game, source, card, true, Duration.Custom, true);
game.addDelayedTriggeredAbility(new OnLeaveReturnExiledAbility(), source); game.addDelayedTriggeredAbility(new OnLeaveReturnExiledAbility(), source);
return true; return true;
} }

View file

@ -117,7 +117,7 @@ class IceCauldronExileEffect extends OneShotEffect {
class IceCauldronCastFromExileEffect extends AsThoughEffectImpl { class IceCauldronCastFromExileEffect extends AsThoughEffectImpl {
IceCauldronCastFromExileEffect() { IceCauldronCastFromExileEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit);
staticText = "You may cast that card for as long as it remains exiled"; staticText = "You may cast that card for as long as it remains exiled";
} }

View file

@ -159,7 +159,7 @@ class IdolOfEnduranceLeaveEffect extends OneShotEffect {
class IdolOfEnduranceCastFromExileEffect extends AsThoughEffectImpl { class IdolOfEnduranceCastFromExileEffect extends AsThoughEffectImpl {
IdolOfEnduranceCastFromExileEffect() { IdolOfEnduranceCastFromExileEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
staticText = "until end of turn, you may cast a creature spell from among cards exiled with {this} without paying its mana cost"; staticText = "until end of turn, you may cast a creature spell from among cards exiled with {this} without paying its mana cost";
} }

View file

@ -68,10 +68,14 @@ class IntellectDevourerExileEffect extends OneShotEffect {
this.staticText = "each opponent exiles a card from their hand until {this} leaves the battlefield"; this.staticText = "each opponent exiles a card from their hand until {this} leaves the battlefield";
} }
private IntellectDevourerExileEffect(final IntellectDevourerExileEffect effect) {super(effect);} private IntellectDevourerExileEffect(final IntellectDevourerExileEffect effect) {
super(effect);
}
@Override @Override
public IntellectDevourerExileEffect copy() {return new IntellectDevourerExileEffect(this);} public IntellectDevourerExileEffect copy() {
return new IntellectDevourerExileEffect(this);
}
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
@ -105,7 +109,7 @@ class IntellectDevourerExileEffect extends OneShotEffect {
// Exile all chosen cards at the same time // Exile all chosen cards at the same time
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = source.getSourceObject(game); MageObject sourceObject = source.getSourceObject(game);
if (controller == null|| sourceObject == null) { if (controller == null || sourceObject == null) {
return false; return false;
} }
UUID exileZoneId = CardUtil.getExileZoneId(game, sourceObject.getId(), sourceObject.getZoneChangeCounter(game)); UUID exileZoneId = CardUtil.getExileZoneId(game, sourceObject.getId(), sourceObject.getZoneChangeCounter(game));
@ -120,7 +124,7 @@ class IntellectDevourerExileEffect extends OneShotEffect {
opponent.moveCardsToExile(opponentCardsToExile.getCards(game), source, game, false, exileZoneId, sourceObject.getIdName()); opponent.moveCardsToExile(opponentCardsToExile.getCards(game), source, game, false, exileZoneId, sourceObject.getIdName());
Card thisCard = opponentCardsToExile.getCards(game).iterator().next(); Card thisCard = opponentCardsToExile.getCards(game).iterator().next();
game.getState().setValue(thisCard.getId().toString() + game.getState().getZoneChangeCounter(thisCard.getId()), exileZoneId); game.getState().setValue(thisCard.getId().toString() + game.getState().getZoneChangeCounter(thisCard.getId()), exileZoneId);
CardUtil.makeCardPlayable(game, source, thisCard, Duration.Custom, true, source.getControllerId(), null); CardUtil.makeCardPlayable(game, source, thisCard, false, Duration.Custom, true, source.getControllerId(), null);
applied = true; applied = true;
} }
@ -136,10 +140,14 @@ class IntellectDevourerReturnCardsAbility extends DelayedTriggeredAbility {
this.setRuleVisible(false); this.setRuleVisible(false);
} }
private IntellectDevourerReturnCardsAbility(final IntellectDevourerReturnCardsAbility ability) {super(ability);} private IntellectDevourerReturnCardsAbility(final IntellectDevourerReturnCardsAbility ability) {
super(ability);
}
@Override @Override
public IntellectDevourerReturnCardsAbility copy() {return new IntellectDevourerReturnCardsAbility(this);} public IntellectDevourerReturnCardsAbility copy() {
return new IntellectDevourerReturnCardsAbility(this);
}
@Override @Override
public boolean checkEventType(GameEvent event, Game game) { public boolean checkEventType(GameEvent event, Game game) {
@ -165,10 +173,14 @@ class IntellectDevourerReturnExiledCardEffect extends OneShotEffect {
this.staticText = "Return exiled cards to their owners' hands"; this.staticText = "Return exiled cards to their owners' hands";
} }
private IntellectDevourerReturnExiledCardEffect(final IntellectDevourerReturnExiledCardEffect effect) {super(effect);} private IntellectDevourerReturnExiledCardEffect(final IntellectDevourerReturnExiledCardEffect effect) {
super(effect);
}
@Override @Override
public IntellectDevourerReturnExiledCardEffect copy() {return new IntellectDevourerReturnExiledCardEffect(this);} public IntellectDevourerReturnExiledCardEffect copy() {
return new IntellectDevourerReturnExiledCardEffect(this);
}
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {

View file

@ -29,7 +29,6 @@ import mage.watchers.Watcher;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author notgreat * @author notgreat
*/ */
public final class IntrepidPaleontologist extends CardImpl { public final class IntrepidPaleontologist extends CardImpl {
@ -70,7 +69,7 @@ public final class IntrepidPaleontologist extends CardImpl {
class IntrepidPaleontologistPlayEffect extends AsThoughEffectImpl { class IntrepidPaleontologistPlayEffect extends AsThoughEffectImpl {
IntrepidPaleontologistPlayEffect() { IntrepidPaleontologistPlayEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "You may cast Dinosaur creature spells from among cards you own exiled with {this}. If you cast a spell this way, that creature enters the battlefield with a finality counter on it."; staticText = "You may cast Dinosaur creature spells from among cards you own exiled with {this}. If you cast a spell this way, that creature enters the battlefield with a finality counter on it.";
} }
@ -94,7 +93,7 @@ class IntrepidPaleontologistPlayEffect extends AsThoughEffectImpl {
Card card = game.getCard(objectId); Card card = game.getCard(objectId);
MageObject sourceObject = game.getObject(source); MageObject sourceObject = game.getObject(source);
if (card != null && sourceObject != null && affectedAbility instanceof SpellAbility) { if (card != null && sourceObject != null && affectedAbility instanceof SpellAbility) {
Card characteristics = ((SpellAbility)affectedAbility).getCharacteristics(game); Card characteristics = ((SpellAbility) affectedAbility).getCharacteristics(game);
if (card.getOwnerId().equals(playerId) && characteristics.isCreature(game) && characteristics.hasSubtype(SubType.DINOSAUR, game)) { if (card.getOwnerId().equals(playerId) && characteristics.isCreature(game) && characteristics.hasSubtype(SubType.DINOSAUR, game)) {
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), sourceObject.getZoneChangeCounter(game)); UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), sourceObject.getZoneChangeCounter(game));
ExileZone exileZone = game.getState().getExile().getExileZone(exileId); ExileZone exileZone = game.getState().getExile().getExileZone(exileId);

View file

@ -68,7 +68,7 @@ class InvasionOfKaldheimEffect extends OneShotEffect {
player.moveCards(cards, Zone.EXILED, source, game); player.moveCards(cards, Zone.EXILED, source, game);
player.drawCards(cards.size(), source, game); player.drawCards(cards.size(), source, game);
for (Card card : cards.getCards(game)) { for (Card card : cards.getCards(game)) {
CardUtil.makeCardPlayable(game, source, card, Duration.UntilEndOfYourNextTurn, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.UntilEndOfYourNextTurn, false);
} }
return true; return true;
} }

View file

@ -108,7 +108,7 @@ class JayaFieryNegotiatorExileEffect extends OneShotEffect {
player.moveCardsToExile(exileCards, source, game, true, CardUtil.getExileZoneId(game, source), "Jaya, Fiery Negotiator"); player.moveCardsToExile(exileCards, source, game, true, CardUtil.getExileZoneId(game, source), "Jaya, Fiery Negotiator");
} }
if (card != null) { if (card != null) {
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, false);
} }
return true; return true;
} }

View file

@ -58,7 +58,7 @@ public final class JohannApprenticeSorcerer extends CardImpl {
class JohannApprenticeSorcererPlayTopEffect extends AsThoughEffectImpl { class JohannApprenticeSorcererPlayTopEffect extends AsThoughEffectImpl {
JohannApprenticeSorcererPlayTopEffect() { JohannApprenticeSorcererPlayTopEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "Once each turn, you may cast an instant or sorcery spell from the top of your library"; staticText = "Once each turn, you may cast an instant or sorcery spell from the top of your library";
} }

View file

@ -1,12 +1,5 @@
package mage.cards.k; package mage.cards.k;
import java.util.UUID;
import mage.constants.SuperType;
import mage.game.ExileZone;
import mage.game.Game;
import mage.players.Player;
import mage.target.targetpointer.FixedTarget;
import mage.util.CardUtil;
import mage.MageObject; import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
@ -18,20 +11,23 @@ import mage.abilities.effects.OneShotEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AsThoughEffectType; import mage.constants.*;
import mage.constants.CardType; import mage.game.ExileZone;
import mage.constants.Duration; import mage.game.Game;
import mage.constants.Outcome; import mage.players.Player;
import mage.target.targetpointer.FixedTarget;
import mage.util.CardUtil;
import java.util.UUID;
/** /**
*
* @author Xanderhall * @author Xanderhall
*/ */
public final class KaylasMusicBox extends CardImpl { public final class KaylasMusicBox extends CardImpl {
public KaylasMusicBox(UUID ownerId, CardSetInfo setInfo) { public KaylasMusicBox(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
this.supertype.add(SuperType.LEGENDARY); this.supertype.add(SuperType.LEGENDARY);
// {W}, {T}: Look at the top card of your library, then exile it face down. // {W}, {T}: Look at the top card of your library, then exile it face down.
@ -163,7 +159,7 @@ class KaylasMusicBoxPlayFromExileEffect extends AsThoughEffectImpl {
if (exileZone == null || !exileZone.contains(sourceId)) { if (exileZone == null || !exileZone.contains(sourceId)) {
return false; return false;
} }
CardUtil.makeCardPlayable(game, source, exileZone.get(sourceId, game), Duration.EndOfTurn, false); CardUtil.makeCardPlayable(game, source, exileZone.get(sourceId, game), false, Duration.EndOfTurn, false);
return true; return true;
} }
} }

View file

@ -60,7 +60,7 @@ public final class KessDissidentMage extends CardImpl {
class KessDissidentMageCastFromGraveyardEffect extends AsThoughEffectImpl { class KessDissidentMageCastFromGraveyardEffect extends AsThoughEffectImpl {
KessDissidentMageCastFromGraveyardEffect() { KessDissidentMageCastFromGraveyardEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "During each of your turns, you may cast an instant or sorcery card from your graveyard"; staticText = "During each of your turns, you may cast an instant or sorcery card from your graveyard";
} }

View file

@ -22,7 +22,6 @@ import mage.util.CardUtil;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author varaghar * @author varaghar
*/ */
public final class KingNarfisBetrayal extends CardImpl { public final class KingNarfisBetrayal extends CardImpl {
@ -146,7 +145,7 @@ class KingNarfisBetrayalSecondEffect extends OneShotEffect {
ExileZone exileZone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)); ExileZone exileZone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source));
if (exileZone != null) { if (exileZone != null) {
for (Card card : exileZone.getCards(game)) { for (Card card : exileZone.getCards(game)) {
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, true); CardUtil.makeCardPlayable(game, source, card, true, Duration.EndOfTurn, true);
} }
} }

View file

@ -96,7 +96,7 @@ class KorvoldAndTheNobleThiefEffect extends OneShotEffect {
cards.retainZone(Zone.EXILED, game); cards.retainZone(Zone.EXILED, game);
for (Card card : cards.getCards(game)) { for (Card card : cards.getCards(game)) {
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, false);
} }
return true; return true;
} }

View file

@ -129,7 +129,7 @@ class KotoseTheSilentSpiderEffect extends OneShotEffect {
KotoseTheSilentSpiderWatcher.addCards(source, cardSet, game); KotoseTheSilentSpiderWatcher.addCards(source, cardSet, game);
for (Card exiledCard : cardSet) { for (Card exiledCard : cardSet) {
CardUtil.makeCardPlayable( CardUtil.makeCardPlayable(
game, source, exiledCard, Duration.WhileControlled, true, game, source, exiledCard, false, Duration.WhileControlled, true,
null, new KotoseTheSilentSpiderCondition(exiledCard, game) null, new KotoseTheSilentSpiderCondition(exiledCard, game)
); );
} }

View file

@ -112,7 +112,7 @@ class LaughingJasperFlintEffect extends OneShotEffect {
} }
controller.moveCards(cards, Zone.EXILED, source, game); controller.moveCards(cards, Zone.EXILED, source, game);
for (Card card : cards.getCards(game)) { for (Card card : cards.getCards(game)) {
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, true); CardUtil.makeCardPlayable(game, source, card, true, Duration.EndOfTurn, true);
} }
return true; return true;
} }

View file

@ -83,7 +83,7 @@ class LidlessGazeEffect extends OneShotEffect {
cards.retainZone(Zone.EXILED, game); cards.retainZone(Zone.EXILED, game);
for (Card card : cards.getCards(game)) { for (Card card : cards.getCards(game)) {
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn,
true, controller.getId(), null); true, controller.getId(), null);
} }

View file

@ -95,7 +95,7 @@ class LilianaUntouchedByDeathEffect extends OneShotEffect {
class LilianaUntouchedByDeathGraveyardEffect extends AsThoughEffectImpl { class LilianaUntouchedByDeathGraveyardEffect extends AsThoughEffectImpl {
LilianaUntouchedByDeathGraveyardEffect() { LilianaUntouchedByDeathGraveyardEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
staticText = "You may cast Zombie cards from your graveyard this turn"; staticText = "You may cast Zombie cards from your graveyard this turn";
} }

View file

@ -96,7 +96,7 @@ class LukkaCoppercoatOutcastCastEffect extends AsThoughEffectImpl {
private static final FilterPermanent filter = new FilterPlaneswalkerPermanent(SubType.LUKKA); private static final FilterPermanent filter = new FilterPlaneswalkerPermanent(SubType.LUKKA);
LukkaCoppercoatOutcastCastEffect() { LukkaCoppercoatOutcastCastEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit);
this.staticText = "You may cast this card from exile as long as you control a Lukka planeswalker."; this.staticText = "You may cast this card from exile as long as you control a Lukka planeswalker.";
} }

View file

@ -52,7 +52,7 @@ public final class MaestrosAscendancy extends CardImpl {
class MaestrosAscendancyCastEffect extends AsThoughEffectImpl { class MaestrosAscendancyCastEffect extends AsThoughEffectImpl {
MaestrosAscendancyCastEffect() { MaestrosAscendancyCastEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.AIDontUseIt); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.AIDontUseIt);
staticText = "once during each of your turns, you may cast an instant or sorcery spell " + staticText = "once during each of your turns, you may cast an instant or sorcery spell " +
"from your graveyard by sacrificing a creature in addition to paying its other costs."; "from your graveyard by sacrificing a creature in addition to paying its other costs.";
} }

View file

@ -1,7 +1,6 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.Ability; import mage.abilities.Ability;
@ -13,25 +12,21 @@ import mage.abilities.effects.common.combat.CantBlockSourceEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AsThoughEffectType; import mage.constants.*;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game; import mage.game.Game;
import java.util.UUID;
/** /**
*
* @author emerald000 * @author emerald000
*/ */
public final class MarangRiverProwler extends CardImpl { public final class MarangRiverProwler extends CardImpl {
public MarangRiverProwler(UUID ownerId, CardSetInfo setInfo) { public MarangRiverProwler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ROGUE); this.subtype.add(SubType.ROGUE);
this.power = new MageInt(2); this.power = new MageInt(2);
@ -43,7 +38,7 @@ public final class MarangRiverProwler extends CardImpl {
effect.setText("and can't be blocked"); effect.setText("and can't be blocked");
ability.addEffect(effect); ability.addEffect(effect);
this.addAbility(ability); this.addAbility(ability);
// You may cast Marang River Prowler from your graveyard as long as you control a black or green permanent. // You may cast Marang River Prowler from your graveyard as long as you control a black or green permanent.
this.addAbility(new SimpleStaticAbility(Zone.GRAVEYARD, new MarangRiverProwlerCastEffect())); this.addAbility(new SimpleStaticAbility(Zone.GRAVEYARD, new MarangRiverProwlerCastEffect()));
} }
@ -59,14 +54,15 @@ public final class MarangRiverProwler extends CardImpl {
} }
class MarangRiverProwlerCastEffect extends AsThoughEffectImpl { class MarangRiverProwlerCastEffect extends AsThoughEffectImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a black or green permanent"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("a black or green permanent");
static { static {
filter.add(Predicates.or(new ColorPredicate(ObjectColor.BLACK), new ColorPredicate(ObjectColor.GREEN))); filter.add(Predicates.or(new ColorPredicate(ObjectColor.BLACK), new ColorPredicate(ObjectColor.GREEN)));
} }
MarangRiverProwlerCastEffect() { MarangRiverProwlerCastEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
staticText = "You may cast {this} from your graveyard as long as you control a black or green permanent"; staticText = "You may cast {this} from your graveyard as long as you control a black or green permanent";
} }
@ -88,7 +84,7 @@ class MarangRiverProwlerCastEffect extends AsThoughEffectImpl {
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
if (sourceId.equals(source.getSourceId())) { if (sourceId.equals(source.getSourceId())) {
Card card = game.getCard(source.getSourceId()); Card card = game.getCard(source.getSourceId());
if (card != null if (card != null
&& card.isOwnedBy(affectedControllerId) && card.isOwnedBy(affectedControllerId)
&& game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD && game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD
&& game.getBattlefield().count(filter, source.getControllerId(), source, game) > 0) { && game.getBattlefield().count(filter, source.getControllerId(), source, game) > 0) {

View file

@ -90,7 +90,7 @@ class MarchOfRecklessJoyEffect extends OneShotEffect {
); );
for (Card card : cards) { for (Card card : cards) {
CardUtil.makeCardPlayable( CardUtil.makeCardPlayable(
game, source, card, Duration.UntilEndOfYourNextTurn, game, source, card, false, Duration.UntilEndOfYourNextTurn,
false, null, MarchOfRecklessJoyCondition.instance false, null, MarchOfRecklessJoyCondition.instance
); );
} }

View file

@ -1,7 +1,5 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.MageIdentifier; import mage.MageIdentifier;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
@ -17,9 +15,9 @@ import mage.abilities.effects.AsThoughEffectImpl;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.counter.AddCounterChoiceSourceEffect; import mage.abilities.effects.common.counter.AddCounterChoiceSourceEffect;
import mage.constants.*;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.counters.Counter; import mage.counters.Counter;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.counters.Counters; import mage.counters.Counters;
@ -30,15 +28,16 @@ import mage.game.events.ZoneChangeEvent;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCardInHand; import mage.target.common.TargetCardInHand;
import java.util.UUID;
/** /**
*
* @author Skiwkr * @author Skiwkr
*/ */
public final class MeTheImmortal extends CardImpl { public final class MeTheImmortal extends CardImpl {
public MeTheImmortal(UUID ownerId, CardSetInfo setInfo) { public MeTheImmortal(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{U}{R}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{U}{R}");
this.supertype.add(SuperType.LEGENDARY); this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ROGUE); this.subtype.add(SubType.ROGUE);
@ -139,7 +138,7 @@ class MeTheImmortalEffect extends ReplacementEffectImpl {
class MeTheImmortalCastEffect extends AsThoughEffectImpl { class MeTheImmortalCastEffect extends AsThoughEffectImpl {
MeTheImmortalCastEffect() { MeTheImmortalCastEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
this.staticText = "you may cast {this} from your graveyard " + this.staticText = "you may cast {this} from your graveyard " +
"by discarding two cards in addition to paying its other costs"; "by discarding two cards in addition to paying its other costs";
} }

View file

@ -85,7 +85,7 @@ class MeetingOfTheFiveExileEffect extends OneShotEffect {
class MeetingOfTheFiveCastEffect extends CanPlayCardControllerEffect { class MeetingOfTheFiveCastEffect extends CanPlayCardControllerEffect {
MeetingOfTheFiveCastEffect(Game game, Card card) { MeetingOfTheFiveCastEffect(Game game, Card card) {
super(game, card.getId(), card.getZoneChangeCounter(game), Duration.EndOfTurn); super(game, card.getId(), card.getZoneChangeCounter(game), true, Duration.EndOfTurn);
} }
private MeetingOfTheFiveCastEffect(final MeetingOfTheFiveCastEffect effect) { private MeetingOfTheFiveCastEffect(final MeetingOfTheFiveCastEffect effect) {

View file

@ -74,7 +74,7 @@ class MemoryVesselExileEffect extends OneShotEffect {
player.moveCards(cards, Zone.EXILED, source, game); player.moveCards(cards, Zone.EXILED, source, game);
for (Card card : cards) { for (Card card : cards) {
CardUtil.makeCardPlayable( CardUtil.makeCardPlayable(
game, source, card, Duration.UntilYourNextTurn, game, source, card, false, Duration.UntilYourNextTurn,
false, playerId, null false, playerId, null
); );
} }

View file

@ -85,7 +85,7 @@ class MezzioMuggerEffect extends OneShotEffect {
} }
player.moveCards(cards, Zone.EXILED, source, game); player.moveCards(cards, Zone.EXILED, source, game);
for (Card card : cards) { for (Card card : cards) {
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, true); CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, true);
} }
return true; return true;
} }

View file

@ -92,7 +92,7 @@ class MishrasResearchDeskEffect extends OneShotEffect {
if (card == null) { if (card == null) {
return false; return false;
} }
CardUtil.makeCardPlayable(game, source, card, Duration.UntilEndOfYourNextTurn, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.UntilEndOfYourNextTurn, false);
return true; return true;
} }
} }

View file

@ -1,7 +1,6 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -10,16 +9,12 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AsThoughEffectType; import mage.constants.*;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class MisthollowGriffin extends CardImpl { public final class MisthollowGriffin extends CardImpl {
@ -50,7 +45,7 @@ public final class MisthollowGriffin extends CardImpl {
class MisthollowGriffinPlayEffect extends AsThoughEffectImpl { class MisthollowGriffinPlayEffect extends AsThoughEffectImpl {
MisthollowGriffinPlayEffect() { MisthollowGriffinPlayEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
staticText = "You may cast {this} from exile"; staticText = "You may cast {this} from exile";
} }

View file

@ -91,7 +91,7 @@ class MnemonicBetrayalExileEffect extends OneShotEffect {
if (card.isLand(game)) { if (card.isLand(game)) {
continue; continue;
} }
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, true); CardUtil.makeCardPlayable(game, source, card, true, Duration.EndOfTurn, true);
} }
cards.retainZone(Zone.EXILED, game); cards.retainZone(Zone.EXILED, game);
game.addDelayedTriggeredAbility(new MnemonicBetrayalDelayedTriggeredAbility( game.addDelayedTriggeredAbility(new MnemonicBetrayalDelayedTriggeredAbility(

View file

@ -125,7 +125,7 @@ class MonkClassEffect extends OneShotEffect {
class MonkClassCastEffect extends AsThoughEffectImpl { class MonkClassCastEffect extends AsThoughEffectImpl {
MonkClassCastEffect() { MonkClassCastEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit);
staticText = "you may cast this card from exile as long as you've cast another spell this turn"; staticText = "you may cast this card from exile as long as you've cast another spell this turn";
} }

View file

@ -91,7 +91,7 @@ class NahirisWarcraftingEffect extends OneShotEffect {
Card card = game.getCard(target.getFirstTarget()); Card card = game.getCard(target.getFirstTarget());
if (card != null) { if (card != null) {
player.moveCards(card, Zone.EXILED, source, game); player.moveCards(card, Zone.EXILED, source, game);
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, false);
} }
cards.retainZone(Zone.LIBRARY, game); cards.retainZone(Zone.LIBRARY, game);
player.putCardsOnBottomOfLibrary(cards, game, source, false); player.putCardsOnBottomOfLibrary(cards, game, source, false);

View file

@ -1,7 +1,5 @@
package mage.cards.n; package mage.cards.n;
import java.util.Set;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.MageObject; import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
@ -19,8 +17,10 @@ import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
import java.util.Set;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class NarsetEnlightenedMaster extends CardImpl { public final class NarsetEnlightenedMaster extends CardImpl {
@ -94,7 +94,7 @@ class NarsetEnlightenedMasterExileEffect extends OneShotEffect {
class NarsetEnlightenedMasterCastFromExileEffect extends AsThoughEffectImpl { class NarsetEnlightenedMasterCastFromExileEffect extends AsThoughEffectImpl {
NarsetEnlightenedMasterCastFromExileEffect() { NarsetEnlightenedMasterCastFromExileEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
staticText = "Until end of turn, you may cast noncreature cards exiled with {this} this turn without paying their mana costs"; staticText = "Until end of turn, you may cast noncreature cards exiled with {this} this turn without paying their mana costs";
} }

View file

@ -167,7 +167,7 @@ class NashiMoonSagesScionWatcher extends Watcher {
class NashiMoonSagesScionPlayEffect extends CanPlayCardControllerEffect { class NashiMoonSagesScionPlayEffect extends CanPlayCardControllerEffect {
NashiMoonSagesScionPlayEffect(Game game, Card card) { NashiMoonSagesScionPlayEffect(Game game, Card card) {
super(game, card.getMainCard().getId(), card.getZoneChangeCounter(game), Duration.EndOfTurn); super(game, card.getMainCard().getId(), card.getZoneChangeCounter(game), false, Duration.EndOfTurn);
} }
private NashiMoonSagesScionPlayEffect(final NashiMoonSagesScionPlayEffect effect) { private NashiMoonSagesScionPlayEffect(final NashiMoonSagesScionPlayEffect effect) {

View file

@ -134,7 +134,7 @@ class NeyaliSunsVanguardEffect extends OneShotEffect {
} }
player.moveCardsToExile(card, source, game, true, CardUtil.getExileZoneId(game, source), CardUtil.getSourceName(game, source)); player.moveCardsToExile(card, source, game, true, CardUtil.getExileZoneId(game, source), CardUtil.getSourceName(game, source));
CardUtil.makeCardPlayable( CardUtil.makeCardPlayable(
game, source, card, Duration.Custom, false, game, source, card, false, Duration.Custom, false,
source.getControllerId(), NeyaliSunsVanguardWatcher::checkPlayer source.getControllerId(), NeyaliSunsVanguardWatcher::checkPlayer
); );
return true; return true;

View file

@ -1,7 +1,6 @@
package mage.cards.n; package mage.cards.n;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
@ -13,19 +12,16 @@ import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AsThoughEffectType; import mage.constants.*;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.players.Library; import mage.players.Library;
import mage.players.Player; import mage.players.Player;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
import mage.util.CardUtil; import mage.util.CardUtil;
import java.util.UUID;
/** /**
*
* @author emerald000 * @author emerald000
*/ */
public final class NivixAerieOfTheFiremind extends CardImpl { public final class NivixAerieOfTheFiremind extends CardImpl {
@ -92,7 +88,7 @@ class NivixAerieOfTheFiremindEffect extends OneShotEffect {
class NivixAerieOfTheFiremindCanCastEffect extends AsThoughEffectImpl { class NivixAerieOfTheFiremindCanCastEffect extends AsThoughEffectImpl {
NivixAerieOfTheFiremindCanCastEffect() { NivixAerieOfTheFiremindCanCastEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.UntilYourNextTurn, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.UntilYourNextTurn, Outcome.Benefit);
staticText = "Until your next turn, you may cast that card"; staticText = "Until your next turn, you may cast that card";
} }

View file

@ -50,7 +50,7 @@ public final class OathswornVampire extends CardImpl {
class OathswornVampirePlayEffect extends AsThoughEffectImpl { class OathswornVampirePlayEffect extends AsThoughEffectImpl {
OathswornVampirePlayEffect() { OathswornVampirePlayEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
staticText = "You may cast {this} from your graveyard if you gained life this turn"; staticText = "You may cast {this} from your graveyard if you gained life this turn";
} }

View file

@ -77,7 +77,7 @@ enum OneWithTheMultiverseCondition implements Condition {
class OneWithTheMultiverseEffect extends AsThoughEffectImpl { class OneWithTheMultiverseEffect extends AsThoughEffectImpl {
OneWithTheMultiverseEffect() { OneWithTheMultiverseEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.PlayForFree); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.PlayForFree);
staticText = "once during each of your turns, you may cast a spell from your hand " + staticText = "once during each of your turns, you may cast a spell from your hand " +
"or the top of your library without paying its mana cost."; "or the top of your library without paying its mana cost.";
} }

View file

@ -13,6 +13,7 @@ import mage.constants.*;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.LibrarySearchedEvent; import mage.game.events.LibrarySearchedEvent;
import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.util.CardUtil; import mage.util.CardUtil;
@ -20,7 +21,6 @@ import java.util.Objects;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import mage.game.permanent.Permanent;
/** /**
* @author JayDi85 * @author JayDi85
@ -104,7 +104,7 @@ class OppositionAgentReplacementEffect extends ReplacementEffectImpl {
// You may play those cards for as long as they remain exiled, and you may spend mana as though it were mana of any color to cast them // You may play those cards for as long as they remain exiled, and you may spend mana as though it were mana of any color to cast them
for (Card card : cardsToExile) { for (Card card : cardsToExile) {
// the source ability is tied to the effect so we need to keep it active to work correctly // the source ability is tied to the effect so we need to keep it active to work correctly
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfGame, true); CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfGame, true);
} }
// return false all the time // return false all the time

View file

@ -1,8 +1,5 @@
package mage.cards.o; package mage.cards.o;
import java.util.Set;
import java.util.UUID;
import mage.MageObject; import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.ContinuousEffect;
@ -20,8 +17,10 @@ import mage.target.common.TargetOpponent;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
import mage.util.CardUtil; import mage.util.CardUtil;
import java.util.Set;
import java.util.UUID;
/** /**
*
* @author DominionSpy * @author DominionSpy
*/ */
public final class OutrageousRobbery extends CardImpl { public final class OutrageousRobbery extends CardImpl {
@ -91,7 +90,7 @@ class OutrageousRobberyEffect extends OneShotEffect {
game.addEffect(effect, source); game.addEffect(effect, source);
CardUtil.makeCardPlayable( CardUtil.makeCardPlayable(
game, source, card, Duration.Custom, true, game, source, card, false, Duration.Custom, true,
source.getControllerId(), null); source.getControllerId(), null);
} }
} }

View file

@ -95,7 +95,7 @@ class PlaneswalkersMischiefEffect extends OneShotEffect {
class PlaneswalkersMischiefCastFromExileEffect extends AsThoughEffectImpl { class PlaneswalkersMischiefCastFromExileEffect extends AsThoughEffectImpl {
PlaneswalkersMischiefCastFromExileEffect() { PlaneswalkersMischiefCastFromExileEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit);
staticText = "You may cast that card without paying its mana cost as long as it remains exiled"; staticText = "You may cast that card without paying its mana cost as long as it remains exiled";
} }

View file

@ -124,7 +124,7 @@ class PsychicIntrusionExileEffect extends OneShotEffect {
class PsychicIntrusionCastFromExileEffect extends AsThoughEffectImpl { class PsychicIntrusionCastFromExileEffect extends AsThoughEffectImpl {
PsychicIntrusionCastFromExileEffect() { PsychicIntrusionCastFromExileEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.Custom, Outcome.Benefit);
staticText = "You may cast that card for as long as it remains exiled, and you may spend mana as though it were mana of any color to cast that spell"; staticText = "You may cast that card for as long as it remains exiled, and you may spend mana as though it were mana of any color to cast that spell";
} }

View file

@ -91,7 +91,7 @@ class PsychicTheftEffect extends OneShotEffect {
} }
controller.moveCardToExileWithInfo(chosenCard, CardUtil.getExileZoneId(game, source), CardUtil.getSourceName(game, source), source, game, Zone.HAND, true); controller.moveCardToExileWithInfo(chosenCard, CardUtil.getExileZoneId(game, source), CardUtil.getSourceName(game, source), source, game, Zone.HAND, true);
CardUtil.makeCardPlayable(game, source, chosenCard, Duration.Custom, false); CardUtil.makeCardPlayable(game, source, chosenCard, true, Duration.Custom, false);
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility( game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(
new ConditionalOneShotEffect( new ConditionalOneShotEffect(

View file

@ -89,7 +89,7 @@ class QuintoriusKandEffect extends OneShotEffect {
player.moveCards(cards, Zone.EXILED, source, game); player.moveCards(cards, Zone.EXILED, source, game);
player.getManaPool().addMana(Mana.RedMana(cards.size()), game, source); player.getManaPool().addMana(Mana.RedMana(cards.size()), game, source);
for (Card card : cards.getCards(game)) { for (Card card : cards.getCards(game)) {
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false); CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, false);
} }
return true; return true;
} }

View file

@ -27,7 +27,7 @@ import java.util.UUID;
public final class RaffinesGuidance extends CardImpl { public final class RaffinesGuidance extends CardImpl {
public RaffinesGuidance(UUID ownerId, CardSetInfo setInfo) { public RaffinesGuidance(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}");
this.subtype.add(SubType.AURA); this.subtype.add(SubType.AURA);
// Enchant creature // Enchant creature
@ -58,7 +58,7 @@ public final class RaffinesGuidance extends CardImpl {
class RafinnesGuidancePlayEffect extends AsThoughEffectImpl { class RafinnesGuidancePlayEffect extends AsThoughEffectImpl {
RafinnesGuidancePlayEffect() { RafinnesGuidancePlayEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
staticText = "You may cast {this} from your graveyard by paying {2}{W} rather than paying its mana cost."; staticText = "You may cast {this} from your graveyard by paying {2}{W} rather than paying its mana cost.";
} }

View file

@ -112,7 +112,7 @@ class RakdosTheMuscleEffect extends OneShotEffect {
// remove cards that could not be moved to exile // remove cards that could not be moved to exile
cards.removeIf(card -> !Zone.EXILED.equals(game.getState().getZone(card.getId()))); cards.removeIf(card -> !Zone.EXILED.equals(game.getState().getZone(card.getId())));
for (Card card : cards) { for (Card card : cards) {
CardUtil.makeCardPlayable(game, source, card, Duration.UntilYourNextEndStep, true, controller.getId(), null); CardUtil.makeCardPlayable(game, source, card, false, Duration.UntilYourNextEndStep, true, controller.getId(), null);
} }
return true; return true;
} }

View file

@ -82,7 +82,7 @@ class RamirezDePietroPillagerEffect extends OneShotEffect {
return false; return false;
} }
player.moveCards(card, Zone.EXILED, source, game); player.moveCards(card, Zone.EXILED, source, game);
CardUtil.makeCardPlayable(game, source, card, Duration.Custom, false, source.getControllerId(), null); CardUtil.makeCardPlayable(game, source, card, true, Duration.Custom, false, source.getControllerId(), null);
return true; return true;
} }
} }

View file

@ -1,8 +1,6 @@
package mage.cards.r; package mage.cards.r;
import java.util.UUID;
import mage.MageIdentifier; import mage.MageIdentifier;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
@ -12,7 +10,6 @@ import mage.abilities.costs.mana.ManaCost;
import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.AsThoughEffectImpl;
import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -21,12 +18,12 @@ import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherPredicate; import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.stack.Spell;
import mage.players.Player; import mage.players.Player;
import mage.util.CardUtil; import mage.util.CardUtil;
import java.util.UUID;
/** /**
*
* @author LevelX2, Susucr * @author LevelX2, Susucr
*/ */
public final class RisenExecutioner extends CardImpl { public final class RisenExecutioner extends CardImpl {
@ -76,7 +73,7 @@ class RisenExecutionerCastEffect extends AsThoughEffectImpl {
} }
RisenExecutionerCastEffect() { RisenExecutionerCastEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
staticText = "You may cast {this} from your graveyard if you pay {1} more to cast it for each other creature card in your graveyard"; staticText = "You may cast {this} from your graveyard if you pay {1} more to cast it for each other creature card in your graveyard";
} }
@ -100,14 +97,14 @@ class RisenExecutionerCastEffect extends AsThoughEffectImpl {
return false; return false;
} }
Card card = game.getCard(source.getSourceId()); Card card = game.getCard(source.getSourceId());
if(card == null if (card == null
|| !card.isOwnedBy(affectedControllerId) || !card.isOwnedBy(affectedControllerId)
|| game.getState().getZone(source.getSourceId()) != Zone.GRAVEYARD) { || game.getState().getZone(source.getSourceId()) != Zone.GRAVEYARD) {
return false; return false;
} }
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
if(controller == null) { if (controller == null) {
return false; return false;
} }
int costIncrease = controller.getGraveyard().count(filter, source.getControllerId(), source, game); int costIncrease = controller.getGraveyard().count(filter, source.getControllerId(), source, game);

View file

@ -15,7 +15,6 @@ import mage.counters.CounterType;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.permanent.token.FoodToken; import mage.game.permanent.token.FoodToken;
import mage.game.permanent.token.TreasureToken;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import mage.util.CardUtil; import mage.util.CardUtil;
@ -85,7 +84,7 @@ class RoccoStreetChefEffect extends OneShotEffect {
} }
player.moveCards(card, Zone.EXILED, source, game); player.moveCards(card, Zone.EXILED, source, game);
CardUtil.makeCardPlayable( CardUtil.makeCardPlayable(
game, source, card, Duration.UntilYourNextEndStep, game, source, card, false, Duration.UntilYourNextEndStep,
false, playerId, null false, playerId, null
); );
} }

View file

@ -1,7 +1,6 @@
package mage.cards.r; package mage.cards.r;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.MageObject; import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
@ -16,21 +15,16 @@ import mage.abilities.effects.common.ExileTargetEffect;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AsThoughEffectType; import mage.constants.*;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterHistoricCard; import mage.filter.common.FilterHistoricCard;
import mage.game.ExileZone; import mage.game.ExileZone;
import mage.game.Game; import mage.game.Game;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
import mage.util.CardUtil; import mage.util.CardUtil;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class RonaDiscipleOfGix extends CardImpl { public final class RonaDiscipleOfGix extends CardImpl {
@ -79,7 +73,7 @@ public final class RonaDiscipleOfGix extends CardImpl {
class RonaDiscipleOfGixPlayNonLandEffect extends AsThoughEffectImpl { class RonaDiscipleOfGixPlayNonLandEffect extends AsThoughEffectImpl {
RonaDiscipleOfGixPlayNonLandEffect() { RonaDiscipleOfGixPlayNonLandEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit); super(AsThoughEffectType.CAST_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "You may cast nonland cards exiled with {this}"; staticText = "You may cast nonland cards exiled with {this}";
} }

Some files were not shown because too many files have changed in this diff Show more