From 324188a86e6440b3bcba08c5d89eaeefe63cf2cb Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 14 Jun 2015 23:22:38 +0200 Subject: [PATCH] Fixed missing copy statements of cardAttribute in game state. --- Mage.Sets/src/mage/sets/gatecrash/Bioshift.java | 1 - Mage/src/mage/game/CardAttribute.java | 8 ++++++++ Mage/src/mage/game/GameState.java | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/gatecrash/Bioshift.java b/Mage.Sets/src/mage/sets/gatecrash/Bioshift.java index 27cb238c2fc..01764c518ab 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/Bioshift.java +++ b/Mage.Sets/src/mage/sets/gatecrash/Bioshift.java @@ -52,7 +52,6 @@ public class Bioshift extends CardImpl { super(ownerId, 214, "Bioshift", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G/U}"); this.expansionSetCode = "GTC"; - // Move any number of +1/+1 counters from target creature onto another target creature with the same controller. getSpellAbility().addEffect(new MoveCounterFromTargetToTargetEffect()); getSpellAbility().addTarget(new TargetCreaturePermanentSameController(2,2,new FilterCreaturePermanent(),false)); diff --git a/Mage/src/mage/game/CardAttribute.java b/Mage/src/mage/game/CardAttribute.java index 95b4659ab7d..49cbf8dce27 100644 --- a/Mage/src/mage/game/CardAttribute.java +++ b/Mage/src/mage/game/CardAttribute.java @@ -21,6 +21,14 @@ public class CardAttribute implements Serializable { public CardAttribute(Card card) { color = card.getColor(null).copy(); } + + public CardAttribute(CardAttribute cardAttribute) { + this.color = cardAttribute.color; + } + + public CardAttribute copy() { + return new CardAttribute(this); + } public ObjectColor getColor() { return color; diff --git a/Mage/src/mage/game/GameState.java b/Mage/src/mage/game/GameState.java index ebfdc555a19..83236ef4e69 100644 --- a/Mage/src/mage/game/GameState.java +++ b/Mage/src/mage/game/GameState.java @@ -171,6 +171,9 @@ public class GameState implements Serializable, Copyable { for (Map.Entry entry: state.cardState.entrySet()) { cardState.put(entry.getKey(), entry.getValue().copy()); } + for (Map.Entry entry: state.cardAttribute.entrySet()) { + cardAttribute.put(entry.getKey(), entry.getValue().copy()); + } this.zoneChangeCounter.putAll(state.zoneChangeCounter); this.copiedCards.putAll(state.copiedCards); this.permanentOrderNumber = state.permanentOrderNumber; @@ -208,6 +211,7 @@ public class GameState implements Serializable, Copyable { this.zones = state.zones; this.simultaneousEvents = state.simultaneousEvents; this.cardState = state.cardState; + this.cardAttribute = state.cardAttribute; this.zoneChangeCounter = state.zoneChangeCounter; this.copiedCards = state.copiedCards; this.permanentOrderNumber = state.permanentOrderNumber;