mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
* 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:
parent
4a98e1ba07
commit
93825fff9c
2 changed files with 6 additions and 3 deletions
|
@ -85,7 +85,7 @@ public class WheelOfSunAndMoon extends CardImpl {
|
|||
class WheelOfSunAndMoonEffect extends ReplacementEffectImpl {
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
@ -126,10 +126,9 @@ class WheelOfSunAndMoonEffect extends ReplacementEffectImpl {
|
|||
if (controller != null && sourceObject != null) {
|
||||
Card card = game.getCard(event.getTargetId());
|
||||
if (card != null) {
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
Cards cards = new CardsImpl(card);
|
||||
controller.revealCards(sourceObject.getIdName(), cards, game);
|
||||
controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, zEvent.getFromZone(), false, true);
|
||||
controller.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -636,6 +636,10 @@ public class Spell extends StackObjImpl implements Card {
|
|||
if (this.isCopiedSpell() && !zone.equals(Zone.STACK)) {
|
||||
return true;
|
||||
}
|
||||
Card card = game.getCard(getSourceId());
|
||||
if (card != null) {
|
||||
return card.moveToZone(zone, sourceId, game, flag, appliedEffects);
|
||||
}
|
||||
throw new UnsupportedOperationException("Unsupported operation");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue