mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
updated library creation code to generate a single event for the whole library (instead of events on per-card basis)
This commit is contained in:
@@ -117,6 +117,7 @@ public class GameNew {
|
|||||||
|
|
||||||
private static void preparePlayerLibrary(Player player, final ZoneType zoneType, CardPool section, boolean canRandomFoil, Random generator) {
|
private static void preparePlayerLibrary(Player player, final ZoneType zoneType, CardPool section, boolean canRandomFoil, Random generator) {
|
||||||
PlayerZone library = player.getZone(zoneType);
|
PlayerZone library = player.getZone(zoneType);
|
||||||
|
List<Card> newLibrary = new ArrayList<Card>();
|
||||||
for (final Entry<PaperCard, Integer> stackOfCards : section) {
|
for (final Entry<PaperCard, Integer> stackOfCards : section) {
|
||||||
final PaperCard cp = stackOfCards.getKey();
|
final PaperCard cp = stackOfCards.getKey();
|
||||||
for (int i = 0; i < stackOfCards.getValue(); i++) {
|
for (int i = 0; i < stackOfCards.getValue(); i++) {
|
||||||
@@ -149,10 +150,10 @@ public class GameNew {
|
|||||||
|
|
||||||
card.setFoil(iFoil);
|
card.setFoil(iFoil);
|
||||||
}
|
}
|
||||||
|
newLibrary.add(card);
|
||||||
library.add(card);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
library.setCards(newLibrary);
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is where the computer cheats
|
// this is where the computer cheats
|
||||||
|
|||||||
Reference in New Issue
Block a user