From a6a544f472aaff114cfbaa8f333eacacfacd52c4 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Fri, 20 Sep 2019 16:54:23 -0700 Subject: [PATCH] Add limit break setting to Axes --- .../skills/axes/ConfigAxesLimitBreak.java | 19 +++++++++++++++++++ .../skills/axes/ConfigAxesSubSkills.java | 9 +++++++++ .../util/experience/ExperienceBarWrapper.java | 4 ++-- .../nossr50/util/skills/CombatTools.java | 1 - 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxesLimitBreak.java diff --git a/src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxesLimitBreak.java b/src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxesLimitBreak.java new file mode 100644 index 000000000..ccb3ce2a2 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxesLimitBreak.java @@ -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; + } + +} diff --git a/src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxesSubSkills.java b/src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxesSubSkills.java index 24e93f291..a5eac757b 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxesSubSkills.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxesSubSkills.java @@ -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(); } + + } diff --git a/src/main/java/com/gmail/nossr50/util/experience/ExperienceBarWrapper.java b/src/main/java/com/gmail/nossr50/util/experience/ExperienceBarWrapper.java index 4af9146fc..d348d4a44 100644 --- a/src/main/java/com/gmail/nossr50/util/experience/ExperienceBarWrapper.java +++ b/src/main/java/com/gmail/nossr50/util/experience/ExperienceBarWrapper.java @@ -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)); diff --git a/src/main/java/com/gmail/nossr50/util/skills/CombatTools.java b/src/main/java/com/gmail/nossr50/util/skills/CombatTools.java index c32d22ba8..36752229d 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/CombatTools.java +++ b/src/main/java/com/gmail/nossr50/util/skills/CombatTools.java @@ -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;