mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
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:
@@ -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) {
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user