Class GetItemTierEvent
- java.lang.Object
-
- org.kikikan.deadbymoonlight.events.Event
-
- org.kikikan.deadbymoonlight.events.player.PlayerEvent
-
- org.kikikan.deadbymoonlight.events.player.survivor.GetItemTierEvent
-
public final class GetItemTierEvent extends PlayerEvent
Called when a Survivor finished opening a Chest and the Item generation progress has begun. Calculates the generated Item's Tier like so:
IfgeneratedNumber
is smaller than or equal toultraRareThreshold
: return Tiers.ULTRA_RARE
else ifgeneratedNumber
is smaller than or equal toveryRareThreshold
: return Tiers.VERY_RARE
...
else return Tiers.COMMON
Default values:
- uncommon threshold = 0.56
- rare threshold = 0.23
- very rare threshold = 0.07
- ultra rare threshold = 0.02
-
-
Constructor Summary
Constructors Constructor Description GetItemTierEvent(Survivor survivor, double generatedNumber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getRareThreshold()
Gets the rare threshold.Tiers
getTier()
Calculates the Tier.double
getUltraRareThreshold()
Gets the ultra rare threshold.double
getUncommonThreshold()
Gets the uncommon threshold.double
getVeryRareThreshold()
Gets the very rare threshold.void
multiplyRareThreshold(double multiplier)
Multiplies the rare threshold with the specified multiplier.void
multiplyUltraRareThreshold(double multiplier)
Multiplies the ultra rare threshold with the specified multiplier.void
multiplyUncommonThreshold(double multiplier)
Multiplies the uncommon threshold with the specified multiplier.void
multiplyVeryRareThreshold(double multiplier)
Multiplies the very rare threshold with the specified multiplier.-
Methods inherited from class org.kikikan.deadbymoonlight.events.player.PlayerEvent
getPerkUser
-
-
-
-
Constructor Detail
-
GetItemTierEvent
public GetItemTierEvent(Survivor survivor, double generatedNumber)
-
-
Method Detail
-
getUncommonThreshold
public double getUncommonThreshold()
Gets the uncommon threshold.- Returns:
- The uncommon threshold.
-
getRareThreshold
public double getRareThreshold()
Gets the rare threshold.- Returns:
- The rare threshold.
-
getVeryRareThreshold
public double getVeryRareThreshold()
Gets the very rare threshold.- Returns:
- The very rare threshold.
-
getUltraRareThreshold
public double getUltraRareThreshold()
Gets the ultra rare threshold.- Returns:
- The ultra rare threshold.
-
multiplyUncommonThreshold
public void multiplyUncommonThreshold(double multiplier)
Multiplies the uncommon threshold with the specified multiplier.- Parameters:
multiplier
- The multiplier.
-
multiplyRareThreshold
public void multiplyRareThreshold(double multiplier)
Multiplies the rare threshold with the specified multiplier.- Parameters:
multiplier
- The multiplier.
-
multiplyVeryRareThreshold
public void multiplyVeryRareThreshold(double multiplier)
Multiplies the very rare threshold with the specified multiplier.- Parameters:
multiplier
- The multiplier.
-
multiplyUltraRareThreshold
public void multiplyUltraRareThreshold(double multiplier)
Multiplies the ultra rare threshold with the specified multiplier.- Parameters:
multiplier
- The multiplier.
-
getTier
public Tiers getTier()
Calculates the Tier.- Returns:
- The Tier.
-
-