- Make generated quest card pool indices 1-based.

This commit is contained in:
Agetian
2014-01-27 18:15:54 +00:00
parent aa230be806
commit f21e1c3f8a

View File

@@ -130,11 +130,11 @@ public final class QuestUtilCards {
if (Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_RANDOM_ART_IN_POOLS)) {
int[] artGroups = MyRandom.splitIntoRandomGroups(nBasic, artCount);
for (int i=0; i<artGroups.length; i++) {
pool.add(db.getCard(landName, landCode, i), artGroups[i]);
for (int i = 1; i <= artGroups.length; i++) {
pool.add(db.getCard(landName, landCode, i), artGroups[i - 1]);
}
} 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);
}
}