Fix timestamp reset messing up LKI

This commit is contained in:
TRT
2023-01-19 16:31:09 +01:00
parent 3a044a50d0
commit 33e8dc7fe2

View File

@@ -710,7 +710,14 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
game.getCombat().getBandOfAttacker(movedCard).setBlocked(false);
combatChanged = true;
}
movedCard.setTimestamp(ts);
if (movedCard.isInPlay()) {
// need to also update LKI
List<Card> lki = movedCard.getZone().getCardsAddedThisTurn(null);
lki.get(lki.lastIndexOf(movedCard)).setTimestamp(ts);
}
if (sa.hasParam("AttachAfter") && movedCard.isAttachment()) {
CardCollection list = AbilityUtils.getDefinedCards(hostCard, sa.getParam("AttachAfter"), sa);
if (list.isEmpty()) {
@@ -1401,6 +1408,11 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
movedCard = game.getAction().moveToPlay(c, c.getController(), sa, moveParams);
movedCard.setTimestamp(ts);
if (movedCard.isInPlay()) {
// need to also update LKI
List<Card> lki = movedCard.getZone().getCardsAddedThisTurn(null);
lki.get(lki.lastIndexOf(movedCard)).setTimestamp(ts);
}
if (sa.hasParam("AttachAfter") && movedCard.isAttachment() && movedCard.isInPlay()) {
CardCollection list = AbilityUtils.getDefinedCards(source, sa.getParam("AttachAfter"), sa);