mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Use updateAbilityTextForView as a limited form of updating the text part of the view in order to update changed card text (e.g. lands affected by Blood Moon, creatures affected by Humility) while avoiding flickering side effects.
- Volrath's Shapeshifter: fixed a concurrent modification when removing temporary triggers.
This commit is contained in:
@@ -1063,7 +1063,8 @@ public class StaticEffect {
|
||||
if (removeMayPlay) {
|
||||
affectedCard.removeMayPlay(ability);
|
||||
}
|
||||
//affectedCard.updateStateForView(); // FIXME: causes intolerable flickering for cards such as Thassa, God of the Sea or Wind Zendikon
|
||||
|
||||
affectedCard.updateAbilityTextForView(); // only update keywords and text for view to avoid flickering
|
||||
}
|
||||
return affectedCards;
|
||||
}
|
||||
|
||||
@@ -476,11 +476,15 @@ public final class StaticAbilityContinuous {
|
||||
// Restore the original text in case it was remembered before
|
||||
if (affectedCard.getStates().contains(CardStateName.OriginalText)) {
|
||||
affectedCard.clearTriggersNew();
|
||||
List<SpellAbility> saToRemove = Lists.newArrayList();
|
||||
for (SpellAbility saTemp : affectedCard.getSpellAbilities()) {
|
||||
if (saTemp.isTemporary()) {
|
||||
affectedCard.removeSpellAbility(saTemp);
|
||||
saToRemove.add(saTemp);
|
||||
}
|
||||
}
|
||||
for (SpellAbility saRem : saToRemove) {
|
||||
affectedCard.removeSpellAbility(saRem);
|
||||
}
|
||||
CardFactory.copyState(affectedCard, CardStateName.OriginalText, affectedCard, CardStateName.Original, false);
|
||||
}
|
||||
|
||||
@@ -516,7 +520,6 @@ public final class StaticAbilityContinuous {
|
||||
affectedCard.getCurrentState().addStaticAbility(stAb);
|
||||
}
|
||||
}
|
||||
affectedCard.updateAbilityTextForView();
|
||||
}
|
||||
|
||||
// Change color words
|
||||
@@ -723,7 +726,7 @@ public final class StaticAbilityContinuous {
|
||||
affectedCard.setMayPlay(mayPlayController, mayPlayWithoutManaCost, mayPlayWithFlash, mayPlayGrantZonePermissions, stAb);
|
||||
}
|
||||
|
||||
//affectedCard.updateStateForView(); // FIXME: causes intolerable flickering for cards such as Thassa, God of the Sea or Wind Zendikon.
|
||||
affectedCard.updateAbilityTextForView(); // only update keywords and text for view to avoid flickering
|
||||
}
|
||||
|
||||
return affectedCards;
|
||||
|
||||
Reference in New Issue
Block a user