mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
added FatPack support
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -11073,6 +11073,7 @@ src/main/java/forge/card/CardSuperType.java -text
|
||||
src/main/java/forge/card/CardType.java -text
|
||||
src/main/java/forge/card/EditionCollection.java svneol=native#text/plain
|
||||
src/main/java/forge/card/EditionInfo.java svneol=native#text/plain
|
||||
src/main/java/forge/card/FatPackData.java -text
|
||||
src/main/java/forge/card/FormatCollection.java -text
|
||||
src/main/java/forge/card/MtgDataParser.java -text
|
||||
src/main/java/forge/card/TriggerReplacementBase.java -text
|
||||
@@ -11387,6 +11388,7 @@ src/main/java/forge/item/BoosterPack.java -text
|
||||
src/main/java/forge/item/CardDb.java -text
|
||||
src/main/java/forge/item/CardPrinted.java -text
|
||||
src/main/java/forge/item/CardPrintedCharacteristics.java -text
|
||||
src/main/java/forge/item/FatPack.java -text
|
||||
src/main/java/forge/item/InventoryItem.java -text
|
||||
src/main/java/forge/item/InventoryItemFromSet.java -text
|
||||
src/main/java/forge/item/ItemPool.java -text
|
||||
|
||||
@@ -192,7 +192,6 @@ public final class CardEdition implements Comparable<CardEdition> { // immutable
|
||||
}
|
||||
|
||||
public static final Predicate<CardEdition> HAS_TOURNAMENT_PACK = new CanMakeStarter();
|
||||
|
||||
private static class CanMakeStarter extends Predicate<CardEdition> {
|
||||
@Override
|
||||
public boolean isTrue(final CardEdition subject) {
|
||||
@@ -200,6 +199,13 @@ public final class CardEdition implements Comparable<CardEdition> { // immutable
|
||||
}
|
||||
}
|
||||
|
||||
public static final Predicate<CardEdition> HAS_FAT_PACK = new CanMakeFatPack();
|
||||
private static class CanMakeFatPack extends Predicate<CardEdition> {
|
||||
@Override
|
||||
public boolean isTrue(final CardEdition subject) {
|
||||
return Singletons.getModel().getFatPacks().contains(subject.getCode());
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Checks if is legal in format.
|
||||
*
|
||||
|
||||
66
src/main/java/forge/card/FatPackData.java
Normal file
66
src/main/java/forge/card/FatPackData.java
Normal file
@@ -0,0 +1,66 @@
|
||||
package forge.card;
|
||||
|
||||
import net.slightlymagic.braids.util.lambda.Lambda1;
|
||||
import forge.util.FileSection;
|
||||
import forge.util.StorageReaderFile;
|
||||
|
||||
/**
|
||||
* TODO: Write javadoc for this type.
|
||||
*
|
||||
*/
|
||||
public class FatPackData {
|
||||
private final String edition;
|
||||
public final String getEdition() {
|
||||
return edition;
|
||||
}
|
||||
|
||||
private final String landsEdition;
|
||||
public final String getLandsEdition() {
|
||||
return landsEdition == null ? edition : landsEdition;
|
||||
}
|
||||
|
||||
public int getCntBoosters() {
|
||||
return cntBoosters;
|
||||
}
|
||||
|
||||
public int getCntLands() {
|
||||
return cntLands;
|
||||
}
|
||||
|
||||
private final int cntBoosters;
|
||||
private final int cntLands;
|
||||
|
||||
public FatPackData(String edition0, String landsEdition0, int nBoosters, int nBasicLands )
|
||||
{
|
||||
cntBoosters = nBoosters;
|
||||
cntLands = nBasicLands;
|
||||
edition = edition0;
|
||||
landsEdition = landsEdition0;
|
||||
}
|
||||
|
||||
public static final Lambda1<String, FatPackData> FN_GET_CODE = new Lambda1<String, FatPackData>() {
|
||||
|
||||
@Override
|
||||
public String apply(FatPackData arg1) {
|
||||
return arg1.edition;
|
||||
}
|
||||
};
|
||||
|
||||
public static final class Reader extends StorageReaderFile<FatPackData> {
|
||||
|
||||
public Reader(String pathname) {
|
||||
super(pathname, FatPackData.FN_GET_CODE);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see forge.util.StorageReaderFile#read(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
protected FatPackData read(String line) {
|
||||
final FileSection section = FileSection.parse(line, ":", "|");
|
||||
int nBoosters = section.getInt("Boosters", 0);
|
||||
int nLand = section.getInt("BasicLands", 0);
|
||||
return new FatPackData(section.get("Set"), section.get("LandSet"), nBoosters, nLand);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,6 +45,7 @@ import forge.gui.deckeditor.elements.TableColumnInfo;
|
||||
import forge.gui.deckeditor.elements.TableView;
|
||||
import forge.item.BoosterPack;
|
||||
import forge.item.CardPrinted;
|
||||
import forge.item.FatPack;
|
||||
import forge.item.InventoryItem;
|
||||
import forge.item.ItemPool;
|
||||
import forge.item.ItemPoolView;
|
||||
@@ -308,6 +309,8 @@ public final class QuestCardShop extends DeckEditorBase<InventoryItem, Object> {
|
||||
return 395;
|
||||
} else if (card instanceof TournamentPack) {
|
||||
return 995;
|
||||
} else if (card instanceof FatPack) {
|
||||
return 2365;
|
||||
} else if (card instanceof PreconDeck) {
|
||||
return ((PreconDeck) card).getRecommendedDeals().getCost();
|
||||
}
|
||||
@@ -339,6 +342,8 @@ public final class QuestCardShop extends DeckEditorBase<InventoryItem, Object> {
|
||||
booster = (BoosterPack) ((BoosterPack) item).clone();
|
||||
} else if (item instanceof TournamentPack) {
|
||||
booster = (TournamentPack) ((TournamentPack) item).clone();
|
||||
} else if (item instanceof FatPack) {
|
||||
booster = (FatPack) ((FatPack) item).clone();
|
||||
}
|
||||
this.questData.getCards().buyPack(booster, value);
|
||||
final List<CardPrinted> newCards = booster.getCards();
|
||||
|
||||
@@ -17,17 +17,11 @@
|
||||
*/
|
||||
package forge.item;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.slightlymagic.braids.util.UtilFunctions;
|
||||
import net.slightlymagic.braids.util.lambda.Lambda1;
|
||||
import forge.Singletons;
|
||||
import forge.card.BoosterData;
|
||||
import forge.card.BoosterGenerator;
|
||||
import forge.card.CardRules;
|
||||
import forge.card.CardEdition;
|
||||
import forge.util.Predicate;
|
||||
|
||||
/**
|
||||
* TODO Write javadoc for this type.
|
||||
@@ -69,36 +63,6 @@ public class BoosterPack extends OpenablePack {
|
||||
return "booster/" + this.contents.getEdition() + ".png";
|
||||
}
|
||||
|
||||
private CardPrinted getRandomBasicLand(final CardEdition set) {
|
||||
return Predicate.and(CardPrinted.Predicates.printedInSets(set.getCode()),
|
||||
CardRules.Predicates.Presets.IS_BASIC_LAND, CardPrinted.FN_GET_RULES).random(
|
||||
CardDb.instance().getAllCards());
|
||||
}
|
||||
|
||||
private CardPrinted getLandFromNearestSet() {
|
||||
final CardEdition[] editions = UtilFunctions.iteratorToArray(Singletons.getModel().getEditions().iterator(), new CardEdition[]{});
|
||||
final int iThisSet = Arrays.binarySearch(editions, this.contents);
|
||||
for (int iSet = iThisSet; iSet < editions.length; iSet++) {
|
||||
final CardPrinted land = this.getRandomBasicLand(editions[iSet]);
|
||||
if (null != land) {
|
||||
return land;
|
||||
}
|
||||
}
|
||||
// if not found (though that's impossible)
|
||||
return this.getRandomBasicLand(Singletons.getModel().getEditions().get("M12"));
|
||||
}
|
||||
|
||||
protected List<CardPrinted> generate() {
|
||||
final BoosterGenerator gen = new BoosterGenerator(this.contents.getEditionFilter());
|
||||
List<CardPrinted> myCards = gen.getBoosterPack(this.contents);
|
||||
|
||||
final int cntLands = this.contents.getLand();
|
||||
if (cntLands > 0) {
|
||||
myCards.add(this.getLandFromNearestSet());
|
||||
}
|
||||
return myCards;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getType() {
|
||||
return "Booster Pack";
|
||||
|
||||
94
src/main/java/forge/item/FatPack.java
Normal file
94
src/main/java/forge/item/FatPack.java
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* 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.item;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.slightlymagic.braids.util.lambda.Lambda1;
|
||||
import forge.Singletons;
|
||||
import forge.card.CardEdition;
|
||||
import forge.card.FatPackData;
|
||||
|
||||
/**
|
||||
* TODO Write javadoc for this type.
|
||||
*
|
||||
*/
|
||||
public class FatPack extends OpenablePack {
|
||||
|
||||
/** The Constant fnFromSet. */
|
||||
public static final Lambda1<FatPack, CardEdition> FN_FROM_SET = new Lambda1<FatPack, CardEdition>() {
|
||||
@Override
|
||||
public FatPack apply(final CardEdition arg1) {
|
||||
FatPackData d = Singletons.getModel().getFatPacks().get(arg1.getCode());
|
||||
return new FatPack(arg1.getName(), d);
|
||||
}
|
||||
};
|
||||
|
||||
private final FatPackData fpData;
|
||||
|
||||
/**
|
||||
* Instantiates a new booster pack.
|
||||
*
|
||||
* @param set
|
||||
* the set
|
||||
*/
|
||||
public FatPack(final String name0, final FatPackData fpData0) {
|
||||
super(name0, Singletons.getModel().getBoosters().get(fpData0.getEdition()));
|
||||
fpData = fpData0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public final String getImageFilename() {
|
||||
return "fatpacks/" + this.contents.getEdition() + ".png";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public final String getType() {
|
||||
return "Fat Pack";
|
||||
}
|
||||
|
||||
protected List<CardPrinted> generate() {
|
||||
List<CardPrinted> result = new ArrayList<CardPrinted>();
|
||||
for( int i = 0; i < fpData.getCntBoosters(); i++ ) {
|
||||
result.addAll(super.generate());
|
||||
}
|
||||
CardEdition landEdition = Singletons.getModel().getEditions().get(fpData.getLandsEdition());
|
||||
result.addAll(getRandomBasicLands(landEdition, fpData.getCntLands()));
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.lang.Object#clone()
|
||||
*/
|
||||
/**
|
||||
* Clone.
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
@Override
|
||||
public final Object clone() {
|
||||
return new FatPack(name, fpData);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,8 +1,16 @@
|
||||
package forge.item;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.slightlymagic.braids.util.UtilFunctions;
|
||||
|
||||
import forge.Singletons;
|
||||
import forge.card.BoosterData;
|
||||
import forge.card.BoosterGenerator;
|
||||
import forge.card.CardEdition;
|
||||
import forge.card.CardRules;
|
||||
import forge.util.Predicate;
|
||||
|
||||
/**
|
||||
* TODO: Write javadoc for this type.
|
||||
@@ -12,6 +20,8 @@ public abstract class OpenablePack implements InventoryItemFromSet {
|
||||
protected final String name;
|
||||
private List<CardPrinted> cards = null;
|
||||
|
||||
private BoosterGenerator generator = null;
|
||||
|
||||
public OpenablePack(final String name0, final BoosterData boosterData) {
|
||||
this.contents = boosterData;
|
||||
this.name = name0;
|
||||
@@ -28,8 +38,6 @@ public abstract class OpenablePack implements InventoryItemFromSet {
|
||||
return this.contents.getEdition();
|
||||
}
|
||||
|
||||
|
||||
protected abstract List<CardPrinted> generate();
|
||||
/**
|
||||
* Gets the cards.
|
||||
*
|
||||
@@ -94,4 +102,43 @@ public abstract class OpenablePack implements InventoryItemFromSet {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
protected List<CardPrinted> generate() {
|
||||
if ( null == generator ) {
|
||||
generator = new BoosterGenerator(this.contents.getEditionFilter());
|
||||
}
|
||||
List<CardPrinted> myCards = generator.getBoosterPack(this.contents);
|
||||
|
||||
final int cntLands = this.contents.getLand();
|
||||
if (cntLands > 0) {
|
||||
myCards.add(this.getLandFromNearestSet());
|
||||
}
|
||||
return myCards;
|
||||
}
|
||||
|
||||
|
||||
private CardPrinted getLandFromNearestSet() {
|
||||
final CardEdition[] editions = UtilFunctions.iteratorToArray(Singletons.getModel().getEditions().iterator(), new CardEdition[]{});
|
||||
final int iThisSet = Arrays.binarySearch(editions, this.contents);
|
||||
for (int iSet = iThisSet; iSet < editions.length; iSet++) {
|
||||
final CardPrinted land = this.getRandomBasicLand(editions[iSet]);
|
||||
if (null != land) {
|
||||
return land;
|
||||
}
|
||||
}
|
||||
// if not found (though that's impossible)
|
||||
return this.getRandomBasicLand(Singletons.getModel().getEditions().get("M12"));
|
||||
}
|
||||
|
||||
|
||||
protected CardPrinted getRandomBasicLand(final CardEdition set) {
|
||||
return getRandomBasicLands(set, 1).get(0);
|
||||
}
|
||||
|
||||
protected List<CardPrinted> getRandomBasicLands(final CardEdition set, int count) {
|
||||
return Predicate.and(CardPrinted.Predicates.printedInSets(set.getCode()),
|
||||
CardRules.Predicates.Presets.IS_BASIC_LAND, CardPrinted.FN_GET_RULES)
|
||||
.random(CardDb.instance().getAllCards(), count);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -37,6 +37,7 @@ import forge.Singletons;
|
||||
import forge.card.BoosterData;
|
||||
import forge.card.CardBlock;
|
||||
import forge.card.EditionCollection;
|
||||
import forge.card.FatPackData;
|
||||
import forge.card.FormatCollection;
|
||||
import forge.control.input.InputControl;
|
||||
import forge.deck.CardCollections;
|
||||
@@ -87,7 +88,8 @@ public enum FModel {
|
||||
private final FormatCollection formats;
|
||||
private final IStorageView<BoosterData> boosters;
|
||||
private final IStorageView<BoosterData> tournaments;
|
||||
private final StorageView<CardBlock> blocks;
|
||||
private final IStorageView<FatPackData> fatPacks;
|
||||
private final IStorageView<CardBlock> blocks;
|
||||
|
||||
// have to implement lazy initialization - at the moment of FModel.ctor()
|
||||
// CardDb is not ready yet.
|
||||
@@ -137,6 +139,7 @@ public enum FModel {
|
||||
this.formats = new FormatCollection("res/blockdata/formats.txt");
|
||||
this.boosters = new StorageView<BoosterData>(new BoosterData.Reader("res/blockdata/boosters.txt"));
|
||||
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));
|
||||
|
||||
// TODO this single setting from preferences should not be here, or,
|
||||
@@ -523,9 +526,13 @@ public enum FModel {
|
||||
}
|
||||
}
|
||||
|
||||
public StorageView<CardBlock> getBlocks() {
|
||||
public IStorageView<CardBlock> getBlocks() {
|
||||
return blocks;
|
||||
}
|
||||
|
||||
public IStorageView<FatPackData> getFatPacks() {
|
||||
return fatPacks;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ import forge.game.GameType;
|
||||
import forge.item.BoosterPack;
|
||||
import forge.item.CardDb;
|
||||
import forge.item.CardPrinted;
|
||||
import forge.item.FatPack;
|
||||
import forge.item.InventoryItem;
|
||||
import forge.item.ItemPool;
|
||||
import forge.item.PreconDeck;
|
||||
@@ -111,7 +112,7 @@ public class QuestDataIO {
|
||||
}
|
||||
|
||||
final IgnoringXStream xStream = new IgnoringXStream();
|
||||
xStream.registerConverter(new CardPoolToXml());
|
||||
xStream.registerConverter(new ItemPoolToXml());
|
||||
xStream.registerConverter(new DeckSectionToXml());
|
||||
xStream.registerConverter(new GameTypeToXml());
|
||||
xStream.alias("CardPool", ItemPool.class);
|
||||
@@ -199,7 +200,7 @@ public class QuestDataIO {
|
||||
public static void saveData(final QuestData qd) {
|
||||
try {
|
||||
final XStream xStream = new XStream();
|
||||
xStream.registerConverter(new CardPoolToXml());
|
||||
xStream.registerConverter(new ItemPoolToXml());
|
||||
xStream.registerConverter(new DeckSectionToXml());
|
||||
xStream.alias("CardPool", ItemPool.class);
|
||||
xStream.alias("DeckSection", DeckSection.class);
|
||||
@@ -273,7 +274,7 @@ public class QuestDataIO {
|
||||
|
||||
}
|
||||
|
||||
private static class CardPoolToXml implements Converter {
|
||||
private static class ItemPoolToXml implements Converter {
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public boolean canConvert(final Class clasz) {
|
||||
@@ -301,6 +302,13 @@ public class QuestDataIO {
|
||||
writer.endNode();
|
||||
}
|
||||
|
||||
protected void write(final FatPack fatpack, final Integer count, final HierarchicalStreamWriter writer) {
|
||||
writer.startNode("fpack");
|
||||
writer.addAttribute("s", fatpack.getEdition());
|
||||
writer.addAttribute("n", count.toString());
|
||||
writer.endNode();
|
||||
}
|
||||
|
||||
protected void write(final TournamentPack booster, final Integer count, final HierarchicalStreamWriter writer) {
|
||||
writer.startNode("tpack");
|
||||
writer.addAttribute("s", booster.getEdition());
|
||||
@@ -328,6 +336,8 @@ public class QuestDataIO {
|
||||
this.write((BoosterPack) item, count, writer);
|
||||
} else if (item instanceof TournamentPack) {
|
||||
this.write((TournamentPack) item, count, writer);
|
||||
} else if (item instanceof FatPack) {
|
||||
this.write((FatPack) item, count, writer);
|
||||
} else if (item instanceof PreconDeck) {
|
||||
this.write((PreconDeck) item, count, writer);
|
||||
}
|
||||
@@ -352,6 +362,8 @@ public class QuestDataIO {
|
||||
result.add(this.readBooster(reader), cnt);
|
||||
} else if ("tpack".equals(nodename)) {
|
||||
result.add(this.readTournamentPack(reader), cnt);
|
||||
} else if ("fpack".equals(nodename)) {
|
||||
result.add(this.readFatPack(reader), cnt);
|
||||
} else if ("precon".equals(nodename)) {
|
||||
final PreconDeck toAdd = this.readPreconDeck(reader);
|
||||
if (null != toAdd) {
|
||||
@@ -372,17 +384,18 @@ public class QuestDataIO {
|
||||
}
|
||||
|
||||
protected BoosterPack readBooster(final HierarchicalStreamReader reader) {
|
||||
final String set = reader.getAttribute("s");
|
||||
CardEdition ed = Singletons.getModel().getEditions().get(set);
|
||||
BoosterData bd = Singletons.getModel().getBoosters().get(set);
|
||||
return new BoosterPack(ed.getName(), bd);
|
||||
CardEdition ed = Singletons.getModel().getEditions().get(reader.getAttribute("s"));
|
||||
return BoosterPack.FN_FROM_SET.apply(ed);
|
||||
}
|
||||
|
||||
protected TournamentPack readTournamentPack(final HierarchicalStreamReader reader) {
|
||||
final String set = reader.getAttribute("s");
|
||||
CardEdition ed = Singletons.getModel().getEditions().get(set);
|
||||
BoosterData bd = Singletons.getModel().getTournamentPacks().get(set);
|
||||
return new TournamentPack(ed.getName(), bd);
|
||||
CardEdition ed = Singletons.getModel().getEditions().get(reader.getAttribute("s"));
|
||||
return TournamentPack.FN_FROM_SET.apply(ed);
|
||||
}
|
||||
|
||||
protected FatPack readFatPack(final HierarchicalStreamReader reader) {
|
||||
CardEdition ed = Singletons.getModel().getEditions().get(reader.getAttribute("s"));
|
||||
return FatPack.FN_FROM_SET.apply(ed);
|
||||
}
|
||||
|
||||
protected CardPrinted readCardPrinted(final HierarchicalStreamReader reader) {
|
||||
@@ -396,7 +409,7 @@ public class QuestDataIO {
|
||||
}
|
||||
}
|
||||
|
||||
private static class DeckSectionToXml extends CardPoolToXml {
|
||||
private static class DeckSectionToXml extends ItemPoolToXml {
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
|
||||
@@ -30,6 +30,7 @@ import forge.deck.Deck;
|
||||
import forge.item.BoosterPack;
|
||||
import forge.item.CardDb;
|
||||
import forge.item.CardPrinted;
|
||||
import forge.item.FatPack;
|
||||
import forge.item.InventoryItem;
|
||||
import forge.item.ItemPool;
|
||||
import forge.item.ItemPoolView;
|
||||
@@ -209,6 +210,7 @@ public final class QuestUtilCards {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Buy precon deck.
|
||||
*
|
||||
@@ -356,7 +358,12 @@ public final class QuestUtilCards {
|
||||
*/
|
||||
public void generateTournamentsInShop(final int count) {
|
||||
Predicate<CardEdition> hasTournament = CardEdition.Predicates.HAS_TOURNAMENT_PACK;
|
||||
this.q.getShopList().addAllFlat(hasTournament.random(Singletons.getModel().getEditions(), count, TournamentPack.FN_FROM_SET));
|
||||
this.q.getShopList().addAllFlat( hasTournament.random(Singletons.getModel().getEditions(), count, TournamentPack.FN_FROM_SET));
|
||||
}
|
||||
|
||||
public void generateFatPacksInShop(final int count) {
|
||||
Predicate<CardEdition> hasPack = CardEdition.Predicates.HAS_FAT_PACK;
|
||||
this.q.getShopList().addAllFlat( hasPack.random(Singletons.getModel().getEditions(), count, FatPack.FN_FROM_SET));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -401,6 +408,7 @@ public final class QuestUtilCards {
|
||||
this.generateBoostersInShop(totalPacks);
|
||||
this.generatePreconsInShop(totalPacks);
|
||||
this.generateTournamentsInShop(totalPacks);
|
||||
this.generateFatPacksInShop(totalPacks);
|
||||
this.q.getShopList().addAll(QuestUtilCards.generateBasicLands(10, 5));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user