* Hinder - Fixed that the countered spell was always moved to top of library.

This commit is contained in:
LevelX2 2015-12-31 12:45:58 +01:00
parent 554e81a462
commit 35c672fa7a
14 changed files with 126 additions and 33 deletions

View file

@ -33,6 +33,7 @@ import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.constants.ZoneDetail;
import mage.target.TargetSpell;
/**
@ -46,7 +47,7 @@ public class Hinder extends CardImpl {
this.expansionSetCode = "CHK";
// Counter target spell. If that spell is countered this way, put that card on the top or bottom of its owner's library instead of into that player's graveyard.
this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.LIBRARY, true));
this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.LIBRARY, ZoneDetail.CHOOSE));
this.getSpellAbility().addTarget(new TargetSpell());
}

View file

@ -36,6 +36,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.constants.ZoneDetail;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetSpell;
@ -86,7 +87,7 @@ class SpellCrumpleCounterEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
return game.getStack().counter(targetPointer.getFirst(game, source), source.getSourceId(), game, Zone.LIBRARY, false, false);
return game.getStack().counter(targetPointer.getFirst(game, source), source.getSourceId(), game, Zone.LIBRARY, false, ZoneDetail.BOTTOM);
}
return false;
}

View file

@ -28,11 +28,12 @@
package mage.sets.conflux;
import java.util.UUID;
import mage.abilities.effects.common.CounterTargetWithReplacementEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.abilities.effects.common.CounterTargetWithReplacementEffect;
import mage.cards.CardImpl;
import mage.constants.ZoneDetail;
import mage.target.TargetSpell;
/**
@ -45,9 +46,8 @@ public class LapseOfCertainty extends CardImpl {
super(ownerId, 9, "Lapse of Certainty", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{W}");
this.expansionSetCode = "CON";
// Counter target spell. If that spell is countered this way, put it on top of its owner's library instead of into that player's graveyard.
this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.LIBRARY, true));
this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.LIBRARY, ZoneDetail.TOP));
this.getSpellAbility().addTarget(new TargetSpell());
}

View file

@ -40,6 +40,7 @@ import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.constants.ZoneDetail;
import mage.game.Game;
import mage.game.stack.Spell;
import mage.game.stack.StackObject;
@ -94,7 +95,7 @@ class SpelljackEffect extends OneShotEffect {
if (controller != null) {
UUID targetId = targetPointer.getFirst(game, source);
StackObject stackObject = game.getStack().getStackObject(targetId);
if (stackObject != null && game.getStack().counter(targetId, source.getSourceId(), game, Zone.EXILED, false, false)) {
if (stackObject != null && game.getStack().counter(targetId, source.getSourceId(), game, Zone.EXILED, false, ZoneDetail.NONE)) {
Card card = ((Spell) stackObject).getCard();
if (card != null) {
ContinuousEffect effect = new SpelljackCastFromExileEffect();

View file

@ -45,6 +45,7 @@ import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.constants.ZoneDetail;
import mage.game.Game;
import mage.game.stack.Spell;
import mage.game.stack.StackObject;
@ -109,7 +110,7 @@ class KheruSpellsnatcherEffect extends OneShotEffect {
StackObject stackObject = game.getStack().getStackObject(objectId);
if (stackObject != null
&& game.getStack().counter(targetPointer.getFirst(game, source), source.getSourceId(), game, Zone.EXILED, false, false)) {
&& game.getStack().counter(targetPointer.getFirst(game, source), source.getSourceId(), game, Zone.EXILED, false, ZoneDetail.NONE)) {
if (!((Spell) stackObject).isCopiedSpell()) {
MageObject card = game.getObject(stackObject.getSourceId());
if (card instanceof Card) {

View file

@ -27,15 +27,15 @@
*/
package mage.sets.seventhedition;
import mage.constants.CardType;
import mage.constants.Rarity;
import java.util.UUID;
import mage.abilities.effects.common.CounterTargetWithReplacementEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.constants.ZoneDetail;
import mage.target.TargetSpell;
import java.util.UUID;
/**
*
* @author magenoxx_at_gmail.com
@ -46,9 +46,8 @@ public class MemoryLapse extends CardImpl {
super(ownerId, 88, "Memory Lapse", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}");
this.expansionSetCode = "7ED";
// Counter target spell. If that spell is countered this way, put it on top of its owner's library instead of into that player's graveyard.
this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.LIBRARY, true));
this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.LIBRARY, ZoneDetail.TOP));
this.getSpellAbility().addTarget(new TargetSpell());
}

View file

@ -35,6 +35,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.constants.ZoneDetail;
import mage.filter.FilterSpell;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
@ -95,7 +96,7 @@ class DesertionEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
return game.getStack().counter(targetPointer.getFirst(game, source), source.getSourceId(), game, Zone.BATTLEFIELD, false, false);
return game.getStack().counter(targetPointer.getFirst(game, source), source.getSourceId(), game, Zone.BATTLEFIELD, false, ZoneDetail.NONE);
}
return false;
}