diff --git a/forge-gui/src/main/java/forge/gui/match/QuestWinLose.java b/forge-gui/src/main/java/forge/gui/match/QuestWinLose.java index 6e006dd04bd..723484ea58c 100644 --- a/forge-gui/src/main/java/forge/gui/match/QuestWinLose.java +++ b/forge-gui/src/main/java/forge/gui/match/QuestWinLose.java @@ -145,13 +145,10 @@ public class QuestWinLose extends ControlWinLose { if (isHumanWinner) { qc.getCards().addAllCards(anteCards); - this.anteWon(anteCards); } else { - for (PaperCard c : anteCards) { - qc.getCards().loseCard(c, 1); - } - this.anteLost(anteCards); + qc.getCards().loseCards(anteCards); } + this.anteReport(anteCards, isHumanWinner); } } @@ -219,38 +216,15 @@ public class QuestWinLose extends ControlWinLose { return true; } - /** - *

- * anteLost. - *

- * Displays cards lost to ante this game. - * - */ - private void anteLost(final List antesLost) { + private void anteReport(final List antesWon, boolean hasWon) { // Generate Swing components and attach. - this.lblTemp1 = new TitleLabel("Ante Lost: You lost the following cards in Ante:"); + if(hasWon) + this.lblTemp1 = new TitleLabel("Ante Won: These cards will be available in your card pool after this match."); + else + this.lblTemp1 = new TitleLabel("Ante Lost: You lost the following cards in Ante:"); this.getView().getPnlCustom().add(this.lblTemp1, QuestWinLose.CONSTRAINTS_TITLE); - this.getView().getPnlCustom().add( - new QuestWinLoseCardViewer(antesLost), QuestWinLose.CONSTRAINTS_CARDS); - } - - /** - *

- * anteWon. - *

- * Displays cards won in ante this game (which will be added to your Card Pool). - * - */ - private void anteWon(final List antesWon) { - final StringBuilder str = new StringBuilder(); - str.append("Ante Won: These cards will be available in your card pool after this match."); - // Generate Swing components and attach. - this.lblTemp1 = new TitleLabel(str.toString()); - - this.getView().getPnlCustom().add(this.lblTemp1, QuestWinLose.CONSTRAINTS_TITLE); - this.getView().getPnlCustom().add( - new QuestWinLoseCardViewer(antesWon), QuestWinLose.CONSTRAINTS_CARDS); + this.getView().getPnlCustom().add(new QuestWinLoseCardViewer(antesWon), QuestWinLose.CONSTRAINTS_CARDS); } /** diff --git a/forge-gui/src/main/java/forge/quest/QuestUtilCards.java b/forge-gui/src/main/java/forge/quest/QuestUtilCards.java index 7beca52f7ac..a776300dd4a 100644 --- a/forge-gui/src/main/java/forge/quest/QuestUtilCards.java +++ b/forge-gui/src/main/java/forge/quest/QuestUtilCards.java @@ -330,8 +330,9 @@ public final class QuestUtilCards { * @param qty * quantity */ - public void loseCard(final PaperCard card, int qty) { - this.sellCard(card, qty, 0, false); + public void loseCards(final List cards) { + for(PaperCard pc: cards) + this.sellCard(pc, 1, 0, false); } /**