From 19acf47f1e0f0e7e594c98310f0fe68de1e3d4a9 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Thu, 30 May 2019 18:59:50 -0700 Subject: [PATCH] Add Armor Impact settings to Axes config --- .../config/hocon/skills/axes/ConfigAxes.java | 24 +++++++++++++++++++ .../datatypes/player/PlayerProfile.java | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxes.java b/src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxes.java index 970c73579..33be7d315 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxes.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxes.java @@ -1,8 +1,32 @@ package com.gmail.nossr50.config.hocon.skills.axes; +import ninja.leaping.configurate.objectmapping.Setting; import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; @ConfigSerializable public class ConfigAxes { + public static final double IMPACT_CHANCE_DEFAULT = 25.0D; + public static final double IMPACT_DURABILITY_MULTIPLIER_DEFAULT = 6.5D; + /* + public double getImpactChance() { return config.getDouble("Skills.Axes.ArmorImpact.Chance", 25.0D); } + public double getImpactDurabilityDamageMultiplier() { return config.getDouble("Skills.Axes.ArmorImpact.DamagePerRank", 6.5D); } + */ + + @Setting(value = "Impact-Activation-Chance", comment = "Chance to activate the Impact skill, this is a static chance and does not change per rank of the skill." + + "\nDefault value: "+IMPACT_CHANCE_DEFAULT) + private double impactChance = IMPACT_CHANCE_DEFAULT; + + @Setting(value = "Impact-Durability-Damage-Multiplier", comment = "The amount of durability damage done by Impact is multiplied by this number" + + "\nThe damage done by impact starts at 1 and increases by 1 every rank, this value is then multiplied by this variable to determine the durability damage done to armor." + + "\nDefault value: "+IMPACT_DURABILITY_MULTIPLIER_DEFAULT) + private double impactDurabilityDamageModifier = IMPACT_DURABILITY_MULTIPLIER_DEFAULT; + + public double getImpactChance() { + return impactChance; + } + + public double getImpactDurabilityDamageModifier() { + return impactDurabilityDamageModifier; + } } \ No newline at end of file diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java index 5641a47d9..367895929 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java @@ -390,7 +390,7 @@ public class PlayerProfile { public int getXpToLevel(PrimarySkillType primarySkillType) { int level = (mcMMO.getConfigManager().getConfigLeveling().getConfigExperienceFormula().isCumulativeCurveEnabled()) ? UserManager.getPlayer(playerName).getPowerLevel() : skills.get(primarySkillType); - return mcMMO.getFormulaManager().getXPtoNextLevel(level, formulaType); + return mcMMO.getFormulaManager().getXPtoNextLevel(level); } private int getChildSkillLevel(PrimarySkillType primarySkillType) {