Skip to content

Commit

Permalink
Tweak logic
Browse files Browse the repository at this point in the history
  • Loading branch information
tool4EvEr authored and tool4EvEr committed Jan 21, 2025
1 parent 58e5ee4 commit 29a0c3d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions forge-game/src/main/java/forge/game/GameActionUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -870,12 +870,13 @@ public static CardCollectionView orderCardsByTheirOwners(Game game, CardCollecti
}
if (eff != null) {
int idx = completeList.indexOf(eff);
// add generous buffer to timestamp, to ensure it applies last compared to cards that were ordered to ETB before it
sa.setSVar("StaticEffectTimestamp", String.valueOf(game.getTimestamp() + idx + 100));
// effects with this param have the responsibility to realign it when later cards are reached
if (idx > 0) {
// effects with this param have the responsibility to realign it when later cards are reached
sa.setSVar("StaticEffectUntilCardID", String.valueOf(completeList.get(idx - 1).getId()));
// add generous offset to timestamp, to ensure it applies last compared to cards that were ordered to ETB before it
idx += completeList.size() * 2;
}
sa.setSVar("StaticEffectTimestamp", String.valueOf(game.getNextTimestamp() + idx));
completeList.remove(eff);
}
return completeList;
Expand Down

0 comments on commit 29a0c3d

Please sign in to comment.