Fixed the random picture number following the new PicCount scheme.

This commit is contained in:
jendave
2011-08-06 16:02:01 +00:00
parent 4ff1606fc3
commit e39d9e580c
5 changed files with 9 additions and 9 deletions

View File

@@ -2304,7 +2304,7 @@ public class GameAction {
if (!card.getCurSetCode().equals("")) {
int n = SetInfoUtil.getSetInfo_Code(card.getSets(), card.getCurSetCode()).PicCount;
if (n > 1)
card.setRandomPicture(generator.nextInt(n));
card.setRandomPicture(generator.nextInt(n-1) + 1);
card.setImageFilename(CardUtil.buildFilename(card));
}
@@ -2340,7 +2340,7 @@ public class GameAction {
if (!card.getCurSetCode().equals("")) {
int n = SetInfoUtil.getSetInfo_Code(card.getSets(), card.getCurSetCode()).PicCount;
if (n > 1)
card.setRandomPicture(generator.nextInt(n));
card.setRandomPicture(generator.nextInt(n-1) + 1);
card.setImageFilename(CardUtil.buildFilename(card));
}