mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
bugfix for starter / tournaments
This commit is contained in:
@@ -94,10 +94,13 @@ public class PrintSheet {
|
|||||||
number -= uniqueCards;
|
number -= uniqueCards;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<CardPrinted> uniques = wantUnique ? new ArrayList<CardPrinted>() : null;
|
||||||
for(int iC = 0; iC < number; iC++) {
|
for(int iC = 0; iC < number; iC++) {
|
||||||
int index = MyRandom.getRandom().nextInt(totalWeight);
|
int index = MyRandom.getRandom().nextInt(totalWeight);
|
||||||
CardPrinted toAdd = fetchRoulette(0, index, wantUnique ? result : null);
|
CardPrinted toAdd = fetchRoulette(0, index, wantUnique ? uniques : null);
|
||||||
result.add(toAdd);
|
result.add(toAdd);
|
||||||
|
if( wantUnique )
|
||||||
|
uniques.add(toAdd);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user