Added support for separate 'fantasy blocks' in Sealed Deck games, plus a definition file containing some sample fantasy blocks.

This commit is contained in:
RumbleBBU
2012-09-12 12:12:00 +00:00
parent 2aaae80cd7
commit ea9fbc1451
5 changed files with 51 additions and 3 deletions

View File

@@ -87,6 +87,7 @@ public enum FModel {
private final IStorageView<BoosterData> tournaments;
private final IStorageView<FatPackData> fatPacks;
private final IStorageView<CardBlock> blocks;
private final IStorageView<CardBlock> fantasyBlocks;
// have to implement lazy initialization - at the moment of FModel.ctor()
// CardDb is not ready yet.
@@ -137,6 +138,7 @@ public enum FModel {
this.tournaments = new StorageView<BoosterData>(new BoosterData.Reader("res/blockdata/starters.txt"));
this.fatPacks = new StorageView<FatPackData>(new FatPackData.Reader("res/blockdata/fatpacks.txt"));
this.blocks = new StorageView<CardBlock>(new CardBlock.Reader("res/blockdata/blocks.txt", editions));
this.fantasyBlocks = new StorageView<CardBlock>(new CardBlock.Reader("res/blockdata/fantasyblocks.txt", editions));
// TODO this single setting from preferences should not be here, or,
// it should be here with all the other settings at the same time.
@@ -497,6 +499,11 @@ public enum FModel {
return blocks;
}
/** @return {@link forge.util.IStorageView}<{@link forge.card.CardBlock}> */
public IStorageView<CardBlock> getFantasyBlocks() {
return fantasyBlocks;
}
/** @return {@link forge.util.IStorageView}<{@link forge.card.FatPackData}> */
public IStorageView<FatPackData> getFatPacks() {
return fatPacks;