~ fix lastState update for Counters and Undying

This commit is contained in:
Hans Mackowiak
2020-11-30 23:17:14 +01:00
parent a4be088724
commit ef830e200c

View File

@@ -947,6 +947,7 @@ public class GameAction {
// do this multiple times, sometimes creatures/permanents will survive when they shouldn't // do this multiple times, sometimes creatures/permanents will survive when they shouldn't
boolean orderedDesCreats = false; boolean orderedDesCreats = false;
boolean orderedNoRegCreats = false; boolean orderedNoRegCreats = false;
CardCollection cardsToUpdateLKI = new CardCollection();
for (int q = 0; q < 9; q++) { for (int q = 0; q < 9; q++) {
checkStaticAbilities(false, affectedCards, CardCollection.EMPTY); checkStaticAbilities(false, affectedCards, CardCollection.EMPTY);
boolean checkAgain = false; boolean checkAgain = false;
@@ -1020,7 +1021,7 @@ public class GameAction {
checkAgain = true; checkAgain = true;
} }
if (checkAgain) { if (checkAgain) {
game.updateLastStateForCard(c); cardsToUpdateLKI.add(c);
} }
} }
@@ -1098,6 +1099,10 @@ public class GameAction {
// this point. // this point.
checkStaticAbilities(false, affectedCards, CardCollection.EMPTY); checkStaticAbilities(false, affectedCards, CardCollection.EMPTY);
for (final Card c : cardsToUpdateLKI) {
game.updateLastStateForCard(c);
}
if (!refreeze) { if (!refreeze) {
game.getStack().unfreezeStack(); game.getStack().unfreezeStack();
} }