mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-14 03:24:43 +02:00
new mmoinfo command and JSON click events
This commit is contained in:
@ -311,6 +311,19 @@ public class SkillUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static double getChanceOfSuccess(int skillLevel, double maxLevelBonus, double curve)
|
||||
{
|
||||
return getChanceOfSuccess((double) skillLevel, maxLevelBonus, curve);
|
||||
}
|
||||
|
||||
public static double getChanceOfSuccess(double skillLevel, double maxLevelBonus, double curve)
|
||||
{
|
||||
if(skillLevel > maxLevelBonus)
|
||||
return maxLevelBonus / curve;
|
||||
|
||||
return skillLevel / curve;
|
||||
}
|
||||
|
||||
/* NEW VERSION */
|
||||
public static boolean isActivationSuccessful(SkillActivationType skillActivationType, AbstractSubSkill abstractSubSkill, Player player, double maxChance, int maxBonusLevel)
|
||||
{
|
||||
|
Reference in New Issue
Block a user