SteamWar/MissileWars
Archiviert
13
0

Fix SpecialItem
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2024-07-22 12:14:57 +02:00
Ursprung 4200d62159
Commit 58e3120ce2

Datei anzeigen

@ -111,6 +111,8 @@ public abstract class SpecialItem {
public static ItemStack getRandomItem() { public static ItemStack getRandomItem() {
double missileChance = Config.MissileChance + count * 0.1; double missileChance = Config.MissileChance + count * 0.1;
if (Config.MissileChance == 0) missileChance = 0.0;
if (Config.MissileChance == 1) missileChance = 1.0;
if (random.nextDouble() > missileChance) { if (random.nextDouble() > missileChance) {
count++; count++;
return supportItems.get(random.nextInt(supportItems.size())).getItem(); return supportItems.get(random.nextInt(supportItems.size())).getItem();