Nerfed luck level to max out at 3 rolls for rarity
This commit is contained in:
parent
92ab01bee1
commit
ae805966da
|
|
@ -21,7 +21,8 @@ public class FishGenerator {
|
||||||
|
|
||||||
public Optional<Fish> getFish(int luckLevel, FishType fishType) {
|
public Optional<Fish> getFish(int luckLevel, FishType fishType) {
|
||||||
int maxChanceRange = rarityManager.getMaxChanceRange(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);
|
Optional<Rarity> optionalRarity = rarityManager.getRarityFromNumber(fishType, rarityValue);
|
||||||
if (optionalRarity.isEmpty())
|
if (optionalRarity.isEmpty())
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user