mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Optimized the generation of basic lands with random art for the quest mode card pool and quest shop.
- Better name for a function to split a value into a predefined number of random groups.
This commit is contained in:
@@ -125,10 +125,11 @@ 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);
|
||||
int artCount = db.getArtCount(landName, landCode);
|
||||
int artGroups[] = MyRandom.splitIntoRandomGroups(nBasic, artCount);
|
||||
|
||||
for (int i=0; i<artGroups.length; i++) {
|
||||
pool.add(db.getCard(landName, landCode, i), artGroups[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user