Fix booster replacement for Bloomburrow

This commit is contained in:
Chris H
2024-08-31 23:05:32 -04:00
parent bcbfe14a70
commit 754cfcd79a
3 changed files with 7 additions and 2 deletions

View File

@@ -45,7 +45,7 @@ public class BoosterSlot {
} }
public String replaceSlot() { public String replaceSlot() {
double rand = Math.random() * 100; float rand = (float) Math.random();
for (Float key : slotPercentages.keySet()) { for (Float key : slotPercentages.keySet()) {
if (rand < key) { if (rand < key) {
System.out.println("Replaced a base slot! " + slotName + " -> " + slotPercentages.get(key)); System.out.println("Replaced a base slot! " + slotName + " -> " + slotPercentages.get(key));

View File

@@ -415,6 +415,11 @@ public class BoosterGenerator {
BoosterSlot boosterSlot = boosterSlots.get(slotType); BoosterSlot boosterSlot = boosterSlots.get(slotType);
String determineSheet = boosterSlot.replaceSlot(); String determineSheet = boosterSlot.replaceSlot();
if (determineSheet.endsWith("+")) {
determineSheet = determineSheet.substring(0, determineSheet.length() - 1);
convertCardFoil = true;
}
String setCode = template.getEdition(); String setCode = template.getEdition();
// Ok, so we have a sheet now. Most should be standard sheets, but some named edition sheets // Ok, so we have a sheet now. Most should be standard sheets, but some named edition sheets

View File

@@ -33,7 +33,7 @@ Replace=.20F Land:fromSheet("BLB full art")+
Base=Common:fromSheet("BLB cards") Base=Common:fromSheet("BLB cards")
# I don't know about these numbers, so i'm just copying them from MH3 # I don't know about these numbers, so i'm just copying them from MH3
Replace=.417F Uncommon:fromSheet("BLB cards") Replace=.417F Uncommon:fromSheet("BLB cards")
Replace=.078F MythicRare:fromSheet("BLB cards") Replace=.078F RareMythic:fromSheet("BLB cards")
Replace=.004F fromSheet("BLB borderless") Replace=.004F fromSheet("BLB borderless")
Replace=.042F fromSheet("BLB showcase") Replace=.042F fromSheet("BLB showcase")