Nerfed luck level to max out at 3 rolls for rarity

This commit is contained in:
Teriuihi 2023-09-30 23:01:38 +02:00
parent 92ab01bee1
commit ae805966da

View File

@ -21,7 +21,8 @@ public class FishGenerator {
public Optional<Fish> getFish(int luckLevel, FishType fishType) {
int maxChanceRange = rarityManager.getMaxChanceRange(fishType);
int rarityValue = CustomRandom.generateNumber(0, maxChanceRange, luckLevel + 1);
int attempts = luckLevel < 3 ? 1 : (luckLevel < 5 ? 2 : 3); //starts at 1, then 2 at lvl 3 and 3 at lvl 5
int rarityValue = CustomRandom.generateNumber(0, maxChanceRange, attempts);
Optional<Rarity> optionalRarity = rarityManager.getRarityFromNumber(fishType, rarityValue);
if (optionalRarity.isEmpty())
return Optional.empty();