Ability lengths now have a default skill cap at which they stop increasing in length, you can change this in advanced.yml

This commit is contained in:
nossr50
2019-01-21 05:57:06 -08:00
parent f8b7d5e10d
commit 6c77017658
6 changed files with 11 additions and 3 deletions

View File

@ -224,7 +224,8 @@ public abstract class SkillCommand implements TabExecutor {
protected String[] calculateLengthDisplayValues(Player player, float skillValue) {
int maxLength = skill.getAbility().getMaxLength();
int abilityLengthVar = Config.getInstance().getIsRetroMode() ? AdvancedConfig.getInstance().getAbilityLengthRetro() : AdvancedConfig.getInstance().getAbilityLengthStandard();
int length = 2 + (int) (skillValue / abilityLengthVar);
int abilityLengthCap = Config.getInstance().getIsRetroMode() ? AdvancedConfig.getInstance().getAbilityLengthCapRetro() : AdvancedConfig.getInstance().getAbilityLengthCapStandard();
int length = 2 + (int) (Math.min(abilityLengthCap, skillValue) / abilityLengthVar);
int enduranceLength = PerksUtils.handleActivationPerks(player, length, maxLength);
if (maxLength != 0) {