Fixed problem with duplicate class name.

This commit is contained in:
LevelX2 2017-09-25 12:01:13 +02:00
parent 1951d4fdcc
commit a316fe508f
2 changed files with 10 additions and 13 deletions

View file

@ -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;
}

View file

@ -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;
}