From 3019e23367ce6a032f0ea57df264131c2f13d7a9 Mon Sep 17 00:00:00 2001 From: Sloth Date: Tue, 11 Jun 2013 19:56:21 +0000 Subject: [PATCH] - Fixed a display issue with blinked cards. --- res/cardsfolder/g/ghostly_flicker.txt | 2 +- src/main/java/forge/view/arcane/PlayArea.java | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/res/cardsfolder/g/ghostly_flicker.txt b/res/cardsfolder/g/ghostly_flicker.txt index 4dc0f20a523..18e0937f9b3 100644 --- a/res/cardsfolder/g/ghostly_flicker.txt +++ b/res/cardsfolder/g/ghostly_flicker.txt @@ -1,7 +1,7 @@ Name:Ghostly Flicker ManaCost:2 U Types:Instant -A:SP$ ChangeZone | Cost$ 2 U | ValidTgts$ Artifact.YouCtrl,Creature.YouCtrl,Land.YouCtrl | TargetMin$ 2 | TargetMax$ 2 | TgtPrompt$ Select 2 target artifacts, creatures, or lands that you control | Origin$ Battlefield | Destination$ Exile | RememberTargets$ True | SubAbility$ DBReturn | SpellDescription$ Exile two target artifacts, creatures and/or lands you control, then return those cards to the battlefield under your control. +A:SP$ ChangeZone | Cost$ 2 U | ValidTgts$ Artifact.YouCtrl,Creature.YouCtrl,Land.YouCtrl | TargetMin$ 2 | TargetMax$ 2 | TgtPrompt$ Select 2 target artifacts, creatures, or lands that you control | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True | SubAbility$ DBReturn | SpellDescription$ Exile two target artifacts, creatures and/or lands you control, then return those cards to the battlefield under your control. SVar:DBReturn:DB$ ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Battlefield | GainControl$ True | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:RemAIDeck:True diff --git a/src/main/java/forge/view/arcane/PlayArea.java b/src/main/java/forge/view/arcane/PlayArea.java index b201a0ff367..2d617d858f1 100644 --- a/src/main/java/forge/view/arcane/PlayArea.java +++ b/src/main/java/forge/view/arcane/PlayArea.java @@ -520,13 +520,18 @@ public class PlayArea extends CardPanelContainer implements CardPanelMouseListen oldCards.add(cpa.getGameCard()); } toDelete = new ArrayList(oldCards); + List toReplace = new ArrayList(); // delete all cards that differ in timestamp (they have been blinked) for (final Card c : model) { for (int i = 0; i < toDelete.size(); i++) { final Card c2 = toDelete.get(i); - if (c.equals(c2) && c.getTimestamp() == c2.getTimestamp()) { - toDelete.remove(i); + if (c.equals(c2)) { + if (c.getTimestamp() == c2.getTimestamp()) { + toDelete.remove(i); + } else { + toReplace.add(c); + } } } } @@ -540,6 +545,7 @@ public class PlayArea extends CardPanelContainer implements CardPanelMouseListen List toAdd = new ArrayList(model); toAdd.removeAll(oldCards); + toAdd.addAll(toReplace); List newPanels = new ArrayList(); for (final Card card : toAdd) {