Add limit break setting to Axes

This commit is contained in:
nossr50 2019-09-20 16:54:23 -07:00
parent 1d7bfc615f
commit a6a544f472
4 changed files with 30 additions and 3 deletions

View File

@ -0,0 +1,19 @@
package com.gmail.nossr50.config.hocon.skills.axes;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigAxesLimitBreak {
private static final boolean DEFAULT_PVE = false;
@Setting(value = "PVE", comment = "If true, the bonus damage from Limit Break will apply to PVE in addition to PVP." +
"\nDefault value: "+DEFAULT_PVE)
private boolean PVE = DEFAULT_PVE;
public boolean isEnabledForPVE() {
return PVE;
}
}

View File

@ -21,6 +21,9 @@ public class ConfigAxesSubSkills {
@Setting(value = "Skull-Splitter")
private ConfigAxesSkullSplitter configAxesSkullSplitter = new ConfigAxesSkullSplitter();
@Setting(value = "Limit-Break")
private ConfigAxesLimitBreak configAxesLimitBreak = new ConfigAxesLimitBreak();
public double getCriticalStrikesMaxActivationChance() {
return configAxesCriticalStrikes.getMaxActivationChance();
}
@ -61,6 +64,10 @@ public class ConfigAxesSubSkills {
return configAxesSkullSplitter;
}
public ConfigAxesLimitBreak getConfigAxesLimitBreak() {
return configAxesLimitBreak;
}
public double getImpactDurabilityDamageModifier() {
return configAxesImpact.getImpactDurabilityDamageModifier();
}
@ -68,4 +75,6 @@ public class ConfigAxesSubSkills {
public double getAxeMasteryMultiplier() {
return configAxesAxeMastery.getAxeMasteryMultiplier();
}
}

View File

@ -55,7 +55,7 @@ public class ExperienceBarWrapper {
private String getTitleTemplate() {
//If they are using extra details
if(pluginRef.getConfigManager().getConfigLeveling().getEarlyGameBoost().isEnableEarlyGameBoost() && PlayerLevelTools.qualifiesForEarlyGameBoost(mcMMOPlayer, primarySkillType)) {
if(pluginRef.getConfigManager().getConfigLeveling().getEarlyGameBoost().isEnableEarlyGameBoost() && pluginRef.getPlayerLevelTools().qualifiesForEarlyGameBoost(mcMMOPlayer, primarySkillType)) {
return pluginRef.getLocaleManager().getString("XPBar.Template.EarlyGameBoost");
} else if(pluginRef.getConfigManager().getConfigLeveling().getConfigExperienceBars().isMoreDetailedXPBars())
return pluginRef.getLocaleManager().getString("XPBar.Complex.Template", pluginRef.getLocaleManager().getString("XPBar."+niceSkillName, getLevel()), getCurrentXP(), getMaxXP(), getPowerLevel(), getPercentageOfLevel());
@ -122,7 +122,7 @@ public class ExperienceBarWrapper {
bossBar.setProgress(v);
//Check player level
if(pluginRef.getConfigManager().getConfigLeveling().getEarlyGameBoost().isEnableEarlyGameBoost() && PlayerLevelTools.qualifiesForEarlyGameBoost(mcMMOPlayer, primarySkillType)) {
if(pluginRef.getConfigManager().getConfigLeveling().getEarlyGameBoost().isEnableEarlyGameBoost() && pluginRef.getPlayerLevelTools().qualifiesForEarlyGameBoost(mcMMOPlayer, primarySkillType)) {
setColor(BarColor.YELLOW);
} else {
setColor(pluginRef.getConfigManager().getConfigLeveling().getConfigExperienceBars().getXPBarColor(primarySkillType));

View File

@ -1,6 +1,5 @@
package com.gmail.nossr50.util.skills;
import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.core.MetadataConstants;
import com.gmail.nossr50.datatypes.experience.SpecialXPKey;
import com.gmail.nossr50.datatypes.experience.XPGainReason;