removed CardPoolLimitation, adjusted texts for Booster Draft and Sealed Deck modes

This commit is contained in:
Maxmtg
2013-05-06 08:17:36 +00:00
parent eaa57597c3
commit 75951e89ad
8 changed files with 21 additions and 65 deletions

1
.gitattributes vendored
View File

@@ -14198,7 +14198,6 @@ src/main/java/forge/game/limited/BoosterDeckBuilder.java -text
src/main/java/forge/game/limited/BoosterDraft.java svneol=native#text/plain
src/main/java/forge/game/limited/BoosterDraftAI.java svneol=native#text/plain
src/main/java/forge/game/limited/CCnt.java svneol=native#text/plain
src/main/java/forge/game/limited/CardPoolLimitation.java -text
src/main/java/forge/game/limited/CardRankingComparator.java -text
src/main/java/forge/game/limited/CustomLimited.java svneol=native#text/plain
src/main/java/forge/game/limited/DeckColors.java svneol=native#text/plain

View File

@@ -70,7 +70,7 @@ public final class BoosterDraft implements IBoosterDraft {
/** The draft picks. */
private final Map<String, Float> draftPicks = new TreeMap<String, Float>();
private final CardPoolLimitation draftFormat;
private final LimitedPoolType draftFormat;
private final List<Supplier<List<CardPrinted>>> product = new ArrayList<Supplier<List<CardPrinted>>>();
@@ -82,7 +82,7 @@ public final class BoosterDraft implements IBoosterDraft {
* @param draftType
* a {@link java.lang.String} object.
*/
public BoosterDraft(final CardPoolLimitation draftType) {
public BoosterDraft(final LimitedPoolType draftType) {
this.draftAI.setBd(this);
this.draftFormat = draftType;
@@ -97,7 +97,7 @@ public final class BoosterDraft implements IBoosterDraft {
case Block: case FantasyBlock: // Draft from cards by block or set
List<CardBlock> blocks = new ArrayList<CardBlock>();
IStorageView<CardBlock> storage = draftType == CardPoolLimitation.Block
IStorageView<CardBlock> storage = draftType == LimitedPoolType.Block
? Singletons.getModel().getBlocks() : Singletons.getModel().getFantasyBlocks();
for (CardBlock b : storage) {

View File

@@ -1,25 +0,0 @@
/*
* Forge: Play Magic: the Gathering.
* Copyright (C) 2011 Forge Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package forge.game.limited;
public enum CardPoolLimitation {
Full,
Block,
FantasyBlock,
Custom
}

View File

@@ -42,7 +42,7 @@ public class SealedDeckBuilder extends LimitedDeckBuilder {
for (int i = 0; i < limit; i++) {
CardPrinted cp = rankedCards.get(i).getValue();
colorChooserList.add(cp);
System.out.println(cp.getName() + " " + cp.getRules().getManaCost().toString());
//System.out.println(cp.getName() + " " + cp.getRules().getManaCost().toString());
}
Iterable<CardRules> rules = Iterables.transform(colorChooserList, CardPrinted.FN_GET_RULES);

View File

@@ -20,7 +20,7 @@ import forge.game.GameType;
import forge.game.MatchController;
import forge.game.MatchStartHelper;
import forge.game.limited.BoosterDraft;
import forge.game.limited.CardPoolLimitation;
import forge.game.limited.LimitedPoolType;
import forge.gui.GuiChoose;
import forge.gui.SOverlayUtils;
import forge.gui.deckeditor.CDeckEditorUI;
@@ -155,33 +155,15 @@ public enum CSubmenuDraft implements ICDoc {
/** */
private void setupDraft() {
final CEditorDraftingProcess draft = new CEditorDraftingProcess();
// Determine what kind of booster draft to run
final ArrayList<String> draftTypes = new ArrayList<String>();
draftTypes.add("Full Cardpool");
draftTypes.add("Block / Set");
draftTypes.add("Fantasy Block");
draftTypes.add("Custom");
final String prompt = "Choose Draft Format:";
final Object o = GuiChoose.one(prompt, draftTypes);
final LimitedPoolType o = GuiChoose.oneOrNone(prompt, LimitedPoolType.values());
if ( o == null ) return;
if (o.toString().equals(draftTypes.get(0))) {
draft.showGui(new BoosterDraft(CardPoolLimitation.Full));
}
else if (o.toString().equals(draftTypes.get(1))) {
draft.showGui(new BoosterDraft(CardPoolLimitation.Block));
}
else if (o.toString().equals(draftTypes.get(2))) {
draft.showGui(new BoosterDraft(CardPoolLimitation.FantasyBlock));
}
else if (o.toString().equals(draftTypes.get(3))) {
draft.showGui(new BoosterDraft(CardPoolLimitation.Custom));
}
final CEditorDraftingProcess draft = new CEditorDraftingProcess();
draft.showGui(new BoosterDraft(o));
FControl.SINGLETON_INSTANCE.changeState(FControl.Screens.DRAFTING_PROCESS);
CDeckEditorUI.SINGLETON_INSTANCE.setCurrentEditorController(draft);

View File

@@ -39,10 +39,10 @@ public enum VSubmenuDraft implements IVSubmenu<CSubmenuDraft> {
// Fields used with interface IVDoc
private DragCell parentCell;
private final DragTab tab = new DragTab("Draft Mode");
private final DragTab tab = new DragTab("Booster Draft");
/** */
private final LblHeader lblTitle = new LblHeader("Sanctioned Format: Draft");
private final LblHeader lblTitle = new LblHeader("Sanctioned Format: Booster Draft");
private final JPanel pnlStart = new JPanel();
private final StartButton btnStart = new StartButton();
@@ -69,7 +69,7 @@ public enum VSubmenuDraft implements IVSubmenu<CSubmenuDraft> {
.text("Then, play against one or all of the AI opponents.")
.fontSize(12).build();
private final FLabel btnBuildDeck = new FLabel.ButtonBuilder().text("New Draft Mode Game").fontSize(16).build();
private final FLabel btnBuildDeck = new FLabel.ButtonBuilder().text("New Booster Draft Game").fontSize(16).build();
/**
@@ -105,7 +105,7 @@ public enum VSubmenuDraft implements IVSubmenu<CSubmenuDraft> {
*/
@Override
public String getMenuTitle() {
return "Draft Mode";
return "Booster Draft";
}
/* (non-Javadoc)

View File

@@ -43,10 +43,10 @@ public enum VSubmenuSealed implements IVSubmenu<CSubmenuSealed> {
// Fields used with interface IVDoc
private DragCell parentCell;
private final DragTab tab = new DragTab("Sealed Mode");
private final DragTab tab = new DragTab("Sealed Deck");
/** */
private final LblHeader lblTitle = new LblHeader("Sanctioned Format: Sealed");
private final LblHeader lblTitle = new LblHeader("Sanctioned Format: Sealed Deck");
private final StartButton btnStart = new StartButton();
private final DeckLister lstDecks = new DeckLister(GameType.Sealed);
@@ -67,7 +67,7 @@ public enum VSubmenuSealed implements IVSubmenu<CSubmenuSealed> {
.text("Then, you will play against each of the AI opponents.")
.fontSize(12).build();
private final FLabel btnBuildDeck = new FLabel.ButtonBuilder().text("New Sealed Mode Game").fontSize(16).build();
private final FLabel btnBuildDeck = new FLabel.ButtonBuilder().text("Build New Sealed Deck").fontSize(16).build();
private final JLabel btnDirections = new FLabel.Builder()
.fontSize(16).opaque(true).hoverable(true)
@@ -117,7 +117,7 @@ public enum VSubmenuSealed implements IVSubmenu<CSubmenuSealed> {
*/
@Override
public String getMenuTitle() {
return "Sealed Mode";
return "Sealed Deck";
}
/* (non-Javadoc)

View File

@@ -3,7 +3,7 @@ package forge;
import org.testng.annotations.Test;
import forge.game.limited.BoosterDraft;
import forge.game.limited.CardPoolLimitation;
import forge.game.limited.LimitedPoolType;
import forge.item.CardPrinted;
import forge.item.ItemPoolView;
@@ -21,7 +21,7 @@ public class BoosterDraft1Test {
*/
@Test(groups = { "UnitTest", "fast" }, timeOut = 1000, enabled = false)
public void boosterDraft1Test1() throws Exception {
final BoosterDraft draft = new BoosterDraft(CardPoolLimitation.Full);
final BoosterDraft draft = new BoosterDraft(LimitedPoolType.Full);
while (draft.hasNextChoice()) {
final ItemPoolView<CardPrinted> list = draft.nextChoice();
System.out.println(list.countAll());