* Finale of Promise - added dialog to select cards order to cast;
@@ -24,9 +24,8 @@ import mage.target.common.TargetCardInYourGraveyard;
import mage.target.targetadjustment.TargetAdjuster;
import mage.target.targetpointer.FixedTarget;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
+import java.util.*;
+import java.util.stream.Collectors;
/**
* @author JayDi85
@@ -120,6 +119,19 @@ class FinaleOfPromiseEffect extends OneShotEffect {
}
}
+ // ask to cast order
+ if (cardsToCast.size() > 0) {
+ String cardsOrder = cardsToCast.stream()
+ .map(game::getCard)
+ .filter(Objects::nonNull)
+ .map(Card::getName)
+ .collect(Collectors.joining(" -> "));
+ if (!controller.chooseUse(Outcome.Detriment, "Cast cards by choose order: " + cardsOrder + "?", "Finale of Promise",
+ "Use that order", "Reverse", source, game)) {
+ Collections.reverse(cardsToCast);
+ }
+ }
+
// free cast + replace effect
for (UUID id : cardsToCast) {
Card card = game.getCard(id);
