Fix some display problems:

- Update GUI after clone effects.
- Fix foil display on face-down cards.
- Update icons on card panels more aggressively.
This commit is contained in:
elcnesh
2014-09-16 14:17:03 +00:00
parent 2e48a21f0e
commit 12e331e2bd
12 changed files with 135 additions and 118 deletions

View File

@@ -11,6 +11,7 @@ import forge.game.card.CardCharacteristics;
import forge.game.card.CardFactory;
import forge.game.card.CardFactoryUtil;
import forge.game.card.CardUtil;
import forge.game.event.GameEventCardStatsChanged;
import forge.game.spellability.SpellAbility;
import forge.game.spellability.TargetRestrictions;
import forge.game.trigger.Trigger;
@@ -57,6 +58,7 @@ public class CloneEffect extends SpellAbilityEffect {
final Card host = sa.getHostCard();
Card tgtCard = host;
Map<String, String> origSVars = host.getSVars();
final Game game = sa.getActivatingPlayer().getGame();
// find cloning source i.e. thing to be copied
Card cardToCopy = null;
@@ -179,7 +181,7 @@ public class CloneEffect extends SpellAbilityEffect {
}
};
final Game game = sa.getActivatingPlayer().getGame();
String duration = sa.getParam("Duration");
if (duration.equals("UntilEndOfTurn")) {
game.getEndOfTurn().addUntil(unclone);
@@ -188,6 +190,7 @@ public class CloneEffect extends SpellAbilityEffect {
}
}
game.fireEvent(new GameEventCardStatsChanged(tgtCard));
} // cloneResolve
private void addExtraCharacteristics(final Card tgtCard, final SpellAbility sa, final Map<String, String> origSVars) {

View File

@@ -8247,20 +8247,6 @@ public class Card extends GameEntity implements Comparable<Card> {
return this.timestamp;
}
/**
*
* TODO Write javadoc for this method.
*
* @return an int
*/
public final int getFoil() {
final String foil = this.getCardForUi().getCharacteristics().getSVar("Foil");
if (!foil.isEmpty()) {
return Integer.parseInt(foil);
}
return 0;
}
/**
* Assign a random foil finish depending on the card edition.
*

View File

@@ -410,6 +410,20 @@ public class CardCharacteristics {
this.sVars = newSVars;
}
/**
*
* TODO Write javadoc for this method.
*
* @return an int
*/
public final int getFoil() {
final String foil = this.getSVar("Foil");
if (!foil.isEmpty()) {
return Integer.parseInt(foil);
}
return 0;
}
/**
* <p>
* copy.