mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +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;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -14,8 +11,9 @@ import mage.game.events.GameEvent;
|
|||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public final class PlanarVoid extends CardImpl {
|
||||
|
@ -39,11 +37,11 @@ public final class PlanarVoid extends CardImpl {
|
|||
|
||||
class PlanarVoidTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public PlanarVoidTriggeredAbility() {
|
||||
PlanarVoidTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new ExileTargetEffect(), false);
|
||||
}
|
||||
|
||||
public PlanarVoidTriggeredAbility(final PlanarVoidTriggeredAbility ability) {
|
||||
private PlanarVoidTriggeredAbility(final PlanarVoidTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
|
@ -60,14 +58,12 @@ class PlanarVoidTriggeredAbility extends TriggeredAbilityImpl {
|
|||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
if (zEvent.getToZone() == Zone.GRAVEYARD && !event.getTargetId().equals(getSourceId())) {
|
||||
Card card = game.getCard(event.getTargetId());
|
||||
if (card != null) {
|
||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(card.getId()));
|
||||
return true;
|
||||
}
|
||||
if (zEvent.getToZone() != Zone.GRAVEYARD
|
||||
|| event.getTargetId().equals(getSourceId())) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
this.getEffects().setTargetPointer(new FixedTarget(event.getTargetId(), game));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue