mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Fixed a bug in random generation where selecting a set which had no basic lands caused an error. Partially fixes #1242
This commit is contained in:
parent
5a812f022d
commit
14148b25db
1 changed files with 2 additions and 1 deletions
|
@ -396,7 +396,8 @@ public class DeckGenerator {
|
|||
private static Card getBasicLand(ColoredManaSymbol color, Map<String, List<CardInfo>> basicLands) {
|
||||
Random random = new Random();
|
||||
String landName = DeckGeneratorPool.getBasicLandName(color.toString());
|
||||
return basicLands.get(landName).get(random.nextInt(basicLands.size() - 1)).getMockCard().copy();
|
||||
List<CardInfo> basicLandsInfo = basicLands.get(landName);
|
||||
return basicLandsInfo.get(random.nextInt(basicLandsInfo.size() - 1)).getMockCard().copy();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue