Booster pack choice now shows more verbose set names; tiny cleanup

This commit is contained in:
RumbleBBU
2012-10-08 06:59:48 +00:00
parent 6d09da894c
commit c6ded8f942
2 changed files with 10 additions and 5 deletions

View File

@@ -24,6 +24,7 @@ import forge.Singletons;
import forge.control.FControl;
import forge.card.BoosterData;
import forge.card.CardEdition;
import forge.card.UnOpenedProduct;
import forge.game.GameEndReason;
import forge.game.GameFormat;
@@ -632,11 +633,15 @@ public class QuestWinLoseHandler extends ControlWinLose {
}
final String setPrompt = "Choose bonus booster set:";
final String chSet = GuiChoose.one(setPrompt, chooseSets);
List<CardEdition> chooseEditions = new ArrayList<CardEdition>();
for (String ed : chooseSets) {
chooseEditions.add(Singletons.getModel().getEditions().get(ed));
}
final CardEdition chooseEd = GuiChoose.one(setPrompt, chooseEditions);
cardsWon = (new UnOpenedProduct(Singletons.getModel().getBoosters().get(chSet))).open();
cardsWon = (new UnOpenedProduct(Singletons.getModel().getBoosters().get(chooseEd.getCode()))).open();
qData.getCards().addAllCards(cardsWon);
this.lblTemp1 = new TitleLabel("Bonus \"" + chSet + "\" booster pack!");
this.lblTemp1 = new TitleLabel("Bonus " + chooseEd.getName() + " booster pack!");
}
if (cardsWon != null) {

View File

@@ -204,9 +204,9 @@ public final class GameFormatQuest {
public boolean isSetLegal(final String setCode) {
return this.allowedSetCodes.isEmpty() || this.allowedSetCodes.contains(setCode);
}
/**
* Checks if the current format contains sets with snow-land (horrible hack...)
* Checks if the current format contains sets with snow-land (horrible hack...).
* @return boolean, contains snow-land sets.
*
*/