- Reverted r22549 and used another fix.

This commit is contained in:
Sloth
2013-07-12 13:39:21 +00:00
parent 18d3b1ffa8
commit 3ac1ddb51e
3 changed files with 9 additions and 2 deletions

View File

@@ -112,6 +112,7 @@ public class CardFactory {
out.setEnchantedBy(in.getEnchantedBy()); out.setEnchantedBy(in.getEnchantedBy());
out.setEnchanting(in.getEnchanting()); out.setEnchanting(in.getEnchanting());
out.setClones(in.getClones()); out.setClones(in.getClones());
out.setZone(in.getZone());
for (final Object o : in.getRemembered()) { for (final Object o : in.getRemembered()) {
out.addRemembered(o); out.addRemembered(o);
} }

View File

@@ -227,8 +227,7 @@ public class GameAction {
} }
zoneFrom.remove(c); zoneFrom.remove(c);
} }
ZoneType fromZoneType = zoneFrom == null ? ZoneType.Stack : zoneFrom.getZoneType();
zoneTo.getCardsAddedThisTurn().add(fromZoneType, c);
// "enter the battlefield as a copy" - apply code here // "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? // but how to query for input here and continue later while the callers assume synchronous result?
zoneTo.add(copied, position); zoneTo.add(copied, position);

View File

@@ -79,6 +79,13 @@ public class Zone implements IZone, java.io.Serializable, Iterable<Card> {
@Override @Override
public void add(final Card c, final Integer index) { public void add(final Card c, final Integer index) {
// Immutable cards are usually emblems and effects
if (!c.isImmutable()) {
final Zone oldZone = game.getZoneOf(c);
final ZoneType zt = oldZone == null ? ZoneType.Stack : oldZone.getZoneType();
cardsAddedThisTurn.add(zt, c);
}
c.setTurnInZone(game.getPhaseHandler().getTurn()); c.setTurnInZone(game.getPhaseHandler().getTurn());
if (zoneType != ZoneType.Battlefield) { if (zoneType != ZoneType.Battlefield) {
c.setTapped(false); c.setTapped(false);