mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
fix: removed unused images, booster pack shops now respect the restricted cards and editions. (#7161)
This commit is contained in:
@@ -230,15 +230,20 @@ public class RewardData implements Serializable {
|
||||
.filter(CardEdition::hasBoosterTemplate)
|
||||
.forEach(allEditions::add);
|
||||
ConfigData configData = Config.instance().getConfigData();
|
||||
|
||||
for (String restricted : configData.restrictedEditions) {
|
||||
allEditions.removeIf(q -> q.getName().equals(restricted));
|
||||
allEditions.removeIf(q -> q.getCode().equals(restricted));
|
||||
}
|
||||
for(String restrictedCard: configData.restrictedCards)
|
||||
{
|
||||
allEditions.removeIf(
|
||||
cardEdition -> cardEdition.getAllCardsInSet().stream().anyMatch(
|
||||
o -> o.name.equals(restrictedCard))
|
||||
);
|
||||
}
|
||||
System.out.println(allEditions);
|
||||
for(int i=0;i<count+addedCount;i++) {
|
||||
ret.add(new Reward(AdventureEventController.instance().generateBooster(Aggregates.random(allEditions).getCode())));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -141,7 +141,7 @@ public class AdventureEventController implements Serializable {
|
||||
}
|
||||
public Deck generateBoosterByColor(String color)
|
||||
{
|
||||
System.out.println(color);
|
||||
|
||||
List<PaperCard> cards = BoosterPack.fromColor(color).getCards();
|
||||
Deck output = new Deck();
|
||||
output.getMain().add(cards);
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 251 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 214 KiB |
Reference in New Issue
Block a user