mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
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:
parent
31295eb645
commit
c77634c843
142 changed files with 464 additions and 531 deletions
|
|
@ -21,7 +21,6 @@ import java.util.Set;
|
|||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author credman0
|
||||
*/
|
||||
public class AminatousAugury extends CardImpl {
|
||||
|
|
@ -129,7 +128,7 @@ class AminatousAuguryEffect extends OneShotEffect {
|
|||
class AminatousAuguryCastFromExileEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ class ArvinoxTheMindFlailExileEffect extends OneShotEffect {
|
|||
class ArvinoxTheMindFlailCastFromExileEffect extends AsThoughEffectImpl {
|
||||
|
||||
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) {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public final class AssembleThePlayers extends CardImpl {
|
|||
class AssembleThePlayersPlayTopEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ class AuthorOfShadowsEffect extends OneShotEffect {
|
|||
ExileZone exileZone = game.getExile().createZone(exileZoneId, exileZoneName);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
|
|
@ -12,11 +11,7 @@ import mage.abilities.keyword.FlashbackAbility;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
|
@ -24,8 +19,9 @@ import mage.game.events.ZoneChangeEvent;
|
|||
import mage.players.Player;
|
||||
import mage.watchers.common.CastFromGraveyardWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj & L_J
|
||||
*/
|
||||
public final class BosiumStrip extends CardImpl {
|
||||
|
|
@ -53,7 +49,7 @@ public final class BosiumStrip extends CardImpl {
|
|||
class BosiumStripCastFromGraveyardEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class BrainstealerDragonExileEffect extends OneShotEffect {
|
|||
player.moveCards(cards, Zone.EXILED, source, game);
|
||||
for (Card card : cards.getCards(game)) {
|
||||
CardUtil.makeCardPlayable(
|
||||
game, source, card, Duration.Custom, true,
|
||||
game, source, card, false, Duration.Custom, true,
|
||||
source.getControllerId(), null
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ class BreechesBrazenPlundererEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
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.abilities.Ability;
|
||||
import mage.abilities.common.CaseAbility;
|
||||
|
|
@ -18,17 +11,8 @@ import mage.abilities.decorator.ConditionalActivatedAbility;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.hint.common.CaseSolvedHint;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.Cards;
|
||||
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.cards.*;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
|
@ -39,6 +23,8 @@ import mage.target.common.TargetOpponentsCreaturePermanent;
|
|||
import mage.util.CardUtil;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Case of the Burning Masks {1}{R}{R}
|
||||
* Enchantment - Case
|
||||
|
|
@ -64,7 +50,7 @@ public final class CaseOfTheBurningMasks extends CardImpl {
|
|||
new SacrificeSourceCost().setText("sacrifice this Case"), SolvedSourceCondition.SOLVED);
|
||||
|
||||
this.addAbility(new CaseAbility(initialAbility, CaseOfTheBurningMasksCondition.instance, solvedAbility)
|
||||
.addHint(new CaseOfTheBurningMasksHint()),
|
||||
.addHint(new CaseOfTheBurningMasksHint()),
|
||||
new CaseOfTheBurningMasksWatcher());
|
||||
}
|
||||
|
||||
|
|
@ -189,7 +175,7 @@ class CaseOfTheBurningMasksEffect extends OneShotEffect {
|
|||
card = game.getCard(target.getFirstTarget());
|
||||
}
|
||||
if (card != null) {
|
||||
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false);
|
||||
CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class CavesOfChaosAdventurerEffect extends OneShotEffect {
|
|||
Zone.EXILED, TargetController.YOU, Duration.EndOfTurn, true
|
||||
).setTargetPointer(new FixedTarget(card, game)), source);
|
||||
} else {
|
||||
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false);
|
||||
CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ import java.util.Set;
|
|||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
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.
|
||||
this.addAbility(new SimpleStaticAbility(new CemeteryIlluminatorPlayTopEffect())
|
||||
.setIdentifier(MageIdentifier.OnceEachTurnCastWatcher)
|
||||
.setIdentifier(MageIdentifier.OnceEachTurnCastWatcher)
|
||||
.addHint(OnceEachTurnCastWatcher.getHint()),
|
||||
new OnceEachTurnCastWatcher());
|
||||
}
|
||||
|
|
@ -106,7 +105,7 @@ class CemeteryIlluminatorExileEffect extends OneShotEffect {
|
|||
class CemeteryIlluminatorPlayTopEffect extends AsThoughEffectImpl {
|
||||
|
||||
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}";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public final class ChainerNightmareAdept extends CardImpl {
|
|||
class ChainerNightmareAdeptContinuousEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
@ -95,6 +95,7 @@ class ChainerNightmareAdeptContinuousEffect extends AsThoughEffectImpl {
|
|||
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");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability affectedAbility, Ability source, Game game, UUID playerId) {
|
||||
ChainerNightmareAdeptWatcher watcher = game.getState().getWatcher(ChainerNightmareAdeptWatcher.class);
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class ChandraHopesBeaconPlayEffect extends AsThoughEffectImpl {
|
|||
private final Set<MageObjectReference> morSet = new HashSet<>();
|
||||
|
||||
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()
|
||||
.map(uuid -> new MageObjectReference(uuid, game))
|
||||
.forEach(morSet::add);
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ class ChandraLegacyOfFireExileEffect extends OneShotEffect {
|
|||
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, count));
|
||||
player.moveCards(cards, Zone.EXILED, source, 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import java.util.*;
|
|||
* @author Xanderhall, xenohedron
|
||||
*/
|
||||
public final class ChissGoriaForgeTyrant extends CardImpl {
|
||||
|
||||
|
||||
public ChissGoriaForgeTyrant(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{R}{R}{R}");
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
|
|
@ -105,7 +105,7 @@ class ChissGoriaForgeTyrantCanPlayEffect extends AsThoughEffectImpl {
|
|||
private final Set<MageObjectReference> morSet = new HashSet<>();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
@ -131,10 +131,10 @@ class ChissGoriaForgeTyrantCanPlayEffect extends AsThoughEffectImpl {
|
|||
}
|
||||
UUID objectIdToCast = CardUtil.getMainCardId(game, sourceId);
|
||||
Card card = game.getCard(objectIdToCast);
|
||||
|
||||
|
||||
return (card != null && card.isArtifact(game)
|
||||
&& morSet.stream().anyMatch(mor -> mor.refersTo(objectIdToCast, game))
|
||||
&& ChissGoriaForgeTyrantWatcher.checkRef(source, morSet, game));
|
||||
&& morSet.stream().anyMatch(mor -> mor.refersTo(objectIdToCast, game))
|
||||
&& ChissGoriaForgeTyrantWatcher.checkRef(source, morSet, game));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -159,10 +159,10 @@ class ChissGoriaForgeTyrantAffinityEffect extends ContinuousEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if (!ChissGoriaForgeTyrantWatcher.checkRef(source, morSet, game)) {
|
||||
discard();
|
||||
return false;
|
||||
}
|
||||
if (!ChissGoriaForgeTyrantWatcher.checkRef(source, morSet, game)) {
|
||||
discard();
|
||||
return false;
|
||||
}
|
||||
|
||||
for (Card card : game.getExile().getAllCardsByRange(game, source.getControllerId())) {
|
||||
if (morSet.contains(new MageObjectReference(card, game)) && card.isArtifact(game)) {
|
||||
|
|
|
|||
|
|
@ -28,14 +28,13 @@ import java.util.Set;
|
|||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author htrajan
|
||||
*/
|
||||
public final class ConspiracyTheorist extends CardImpl {
|
||||
|
||||
public ConspiracyTheorist(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.SHAMAN);
|
||||
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.
|
||||
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));
|
||||
|
||||
// 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);
|
||||
TargetCard target = new TargetCard(Zone.GRAVEYARD, new FilterCard("card to exile"));
|
||||
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 (controller.choose(Outcome.Benefit, cards, target, source, game)) {
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null && controller.moveCards(card, Zone.EXILED, source, game)) {
|
||||
// you may cast it this turn
|
||||
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false);
|
||||
CardUtil.makeCardPlayable(game, source, card, true, Duration.EndOfTurn, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ class CourtOfLocthwainFirstEffect extends OneShotEffect {
|
|||
|
||||
if (game.getState().getZone(card.getId()) == Zone.EXILED) {
|
||||
CardUtil.makeCardPlayable(
|
||||
game, source, card, Duration.EndOfGame,
|
||||
game, source, card, false, Duration.EndOfGame,
|
||||
true, controller.getId(), null
|
||||
);
|
||||
}
|
||||
|
|
@ -160,7 +160,7 @@ class CourtOfLocthwainCastForFreeEffect extends AsThoughEffectImpl {
|
|||
private final 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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class CovetousUrgeEffect extends OneShotEffect {
|
|||
if (card.getSpellAbility() == null) {
|
||||
return true;
|
||||
}
|
||||
CardUtil.makeCardPlayable(game, source, card, Duration.Custom, true);
|
||||
CardUtil.makeCardPlayable(game, source, card, true, Duration.Custom, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ class CunningRhetoricEffect extends OneShotEffect {
|
|||
|
||||
UUID exileZoneId = CardUtil.getExileZoneId(game, sourceObject.getId(), sourceObject.getZoneChangeCounter(game));
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ class CurseOfHospitalityEffect extends OneShotEffect {
|
|||
if (player == null) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class DaxosOfMeletisEffect extends OneShotEffect {
|
|||
if (card.getSpellAbility() != null) {
|
||||
// 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.EndOfTurn, true);
|
||||
CardUtil.makeCardPlayable(game, source, card, true, Duration.EndOfTurn, true);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class DeadMansChestEffect extends OneShotEffect {
|
|||
class DeadMansChestCastFromExileEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ class ExpensiveTasteEffect extends OneShotEffect {
|
|||
}
|
||||
exileZones.add(exileZoneId);
|
||||
// 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
|
||||
ContinuousEffect effect = new MayLookAtTargetCardEffect(controller.getId());
|
||||
effect.setTargetPointer(new FixedTarget(card.getId(), game));
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import mage.watchers.common.SpellsCastWatcher;
|
|||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class Demilich extends CardImpl {
|
||||
|
|
@ -98,7 +97,7 @@ enum DemilichValue implements DynamicValue {
|
|||
class DemilichPlayEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public final class DemonicEmbrace extends CardImpl {
|
|||
class DemonicEmbracePlayEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class DireFleetDaredevilEffect extends OneShotEffect {
|
|||
Card card = game.getCard(targetCard.getId());
|
||||
if (card != null) {
|
||||
// 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
|
||||
ContinuousEffect effect = new ThatSpellGraveyardExileReplacementEffect(false);
|
||||
effect.setTargetPointer(new FixedTarget(card, game));
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ class DraugrNecromancerReplacementEffect extends ReplacementEffectImpl {
|
|||
class DraugrNecromancerCastFromExileEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,16 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.*;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
|
|
@ -20,8 +19,9 @@ import mage.game.events.GameEvent;
|
|||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class EbondeathDracolich extends CardImpl {
|
||||
|
|
@ -61,7 +61,7 @@ public final class EbondeathDracolich extends CardImpl {
|
|||
class EbondeathDracolichEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class EcstaticBeautyEffect extends OneShotEffect {
|
|||
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 3));
|
||||
player.moveCards(cards, Zone.EXILED, source, 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)) {
|
||||
card.addCounters(CounterType.TIME.createInstance(4), source, game);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ class ElderBrainEffect extends OneShotEffect {
|
|||
player.drawCards(cards.size(), source, game);
|
||||
for (Card card : cards.getCards(game)) {
|
||||
CardUtil.makeCardPlayable(
|
||||
game, source, card, Duration.Custom,
|
||||
game, source, card, false, Duration.Custom,
|
||||
true, controller.getId(), null
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ import mage.util.CardUtil;
|
|||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author L_J
|
||||
*/
|
||||
public final class ElkinBottle extends CardImpl {
|
||||
|
|
@ -66,7 +65,7 @@ class ElkinBottleExileEffect extends OneShotEffect {
|
|||
Card card = controller.getLibrary().getFromTop(game);
|
||||
if (card != 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public final class EmryLurkerOfTheLoch extends CardImpl {
|
|||
class EmryLurkerOfTheLochPlayEffect extends AsThoughEffectImpl {
|
||||
|
||||
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.";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class EruthTormentedProphetEffect extends ReplacementEffectImpl {
|
|||
Set<Card> cards = player.getLibrary().getTopCards(game, 2);
|
||||
player.moveCards(cards, Zone.EXILED, source, game);
|
||||
for (Card card : cards) {
|
||||
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false);
|
||||
CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import mage.game.Game;
|
|||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class EternalScourge extends CardImpl {
|
||||
|
|
@ -49,7 +48,7 @@ public final class EternalScourge extends CardImpl {
|
|||
class EternalScourgePlayEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,14 +34,13 @@ import java.util.UUID;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class ExtraordinaryJourney extends CardImpl {
|
||||
|
||||
public ExtraordinaryJourney(UUID ownerId, CardSetInfo setInfo) {
|
||||
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.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new ExtraordinaryJourneyEffect());
|
||||
|
|
@ -100,7 +99,7 @@ class ExtraordinaryJourneyEffect extends OneShotEffect {
|
|||
|
||||
// exile up to X target creatures.
|
||||
Effect effect = new ExileTargetEffect().setTargetPointer(new FixedTargets(permanents, game));
|
||||
if(!effect.apply(game, source)) {
|
||||
if (!effect.apply(game, source)) {
|
||||
return false;
|
||||
}
|
||||
game.getState().applyEffects(game);
|
||||
|
|
@ -127,11 +126,11 @@ class ExtraordinaryJourneyEffect extends OneShotEffect {
|
|||
);
|
||||
|
||||
ExileZone zone = game.getState().getExile().createZone(exileZoneId, exileZoneName);
|
||||
for(Card card : cards) {
|
||||
for (Card card : cards) {
|
||||
if (card.getOwnerId().equals(owner.getId())) {
|
||||
game.getExile().moveToAnotherZone(card, game, zone);
|
||||
CardUtil.makeCardPlayable(
|
||||
game, source, card, Duration.Custom,
|
||||
game, source, card, false, Duration.Custom,
|
||||
false, card.getOwnerId(), null
|
||||
);
|
||||
}
|
||||
|
|
@ -147,7 +146,7 @@ class ExtraordinaryJourneyTriggeredAbility extends TriggeredAbilityImpl {
|
|||
ExtraordinaryJourneyTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1, "you"), false);
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
@ -168,25 +167,25 @@ class ExtraordinaryJourneyTriggeredAbility extends TriggeredAbilityImpl {
|
|||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
EntersTheBattlefieldEvent zEvent = (EntersTheBattlefieldEvent) event;
|
||||
if(zEvent == null){
|
||||
if (zEvent == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Permanent permanent = zEvent.getTarget();
|
||||
if(permanent == null || !permanent.isCreature(game)) {
|
||||
if (permanent == null || !permanent.isCreature(game)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Zone fromZone = zEvent.getFromZone();
|
||||
if(fromZone == Zone.EXILED) {
|
||||
if (fromZone == Zone.EXILED) {
|
||||
// Directly from exile
|
||||
return true;
|
||||
}
|
||||
|
||||
if(fromZone == Zone.STACK) {
|
||||
if (fromZone == Zone.STACK) {
|
||||
// Get spell in the stack.
|
||||
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
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public final class FalcoSparaPactweaver extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.SHIELD.createInstance(1)),
|
||||
"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.
|
||||
|
|
@ -75,7 +75,7 @@ public final class FalcoSparaPactweaver extends CardImpl {
|
|||
class FalcoSparaPactweaverEffect extends AsThoughEffectImpl {
|
||||
|
||||
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 "
|
||||
+ "a counter from a creature you control in addition to paying their other costs";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class FeldonRonomExcavatorEffect extends OneShotEffect {
|
|||
card = game.getCard(target.getFirstTarget());
|
||||
}
|
||||
if (card != null) {
|
||||
CardUtil.makeCardPlayable(game, source, card, Duration.UntilEndOfYourNextTurn, false);
|
||||
CardUtil.makeCardPlayable(game, source, card, false, Duration.UntilEndOfYourNextTurn, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ class FeralEncounterEffect extends LookLibraryAndPickControllerEffect {
|
|||
boolean result = putPickedCards.moveCards(player, pickedCards, source, game);
|
||||
pickedCards.retainZone(Zone.EXILED, 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);
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import mage.filter.common.FilterControlledPermanent;
|
|||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetDiscard;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
|
|
@ -89,7 +88,7 @@ class FiendOfTheShadowsEffect extends OneShotEffect {
|
|||
card, CardUtil.getExileZoneId(game, source), CardUtil.getSourceName(game, source),
|
||||
source, game, Zone.HAND, true
|
||||
);
|
||||
CardUtil.makeCardPlayable(game, source, card, Duration.Custom, false);
|
||||
CardUtil.makeCardPlayable(game, source, card, false, Duration.Custom, false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,23 +25,22 @@ import mage.util.CardUtil;
|
|||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class FiresOfMountDoom extends CardImpl {
|
||||
|
||||
public FiresOfMountDoom(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}");
|
||||
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
|
||||
// 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.
|
||||
TriggeredAbility trigger = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2));
|
||||
trigger.addEffect(
|
||||
new DestroyAllAttachedToTargetEffect(
|
||||
StaticFilters.FILTER_PERMANENT_EQUIPMENT,
|
||||
"that creature")
|
||||
new DestroyAllAttachedToTargetEffect(
|
||||
StaticFilters.FILTER_PERMANENT_EQUIPMENT,
|
||||
"that creature")
|
||||
);
|
||||
trigger.addTarget(new TargetOpponentsCreaturePermanent());
|
||||
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.
|
||||
// When you play a card this way, Fires of Mount Doom deals 2 damage to each player.
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new FiresOfMountDoomEffect(),
|
||||
new ManaCostsImpl<>("{2}{R}")));
|
||||
Zone.BATTLEFIELD,
|
||||
new FiresOfMountDoomEffect(),
|
||||
new ManaCostsImpl<>("{2}{R}")));
|
||||
}
|
||||
|
||||
private FiresOfMountDoom(final FiresOfMountDoom card) {
|
||||
|
|
@ -69,7 +68,7 @@ class FiresOfMountDoomEffect extends OneShotEffect {
|
|||
FiresOfMountDoomEffect() {
|
||||
super(Outcome.Benefit);
|
||||
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) {
|
||||
|
|
@ -85,7 +84,7 @@ class FiresOfMountDoomEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source);
|
||||
if(controller == null || sourceObject == null){
|
||||
if (controller == null || sourceObject == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -95,7 +94,7 @@ class FiresOfMountDoomEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
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);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -129,7 +128,7 @@ class FiresOfMountDoomDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
|||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
GameEvent.EventType type = event.getType();
|
||||
return type == GameEvent.EventType.PLAY_LAND
|
||||
|| type == GameEvent.EventType.SPELL_CAST;
|
||||
|| type == GameEvent.EventType.SPELL_CAST;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -86,10 +86,10 @@ class GalesRedirectionEffect extends RollDieWithResultTableEffect {
|
|||
}
|
||||
if (result >= 15) {
|
||||
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);
|
||||
} else if (result >= 1) {
|
||||
CardUtil.makeCardPlayable(game, source, card, Duration.Custom, true);
|
||||
CardUtil.makeCardPlayable(game, source, card, true, Duration.Custom, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ import java.util.Set;
|
|||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class GlimpseTheCosmos extends CardImpl {
|
||||
|
|
@ -66,7 +65,7 @@ public class GlimpseTheCosmos extends CardImpl {
|
|||
class GlimpseTheCosmosPlayEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class GoblinResearcherEffect extends OneShotEffect {
|
|||
}
|
||||
player.moveCards(card, Zone.EXILED, source, game);
|
||||
CardUtil.makeCardPlayable(
|
||||
game, source, card, Duration.Custom, false,
|
||||
game, source, card, false, Duration.Custom, false,
|
||||
source.getControllerId(), GoblinResearcherCondition.instance
|
||||
);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -4,25 +4,18 @@ import mage.MageInt;
|
|||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.AsThoughManaEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.ExileFaceDownYouMayPlayAsLongAsExiledTargetEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.asthought.MayLookAtTargetCardEffect;
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.cards.*;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.ManaPoolItem;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetOpponent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
|
|
@ -61,8 +54,6 @@ public final class GontiLordOfLuxury extends CardImpl {
|
|||
|
||||
class GontiLordOfLuxuryEffect extends OneShotEffect {
|
||||
|
||||
private static final String VALUE_PREFIX = "ExileZones";
|
||||
|
||||
public GontiLordOfLuxuryEffect() {
|
||||
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";
|
||||
|
|
@ -90,126 +81,14 @@ class GontiLordOfLuxuryEffect extends OneShotEffect {
|
|||
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to exile"));
|
||||
controller.choose(outcome, topCards, target, source, game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card == null) {
|
||||
controller.putCardsOnBottomOfLibrary(topCards, game, source, false);
|
||||
return true;
|
||||
}
|
||||
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);
|
||||
if (card != null) {
|
||||
new ExileFaceDownYouMayPlayAsLongAsExiledTargetEffect(true, CastManaAdjustment.AS_THOUGH_ANY_MANA_TYPE)
|
||||
.setTargetPointer(new FixedTarget(card, game))
|
||||
.apply(game, source);
|
||||
}
|
||||
topCards.retainZone(Zone.LIBRARY, game);
|
||||
// then put the rest on the bottom of that library in a random order
|
||||
controller.putCardsOnBottomOfLibrary(topCards, game, source, false);
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CantBlockAbility;
|
||||
|
|
@ -14,14 +13,15 @@ import mage.constants.*;
|
|||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward
|
||||
*/
|
||||
public final class Gravecrawler extends CardImpl {
|
||||
|
||||
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.power = new MageInt(2);
|
||||
|
|
@ -54,7 +54,7 @@ class GravecrawlerPlayEffect extends AsThoughEffectImpl {
|
|||
}
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ class GrenzoHavocRaiserEffect extends OneShotEffect {
|
|||
if (card.getSpellAbility() != null) {
|
||||
// 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.EndOfTurn, true);
|
||||
CardUtil.makeCardPlayable(game, source, card, true, Duration.EndOfTurn, true);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class GrinningTotemSearchAndExileEffect extends OneShotEffect {
|
|||
if (card != null) {
|
||||
UUID exileZoneId = CardUtil.getCardExileZoneId(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);
|
||||
}
|
||||
targetOpponent.shuffleLibrary(source, game);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||
|
|
@ -17,14 +16,15 @@ import mage.constants.*;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Mainiack11
|
||||
*/
|
||||
public final class HaakonStromgaldScourge extends CardImpl {
|
||||
|
||||
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.subtype.add(SubType.ZOMBIE);
|
||||
this.subtype.add(SubType.KNIGHT);
|
||||
|
|
@ -59,7 +59,7 @@ public final class HaakonStromgaldScourge extends CardImpl {
|
|||
class HaakonStromgaldScourgePlayEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
@ -103,12 +103,12 @@ class HaakonStromgaldScourgePlayEffect2 extends ContinuousRuleModifyingEffectImp
|
|||
public HaakonStromgaldScourgePlayEffect2 copy() {
|
||||
return new HaakonStromgaldScourgePlayEffect2(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.CAST_SPELL;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Card card = game.getCard(event.getSourceId());
|
||||
|
|
@ -122,8 +122,8 @@ class HaakonStromgaldScourgePlayEffect2 extends ContinuousRuleModifyingEffectImp
|
|||
|
||||
class HaakonPlayKnightsFromGraveyardEffect extends AsThoughEffectImpl {
|
||||
|
||||
public HaakonPlayKnightsFromGraveyardEffect () {
|
||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
public HaakonPlayKnightsFromGraveyardEffect() {
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ class HaakonPlayKnightsFromGraveyardEffect extends AsThoughEffectImpl {
|
|||
}
|
||||
|
||||
@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())) {
|
||||
Card knightToCast = game.getCard(objectId);
|
||||
return knightToCast != null
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.ActivatedAbility;
|
||||
|
|
@ -13,14 +12,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
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.constants.*;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
|
|
@ -28,8 +20,9 @@ import mage.game.events.GameEvent;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward
|
||||
*/
|
||||
public final class HavengulLich extends CardImpl {
|
||||
|
|
@ -66,7 +59,7 @@ public final class HavengulLich extends CardImpl {
|
|||
class HavengulLichPlayEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ class HeadlinerScarlettExileEffect extends OneShotEffect {
|
|||
controller.moveCardsToExile(card, source, game, false, exileId, exileName);
|
||||
if (game.getState().getZone(card.getId()) == Zone.EXILED) {
|
||||
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());
|
||||
effect.setTargetPointer(new FixedTarget(card, game));
|
||||
game.addEffect(effect, source);
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class HeartlessConscriptionEffect extends OneShotEffect {
|
|||
game.getState().processAction(game);
|
||||
cards.retainZone(Zone.EXILED, 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class HedonistsTrovePlayLandEffect extends AsThoughEffectImpl {
|
|||
class HedonistsTroveCastNonlandCardsEffect extends AsThoughEffectImpl {
|
||||
|
||||
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}. "
|
||||
+ "You can't cast more than one spell this way each turn.";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class HelbruteEffect extends AsThoughEffectImpl {
|
|||
}
|
||||
|
||||
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 " +
|
||||
"creature card from your graveyard in addition to paying its other costs.";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class HoardingBroodlordEffect extends OneShotEffect {
|
|||
if (card != null) {
|
||||
player.moveCards(card, Zone.EXILED, source, game);
|
||||
card.setFaceDown(true, game);
|
||||
CardUtil.makeCardPlayable(game, source, card, Duration.Custom, false);
|
||||
CardUtil.makeCardPlayable(game, source, card, false, Duration.Custom, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class HostageTakerExileEffect extends OneShotEffect {
|
|||
UUID exileId = CardUtil.getCardExileZoneId(game, source);
|
||||
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
|
||||
CardUtil.makeCardPlayable(game, source, card, Duration.Custom, true);
|
||||
CardUtil.makeCardPlayable(game, source, card, true, Duration.Custom, true);
|
||||
game.addDelayedTriggeredAbility(new OnLeaveReturnExiledAbility(), source);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ class IceCauldronExileEffect extends OneShotEffect {
|
|||
class IceCauldronCastFromExileEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ class IdolOfEnduranceLeaveEffect extends OneShotEffect {
|
|||
class IdolOfEnduranceCastFromExileEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,10 +68,14 @@ class IntellectDevourerExileEffect extends OneShotEffect {
|
|||
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
|
||||
public IntellectDevourerExileEffect copy() {return new IntellectDevourerExileEffect(this);}
|
||||
public IntellectDevourerExileEffect copy() {
|
||||
return new IntellectDevourerExileEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
|
|
@ -105,7 +109,7 @@ class IntellectDevourerExileEffect extends OneShotEffect {
|
|||
// Exile all chosen cards at the same time
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (controller == null|| sourceObject == null) {
|
||||
if (controller == null || sourceObject == null) {
|
||||
return false;
|
||||
}
|
||||
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());
|
||||
Card thisCard = opponentCardsToExile.getCards(game).iterator().next();
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
@ -136,10 +140,14 @@ class IntellectDevourerReturnCardsAbility extends DelayedTriggeredAbility {
|
|||
this.setRuleVisible(false);
|
||||
}
|
||||
|
||||
private IntellectDevourerReturnCardsAbility(final IntellectDevourerReturnCardsAbility ability) {super(ability);}
|
||||
private IntellectDevourerReturnCardsAbility(final IntellectDevourerReturnCardsAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntellectDevourerReturnCardsAbility copy() {return new IntellectDevourerReturnCardsAbility(this);}
|
||||
public IntellectDevourerReturnCardsAbility copy() {
|
||||
return new IntellectDevourerReturnCardsAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
|
|
@ -165,10 +173,14 @@ class IntellectDevourerReturnExiledCardEffect extends OneShotEffect {
|
|||
this.staticText = "Return exiled cards to their owners' hands";
|
||||
}
|
||||
|
||||
private IntellectDevourerReturnExiledCardEffect(final IntellectDevourerReturnExiledCardEffect effect) {super(effect);}
|
||||
private IntellectDevourerReturnExiledCardEffect(final IntellectDevourerReturnExiledCardEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntellectDevourerReturnExiledCardEffect copy() {return new IntellectDevourerReturnExiledCardEffect(this);}
|
||||
public IntellectDevourerReturnExiledCardEffect copy() {
|
||||
return new IntellectDevourerReturnExiledCardEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import mage.watchers.Watcher;
|
|||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author notgreat
|
||||
*/
|
||||
public final class IntrepidPaleontologist extends CardImpl {
|
||||
|
|
@ -70,7 +69,7 @@ public final class IntrepidPaleontologist extends CardImpl {
|
|||
class IntrepidPaleontologistPlayEffect extends AsThoughEffectImpl {
|
||||
|
||||
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.";
|
||||
}
|
||||
|
||||
|
|
@ -94,7 +93,7 @@ class IntrepidPaleontologistPlayEffect extends AsThoughEffectImpl {
|
|||
Card card = game.getCard(objectId);
|
||||
MageObject sourceObject = game.getObject(source);
|
||||
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)) {
|
||||
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), sourceObject.getZoneChangeCounter(game));
|
||||
ExileZone exileZone = game.getState().getExile().getExileZone(exileId);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class InvasionOfKaldheimEffect extends OneShotEffect {
|
|||
player.moveCards(cards, Zone.EXILED, source, game);
|
||||
player.drawCards(cards.size(), source, 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class JayaFieryNegotiatorExileEffect extends OneShotEffect {
|
|||
player.moveCardsToExile(exileCards, source, game, true, CardUtil.getExileZoneId(game, source), "Jaya, Fiery Negotiator");
|
||||
}
|
||||
if (card != null) {
|
||||
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false);
|
||||
CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public final class JohannApprenticeSorcerer extends CardImpl {
|
|||
class JohannApprenticeSorcererPlayTopEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
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.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -18,20 +11,23 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.*;
|
||||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Xanderhall
|
||||
*/
|
||||
public final class KaylasMusicBox extends CardImpl {
|
||||
|
||||
public KaylasMusicBox(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
|
||||
// {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)) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -60,7 +60,7 @@ public final class KessDissidentMage extends CardImpl {
|
|||
class KessDissidentMageCastFromGraveyardEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import mage.util.CardUtil;
|
|||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author varaghar
|
||||
*/
|
||||
public final class KingNarfisBetrayal extends CardImpl {
|
||||
|
|
@ -146,7 +145,7 @@ class KingNarfisBetrayalSecondEffect extends OneShotEffect {
|
|||
ExileZone exileZone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source));
|
||||
if (exileZone != null) {
|
||||
for (Card card : exileZone.getCards(game)) {
|
||||
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, true);
|
||||
CardUtil.makeCardPlayable(game, source, card, true, Duration.EndOfTurn, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ class KorvoldAndTheNobleThiefEffect extends OneShotEffect {
|
|||
cards.retainZone(Zone.EXILED, 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ class KotoseTheSilentSpiderEffect extends OneShotEffect {
|
|||
KotoseTheSilentSpiderWatcher.addCards(source, cardSet, game);
|
||||
for (Card exiledCard : cardSet) {
|
||||
CardUtil.makeCardPlayable(
|
||||
game, source, exiledCard, Duration.WhileControlled, true,
|
||||
game, source, exiledCard, false, Duration.WhileControlled, true,
|
||||
null, new KotoseTheSilentSpiderCondition(exiledCard, game)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ class LaughingJasperFlintEffect extends OneShotEffect {
|
|||
}
|
||||
controller.moveCards(cards, Zone.EXILED, source, 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class LidlessGazeEffect extends OneShotEffect {
|
|||
|
||||
cards.retainZone(Zone.EXILED, 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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class LilianaUntouchedByDeathEffect extends OneShotEffect {
|
|||
class LilianaUntouchedByDeathGraveyardEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ class LukkaCoppercoatOutcastCastEffect extends AsThoughEffectImpl {
|
|||
private static final FilterPermanent filter = new FilterPlaneswalkerPermanent(SubType.LUKKA);
|
||||
|
||||
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.";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public final class MaestrosAscendancy extends CardImpl {
|
|||
class MaestrosAscendancyCastEffect extends AsThoughEffectImpl {
|
||||
|
||||
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 " +
|
||||
"from your graveyard by sacrificing a creature in addition to paying its other costs.";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -13,25 +12,21 @@ import mage.abilities.effects.common.combat.CantBlockSourceEffect;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public final class MarangRiverProwler extends CardImpl {
|
||||
|
||||
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.ROGUE);
|
||||
this.power = new MageInt(2);
|
||||
|
|
@ -43,7 +38,7 @@ public final class MarangRiverProwler extends CardImpl {
|
|||
effect.setText("and can't be blocked");
|
||||
ability.addEffect(effect);
|
||||
this.addAbility(ability);
|
||||
|
||||
|
||||
// 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()));
|
||||
}
|
||||
|
|
@ -59,14 +54,15 @@ public final class MarangRiverProwler extends CardImpl {
|
|||
}
|
||||
|
||||
class MarangRiverProwlerCastEffect extends AsThoughEffectImpl {
|
||||
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a black or green permanent");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(new ColorPredicate(ObjectColor.BLACK), new ColorPredicate(ObjectColor.GREEN)));
|
||||
}
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
@ -88,7 +84,7 @@ class MarangRiverProwlerCastEffect extends AsThoughEffectImpl {
|
|||
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
|
||||
if (sourceId.equals(source.getSourceId())) {
|
||||
Card card = game.getCard(source.getSourceId());
|
||||
if (card != null
|
||||
if (card != null
|
||||
&& card.isOwnedBy(affectedControllerId)
|
||||
&& game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD
|
||||
&& game.getBattlefield().count(filter, source.getControllerId(), source, game) > 0) {
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class MarchOfRecklessJoyEffect extends OneShotEffect {
|
|||
);
|
||||
for (Card card : cards) {
|
||||
CardUtil.makeCardPlayable(
|
||||
game, source, card, Duration.UntilEndOfYourNextTurn,
|
||||
game, source, card, false, Duration.UntilEndOfYourNextTurn,
|
||||
false, null, MarchOfRecklessJoyCondition.instance
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageIdentifier;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -17,9 +15,9 @@ import mage.abilities.effects.AsThoughEffectImpl;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.counter.AddCounterChoiceSourceEffect;
|
||||
import mage.constants.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
import mage.counters.Counters;
|
||||
|
|
@ -30,15 +28,16 @@ import mage.game.events.ZoneChangeEvent;
|
|||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Skiwkr
|
||||
*/
|
||||
public final class MeTheImmortal extends CardImpl {
|
||||
|
||||
public MeTheImmortal(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{U}{R}");
|
||||
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.ROGUE);
|
||||
|
|
@ -139,7 +138,7 @@ class MeTheImmortalEffect extends ReplacementEffectImpl {
|
|||
class MeTheImmortalCastEffect extends AsThoughEffectImpl {
|
||||
|
||||
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 " +
|
||||
"by discarding two cards in addition to paying its other costs";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class MeetingOfTheFiveExileEffect extends OneShotEffect {
|
|||
class MeetingOfTheFiveCastEffect extends CanPlayCardControllerEffect {
|
||||
|
||||
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) {
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class MemoryVesselExileEffect extends OneShotEffect {
|
|||
player.moveCards(cards, Zone.EXILED, source, game);
|
||||
for (Card card : cards) {
|
||||
CardUtil.makeCardPlayable(
|
||||
game, source, card, Duration.UntilYourNextTurn,
|
||||
game, source, card, false, Duration.UntilYourNextTurn,
|
||||
false, playerId, null
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class MezzioMuggerEffect extends OneShotEffect {
|
|||
}
|
||||
player.moveCards(cards, Zone.EXILED, source, game);
|
||||
for (Card card : cards) {
|
||||
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, true);
|
||||
CardUtil.makeCardPlayable(game, source, card, false, Duration.EndOfTurn, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class MishrasResearchDeskEffect extends OneShotEffect {
|
|||
if (card == null) {
|
||||
return false;
|
||||
}
|
||||
CardUtil.makeCardPlayable(game, source, card, Duration.UntilEndOfYourNextTurn, false);
|
||||
CardUtil.makeCardPlayable(game, source, card, false, Duration.UntilEndOfYourNextTurn, false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
|
@ -10,16 +9,12 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public final class MisthollowGriffin extends CardImpl {
|
||||
|
|
@ -50,7 +45,7 @@ public final class MisthollowGriffin extends CardImpl {
|
|||
class MisthollowGriffinPlayEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class MnemonicBetrayalExileEffect extends OneShotEffect {
|
|||
if (card.isLand(game)) {
|
||||
continue;
|
||||
}
|
||||
CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, true);
|
||||
CardUtil.makeCardPlayable(game, source, card, true, Duration.EndOfTurn, true);
|
||||
}
|
||||
cards.retainZone(Zone.EXILED, game);
|
||||
game.addDelayedTriggeredAbility(new MnemonicBetrayalDelayedTriggeredAbility(
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ class MonkClassEffect extends OneShotEffect {
|
|||
class MonkClassCastEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class NahirisWarcraftingEffect extends OneShotEffect {
|
|||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
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);
|
||||
player.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package mage.cards.n;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -19,8 +17,10 @@ import mage.game.Game;
|
|||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class NarsetEnlightenedMaster extends CardImpl {
|
||||
|
|
@ -94,7 +94,7 @@ class NarsetEnlightenedMasterExileEffect extends OneShotEffect {
|
|||
class NarsetEnlightenedMasterCastFromExileEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ class NashiMoonSagesScionWatcher extends Watcher {
|
|||
class NashiMoonSagesScionPlayEffect extends CanPlayCardControllerEffect {
|
||||
|
||||
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) {
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ class NeyaliSunsVanguardEffect extends OneShotEffect {
|
|||
}
|
||||
player.moveCardsToExile(card, source, game, true, CardUtil.getExileZoneId(game, source), CardUtil.getSourceName(game, source));
|
||||
CardUtil.makeCardPlayable(
|
||||
game, source, card, Duration.Custom, false,
|
||||
game, source, card, false, Duration.Custom, false,
|
||||
source.getControllerId(), NeyaliSunsVanguardWatcher::checkPlayer
|
||||
);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.n;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
|
|
@ -13,19 +12,16 @@ import mage.abilities.mana.ColorlessManaAbility;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.players.Library;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public final class NivixAerieOfTheFiremind extends CardImpl {
|
||||
|
|
@ -92,7 +88,7 @@ class NivixAerieOfTheFiremindEffect extends OneShotEffect {
|
|||
class NivixAerieOfTheFiremindCanCastEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public final class OathswornVampire extends CardImpl {
|
|||
class OathswornVampirePlayEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ enum OneWithTheMultiverseCondition implements Condition {
|
|||
class OneWithTheMultiverseEffect extends AsThoughEffectImpl {
|
||||
|
||||
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 " +
|
||||
"or the top of your library without paying its mana cost.";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import mage.constants.*;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.LibrarySearchedEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
|
|
@ -20,7 +21,6 @@ import java.util.Objects;
|
|||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
* @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
|
||||
for (Card card : cardsToExile) {
|
||||
// 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
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
package mage.cards.o;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
|
|
@ -20,8 +17,10 @@ import mage.target.common.TargetOpponent;
|
|||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author DominionSpy
|
||||
*/
|
||||
public final class OutrageousRobbery extends CardImpl {
|
||||
|
|
@ -91,7 +90,7 @@ class OutrageousRobberyEffect extends OneShotEffect {
|
|||
game.addEffect(effect, source);
|
||||
|
||||
CardUtil.makeCardPlayable(
|
||||
game, source, card, Duration.Custom, true,
|
||||
game, source, card, false, Duration.Custom, true,
|
||||
source.getControllerId(), null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class PlaneswalkersMischiefEffect extends OneShotEffect {
|
|||
class PlaneswalkersMischiefCastFromExileEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ class PsychicIntrusionExileEffect extends OneShotEffect {
|
|||
class PsychicIntrusionCastFromExileEffect extends AsThoughEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class PsychicTheftEffect extends OneShotEffect {
|
|||
}
|
||||
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(
|
||||
new ConditionalOneShotEffect(
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class QuintoriusKandEffect extends OneShotEffect {
|
|||
player.moveCards(cards, Zone.EXILED, source, game);
|
||||
player.getManaPool().addMana(Mana.RedMana(cards.size()), game, source);
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import java.util.UUID;
|
|||
public final class RaffinesGuidance extends CardImpl {
|
||||
|
||||
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);
|
||||
|
||||
// Enchant creature
|
||||
|
|
@ -58,7 +58,7 @@ public final class RaffinesGuidance extends CardImpl {
|
|||
class RafinnesGuidancePlayEffect extends AsThoughEffectImpl {
|
||||
|
||||
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.";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ class RakdosTheMuscleEffect extends OneShotEffect {
|
|||
// remove cards that could not be moved to exile
|
||||
cards.removeIf(card -> !Zone.EXILED.equals(game.getState().getZone(card.getId())));
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class RamirezDePietroPillagerEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageIdentifier;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -12,7 +10,6 @@ import mage.abilities.costs.mana.ManaCost;
|
|||
import mage.abilities.costs.mana.ManaCosts;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -21,12 +18,12 @@ import mage.filter.common.FilterCreatureCard;
|
|||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2, Susucr
|
||||
*/
|
||||
public final class RisenExecutioner extends CardImpl {
|
||||
|
|
@ -76,7 +73,7 @@ class RisenExecutionerCastEffect extends AsThoughEffectImpl {
|
|||
}
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
|
@ -100,14 +97,14 @@ class RisenExecutionerCastEffect extends AsThoughEffectImpl {
|
|||
return false;
|
||||
}
|
||||
Card card = game.getCard(source.getSourceId());
|
||||
if(card == null
|
||||
if (card == null
|
||||
|| !card.isOwnedBy(affectedControllerId)
|
||||
|| game.getState().getZone(source.getSourceId()) != Zone.GRAVEYARD) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if(controller == null) {
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
int costIncrease = controller.getGraveyard().count(filter, source.getControllerId(), source, game);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import mage.counters.CounterType;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.token.FoodToken;
|
||||
import mage.game.permanent.token.TreasureToken;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.util.CardUtil;
|
||||
|
|
@ -85,7 +84,7 @@ class RoccoStreetChefEffect extends OneShotEffect {
|
|||
}
|
||||
player.moveCards(card, Zone.EXILED, source, game);
|
||||
CardUtil.makeCardPlayable(
|
||||
game, source, card, Duration.UntilYourNextEndStep,
|
||||
game, source, card, false, Duration.UntilYourNextEndStep,
|
||||
false, playerId, null
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -16,21 +15,16 @@ import mage.abilities.effects.common.ExileTargetEffect;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
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.constants.*;
|
||||
import mage.filter.common.FilterHistoricCard;
|
||||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class RonaDiscipleOfGix extends CardImpl {
|
||||
|
|
@ -79,7 +73,7 @@ public final class RonaDiscipleOfGix extends CardImpl {
|
|||
class RonaDiscipleOfGixPlayNonLandEffect extends AsThoughEffectImpl {
|
||||
|
||||
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}";
|
||||
}
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue