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}");
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));

View file

@ -22,6 +22,14 @@ public class CardAttribute implements Serializable {
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;
}

View file

@ -171,6 +171,9 @@ public class GameState implements Serializable, Copyable<GameState> {
for (Map.Entry<UUID, CardState> entry: state.cardState.entrySet()) {
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.copiedCards.putAll(state.copiedCards);
this.permanentOrderNumber = state.permanentOrderNumber;
@ -208,6 +211,7 @@ public class GameState implements Serializable, Copyable<GameState> {
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;