Zone: do not add Tokens to the cardList if its not the Battlefield

that does fix The Great Aurora
This commit is contained in:
Hanmac
2016-06-08 17:11:11 +00:00
parent 2ed6d5d9e4
commit beadafd2d9

View File

@@ -91,14 +91,17 @@ public class Zone implements java.io.Serializable, Iterable<Card> {
if (zoneType != ZoneType.Battlefield) { if (zoneType != ZoneType.Battlefield) {
c.setTapped(false); c.setTapped(false);
} }
// Do not add Tokens to other zones than the battlefield.
if (zoneType == ZoneType.Battlefield || !c.isToken()) {
c.setZone(this); c.setZone(this);
if (index == null) { if (index == null) {
cardList.add(c); cardList.add(c);
} } else {
else {
cardList.add(index.intValue(), c); cardList.add(index.intValue(), c);
} }
}
onChanged(); onChanged();
game.fireEvent(new GameEventZone(zoneType, getPlayer(), EventValueChangeType.Added, c)); game.fireEvent(new GameEventZone(zoneType, getPlayer(), EventValueChangeType.Added, c));
} }