* Wheel of Sun and Moon - Fixed a bug that happened as Wheel of Sun and Moon tried to move the card of a spell cast to the library.

This commit is contained in:
LevelX2 2015-09-02 16:20:05 +02:00
parent 4a98e1ba07
commit 93825fff9c
2 changed files with 6 additions and 3 deletions

View file

@ -85,7 +85,7 @@ public class WheelOfSunAndMoon extends CardImpl {
class WheelOfSunAndMoonEffect extends ReplacementEffectImpl { class WheelOfSunAndMoonEffect extends ReplacementEffectImpl {
public WheelOfSunAndMoonEffect() { public WheelOfSunAndMoonEffect() {
super(Duration.WhileOnBattlefield, Outcome.Damage); super(Duration.WhileOnBattlefield, Outcome.Detriment);
staticText = "If a card would be put into enchanted player's graveyard from anywhere, instead that card is revealed and put on the bottom of that player's library"; staticText = "If a card would be put into enchanted player's graveyard from anywhere, instead that card is revealed and put on the bottom of that player's library";
} }
@ -126,10 +126,9 @@ class WheelOfSunAndMoonEffect extends ReplacementEffectImpl {
if (controller != null && sourceObject != null) { if (controller != null && sourceObject != null) {
Card card = game.getCard(event.getTargetId()); Card card = game.getCard(event.getTargetId());
if (card != null) { if (card != null) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
Cards cards = new CardsImpl(card); Cards cards = new CardsImpl(card);
controller.revealCards(sourceObject.getIdName(), cards, game); controller.revealCards(sourceObject.getIdName(), cards, game);
controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, zEvent.getFromZone(), false, true); controller.putCardsOnBottomOfLibrary(cards, game, source, false);
return true; return true;
} }
} }

View file

@ -636,6 +636,10 @@ public class Spell extends StackObjImpl implements Card {
if (this.isCopiedSpell() && !zone.equals(Zone.STACK)) { if (this.isCopiedSpell() && !zone.equals(Zone.STACK)) {
return true; return true;
} }
Card card = game.getCard(getSourceId());
if (card != null) {
return card.moveToZone(zone, sourceId, game, flag, appliedEffects);
}
throw new UnsupportedOperationException("Unsupported operation"); throw new UnsupportedOperationException("Unsupported operation");
} }