mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28: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) {
|
||||
PlayerZone library = player.getZone(zoneType);
|
||||
List<Card> newLibrary = new ArrayList<Card>();
|
||||
for (final Entry<PaperCard, Integer> stackOfCards : section) {
|
||||
final PaperCard cp = stackOfCards.getKey();
|
||||
for (int i = 0; i < stackOfCards.getValue(); i++) {
|
||||
@@ -149,10 +150,10 @@ public class GameNew {
|
||||
|
||||
card.setFoil(iFoil);
|
||||
}
|
||||
|
||||
library.add(card);
|
||||
newLibrary.add(card);
|
||||
}
|
||||
}
|
||||
library.setCards(newLibrary);
|
||||
}
|
||||
|
||||
// this is where the computer cheats
|
||||
|
||||
Reference in New Issue
Block a user