Fix gacha 4 star probability rates

This commit is contained in:
Melledy
2025-12-15 08:39:29 -08:00
parent 21467faa7f
commit 4da479a88a
2 changed files with 20 additions and 15 deletions

View File

@@ -4,6 +4,7 @@ import emu.nebula.data.BaseDef;
import emu.nebula.data.GameData; import emu.nebula.data.GameData;
import emu.nebula.data.ResourceType; import emu.nebula.data.ResourceType;
import emu.nebula.util.WeightedList; import emu.nebula.util.WeightedList;
import lombok.Getter; import lombok.Getter;
@Getter @Getter
@@ -55,13 +56,14 @@ public class GachaDef extends BaseDef {
if (this.ATypePkg > 0) { if (this.ATypePkg > 0) {
packageA.add( packageA.add(
10000 - storage.getATypeUpProb(), 10000 - storage.getATypeUpProb(),
new GachaPackage(GachaPackageType.A, this.ATypePkg) new GachaPackage(GachaPackageType.A, this.ATypePkg)
); );
} if (this.ATypeUpPkg > 0) { }
if (this.ATypeUpPkg > 0) {
packageA.add( packageA.add(
storage.getATypeUpProb(), storage.getATypeUpProb(),
new GachaPackage(GachaPackageType.A_UP, this.ATypeUpPkg) new GachaPackage(GachaPackageType.A_UP, this.ATypeUpPkg)
); );
} }
@@ -70,18 +72,20 @@ public class GachaDef extends BaseDef {
if (this.BTypePkg > 0) { if (this.BTypePkg > 0) {
packageB.add( packageB.add(
10000 - storage.getBTypeUpProb(), storage.getBTypeProb(),
new GachaPackage(GachaPackageType.B, this.BTypePkg) new GachaPackage(GachaPackageType.B, this.BTypePkg)
); );
} else if (this.BGuaranteePkg > 0) { }
if (this.BGuaranteePkg > 0) {
packageB.add( packageB.add(
10000 - storage.getBTypeUpProb(), storage.getBTypeGuaranteeProb(),
new GachaPackage(GachaPackageType.B, this.BGuaranteePkg) new GachaPackage(GachaPackageType.B, this.BGuaranteePkg)
); );
} if (this.BTypeUpPkg > 0) { }
if (this.BTypeUpPkg > 0) {
packageB.add( packageB.add(
storage.getBTypeUpProb(), storage.getBTypeUpProb(),
new GachaPackage(GachaPackageType.B_UP, this.BTypeUpPkg) new GachaPackage(GachaPackageType.B_UP, this.BTypeUpPkg)
); );
} }
@@ -90,8 +94,8 @@ public class GachaDef extends BaseDef {
if (this.CTypePkg > 0) { if (this.CTypePkg > 0) {
packageC.add( packageC.add(
10000, 10000,
new GachaPackage(GachaPackageType.C, this.CTypePkg) new GachaPackage(GachaPackageType.C, this.CTypePkg)
); );
} }
} }

View File

@@ -16,6 +16,7 @@ public class GachaStorageDef extends BaseDef {
private int CostQty; private int CostQty;
private int ATypeUpProb; private int ATypeUpProb;
private int BTypeProb;
private int BTypeUpProb; private int BTypeUpProb;
private int BTypeGuaranteeProb; private int BTypeGuaranteeProb;