diff --git a/Mage.Sets/src/mage/cards/p/PlaneswalkersMischief.java b/Mage.Sets/src/mage/cards/p/PlaneswalkersMischief.java index 1e9bc9d243..3e2d14811d 100644 --- a/Mage.Sets/src/mage/cards/p/PlaneswalkersMischief.java +++ b/Mage.Sets/src/mage/cards/p/PlaneswalkersMischief.java @@ -115,7 +115,7 @@ class PlaneswalkersMischiefEffect extends OneShotEffect { effect.setTargetPointer(new FixedTarget(revealedCard.getId())); game.addEffect(effect, source); OneShotEffect effect2 = new ReturnFromExileEffect(source.getSourceId(), Zone.HAND); - Condition condition = new SpellWasNotCastCondition(source.getSourceId(), revealedCard.getId()); + Condition condition = new PlaneswalkersMischiefCondition(source.getSourceId(), revealedCard.getId()); ConditionalOneShotEffect effect3 = new ConditionalOneShotEffect(effect2, condition, "if you haven't cast it, return it to its owner's hand."); DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect3); game.addDelayedTriggeredAbility(delayedAbility, source); @@ -163,12 +163,12 @@ class PlaneswalkersMischiefCastFromExileEffect extends AsThoughEffectImpl { } } -class SpellWasNotCastCondition implements Condition { +class PlaneswalkersMischiefCondition implements Condition { protected UUID exileId; protected UUID cardId; - public SpellWasNotCastCondition(UUID exileId, UUID cardId) { + public PlaneswalkersMischiefCondition(UUID exileId, UUID cardId) { this.exileId = exileId; this.cardId = cardId; } diff --git a/Mage.Sets/src/mage/cards/p/PsychicTheft.java b/Mage.Sets/src/mage/cards/p/PsychicTheft.java index f3ecc5b1ea..0de93dd34e 100644 --- a/Mage.Sets/src/mage/cards/p/PsychicTheft.java +++ b/Mage.Sets/src/mage/cards/p/PsychicTheft.java @@ -42,8 +42,6 @@ import mage.abilities.effects.common.ReturnFromExileEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; import mage.filter.common.FilterInstantOrSorceryCard; import mage.constants.AsThoughEffectType; import mage.constants.CardType; @@ -58,7 +56,6 @@ import mage.target.TargetPlayer; import mage.target.targetpointer.FixedTarget; import mage.watchers.common.SpellsCastWatcher; - /** * * @author L_J (significantly based on code by jeffwadsworth and Styxo) @@ -119,16 +116,16 @@ class PsychicTheftEffect extends OneShotEffect { } } if (chosenCard != null) { - + opponent.moveCardToExileWithInfo(chosenCard, source.getSourceId(), sourceObject.getIdName(), source.getSourceId(), game, Zone.HAND, true); - + AsThoughEffect effect = new PsychicTheftCastFromExileEffect(); effect.setTargetPointer(new FixedTarget(chosenCard.getId())); game.addEffect(effect, source); - + OneShotEffect effect2 = new ReturnFromExileEffect(source.getSourceId(), Zone.HAND); - Condition condition = new SpellWasNotCastCondition(source.getSourceId(), chosenCard.getId()); - + Condition condition = new PsychicTheftCondition(source.getSourceId(), chosenCard.getId()); + ConditionalOneShotEffect effect3 = new ConditionalOneShotEffect(effect2, condition, "if you haven't cast it, return it to its owner's hand."); DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect3); game.addDelayedTriggeredAbility(delayedAbility, source); @@ -176,12 +173,12 @@ class PsychicTheftCastFromExileEffect extends AsThoughEffectImpl { } } -class SpellWasNotCastCondition implements Condition { +class PsychicTheftCondition implements Condition { protected UUID exileId; protected UUID cardId; - public SpellWasNotCastCondition(UUID exileId, UUID cardId) { + public PsychicTheftCondition(UUID exileId, UUID cardId) { this.exileId = exileId; this.cardId = cardId; }