mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Additional changes to Card and Spell to support the visual flickering-free Bestow check
This commit is contained in:
@@ -6253,15 +6253,23 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
}
|
||||
|
||||
public final void animateBestow() {
|
||||
animateBestow(true);
|
||||
}
|
||||
|
||||
public final void animateBestow(final boolean updateView) {
|
||||
bestowTimestamp = getGame().getNextTimestamp();
|
||||
addChangedCardTypes(new CardType(Collections.singletonList("Aura")),
|
||||
new CardType(Collections.singletonList("Creature")), false, false, false, true, bestowTimestamp, false);
|
||||
addChangedCardKeywords(Collections.singletonList("Enchant creature"), new ArrayList<String>(), false, bestowTimestamp, false);
|
||||
new CardType(Collections.singletonList("Creature")), false, false, false, true, bestowTimestamp, updateView);
|
||||
addChangedCardKeywords(Collections.singletonList("Enchant creature"), new ArrayList<String>(), false, bestowTimestamp, updateView);
|
||||
}
|
||||
|
||||
public final void unanimateBestow() {
|
||||
removeChangedCardKeywords(bestowTimestamp, false);
|
||||
removeChangedCardTypes(bestowTimestamp, false);
|
||||
unanimateBestow(true);
|
||||
}
|
||||
|
||||
public final void unanimateBestow(final boolean updateView) {
|
||||
removeChangedCardKeywords(bestowTimestamp, updateView);
|
||||
removeChangedCardTypes(bestowTimestamp, updateView);
|
||||
bestowTimestamp = -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -86,10 +86,10 @@ public abstract class Spell extends SpellAbility implements java.io.Serializable
|
||||
// Rule 601.3: cast Bestow with Flash
|
||||
// for the check the card does need to be animated
|
||||
// otherwise the StaticAbility will not found them
|
||||
card.animateBestow();
|
||||
card.animateBestow(false); // when animating and unanimating Bestow, do not update the view to prevent flickering
|
||||
game.getAction().checkStaticAbilities(false, Sets.newHashSet(card));
|
||||
flash = card.hasKeyword("Flash");
|
||||
card.unanimateBestow();
|
||||
card.unanimateBestow(false);
|
||||
}
|
||||
|
||||
if (!(card.isInstant() || activator.canCastSorcery() || flash
|
||||
|
||||
Reference in New Issue
Block a user