Fixed missing copy statements of cardAttribute in game state.

This commit is contained in:
LevelX2 2015-06-14 23:22:38 +02:00
parent 35654a5ca8
commit 324188a86e
3 changed files with 12 additions and 1 deletions

View file

@ -52,7 +52,6 @@ public class Bioshift extends CardImpl {
super(ownerId, 214, "Bioshift", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G/U}"); super(ownerId, 214, "Bioshift", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G/U}");
this.expansionSetCode = "GTC"; this.expansionSetCode = "GTC";
// Move any number of +1/+1 counters from target creature onto another target creature with the same controller. // Move any number of +1/+1 counters from target creature onto another target creature with the same controller.
getSpellAbility().addEffect(new MoveCounterFromTargetToTargetEffect()); getSpellAbility().addEffect(new MoveCounterFromTargetToTargetEffect());
getSpellAbility().addTarget(new TargetCreaturePermanentSameController(2,2,new FilterCreaturePermanent(),false)); getSpellAbility().addTarget(new TargetCreaturePermanentSameController(2,2,new FilterCreaturePermanent(),false));

View file

@ -21,6 +21,14 @@ public class CardAttribute implements Serializable {
public CardAttribute(Card card) { public CardAttribute(Card card) {
color = card.getColor(null).copy(); color = card.getColor(null).copy();
} }
public CardAttribute(CardAttribute cardAttribute) {
this.color = cardAttribute.color;
}
public CardAttribute copy() {
return new CardAttribute(this);
}
public ObjectColor getColor() { public ObjectColor getColor() {
return color; return color;

View file

@ -171,6 +171,9 @@ public class GameState implements Serializable, Copyable<GameState> {
for (Map.Entry<UUID, CardState> entry: state.cardState.entrySet()) { for (Map.Entry<UUID, CardState> entry: state.cardState.entrySet()) {
cardState.put(entry.getKey(), entry.getValue().copy()); cardState.put(entry.getKey(), entry.getValue().copy());
} }
for (Map.Entry<UUID, CardAttribute> entry: state.cardAttribute.entrySet()) {
cardAttribute.put(entry.getKey(), entry.getValue().copy());
}
this.zoneChangeCounter.putAll(state.zoneChangeCounter); this.zoneChangeCounter.putAll(state.zoneChangeCounter);
this.copiedCards.putAll(state.copiedCards); this.copiedCards.putAll(state.copiedCards);
this.permanentOrderNumber = state.permanentOrderNumber; this.permanentOrderNumber = state.permanentOrderNumber;
@ -208,6 +211,7 @@ public class GameState implements Serializable, Copyable<GameState> {
this.zones = state.zones; this.zones = state.zones;
this.simultaneousEvents = state.simultaneousEvents; this.simultaneousEvents = state.simultaneousEvents;
this.cardState = state.cardState; this.cardState = state.cardState;
this.cardAttribute = state.cardAttribute;
this.zoneChangeCounter = state.zoneChangeCounter; this.zoneChangeCounter = state.zoneChangeCounter;
this.copiedCards = state.copiedCards; this.copiedCards = state.copiedCards;
this.permanentOrderNumber = state.permanentOrderNumber; this.permanentOrderNumber = state.permanentOrderNumber;