mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Cards with no art index specified will now have random art in every match (e.g. the line "20 Forest|7ED" provides twenty 7th Edition Forest cards each with randomized art).
- Some code reogranization related to card art randomization.
This commit is contained in:
@@ -157,9 +157,7 @@ public class CEditorDraftingProcess extends ACEditorBase<PaperCard, DeckGroup> {
|
||||
final CardEdition landSet = IBoosterDraft.LAND_SET_CODE[0];
|
||||
final int landsCount = 20;
|
||||
for(String landName : MagicColor.Constant.BASIC_LANDS) {
|
||||
for (int i = 0; i < landsCount; i++) {
|
||||
deck.get(DeckSection.Sideboard).add(landName, landSet.getCode(), -1, 1);
|
||||
}
|
||||
deck.get(DeckSection.Sideboard).add(landName, landSet.getCode(), -1, landsCount);
|
||||
}
|
||||
|
||||
return deck;
|
||||
|
||||
@@ -172,9 +172,7 @@ public enum CSubmenuSealed implements ICDoc {
|
||||
deck.getOrCreate(DeckSection.Sideboard).addAll(humanPool);
|
||||
|
||||
for (final String element : MagicColor.Constant.BASIC_LANDS) {
|
||||
for (int i = 0; i < 18; i++) {
|
||||
deck.get(DeckSection.Sideboard).add(element, sd.getLandSetCode(), -1, 1);
|
||||
}
|
||||
deck.get(DeckSection.Sideboard).add(element, sd.getLandSetCode(), -1, 18);
|
||||
}
|
||||
|
||||
final IStorage<DeckGroup> sealedDecks = Singletons.getModel().getDecks().getSealed();
|
||||
|
||||
@@ -126,6 +126,8 @@ public final class QuestUtilCards {
|
||||
|
||||
for (String landName : MagicColor.Constant.BASIC_LANDS) {
|
||||
for (int i=0; i<nBasic; i++) {
|
||||
// we have to add lands one at a time here because ItemPool<PaperCard> can't handle art index
|
||||
// randomization internally when adding cards in a batch (all cards end up with the same art)
|
||||
pool.add(db.getCard(landName, landCode, -1), 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user