diff --git a/src/main/java/forge/game/GameAction.java b/src/main/java/forge/game/GameAction.java index 2c2a65831b1..af7c9282171 100644 --- a/src/main/java/forge/game/GameAction.java +++ b/src/main/java/forge/game/GameAction.java @@ -227,7 +227,8 @@ public class GameAction { } zoneFrom.remove(c); } - + ZoneType fromZoneType = zoneFrom == null ? null : zoneFrom.getZoneType(); + zoneTo.getCardsAddedThisTurn().add(fromZoneType, c); // "enter the battlefield as a copy" - apply code here // but how to query for input here and continue later while the callers assume synchronous result? zoneTo.add(copied, position); diff --git a/src/main/java/forge/game/zone/Zone.java b/src/main/java/forge/game/zone/Zone.java index 1f45b9ebbec..ecfcff77224 100644 --- a/src/main/java/forge/game/zone/Zone.java +++ b/src/main/java/forge/game/zone/Zone.java @@ -78,14 +78,6 @@ public class Zone implements IZone, java.io.Serializable, Iterable { @Override public void add(final Card c, final Integer index) { - // Immutable cards are usually emblems,effects and the mana pool and we - // don't want to log those. - if (!c.isImmutable()) { - final Zone oldZone = game.getZoneOf(c); - // if any tokens come to battlefield, consider they are from stack. Plain "null" cannot be a key of EnumMap - final ZoneType zt = oldZone == null ? ZoneType.Stack : oldZone.getZoneType(); - cardsAddedThisTurn.add(zt, c); - } c.setTurnInZone(game.getPhaseHandler().getTurn()); if (zoneType != ZoneType.Battlefield) { @@ -174,6 +166,15 @@ public class Zone implements IZone, java.io.Serializable, Iterable { return this.cardList.isEmpty(); } + /** + *

+ * Getter for the field cardsAddedThisTurn. + *

+ */ + public final MapOfLists getCardsAddedThisTurn() { + return cardsAddedThisTurn; + } + /** *

* Getter for the field cardsAddedThisTurn.