mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Optimized the generation of basic lands with random art for the quest mode card pool and quest shop.
- Better name for a function to split a value into a predefined number of random groups.
This commit is contained in:
@@ -69,7 +69,7 @@ public class CardPool extends ItemPool<PaperCard> {
|
||||
this.add(cp, amount);
|
||||
} else {
|
||||
// random art index specified, make sure we get different groups of cards with different art
|
||||
int[] artGroups = MyRandom.splitIntoGroups(amount, artCount);
|
||||
int[] artGroups = MyRandom.splitIntoRandomGroups(amount, artCount);
|
||||
for (int i = 0; i < artGroups.length; i++) {
|
||||
PaperCard cp_random = isCommonCard ? StaticData.instance().getCommonCards().tryGetCard(cardName, setCode, i) : StaticData.instance().getVariantCards().tryGetCard(cardName, setCode, i);
|
||||
this.add(cp_random, artGroups[i]);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class MyRandom {
|
||||
return MyRandom.random;
|
||||
}
|
||||
|
||||
public static int[] splitIntoGroups(final int value, final int numGroups) {
|
||||
public static int[] splitIntoRandomGroups(final int value, final int numGroups) {
|
||||
int[] groups = new int[numGroups];
|
||||
|
||||
for (int i = 0; i < value; i++) {
|
||||
|
||||
Reference in New Issue
Block a user