* Fixed a bug where wrongly a card object was moved for a copied spell.

This commit is contained in:
LevelX2 2015-11-26 00:48:28 +01:00
parent 69d3bc0575
commit e51c4d5f67
9 changed files with 142 additions and 39 deletions

View file

@ -34,6 +34,7 @@ import mage.cards.Card;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.stack.Spell;
import mage.players.Player;
/**
@ -62,9 +63,12 @@ public class ExileSpellEffect extends OneShotEffect implements MageSingleton {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Card spellCard = game.getStack().getSpell(source.getSourceId()).getCard();
if (spellCard != null) {
controller.moveCards(spellCard, Zone.EXILED, source, game);
Spell spell = game.getStack().getSpell(source.getId());
if (spell != null && !spell.isCopiedSpell()) {
Card spellCard = spell.getCard();
if (spellCard != null) {
controller.moveCards(spellCard, Zone.EXILED, source, game);
}
}
return true;
}

View file

@ -3299,7 +3299,7 @@ public abstract class PlayerImpl implements Player, Serializable {
card = game.getCard(card.getId());
}
StringBuilder sb = new StringBuilder(this.getLogName())
.append(" puts ").append(card.getLogName()).append(" ")
.append(" puts ").append(card.getLogName()).append(" ").append(card.isCopy() ? "(Copy) " : "")
.append(fromZone != null ? "from " + fromZone.toString().toLowerCase(Locale.ENGLISH) + " " : "");
if (card.getOwnerId().equals(getId())) {
sb.append("into his or her graveyard");