mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Sure enough, the code didn't work with brand new cards lacking SetInfo.
This commit is contained in:
@@ -2301,11 +2301,13 @@ public class GameAction {
|
||||
if ((card.getSets().size() > 0) && card.getCurSetCode().equals(""))
|
||||
card.setRandomSetCode();
|
||||
|
||||
int n = SetInfoUtil.getSetInfo_Code(card.getSets(), card.getCurSetCode()).PicCount;
|
||||
if (n > 1)
|
||||
card.setRandomPicture(generator.nextInt(n));
|
||||
if (!card.getCurSetCode().equals("")) {
|
||||
int n = SetInfoUtil.getSetInfo_Code(card.getSets(), card.getCurSetCode()).PicCount;
|
||||
if (n > 1)
|
||||
card.setRandomPicture(generator.nextInt(n));
|
||||
|
||||
card.setImageFilename(CardUtil.buildFilename(card));
|
||||
card.setImageFilename(CardUtil.buildFilename(card));
|
||||
}
|
||||
|
||||
//System.out.println("human random number:" + card.getRandomPicture());
|
||||
//}
|
||||
@@ -2335,11 +2337,13 @@ public class GameAction {
|
||||
if ((card.getSets().size() > 0) && card.getCurSetCode().equals(""))
|
||||
card.setRandomSetCode();
|
||||
|
||||
int n = SetInfoUtil.getSetInfo_Code(card.getSets(), card.getCurSetCode()).PicCount;
|
||||
if (n > 1)
|
||||
card.setRandomPicture(generator.nextInt(n));
|
||||
if (!card.getCurSetCode().equals("")) {
|
||||
int n = SetInfoUtil.getSetInfo_Code(card.getSets(), card.getCurSetCode()).PicCount;
|
||||
if (n > 1)
|
||||
card.setRandomPicture(generator.nextInt(n));
|
||||
|
||||
card.setImageFilename(CardUtil.buildFilename(card));
|
||||
card.setImageFilename(CardUtil.buildFilename(card));
|
||||
}
|
||||
|
||||
AllZone.Computer_Library.add(card);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user