From b589539cd329c76140a287781a07f356889d548d Mon Sep 17 00:00:00 2001 From: Hellfish Date: Sat, 27 Aug 2011 11:18:20 +0000 Subject: [PATCH] *Hopefully fixed the "triggers for wrong player" bug. The Anodet Lurker/Slave of Bolas case works properly now, among others at least. --- src/main/java/forge/Card.java | 12 +++++++++++- src/main/java/forge/GameAction.java | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/main/java/forge/Card.java b/src/main/java/forge/Card.java index deeac74bcdc..3bab4612704 100644 --- a/src/main/java/forge/Card.java +++ b/src/main/java/forge/Card.java @@ -2762,11 +2762,21 @@ public class Card extends MyObservable implements Comparable { updateObservers(); } } - + public void clearControllers() { controllerObjects.clear(); } + + public ArrayList getControllerObjects() + { + return controllerObjects; + } + + public void setControllerObjects(ArrayList in) + { + controllerObjects = in; + } /** *

Setter for the field name.

diff --git a/src/main/java/forge/GameAction.java b/src/main/java/forge/GameAction.java index 52910b20290..7f06e7c8972 100644 --- a/src/main/java/forge/GameAction.java +++ b/src/main/java/forge/GameAction.java @@ -77,6 +77,7 @@ public class GameAction { copied = c; else { copied = AllZone.getCardFactory().copyCard(c); + copied.setControllerObjects(c.getControllerObjects()); // todo: improve choices here // Certain attributes need to be copied from Hand->Stack and Stack->Battlefield @@ -120,6 +121,10 @@ public class GameAction { prev.remove(c); } + + if (!(c.isToken() || suppress || zone.is(Constant.Zone.Battlefield))) + copied = AllZone.getCardFactory().copyCard(copied); + //remove all counters from the card if destination is not the battlefield if (!zone.is(Constant.Zone.Battlefield)) copied.clearCounters();