mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
fixed Planar Void exiling cards no longer in the graveyard
This commit is contained in:
parent
35b6239e92
commit
6dcf7a2e53
1 changed files with 9 additions and 13 deletions
|
@ -1,10 +1,7 @@
|
||||||
|
|
||||||
package mage.cards.p;
|
package mage.cards.p;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.effects.common.ExileTargetEffect;
|
import mage.abilities.effects.common.ExileTargetEffect;
|
||||||
import mage.cards.Card;
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
@ -14,8 +11,9 @@ import mage.game.events.GameEvent;
|
||||||
import mage.game.events.ZoneChangeEvent;
|
import mage.game.events.ZoneChangeEvent;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author spjspj
|
* @author spjspj
|
||||||
*/
|
*/
|
||||||
public final class PlanarVoid extends CardImpl {
|
public final class PlanarVoid extends CardImpl {
|
||||||
|
@ -39,11 +37,11 @@ public final class PlanarVoid extends CardImpl {
|
||||||
|
|
||||||
class PlanarVoidTriggeredAbility extends TriggeredAbilityImpl {
|
class PlanarVoidTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
public PlanarVoidTriggeredAbility() {
|
PlanarVoidTriggeredAbility() {
|
||||||
super(Zone.BATTLEFIELD, new ExileTargetEffect(), false);
|
super(Zone.BATTLEFIELD, new ExileTargetEffect(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlanarVoidTriggeredAbility(final PlanarVoidTriggeredAbility ability) {
|
private PlanarVoidTriggeredAbility(final PlanarVoidTriggeredAbility ability) {
|
||||||
super(ability);
|
super(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,14 +58,12 @@ class PlanarVoidTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||||
if (zEvent.getToZone() == Zone.GRAVEYARD && !event.getTargetId().equals(getSourceId())) {
|
if (zEvent.getToZone() != Zone.GRAVEYARD
|
||||||
Card card = game.getCard(event.getTargetId());
|
|| event.getTargetId().equals(getSourceId())) {
|
||||||
if (card != null) {
|
return false;
|
||||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(card.getId()));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
this.getEffects().setTargetPointer(new FixedTarget(event.getTargetId(), game));
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue