mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
Merge remote-tracking branch 'remote-production/master' into local-production
This commit is contained in:
commit
64721675f2
29 changed files with 462 additions and 487 deletions
|
@ -1,14 +1,10 @@
|
|||
package org.mage.plugins.card.dl.sources;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import mage.client.dialog.PreferencesDialog;
|
||||
import org.mage.plugins.card.images.CardDownloadData;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author Quercitron, JayDi85
|
||||
*/
|
||||
|
@ -234,6 +230,7 @@ public enum ScryfallImageSource implements CardImageSource {
|
|||
supportedSets.add("M19");
|
||||
supportedSets.add("GS1");
|
||||
supportedSets.add("GRN");
|
||||
supportedSets.add("GK1");
|
||||
//
|
||||
supportedSets.add("EURO");
|
||||
supportedSets.add("GPX");
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@ -7,18 +6,18 @@ import java.util.Map.Entry;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneAllEffect;
|
||||
import mage.abilities.keyword.CyclingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
|
@ -42,7 +41,14 @@ public final class AbandonedSarcophagus extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
||||
// You may cast nonland cards with cycling from your graveyard.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AbandonedSarcophagusCastFromGraveyardEffect()));
|
||||
FilterCard filter = new FilterCard("nonland cards with cycling");
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
||||
filter.add(new AbilityPredicate(CyclingAbility.class));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new PlayFromNotOwnHandZoneAllEffect(filter,
|
||||
Zone.GRAVEYARD, true, TargetController.YOU, Duration.WhileOnBattlefield)
|
||||
.setText("You may cast nonland cards with cycling from your graveyard"))
|
||||
);
|
||||
|
||||
// If a card with cycling would be put into your graveyard from anywhere and it wasn't cycled, exile it instead.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AbandonedSarcophagusReplacementEffect()), new AbandonedSarcophagusWatcher());
|
||||
|
@ -59,46 +65,6 @@ public final class AbandonedSarcophagus extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class AbandonedSarcophagusCastFromGraveyardEffect extends AsThoughEffectImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("nonland cards with cycling");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
||||
filter.add(new AbilityPredicate(CyclingAbility.class));
|
||||
}
|
||||
|
||||
AbandonedSarcophagusCastFromGraveyardEffect() {
|
||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "You may cast nonland cards with cycling from your graveyard";
|
||||
}
|
||||
|
||||
AbandonedSarcophagusCastFromGraveyardEffect(final AbandonedSarcophagusCastFromGraveyardEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbandonedSarcophagusCastFromGraveyardEffect copy() {
|
||||
return new AbandonedSarcophagusCastFromGraveyardEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
Card card = game.getCard(objectId);
|
||||
if (card != null) {
|
||||
return (affectedControllerId.equals(source.getControllerId())
|
||||
&& filter.match(card, game)
|
||||
&& game.getState().getZone(card.getId()) == Zone.GRAVEYARD);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class AbandonedSarcophagusReplacementEffect extends ReplacementEffectImpl {
|
||||
|
||||
boolean cardHasCycling;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -8,6 +7,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect;
|
||||
import mage.abilities.keyword.ProwessAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -75,7 +75,7 @@ class AbbotOfKeralKeepExileEffect extends OneShotEffect {
|
|||
if (card != null) {
|
||||
String exileName = sourcePermanent.getIdName() + " <this card may be played the turn it was exiled>";
|
||||
controller.moveCardsToExile(card, source, game, true, source.getSourceId(), exileName);
|
||||
ContinuousEffect effect = new AbbotOfKeralKeepCastFromExileEffect();
|
||||
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game)));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
@ -6,9 +5,9 @@ import java.util.Set;
|
|||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -44,7 +43,7 @@ class ActOnImpulseExileEffect extends OneShotEffect {
|
|||
|
||||
public ActOnImpulseExileEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Exile the top three cards of your library. Until end of turn, you may play cards exiled this way.";
|
||||
this.staticText = "Exile the top three cards of your library. Until end of turn, you may play cards exiled this way";
|
||||
}
|
||||
|
||||
public ActOnImpulseExileEffect(final ActOnImpulseExileEffect effect) {
|
||||
|
@ -71,7 +70,7 @@ class ActOnImpulseExileEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
if (!cards.isEmpty()) {
|
||||
ContinuousEffect effect = new ActOnImpulseMayPlayExiledEffect();
|
||||
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTargets(cards, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
|
@ -82,31 +81,3 @@ class ActOnImpulseExileEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
class ActOnImpulseMayPlayExiledEffect extends AsThoughEffectImpl {
|
||||
|
||||
public ActOnImpulseMayPlayExiledEffect() {
|
||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
|
||||
}
|
||||
|
||||
public ActOnImpulseMayPlayExiledEffect(final ActOnImpulseMayPlayExiledEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActOnImpulseMayPlayExiledEffect copy() {
|
||||
return new ActOnImpulseMayPlayExiledEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
return affectedControllerId.equals(source.getControllerId())
|
||||
&& getTargetPointer().getTargets(game, source).contains(objectId);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -6,18 +5,18 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect;
|
||||
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.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Library;
|
||||
|
@ -81,7 +80,7 @@ class AerialCaravanExileEffect extends OneShotEffect {
|
|||
if (card != null) {
|
||||
String exileName = sourcePermanent.getIdName() + " <this card may be played the turn it was exiled>";
|
||||
controller.moveCardsToExile(card, source, game, true, source.getSourceId(), exileName);
|
||||
ContinuousEffect effect = new AerialCaravanCastFromExileEffect();
|
||||
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game)));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
|
@ -90,31 +89,3 @@ class AerialCaravanExileEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class AerialCaravanCastFromExileEffect extends AsThoughEffectImpl {
|
||||
|
||||
public AerialCaravanCastFromExileEffect() {
|
||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
|
||||
staticText = "You may play the card from exile";
|
||||
}
|
||||
|
||||
public AerialCaravanCastFromExileEffect(final AerialCaravanCastFromExileEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AerialCaravanCastFromExileEffect copy() {
|
||||
return new AerialCaravanCastFromExileEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
return source.isControlledBy(affectedControllerId)
|
||||
&& objectId.equals(getTargetPointer().getFirst(game, source));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,14 +4,13 @@ import java.util.Set;
|
|||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect;
|
||||
import mage.abilities.effects.mana.AddManaOfAnyColorEffect;
|
||||
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;
|
||||
|
@ -79,7 +78,7 @@ class ApexOfPowerSpellEffect extends OneShotEffect {
|
|||
if (card.isLand()) {
|
||||
continue;
|
||||
}
|
||||
ContinuousEffect effect = new ApexOfPowerCastFromExileEffect();
|
||||
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game)));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
|
@ -87,34 +86,6 @@ class ApexOfPowerSpellEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
|
||||
class ApexOfPowerCastFromExileEffect extends AsThoughEffectImpl {
|
||||
|
||||
public ApexOfPowerCastFromExileEffect() {
|
||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
|
||||
staticText = "You may play the card from exile";
|
||||
}
|
||||
|
||||
public ApexOfPowerCastFromExileEffect(final ApexOfPowerCastFromExileEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApexOfPowerCastFromExileEffect copy() {
|
||||
return new ApexOfPowerCastFromExileEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
return source.isControlledBy(affectedControllerId)
|
||||
&& objectId.equals(getTargetPointer().getFirst(game, source));
|
||||
}
|
||||
}
|
||||
|
||||
class ApexOfPowerManaEffect extends OneShotEffect {
|
||||
|
||||
public ApexOfPowerManaEffect() {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
@ -9,9 +8,9 @@ import mage.MageObjectReference;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect;
|
||||
import mage.abilities.effects.common.combat.CantBlockTargetEffect;
|
||||
import mage.cards.*;
|
||||
import mage.constants.*;
|
||||
|
@ -20,7 +19,6 @@ import mage.filter.common.FilterInstantOrSorceryCard;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.StackObject;
|
||||
import mage.players.Library;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetCard;
|
||||
|
@ -177,12 +175,13 @@ class ChandraPyromasterEffect2 extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (controller != null && sourceObject != null && controller.getLibrary().hasCards()) {
|
||||
Library library = controller.getLibrary();
|
||||
Card card = library.getFromTop(game);
|
||||
if (controller != null && sourceObject != null) {
|
||||
Card card = controller.getLibrary().getFromTop(game);
|
||||
if (card != null) {
|
||||
controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getIdName() + " <this card may be played the turn it was exiled>", source.getSourceId(), game, Zone.LIBRARY, true);
|
||||
game.addEffect(new ChandraPyromasterPlayEffect(new MageObjectReference(card, game)), source);
|
||||
controller.moveCards(card, Zone.EXILED, source, game);
|
||||
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(card, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -190,45 +189,6 @@ class ChandraPyromasterEffect2 extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
|
||||
class ChandraPyromasterPlayEffect extends AsThoughEffectImpl {
|
||||
|
||||
private final MageObjectReference objectReference;
|
||||
|
||||
public ChandraPyromasterPlayEffect(MageObjectReference objectReference) {
|
||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
|
||||
this.objectReference = objectReference;
|
||||
staticText = "you may play that card until end of turn";
|
||||
}
|
||||
|
||||
public ChandraPyromasterPlayEffect(final ChandraPyromasterPlayEffect effect) {
|
||||
super(effect);
|
||||
this.objectReference = effect.objectReference;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChandraPyromasterPlayEffect copy() {
|
||||
return new ChandraPyromasterPlayEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
if (objectReference.refersTo(objectId, game) && affectedControllerId.equals(source.getControllerId())) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
return true;
|
||||
} else {
|
||||
discard();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class ChandraPyromasterEffect3 extends OneShotEffect {
|
||||
|
||||
public ChandraPyromasterEffect3() {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.Set;
|
||||
|
@ -23,7 +22,7 @@ import mage.util.CardUtil;
|
|||
public final class CommuneWithLava extends CardImpl {
|
||||
|
||||
public CommuneWithLava(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{R}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{R}{R}");
|
||||
|
||||
// Exile the top X cards of your library. Until the end of your next turn, you may play those cards.
|
||||
this.getSpellAbility().addEffect(new CommuneWithLavaEffect());
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -8,6 +7,7 @@ import mage.abilities.effects.AsThoughEffectImpl;
|
|||
import mage.abilities.effects.AsThoughManaEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -28,7 +28,7 @@ import mage.util.CardUtil;
|
|||
public final class CunningAbduction extends CardImpl {
|
||||
|
||||
public CunningAbduction(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{U}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}{B}");
|
||||
|
||||
// Target opponent reveals their hand. You choose a nonland card from that player's hand and exile it. 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.
|
||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||
|
@ -82,10 +82,10 @@ class CunningAbductionExileEffect extends OneShotEffect {
|
|||
if (card != null) {
|
||||
// move card to exile
|
||||
UUID exileId = CardUtil.getCardExileZoneId(game, source);
|
||||
controller.moveCardToExileWithInfo(card, exileId, sourceObject.getIdName(), source.getSourceId(), game, Zone.HAND, true);
|
||||
controller.moveCardsToExile(card, source, game, true, exileId, sourceObject.getIdName());
|
||||
// allow to cast the card
|
||||
ContinuousEffect effect = new CunningAbductionCastFromExileEffect();
|
||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED, Duration.Custom);
|
||||
effect.setTargetPointer(new FixedTarget(card, game));
|
||||
game.addEffect(effect, source);
|
||||
// and you may spend mana as though it were mana of any color to cast it
|
||||
effect = new CunningAbductionSpendAnyManaEffect();
|
||||
|
@ -99,41 +99,6 @@ class CunningAbductionExileEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
|
||||
class CunningAbductionCastFromExileEffect extends AsThoughEffectImpl {
|
||||
|
||||
public CunningAbductionCastFromExileEffect() {
|
||||
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";
|
||||
}
|
||||
|
||||
public CunningAbductionCastFromExileEffect(final CunningAbductionCastFromExileEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CunningAbductionCastFromExileEffect copy() {
|
||||
return new CunningAbductionCastFromExileEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
if (objectId.equals(getTargetPointer().getFirst(game, source))) {
|
||||
if (affectedControllerId.equals(source.getControllerId())) {
|
||||
return true;
|
||||
}
|
||||
} else if (((FixedTarget) getTargetPointer()).getTarget().equals(objectId)) {
|
||||
// object has moved zone so effect can be discarted
|
||||
this.discard();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class CunningAbductionSpendAnyManaEffect extends AsThoughEffectImpl implements AsThoughManaEffect {
|
||||
|
||||
public CunningAbductionSpendAnyManaEffect() {
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.common.PayLifeCost;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect;
|
||||
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.filter.common.FilterNonlandCard;
|
||||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
@ -76,7 +74,7 @@ class DarkDecisionEffect extends OneShotEffect {
|
|||
Card card = game.getCard(targetId);
|
||||
if (card != null) {
|
||||
controller.moveCardsToExile(card, source, game, true, source.getSourceId(), sourceObject.getIdName());
|
||||
ContinuousEffect effect = new DarkDecisionMayPlayExiledEffect();
|
||||
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(card.getId(), game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
|
@ -88,34 +86,3 @@ class DarkDecisionEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
class DarkDecisionMayPlayExiledEffect extends AsThoughEffectImpl {
|
||||
|
||||
public DarkDecisionMayPlayExiledEffect() {
|
||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
|
||||
}
|
||||
|
||||
public DarkDecisionMayPlayExiledEffect(final DarkDecisionMayPlayExiledEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DarkDecisionMayPlayExiledEffect copy() {
|
||||
return new DarkDecisionMayPlayExiledEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
if (objectId.equals(getTargetPointer().getFirst(game, source)) && affectedControllerId.equals(source.getControllerId())) {
|
||||
ExileZone exileZone = game.getExile().getExileZone(source.getSourceId());
|
||||
return exileZone != null && exileZone.contains(getTargetPointer().getFirst(game, source));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,17 +6,17 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.SubType;
|
||||
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.Zone;
|
||||
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -88,8 +88,8 @@ class DarkDwellerOracleExileEffect extends OneShotEffect {
|
|||
if (card != null) {
|
||||
String exileName = sourcePermanent.getIdName() + " <this card may be played the turn it was exiled>";
|
||||
controller.moveCardsToExile(card, source, game, true, source.getSourceId(), exileName);
|
||||
ContinuousEffect effect = new DarkDwellerOracleCastFromExileEffect();
|
||||
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game)));
|
||||
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(card, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
return true;
|
||||
|
@ -97,31 +97,3 @@ class DarkDwellerOracleExileEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class DarkDwellerOracleCastFromExileEffect extends AsThoughEffectImpl {
|
||||
|
||||
public DarkDwellerOracleCastFromExileEffect() {
|
||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
|
||||
staticText = "You may play the card from exile";
|
||||
}
|
||||
|
||||
public DarkDwellerOracleCastFromExileEffect(final DarkDwellerOracleCastFromExileEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DarkDwellerOracleCastFromExileEffect copy() {
|
||||
return new DarkDwellerOracleCastFromExileEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
return source.isControlledBy(affectedControllerId)
|
||||
&& objectId.equals(getTargetPointer().getFirst(game, source));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.Objects;
|
||||
|
@ -12,6 +11,7 @@ import mage.abilities.effects.AsThoughEffectImpl;
|
|||
import mage.abilities.effects.AsThoughManaEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -39,7 +39,7 @@ public final class DaxosOfMeletis extends CardImpl {
|
|||
}
|
||||
|
||||
public DaxosOfMeletis(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{U}");
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.SOLDIER);
|
||||
|
@ -91,7 +91,7 @@ class DaxosOfMeletisEffect extends OneShotEffect {
|
|||
Card card = damagedPlayer.getLibrary().getFromTop(game);
|
||||
if (card != null) {
|
||||
// move card to exile
|
||||
controller.moveCardToExileWithInfo(card, exileId, sourceObject.getIdName(), source.getSourceId(), game, Zone.LIBRARY, true);
|
||||
controller.moveCardsToExile(card, source, game, true, exileId, sourceObject.getIdName());
|
||||
// player gains life
|
||||
int cmc = card.getConvertedManaCost();
|
||||
if (cmc > 0) {
|
||||
|
@ -100,10 +100,12 @@ class DaxosOfMeletisEffect extends OneShotEffect {
|
|||
// Add effects only if the card has a spellAbility (e.g. not for lands).
|
||||
if (card.getSpellAbility() != null) {
|
||||
// allow to cast the card
|
||||
game.addEffect(new DaxosOfMeletisCastFromExileEffect(card.getId(), exileId), source);
|
||||
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(card, game));
|
||||
game.addEffect(effect, source);
|
||||
// and you may spend mana as though it were mana of any color to cast it
|
||||
ContinuousEffect effect = new DaxosOfMeletisSpendAnyManaEffect();
|
||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||
effect = new DaxosOfMeletisSpendAnyManaEffect();
|
||||
effect.setTargetPointer(new FixedTarget(card, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.Set;
|
||||
|
@ -11,6 +10,7 @@ import mage.abilities.effects.AsThoughManaEffect;
|
|||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -22,6 +22,7 @@ import mage.constants.ManaType;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
|
@ -101,11 +102,11 @@ class DeadMansChestEffect extends OneShotEffect {
|
|||
controller.moveCardsToExile(cards, source, game, true, source.getSourceId(), sourceObject.getLogName());
|
||||
for (Card card : cards) {
|
||||
if (!card.isLand()) {
|
||||
ContinuousEffect effect = new DeadMansChestCastFromExileEffect();
|
||||
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game)));
|
||||
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED, Duration.Custom);
|
||||
effect.setTargetPointer(new FixedTarget(card, game));
|
||||
game.addEffect(effect, source);
|
||||
effect = new DeadMansChestSpendManaEffect();
|
||||
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game)));
|
||||
effect.setTargetPointer(new FixedTarget(card, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.Objects;
|
||||
|
@ -11,6 +10,7 @@ import mage.abilities.effects.AsThoughManaEffect;
|
|||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -102,14 +102,14 @@ class DireFleetDaredevilEffect extends OneShotEffect {
|
|||
if (controller.moveCards(targetCard, Zone.EXILED, source, game)) {
|
||||
targetCard = game.getCard(targetCard.getId());
|
||||
if (targetCard != null) {
|
||||
ContinuousEffect effect = new DireFleetDaredevilPlayEffect();
|
||||
effect.setTargetPointer(new FixedTarget(targetCard.getId(), targetCard.getZoneChangeCounter(game)));
|
||||
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(targetCard, game));
|
||||
game.addEffect(effect, source);
|
||||
effect = new DireFleetDaredevilSpendAnyManaEffect();
|
||||
effect.setTargetPointer(new FixedTarget(targetCard.getId(), targetCard.getZoneChangeCounter(game)));
|
||||
effect.setTargetPointer(new FixedTarget(targetCard, game));
|
||||
game.addEffect(effect, source);
|
||||
effect = new DireFleetDaredevilReplacementEffect();
|
||||
effect.setTargetPointer(new FixedTarget(targetCard.getId(), targetCard.getZoneChangeCounter(game)));
|
||||
effect.setTargetPointer(new FixedTarget(targetCard, game));
|
||||
game.addEffect(effect, source);
|
||||
|
||||
}
|
||||
|
@ -121,41 +121,6 @@ class DireFleetDaredevilEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
|
||||
class DireFleetDaredevilPlayEffect extends AsThoughEffectImpl {
|
||||
|
||||
public DireFleetDaredevilPlayEffect() {
|
||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
|
||||
staticText = "You may cast that card this turn";
|
||||
}
|
||||
|
||||
public DireFleetDaredevilPlayEffect(final DireFleetDaredevilPlayEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DireFleetDaredevilPlayEffect copy() {
|
||||
return new DireFleetDaredevilPlayEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
UUID targetId = getTargetPointer().getFirst(game, source);
|
||||
if (targetId != null) {
|
||||
return targetId.equals(objectId)
|
||||
&& source.isControlledBy(affectedControllerId);
|
||||
} else {
|
||||
// the target card has changed zone meanwhile, so the effect is no longer needed
|
||||
discard();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class DireFleetDaredevilSpendAnyManaEffect extends AsThoughEffectImpl implements AsThoughManaEffect {
|
||||
|
||||
public DireFleetDaredevilSpendAnyManaEffect() {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.Set;
|
||||
|
@ -7,21 +6,23 @@ import mage.MageInt;
|
|||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.target.targetpointer.FixedTargets;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -30,7 +31,7 @@ import mage.target.targetpointer.FixedTarget;
|
|||
public final class DreamPillager extends CardImpl {
|
||||
|
||||
public DreamPillager(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}{R}");
|
||||
this.subtype.add(SubType.DRAGON);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
@ -114,13 +115,15 @@ class DreamPillagerEffect extends OneShotEffect {
|
|||
Set<Card> cards = controller.getLibrary().getTopCards(game, amount);
|
||||
if (!cards.isEmpty()) {
|
||||
controller.moveCards(cards, Zone.EXILED, source, game);
|
||||
Cards canBeCast = new CardsImpl();
|
||||
for (Card card : cards) {
|
||||
if (!card.isLand()) {
|
||||
ContinuousEffect effect = new DreamPillagerCastFromExileEffect();
|
||||
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game)));
|
||||
game.addEffect(effect, source);
|
||||
canBeCast.add(card);
|
||||
}
|
||||
}
|
||||
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTargets(canBeCast, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -129,31 +132,3 @@ class DreamPillagerEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class DreamPillagerCastFromExileEffect extends AsThoughEffectImpl {
|
||||
|
||||
public DreamPillagerCastFromExileEffect() {
|
||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
|
||||
staticText = "You may play the card from exile";
|
||||
}
|
||||
|
||||
public DreamPillagerCastFromExileEffect(final DreamPillagerCastFromExileEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DreamPillagerCastFromExileEffect copy() {
|
||||
return new DreamPillagerCastFromExileEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
return source.isControlledBy(affectedControllerId)
|
||||
&& objectId.equals(getTargetPointer().getFirst(game, source));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.e;
|
||||
|
||||
import java.util.Set;
|
||||
|
@ -10,6 +9,7 @@ import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbil
|
|||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -20,9 +20,9 @@ import mage.constants.Outcome;
|
|||
import mage.constants.SuperType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.RandomUtil;
|
||||
|
@ -81,8 +81,8 @@ class ElkinLairUpkeepEffect extends OneShotEffect {
|
|||
String exileName = sourcePermanent.getIdName() + " <this card may be played the turn it was exiled";
|
||||
player.moveCardsToExile(card, source, game, true, source.getSourceId(), exileName);
|
||||
if (game.getState().getZone(card.getId()) == Zone.EXILED) {
|
||||
ContinuousEffect effect = new ElkinLairPlayExiledEffect(Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game)));
|
||||
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED, Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(card, game));
|
||||
game.addEffect(effect, source);
|
||||
|
||||
DelayedTriggeredAbility delayed = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ElkinLairPutIntoGraveyardEffect());
|
||||
|
|
|
@ -145,7 +145,7 @@ class EtrataTheSilencerEffect extends OneShotEffect {
|
|||
}
|
||||
int cardsFound = 0;
|
||||
for (Card exiledCard : game.getExile().getAllCards(game)) {
|
||||
if (exiledCard.getCounters(game).getCount(CounterType.HIT) > 1 && exiledCard.getOwnerId().equals(player.getId())) {
|
||||
if (exiledCard.getCounters(game).getCount(CounterType.HIT) >= 1 && exiledCard.getOwnerId().equals(player.getId())) {
|
||||
cardsFound++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,14 +2,13 @@ package mage.cards.m;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect;
|
||||
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;
|
||||
|
@ -81,8 +80,8 @@ class MissionBriefingEffect extends OneShotEffect {
|
|||
}
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
ContinuousEffect effect = new MissionBriefingCastFromGraveyardEffect();
|
||||
effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game)));
|
||||
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect();
|
||||
effect.setTargetPointer(new FixedTarget(card, game));
|
||||
game.addEffect(effect, source);
|
||||
effect = new MissionBriefingReplacementEffect(card.getId());
|
||||
game.addEffect(effect, source);
|
||||
|
@ -92,33 +91,6 @@ class MissionBriefingEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
|
||||
class MissionBriefingCastFromGraveyardEffect extends AsThoughEffectImpl {
|
||||
|
||||
public MissionBriefingCastFromGraveyardEffect() {
|
||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
|
||||
}
|
||||
|
||||
public MissionBriefingCastFromGraveyardEffect(final MissionBriefingCastFromGraveyardEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MissionBriefingCastFromGraveyardEffect copy() {
|
||||
return new MissionBriefingCastFromGraveyardEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
return objectId.equals(this.getTargetPointer().getFirst(game, source))
|
||||
&& affectedControllerId.equals(source.getControllerId());
|
||||
}
|
||||
}
|
||||
|
||||
class MissionBriefingReplacementEffect extends ReplacementEffectImpl {
|
||||
|
||||
private final UUID cardId;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.n;
|
||||
|
||||
import java.util.Set;
|
||||
|
@ -77,7 +76,7 @@ class NarsetEnlightenedMasterExileEffect extends OneShotEffect {
|
|||
&& !card.isCreature()
|
||||
&& !card.isLand()) {
|
||||
ContinuousEffect effect = new NarsetEnlightenedMasterCastFromExileEffect();
|
||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||
effect.setTargetPointer(new FixedTarget(card, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
}
|
||||
|
@ -115,7 +114,8 @@ class NarsetEnlightenedMasterCastFromExileEffect extends AsThoughEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
if (objectId.equals(getTargetPointer().getFirst(game, source)) && affectedControllerId.equals(source.getControllerId())) {
|
||||
if (objectId.equals(getTargetPointer().getFirst(game, source))
|
||||
&& affectedControllerId.equals(source.getControllerId())) {
|
||||
Card card = game.getCard(objectId);
|
||||
if (card != null) {
|
||||
Player player = game.getPlayer(affectedControllerId);
|
||||
|
|
151
Mage.Sets/src/mage/sets/GuildKit1.java
Normal file
151
Mage.Sets/src/mage/sets/GuildKit1.java
Normal file
|
@ -0,0 +1,151 @@
|
|||
|
||||
package mage.sets;
|
||||
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SetType;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class GuildKit1 extends ExpansionSet {
|
||||
|
||||
private static final GuildKit1 instance = new GuildKit1();
|
||||
|
||||
public static GuildKit1 getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
private GuildKit1() {
|
||||
super("Guilds of Ravnica Guild Kits", "GK1", ExpansionSet.buildDate(2018, 11, 2), SetType.SUPPLEMENTAL);
|
||||
this.blockName = "Guild Kits";
|
||||
this.hasBasicLands = true;
|
||||
cards.add(new SetCardInfo("Abrupt Decay", 57, Rarity.RARE, mage.cards.a.AbruptDecay.class));
|
||||
cards.add(new SetCardInfo("Advent of the Wurm", 107, Rarity.RARE, mage.cards.a.AdventOfTheWurm.class));
|
||||
cards.add(new SetCardInfo("Agrus Kos, Wojek Veteran", 83, Rarity.RARE, mage.cards.a.AgrusKosWojekVeteran.class));
|
||||
cards.add(new SetCardInfo("Armada Wurm", 108, Rarity.MYTHIC, mage.cards.a.ArmadaWurm.class));
|
||||
cards.add(new SetCardInfo("Aurelia, the Warleader", 77, Rarity.MYTHIC, mage.cards.a.AureliaTheWarleader.class));
|
||||
cards.add(new SetCardInfo("Bomber Corps", 80, Rarity.COMMON, mage.cards.b.BomberCorps.class));
|
||||
cards.add(new SetCardInfo("Boros Charm", 84, Rarity.UNCOMMON, mage.cards.b.BorosCharm.class));
|
||||
cards.add(new SetCardInfo("Boros Elite", 78, Rarity.UNCOMMON, mage.cards.b.BorosElite.class));
|
||||
cards.add(new SetCardInfo("Boros Garrison", 98, Rarity.COMMON, mage.cards.b.BorosGarrison.class));
|
||||
cards.add(new SetCardInfo("Boros Keyrune", 96, Rarity.UNCOMMON, mage.cards.b.BorosKeyrune.class));
|
||||
cards.add(new SetCardInfo("Boros Reckoner", 85, Rarity.RARE, mage.cards.b.BorosReckoner.class));
|
||||
cards.add(new SetCardInfo("Boros Signet", 97, Rarity.COMMON, mage.cards.b.BorosSignet.class));
|
||||
cards.add(new SetCardInfo("Boros Swiftblade", 86, Rarity.UNCOMMON, mage.cards.b.BorosSwiftblade.class));
|
||||
cards.add(new SetCardInfo("Brightflame", 87, Rarity.RARE, mage.cards.b.Brightflame.class));
|
||||
cards.add(new SetCardInfo("Call of the Conclave", 109, Rarity.UNCOMMON, mage.cards.c.CallOfTheConclave.class));
|
||||
cards.add(new SetCardInfo("Call of the Nightwing", 8, Rarity.UNCOMMON, mage.cards.c.CallOfTheNightwing.class));
|
||||
cards.add(new SetCardInfo("Centaur Healer", 110, Rarity.COMMON, mage.cards.c.CentaurHealer.class));
|
||||
cards.add(new SetCardInfo("Cerebral Vortex", 35, Rarity.RARE, mage.cards.c.CerebralVortex.class));
|
||||
cards.add(new SetCardInfo("Char", 28, Rarity.RARE, mage.cards.c.Char.class));
|
||||
cards.add(new SetCardInfo("Circu, Dimir Lobotomist", 9, Rarity.RARE, mage.cards.c.CircuDimirLobotomist.class));
|
||||
cards.add(new SetCardInfo("Consuming Aberration", 10, Rarity.RARE, mage.cards.c.ConsumingAberration.class));
|
||||
cards.add(new SetCardInfo("Daring Skyjek", 79, Rarity.COMMON, mage.cards.d.DaringSkyjek.class));
|
||||
cards.add(new SetCardInfo("Darkblast", 51, Rarity.UNCOMMON, mage.cards.d.Darkblast.class));
|
||||
cards.add(new SetCardInfo("Deadbridge Chant", 58, Rarity.MYTHIC, mage.cards.d.DeadbridgeChant.class));
|
||||
cards.add(new SetCardInfo("Deadbridge Goliath", 55, Rarity.RARE, mage.cards.d.DeadbridgeGoliath.class));
|
||||
cards.add(new SetCardInfo("Deathrite Shaman", 59, Rarity.RARE, mage.cards.d.DeathriteShaman.class));
|
||||
cards.add(new SetCardInfo("Devouring Light", 103, Rarity.UNCOMMON, mage.cards.d.DevouringLight.class));
|
||||
cards.add(new SetCardInfo("Dimir Aqueduct", 23, Rarity.COMMON, mage.cards.d.DimirAqueduct.class));
|
||||
cards.add(new SetCardInfo("Dimir Charm", 11, Rarity.UNCOMMON, mage.cards.d.DimirCharm.class));
|
||||
cards.add(new SetCardInfo("Dimir Doppelganger", 12, Rarity.RARE, mage.cards.d.DimirDoppelganger.class));
|
||||
cards.add(new SetCardInfo("Dimir Guildmage", 13, Rarity.UNCOMMON, mage.cards.d.DimirGuildmage.class));
|
||||
cards.add(new SetCardInfo("Dimir Signet", 22, Rarity.COMMON, mage.cards.d.DimirSignet.class));
|
||||
cards.add(new SetCardInfo("Dinrova Horror", 14, Rarity.UNCOMMON, mage.cards.d.DinrovaHorror.class));
|
||||
cards.add(new SetCardInfo("Djinn Illuminatus", 36, Rarity.RARE, mage.cards.d.DjinnIlluminatus.class));
|
||||
cards.add(new SetCardInfo("Drown in Filth", 60, Rarity.COMMON, mage.cards.d.DrownInFilth.class));
|
||||
cards.add(new SetCardInfo("Dryad Militant", 111, Rarity.UNCOMMON, mage.cards.d.DryadMilitant.class));
|
||||
cards.add(new SetCardInfo("Electrickery", 29, Rarity.COMMON, mage.cards.e.Electrickery.class));
|
||||
cards.add(new SetCardInfo("Electrolyze", 37, Rarity.UNCOMMON, mage.cards.e.Electrolyze.class));
|
||||
cards.add(new SetCardInfo("Elves of Deep Shadow", 56, Rarity.COMMON, mage.cards.e.ElvesOfDeepShadow.class));
|
||||
cards.add(new SetCardInfo("Etrata, the Silencer", 1, Rarity.RARE, mage.cards.e.EtrataTheSilencer.class));
|
||||
cards.add(new SetCardInfo("Firemane Angel", 88, Rarity.RARE, mage.cards.f.FiremaneAngel.class));
|
||||
cards.add(new SetCardInfo("Firemane Avenger", 89, Rarity.RARE, mage.cards.f.FiremaneAvenger.class));
|
||||
cards.add(new SetCardInfo("Forest", 76, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Forest", 127, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Frenzied Goblin", 81, Rarity.UNCOMMON, mage.cards.f.FrenziedGoblin.class));
|
||||
cards.add(new SetCardInfo("Gather Courage", 105, Rarity.COMMON, mage.cards.g.GatherCourage.class));
|
||||
cards.add(new SetCardInfo("Gaze of Granite", 61, Rarity.RARE, mage.cards.g.GazeOfGranite.class));
|
||||
cards.add(new SetCardInfo("Gelectrode", 38, Rarity.UNCOMMON, mage.cards.g.Gelectrode.class));
|
||||
cards.add(new SetCardInfo("Glare of Subdual", 112, Rarity.RARE, mage.cards.g.GlareOfSubdual.class));
|
||||
cards.add(new SetCardInfo("Glimpse the Unthinkable", 15, Rarity.RARE, mage.cards.g.GlimpseTheUnthinkable.class));
|
||||
cards.add(new SetCardInfo("Goblin Rally", 30, Rarity.UNCOMMON, mage.cards.g.GoblinRally.class));
|
||||
cards.add(new SetCardInfo("Golgari Charm", 62, Rarity.UNCOMMON, mage.cards.g.GolgariCharm.class));
|
||||
cards.add(new SetCardInfo("Golgari Rot Farm", 74, Rarity.COMMON, mage.cards.g.GolgariRotFarm.class));
|
||||
cards.add(new SetCardInfo("Golgari Signet", 73, Rarity.COMMON, mage.cards.g.GolgariSignet.class));
|
||||
cards.add(new SetCardInfo("Grave-Shell Scarab", 63, Rarity.RARE, mage.cards.g.GraveShellScarab.class));
|
||||
cards.add(new SetCardInfo("Grisly Salvage", 64, Rarity.COMMON, mage.cards.g.GrislySalvage.class));
|
||||
cards.add(new SetCardInfo("Grove of the Guardian", 124, Rarity.RARE, mage.cards.g.GroveOfTheGuardian.class));
|
||||
cards.add(new SetCardInfo("Growing Ranks", 113, Rarity.RARE, mage.cards.g.GrowingRanks.class));
|
||||
cards.add(new SetCardInfo("Guttersnipe", 31, Rarity.UNCOMMON, mage.cards.g.Guttersnipe.class));
|
||||
cards.add(new SetCardInfo("Hour of Reckoning", 104, Rarity.RARE, mage.cards.h.HourOfReckoning.class));
|
||||
cards.add(new SetCardInfo("Hypersonic Dragon", 39, Rarity.RARE, mage.cards.h.HypersonicDragon.class));
|
||||
cards.add(new SetCardInfo("Invoke the Firemind", 40, Rarity.RARE, mage.cards.i.InvokeTheFiremind.class));
|
||||
cards.add(new SetCardInfo("Island", 24, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Island", 48, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Izoni, Thousand-Eyed", 50, Rarity.RARE, mage.cards.i.IzoniThousandEyed.class));
|
||||
cards.add(new SetCardInfo("Izzet Boilerworks", 47, Rarity.COMMON, mage.cards.i.IzzetBoilerworks.class));
|
||||
cards.add(new SetCardInfo("Izzet Charm", 41, Rarity.UNCOMMON, mage.cards.i.IzzetCharm.class));
|
||||
cards.add(new SetCardInfo("Izzet Signet", 46, Rarity.COMMON, mage.cards.i.IzzetSignet.class));
|
||||
cards.add(new SetCardInfo("Jarad, Golgari Lich Lord", 65, Rarity.MYTHIC, mage.cards.j.JaradGolgariLichLord.class));
|
||||
cards.add(new SetCardInfo("Korozda Guildmage", 66, Rarity.UNCOMMON, mage.cards.k.KorozdaGuildmage.class));
|
||||
cards.add(new SetCardInfo("Last Gasp", 5, Rarity.COMMON, mage.cards.l.LastGasp.class));
|
||||
cards.add(new SetCardInfo("Lazav, Dimir Mastermind", 16, Rarity.MYTHIC, mage.cards.l.LazavDimirMastermind.class));
|
||||
cards.add(new SetCardInfo("Legion Loyalist", 82, Rarity.RARE, mage.cards.l.LegionLoyalist.class));
|
||||
cards.add(new SetCardInfo("Lightning Helix", 90, Rarity.UNCOMMON, mage.cards.l.LightningHelix.class));
|
||||
cards.add(new SetCardInfo("Lotleth Troll", 67, Rarity.RARE, mage.cards.l.LotlethTroll.class));
|
||||
cards.add(new SetCardInfo("Loxodon Hierarch", 114, Rarity.RARE, mage.cards.l.LoxodonHierarch.class));
|
||||
cards.add(new SetCardInfo("Martial Glory", 91, Rarity.COMMON, mage.cards.m.MartialGlory.class));
|
||||
cards.add(new SetCardInfo("Master Warcraft", 92, Rarity.RARE, mage.cards.m.MasterWarcraft.class));
|
||||
cards.add(new SetCardInfo("Mirko Vosk, Mind Drinker", 17, Rarity.RARE, mage.cards.m.MirkoVoskMindDrinker.class));
|
||||
cards.add(new SetCardInfo("Mizzium Mortars", 32, Rarity.RARE, mage.cards.m.MizziumMortars.class));
|
||||
cards.add(new SetCardInfo("Moroii", 18, Rarity.UNCOMMON, mage.cards.m.Moroii.class));
|
||||
cards.add(new SetCardInfo("Mountain", 49, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Mountain", 101, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Netherborn Phalanx", 6, Rarity.UNCOMMON, mage.cards.n.NetherbornPhalanx.class));
|
||||
cards.add(new SetCardInfo("Nightveil Specter", 19, Rarity.RARE, mage.cards.n.NightveilSpecter.class));
|
||||
cards.add(new SetCardInfo("Niv-Mizzet, the Firemind", 26, Rarity.RARE, mage.cards.n.NivMizzetTheFiremind.class));
|
||||
cards.add(new SetCardInfo("Nivix Guildmage", 42, Rarity.UNCOMMON, mage.cards.n.NivixGuildmage.class));
|
||||
cards.add(new SetCardInfo("Plains", 100, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Plains", 126, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Pollenbright Wings", 115, Rarity.UNCOMMON, mage.cards.p.PollenbrightWings.class));
|
||||
cards.add(new SetCardInfo("Privileged Position", 116, Rarity.RARE, mage.cards.p.PrivilegedPosition.class));
|
||||
cards.add(new SetCardInfo("Putrefy", 68, Rarity.UNCOMMON, mage.cards.p.Putrefy.class));
|
||||
cards.add(new SetCardInfo("Pyromatics", 33, Rarity.COMMON, mage.cards.p.Pyromatics.class));
|
||||
cards.add(new SetCardInfo("Razia, Boros Archangel", 93, Rarity.RARE, mage.cards.r.RaziaBorosArchangel.class));
|
||||
cards.add(new SetCardInfo("Ribbons of Night", 7, Rarity.UNCOMMON, mage.cards.r.RibbonsOfNight.class));
|
||||
cards.add(new SetCardInfo("Savra, Queen of the Golgari", 69, Rarity.RARE, mage.cards.s.SavraQueenOfTheGolgari.class));
|
||||
cards.add(new SetCardInfo("Scatter the Seeds", 106, Rarity.COMMON, mage.cards.s.ScatterTheSeeds.class));
|
||||
cards.add(new SetCardInfo("Selesnya Charm", 117, Rarity.UNCOMMON, mage.cards.s.SelesnyaCharm.class));
|
||||
cards.add(new SetCardInfo("Selesnya Evangel", 118, Rarity.COMMON, mage.cards.s.SelesnyaEvangel.class));
|
||||
cards.add(new SetCardInfo("Selesnya Guildmage", 119, Rarity.UNCOMMON, mage.cards.s.SelesnyaGuildmage.class));
|
||||
cards.add(new SetCardInfo("Selesnya Sanctuary", 125, Rarity.COMMON, mage.cards.s.SelesnyaSanctuary.class));
|
||||
cards.add(new SetCardInfo("Selesnya Signet", 123, Rarity.COMMON, mage.cards.s.SelesnyaSignet.class));
|
||||
cards.add(new SetCardInfo("Shambling Shell", 70, Rarity.COMMON, mage.cards.s.ShamblingShell.class));
|
||||
cards.add(new SetCardInfo("Shattering Spree", 34, Rarity.UNCOMMON, mage.cards.s.ShatteringSpree.class));
|
||||
cards.add(new SetCardInfo("Sisters of Stone Death", 71, Rarity.RARE, mage.cards.s.SistersOfStoneDeath.class));
|
||||
cards.add(new SetCardInfo("Slum Reaper", 52, Rarity.UNCOMMON, mage.cards.s.SlumReaper.class));
|
||||
cards.add(new SetCardInfo("Spark Trooper", 94, Rarity.RARE, mage.cards.s.SparkTrooper.class));
|
||||
cards.add(new SetCardInfo("Stinkweed Imp", 53, Rarity.COMMON, mage.cards.s.StinkweedImp.class));
|
||||
cards.add(new SetCardInfo("Stitch in Time", 43, Rarity.RARE, mage.cards.s.StitchInTime.class));
|
||||
cards.add(new SetCardInfo("Stolen Identity", 2, Rarity.RARE, mage.cards.s.StolenIdentity.class));
|
||||
cards.add(new SetCardInfo("Sundering Growth", 120, Rarity.COMMON, mage.cards.s.SunderingGrowth.class));
|
||||
cards.add(new SetCardInfo("Sunhome Guildmage", 95, Rarity.UNCOMMON, mage.cards.s.SunhomeGuildmage.class));
|
||||
cards.add(new SetCardInfo("Sunhome, Fortress of the Legion", 99, Rarity.UNCOMMON, mage.cards.s.SunhomeFortressOfTheLegion.class));
|
||||
cards.add(new SetCardInfo("Swamp", 25, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Swamp", 75, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Syncopate", 3, Rarity.UNCOMMON, mage.cards.s.Syncopate.class));
|
||||
cards.add(new SetCardInfo("Szadek, Lord of Secrets", 20, Rarity.RARE, mage.cards.s.SzadekLordOfSecrets.class));
|
||||
cards.add(new SetCardInfo("Telling Time", 4, Rarity.UNCOMMON, mage.cards.t.TellingTime.class));
|
||||
cards.add(new SetCardInfo("Thunderheads", 27, Rarity.UNCOMMON, mage.cards.t.Thunderheads.class));
|
||||
cards.add(new SetCardInfo("Tibor and Lumia", 44, Rarity.RARE, mage.cards.t.TiborAndLumia.class));
|
||||
cards.add(new SetCardInfo("Tolsimir Wolfblood", 121, Rarity.RARE, mage.cards.t.TolsimirWolfblood.class));
|
||||
cards.add(new SetCardInfo("Treasured Find", 72, Rarity.UNCOMMON, mage.cards.t.TreasuredFind.class));
|
||||
cards.add(new SetCardInfo("Trostani, Selesnya's Voice", 102, Rarity.MYTHIC, mage.cards.t.TrostaniSelesnyasVoice.class));
|
||||
cards.add(new SetCardInfo("Turn // Burn", 45, Rarity.UNCOMMON, mage.cards.t.TurnBurn.class));
|
||||
cards.add(new SetCardInfo("Vigor Mortis", 54, Rarity.UNCOMMON, mage.cards.v.VigorMortis.class));
|
||||
cards.add(new SetCardInfo("Warped Physique", 21, Rarity.UNCOMMON, mage.cards.w.WarpedPhysique.class));
|
||||
cards.add(new SetCardInfo("Watchwolf", 122, Rarity.UNCOMMON, mage.cards.w.Watchwolf.class));
|
||||
}
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package org.mage.test.cards.asthough;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
|
@ -99,8 +98,9 @@ public class PlayFromNonHandZoneTest extends CardTestPlayerBase {
|
|||
|
||||
assertExileCount("Silvercoat Lion", 1);
|
||||
assertPermanentCount(playerB, "Abzan Banner", 1);
|
||||
assertPermanentCount(playerB, "Dragon Grip", 1);
|
||||
assertGraveyardCount(playerB, "Peach Garden Oath", 1);
|
||||
assertExileCount(playerB, "Dragon Grip", 0);
|
||||
assertGraveyardCount(playerB, "Dragon Grip", 0);
|
||||
|
||||
assertPowerToughness(playerB, "Narset, Enlightened Master", 5, 2);
|
||||
|
||||
|
@ -108,6 +108,8 @@ public class PlayFromNonHandZoneTest extends CardTestPlayerBase {
|
|||
assertLife(playerA, 17);
|
||||
assertLife(playerB, 22);
|
||||
|
||||
assertPermanentCount(playerB, "Dragon Grip", 1);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -140,7 +142,6 @@ public class PlayFromNonHandZoneTest extends CardTestPlayerBase {
|
|||
assertExileCount(playerB, "Plains", 3);
|
||||
assertExileCount(playerB, 3);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import mage.abilities.keyword.SpliceOntoArcaneAbility;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.cards.SplitCardHalf;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicate;
|
||||
|
@ -488,15 +489,23 @@ public class ContinuousEffects implements Serializable {
|
|||
*/
|
||||
public MageObjectReference asThough(UUID objectId, AsThoughEffectType type, Ability affectedAbility, UUID controllerId, Game game) {
|
||||
List<AsThoughEffect> asThoughEffectsList = getApplicableAsThoughEffects(type, game);
|
||||
for (AsThoughEffect effect : asThoughEffectsList) {
|
||||
Set<Ability> abilities = asThoughEffectsMap.get(type).getAbility(effect.getId());
|
||||
for (Ability ability : abilities) {
|
||||
if (affectedAbility == null) {
|
||||
if (effect.applies(objectId, ability, controllerId, game)) {
|
||||
if (!asThoughEffectsList.isEmpty()) {
|
||||
UUID idToCheck;
|
||||
if (affectedAbility != null && affectedAbility.getSourceObject(game) instanceof SplitCardHalf) {
|
||||
idToCheck = ((SplitCardHalf) affectedAbility.getSourceObject(game)).getParentCard().getId();
|
||||
} else {
|
||||
idToCheck = objectId;
|
||||
}
|
||||
for (AsThoughEffect effect : asThoughEffectsList) {
|
||||
Set<Ability> abilities = asThoughEffectsMap.get(type).getAbility(effect.getId());
|
||||
for (Ability ability : abilities) {
|
||||
if (affectedAbility == null) {
|
||||
if (effect.applies(idToCheck, ability, controllerId, game)) {
|
||||
return new MageObjectReference(ability.getSourceObject(game), game);
|
||||
}
|
||||
} else if (effect.applies(idToCheck, affectedAbility, ability, game, controllerId)) {
|
||||
return new MageObjectReference(ability.getSourceObject(game), game);
|
||||
}
|
||||
} else if (effect.applies(objectId, affectedAbility, ability, game, controllerId)) {
|
||||
return new MageObjectReference(ability.getSourceObject(game), game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
@ -39,7 +38,9 @@ public class AttachEffect extends OneShotEffect {
|
|||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (sourcePermanent != null) {
|
||||
int zcc = game.getState().getZoneChangeCounter(sourcePermanent.getId());
|
||||
if (zcc == source.getSourceObjectZoneChangeCounter() || zcc == source.getSourceObjectZoneChangeCounter() + 1) {
|
||||
if (zcc == source.getSourceObjectZoneChangeCounter()
|
||||
|| zcc == source.getSourceObjectZoneChangeCounter() + 1
|
||||
|| zcc == source.getSourceObjectZoneChangeCounter() + 2) {
|
||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (permanent != null) {
|
||||
return permanent.addAttachment(source.getSourceId(), game);
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
package mage.abilities.effects.common.asthought;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class PlayFromNotOwnHandZoneAllEffect extends AsThoughEffectImpl {
|
||||
|
||||
private final FilterCard filter;
|
||||
private final Zone fromZone;
|
||||
private final boolean onlyOwnedCards;
|
||||
private final TargetController allowedCaster;
|
||||
|
||||
public PlayFromNotOwnHandZoneAllEffect(FilterCard filter, Zone fromZone, boolean onlyOwnedCards, TargetController allowedCaster, Duration duration) {
|
||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, duration, Outcome.Benefit);
|
||||
this.filter = filter;
|
||||
this.fromZone = fromZone;
|
||||
this.onlyOwnedCards = onlyOwnedCards;
|
||||
this.allowedCaster = allowedCaster;
|
||||
}
|
||||
|
||||
public PlayFromNotOwnHandZoneAllEffect(final PlayFromNotOwnHandZoneAllEffect effect) {
|
||||
super(effect);
|
||||
this.filter = effect.filter;
|
||||
this.fromZone = effect.fromZone;
|
||||
this.onlyOwnedCards = effect.onlyOwnedCards;
|
||||
this.allowedCaster = effect.allowedCaster;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayFromNotOwnHandZoneAllEffect copy() {
|
||||
return new PlayFromNotOwnHandZoneAllEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
Card card = game.getCard(objectId);
|
||||
if (card != null) {
|
||||
switch (allowedCaster) {
|
||||
case YOU:
|
||||
if (affectedControllerId != source.getControllerId()) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case OPPONENT:
|
||||
if (!game.getOpponents(source.getControllerId()).contains(affectedControllerId)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return !onlyOwnedCards || card.getOwnerId().equals(source.getControllerId())
|
||||
&& filter.match(card, game)
|
||||
&& game.getState().getZone(card.getId()).match(fromZone);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
package mage.abilities.effects.common.asthought;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class PlayFromNotOwnHandZoneTargetEffect extends AsThoughEffectImpl {
|
||||
|
||||
private final Zone fromZone;
|
||||
private final TargetController allowedCaster;
|
||||
|
||||
public PlayFromNotOwnHandZoneTargetEffect() {
|
||||
this(Duration.EndOfTurn);
|
||||
}
|
||||
|
||||
public PlayFromNotOwnHandZoneTargetEffect(Duration duration) {
|
||||
this(Zone.ALL, TargetController.YOU, duration);
|
||||
}
|
||||
|
||||
public PlayFromNotOwnHandZoneTargetEffect(Zone fromZone, Duration duration) {
|
||||
this(fromZone, TargetController.YOU, duration);
|
||||
}
|
||||
|
||||
public PlayFromNotOwnHandZoneTargetEffect(Zone fromZone, TargetController allowedCaster, Duration duration) {
|
||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, duration, Outcome.Benefit);
|
||||
this.fromZone = fromZone;
|
||||
this.allowedCaster = allowedCaster;
|
||||
}
|
||||
|
||||
public PlayFromNotOwnHandZoneTargetEffect(final PlayFromNotOwnHandZoneTargetEffect effect) {
|
||||
super(effect);
|
||||
this.fromZone = effect.fromZone;
|
||||
this.allowedCaster = effect.allowedCaster;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayFromNotOwnHandZoneTargetEffect copy() {
|
||||
return new PlayFromNotOwnHandZoneTargetEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
switch (allowedCaster) {
|
||||
case YOU:
|
||||
if (affectedControllerId != source.getControllerId()) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case OPPONENT:
|
||||
if (!game.getOpponents(source.getControllerId()).contains(affectedControllerId)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case ANY:
|
||||
break;
|
||||
}
|
||||
List<UUID> targets = getTargetPointer().getTargets(game, source);
|
||||
if (targets.isEmpty()) {
|
||||
this.discard();
|
||||
return false;
|
||||
}
|
||||
return targets.contains(objectId)
|
||||
&& affectedControllerId.equals(source.getControllerId())
|
||||
&& game.getState().getZone(objectId).match(fromZone);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -68,16 +67,19 @@ class AftermathCastFromGraveyard extends AsThoughEffectImpl {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
if (objectId.equals(source.getSourceId())
|
||||
public boolean applies(UUID objectId, Ability affectedAbility, Ability source, Game game, UUID affectedControllerId) {
|
||||
if (affectedAbility != null && affectedAbility.getSourceId().equals(source.getSourceId())
|
||||
&& affectedControllerId.equals(source.getControllerId())) {
|
||||
Card card = game.getCard(source.getSourceId());
|
||||
if (card != null && game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) {
|
||||
return true;
|
||||
}
|
||||
return game.getState().getZone(objectId).equals(Zone.GRAVEYARD);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class AftermathCantCastFromHand extends ContinuousRuleModifyingEffectImpl {
|
||||
|
@ -168,17 +170,14 @@ class AftermathExileAsResolvesFromGraveyard extends ReplacementEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
UUID sourceId = source.getSourceId();
|
||||
Card sourceCard = game.getCard(source.getSourceId());
|
||||
if (sourceCard instanceof SplitCardHalf) {
|
||||
sourceCard = ((SplitCardHalf) sourceCard).getParentCard();
|
||||
sourceId = sourceCard.getId();
|
||||
}
|
||||
|
||||
if (sourceCard != null) {
|
||||
Player player = game.getPlayer(sourceCard.getOwnerId());
|
||||
if (player != null) {
|
||||
return player.moveCardToExileWithInfo(sourceCard, null, "", sourceId, game, ((ZoneChangeEvent) event).getFromZone(), true);
|
||||
return player.moveCards(sourceCard, Zone.EXILED, source, game);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ElfKnightToken extends TokenImpl {
|
||||
|
||||
public ElfKnightToken() {
|
||||
super("Knight Ally", "2/2 green and white Elf Knight creature token with vigilance");
|
||||
super("Elf Knight", "2/2 green and white Elf Knight creature token with vigilance");
|
||||
this.setExpansionSetCodeForImage("GRN");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package mage.players;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
import mage.ConditionalMana;
|
||||
import mage.MageObject;
|
||||
import mage.MageObjectReference;
|
||||
|
@ -68,11 +72,6 @@ import mage.util.GameLog;
|
|||
import mage.util.RandomUtil;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public abstract class PlayerImpl implements Player, Serializable {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(PlayerImpl.class);
|
||||
|
@ -2563,7 +2562,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
/**
|
||||
* @param game
|
||||
* @param appliedEffects
|
||||
* @param numSides Number of sides the dice has
|
||||
* @param numSides Number of sides the dice has
|
||||
* @return the number that the player rolled
|
||||
*/
|
||||
@Override
|
||||
|
@ -2597,10 +2596,10 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
/**
|
||||
* @param game
|
||||
* @param appliedEffects
|
||||
* @param numberChaosSides The number of chaos sides the planar die
|
||||
* currently has (normally 1 but can be 5)
|
||||
* @param numberChaosSides The number of chaos sides the planar die
|
||||
* currently has (normally 1 but can be 5)
|
||||
* @param numberPlanarSides The number of chaos sides the planar die
|
||||
* currently has (normally 1)
|
||||
* currently has (normally 1)
|
||||
* @return the outcome that the player rolled. Either ChaosRoll, PlanarRoll
|
||||
* or NilRoll
|
||||
*/
|
||||
|
@ -2757,7 +2756,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
/**
|
||||
* @param ability
|
||||
* @param available if null, it won't be checked if enough mana is available
|
||||
* @param available if null, it won't be checked if enough mana is available
|
||||
* @param sourceObject
|
||||
* @param game
|
||||
* @return
|
||||
|
@ -2927,7 +2926,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
}
|
||||
|
||||
private void getPlayableFromGraveyardCard(Game game, Card card, Abilities<Ability> candidateAbilities, ManaOptions availableMana, List<Ability> output) {
|
||||
MageObjectReference permittingObject = game.getContinuousEffects().asThough(card.getId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, null, this.getId(), game);
|
||||
MageObjectReference permittingObject = game.getContinuousEffects().asThough(card.getId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, card.getSpellAbility(), this.getId(), game);
|
||||
for (ActivatedAbility ability : candidateAbilities.getActivatedAbilities(Zone.ALL)) {
|
||||
boolean possible = false;
|
||||
if (ability.getZone().match(Zone.GRAVEYARD)) {
|
||||
|
@ -3033,7 +3032,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
if (player != null) {
|
||||
if (/*player.isTopCardRevealed() &&*/player.getLibrary().hasCards()) {
|
||||
Card card = player.getLibrary().getFromTop(game);
|
||||
if (null != game.getContinuousEffects().asThough(card.getId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, null, getId(), game)) {
|
||||
if (null != game.getContinuousEffects().asThough(card.getId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, card.getSpellAbility(), getId(), game)) {
|
||||
for (ActivatedAbility ability : card.getAbilities().getActivatedAbilities(Zone.HAND)) {
|
||||
if (ability instanceof SpellAbility || ability instanceof PlayLandAbility) {
|
||||
playable.add(ability);
|
||||
|
@ -3309,7 +3308,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
@Override
|
||||
public boolean canPaySacrificeCost(Permanent permanent, UUID sourceId,
|
||||
UUID controllerId, Game game
|
||||
UUID controllerId, Game game
|
||||
) {
|
||||
return sacrificeCostFilter == null || !sacrificeCostFilter.match(permanent, sourceId, controllerId, game);
|
||||
}
|
||||
|
@ -3457,8 +3456,8 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
@Override
|
||||
public boolean moveCards(Card card, Zone toZone,
|
||||
Ability source, Game game,
|
||||
boolean tapped, boolean faceDown, boolean byOwner, List<UUID> appliedEffects
|
||||
Ability source, Game game,
|
||||
boolean tapped, boolean faceDown, boolean byOwner, List<UUID> appliedEffects
|
||||
) {
|
||||
Set<Card> cardList = new HashSet<>();
|
||||
if (card != null) {
|
||||
|
@ -3469,22 +3468,22 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
@Override
|
||||
public boolean moveCards(Cards cards, Zone toZone,
|
||||
Ability source, Game game
|
||||
Ability source, Game game
|
||||
) {
|
||||
return moveCards(cards.getCards(game), toZone, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCards(Set<Card> cards, Zone toZone,
|
||||
Ability source, Game game
|
||||
Ability source, Game game
|
||||
) {
|
||||
return moveCards(cards, toZone, source, game, false, false, false, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCards(Set<Card> cards, Zone toZone,
|
||||
Ability source, Game game,
|
||||
boolean tapped, boolean faceDown, boolean byOwner, List<UUID> appliedEffects
|
||||
Ability source, Game game,
|
||||
boolean tapped, boolean faceDown, boolean byOwner, List<UUID> appliedEffects
|
||||
) {
|
||||
if (cards.isEmpty()) {
|
||||
return true;
|
||||
|
@ -3570,8 +3569,8 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
@Override
|
||||
public boolean moveCardsToExile(Card card, Ability source,
|
||||
Game game, boolean withName, UUID exileId,
|
||||
String exileZoneName
|
||||
Game game, boolean withName, UUID exileId,
|
||||
String exileZoneName
|
||||
) {
|
||||
Set<Card> cards = new HashSet<>();
|
||||
cards.add(card);
|
||||
|
@ -3580,8 +3579,8 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
@Override
|
||||
public boolean moveCardsToExile(Set<Card> cards, Ability source,
|
||||
Game game, boolean withName, UUID exileId,
|
||||
String exileZoneName
|
||||
Game game, boolean withName, UUID exileId,
|
||||
String exileZoneName
|
||||
) {
|
||||
if (cards.isEmpty()) {
|
||||
return true;
|
||||
|
@ -3596,14 +3595,14 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
@Override
|
||||
public boolean moveCardToHandWithInfo(Card card, UUID sourceId,
|
||||
Game game
|
||||
Game game
|
||||
) {
|
||||
return this.moveCardToHandWithInfo(card, sourceId, game, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean moveCardToHandWithInfo(Card card, UUID sourceId,
|
||||
Game game, boolean withName
|
||||
Game game, boolean withName
|
||||
) {
|
||||
boolean result = false;
|
||||
Zone fromZone = game.getState().getZone(card.getId());
|
||||
|
@ -3628,7 +3627,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
@Override
|
||||
public Set<Card> moveCardsToGraveyardWithInfo(Set<Card> allCards, Ability source,
|
||||
Game game, Zone fromZone
|
||||
Game game, Zone fromZone
|
||||
) {
|
||||
UUID sourceId = source == null ? null : source.getSourceId();
|
||||
Set<Card> movedCards = new LinkedHashSet<>();
|
||||
|
@ -3636,7 +3635,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
// identify cards from one owner
|
||||
Cards cards = new CardsImpl();
|
||||
UUID ownerId = null;
|
||||
for (Iterator<Card> it = allCards.iterator(); it.hasNext(); ) {
|
||||
for (Iterator<Card> it = allCards.iterator(); it.hasNext();) {
|
||||
Card card = it.next();
|
||||
if (cards.isEmpty()) {
|
||||
ownerId = card.getOwnerId();
|
||||
|
@ -3697,7 +3696,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
@Override
|
||||
public boolean moveCardToGraveyardWithInfo(Card card, UUID sourceId,
|
||||
Game game, Zone fromZone
|
||||
Game game, Zone fromZone
|
||||
) {
|
||||
if (card == null) {
|
||||
return false;
|
||||
|
@ -3726,8 +3725,8 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
@Override
|
||||
public boolean moveCardToLibraryWithInfo(Card card, UUID sourceId,
|
||||
Game game, Zone fromZone,
|
||||
boolean toTop, boolean withName
|
||||
Game game, Zone fromZone,
|
||||
boolean toTop, boolean withName
|
||||
) {
|
||||
if (card == null) {
|
||||
return false;
|
||||
|
@ -3761,7 +3760,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
@Override
|
||||
public boolean moveCardToExileWithInfo(Card card, UUID exileId, String exileName, UUID sourceId,
|
||||
Game game, Zone fromZone, boolean withName) {
|
||||
Game game, Zone fromZone, boolean withName) {
|
||||
if (card == null) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -21,6 +21,12 @@ public class FixedTarget implements TargetPointer {
|
|||
this.initialized = false;
|
||||
}
|
||||
|
||||
public FixedTarget(Card card, Game game) {
|
||||
this.targetId = card.getId();
|
||||
this.zoneChangeCounter = card.getZoneChangeCounter(game);
|
||||
this.initialized = true;
|
||||
}
|
||||
|
||||
public FixedTarget(Permanent permanent, Game game) {
|
||||
this.targetId = permanent.getId();
|
||||
this.zoneChangeCounter = permanent.getZoneChangeCounter(game);
|
||||
|
|
Loading…
Reference in a new issue