another clean-up for quest drafts (add ROE x3 drafts, fix core set drafts)

This commit is contained in:
Maxmtg
2015-01-30 07:26:48 +00:00
parent 0594145a4f
commit 1eeaa685db
2 changed files with 10 additions and 4 deletions

View File

@@ -41,8 +41,6 @@ import java.util.TreeMap;
* This is a CardBlock class. * This is a CardBlock class.
*/ */
public final class CardBlock implements Comparable<CardBlock> { public final class CardBlock implements Comparable<CardBlock> {
private static final CardEdition[] EMPTY_SET_ARRAY = new CardEdition[] {};
private final int orderNum; private final int orderNum;
private final String name; private final String name;
private final List<CardEdition> sets; private final List<CardEdition> sets;

View File

@@ -864,6 +864,11 @@ public class QuestEventDraft {
List<CardEdition> sets = block.getSets(); List<CardEdition> sets = block.getSets();
final String s0c = sets.get(0).getCode(); final String s0c = sets.get(0).getCode();
if (sets.size() == 1) {
result.add(String.format("%s/%s/%s", s0c, s0c, s0c));
return result;
}
final String s1c = sets.get(1).getCode(); final String s1c = sets.get(1).getCode();
final String s2c = sets.size() > 2 ? sets.get(2).getCode() : null; final String s2c = sets.size() > 2 ? sets.get(2).getCode() : null;
@@ -882,9 +887,12 @@ public class QuestEventDraft {
result.add(String.format("%s/%s/%s", s0c, s0c, s0c)); result.add(String.format("%s/%s/%s", s0c, s0c, s0c));
} }
} else { } else {
result.add(String.format("%s/%s/%s", s0c, s1c, s2c));
result.add(String.format("%s/%s/%s", s0c, s0c, s0c)); result.add(String.format("%s/%s/%s", s0c, s0c, s0c));
result.add(String.format("%s/%s/%s", s0c, s1c, s2c));
// allow separate drafts with 3rd large set (ex: ROE, AVR)
if( sets.get(2).getCards().length > 200)
result.add(String.format("%s/%s/%s", s2c, s2c, s2c));
} }
// This is set to Scars of Mirrodin date to account for the fact that MBS is drafted as a part of the Scars of Mirrodin block. // This is set to Scars of Mirrodin date to account for the fact that MBS is drafted as a part of the Scars of Mirrodin block.