mirror of
https://github.com/correl/mage.git
synced 2025-04-03 17:00:16 -09:00
* Finale of Promise - added dialog to select cards order to cast;
This commit is contained in:
parent
6848626c4b
commit
830f71cd32
1 changed files with 15 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue