mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Make generated quest card pool indices 1-based.
This commit is contained in:
@@ -130,11 +130,11 @@ public final class QuestUtilCards {
|
|||||||
if (Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_RANDOM_ART_IN_POOLS)) {
|
if (Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_RANDOM_ART_IN_POOLS)) {
|
||||||
int[] artGroups = MyRandom.splitIntoRandomGroups(nBasic, artCount);
|
int[] artGroups = MyRandom.splitIntoRandomGroups(nBasic, artCount);
|
||||||
|
|
||||||
for (int i=0; i<artGroups.length; i++) {
|
for (int i = 1; i <= artGroups.length; i++) {
|
||||||
pool.add(db.getCard(landName, landCode, i), artGroups[i]);
|
pool.add(db.getCard(landName, landCode, i), artGroups[i - 1]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pool.add(db.getCard(landName, landCode, artCount > 1 ? MyRandom.getRandom().nextInt(artCount) : 0), nBasic);
|
pool.add(db.getCard(landName, landCode, artCount > 1 ? MyRandom.getRandom().nextInt(artCount + 1) : 1), nBasic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user