diff --git a/Mage/src/mage/game/Game.java b/Mage/src/mage/game/Game.java index c57fc7d6df..170ac12fb3 100644 --- a/Mage/src/mage/game/Game.java +++ b/Mage/src/mage/game/Game.java @@ -177,6 +177,8 @@ public interface Game extends MageItem, Serializable { * @param applier */ public void copyPermanent(Permanent copyFromPermanent, Permanent copyToPermanent, Ability source, ApplyToPermanent applier); + + public Card copyCard(Card cardToCopy, Ability source, UUID newController); public void addTriggeredAbility(TriggeredAbility ability); public void addDelayedTriggeredAbility(DelayedTriggeredAbility delayedAbility); diff --git a/Mage/src/mage/game/GameImpl.java b/Mage/src/mage/game/GameImpl.java index 8557d0a2b5..1e7988b7d7 100644 --- a/Mage/src/mage/game/GameImpl.java +++ b/Mage/src/mage/game/GameImpl.java @@ -867,6 +867,19 @@ public abstract class GameImpl> implements Game, Serializa state.addEffect(newEffect, newAbility); } + @Override + public Card copyCard(Card cardToCopy, Ability source, UUID newController) { + Card copiedCard = cardToCopy.copy(); + copiedCard.assignNewId(); + copiedCard.setControllerId(newController); + copiedCard.setCopy(true); + Set cards = new HashSet(); + cards.add(copiedCard); + loadCards(cards, source.getControllerId()); + + return copiedCard; + } + @Override public void addTriggeredAbility(TriggeredAbility ability) { if (ability instanceof TriggeredManaAbility) { diff --git a/Mage/src/mage/game/stack/Spell.java b/Mage/src/mage/game/stack/Spell.java index 77b31f6f4f..60f6f4cfa8 100644 --- a/Mage/src/mage/game/stack/Spell.java +++ b/Mage/src/mage/game/stack/Spell.java @@ -101,7 +101,9 @@ public class Spell> implements StackObject, Card { return result; } } - card.moveToZone(Zone.GRAVEYARD, ability.getId(), game, false); + if (!card.isCopy()) { + card.moveToZone(Zone.GRAVEYARD, ability.getId(), game, false); + } } return result;