Browse Source

Greater Impact settings & some refactoring for Axes config

nossr50 6 years ago
parent
commit
cb9a4e5e5d

+ 15 - 11
src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxes.java

@@ -32,14 +32,6 @@ public class ConfigAxes {
         return greaterImpactKnockbackMultiplier;
         return greaterImpactKnockbackMultiplier;
     }
     }
 
 
-
-        GreaterImpact:
-            # Chance: Chance of hitting with GreaterImpact, mobs are knocked backwards when successful
-            # KnockbackModifier: Velocity modifier of GreaterImpact hits, this determines how great the knockback is
-            # BonusDamage: Extra damage for GreaterImpact hits
-            Chance: 25.0
-            KnockbackModifier: 1.5
-            BonusDamage: 2.0
         ArmorImpact:
         ArmorImpact:
             # Multiplied against the skill rank to determine how much damage to do
             # Multiplied against the skill rank to determine how much damage to do
             DamagePerRank: 6.5
             DamagePerRank: 6.5
@@ -64,15 +56,27 @@ public class ConfigAxes {
     @Setting(value = "Skull-Splitter")
     @Setting(value = "Skull-Splitter")
     private ConfigAxesSkullSplitter configAxesSkullSplitter = new ConfigAxesSkullSplitter();
     private ConfigAxesSkullSplitter configAxesSkullSplitter = new ConfigAxesSkullSplitter();
 
 
-    public double getMaxActivationChance() {
+    public double getCriticalStrikesMaxActivationChance() {
         return configAxesCriticalStrikes.getMaxActivationChance();
         return configAxesCriticalStrikes.getMaxActivationChance();
     }
     }
 
 
-    public AbstractMaximumProgressionLevel getMaximumProgressionLevel() {
+    public AbstractMaximumProgressionLevel getCriticalStrikesMaximumProgressionLevel() {
         return configAxesCriticalStrikes.getMaximumProgressionLevel();
         return configAxesCriticalStrikes.getMaximumProgressionLevel();
     }
     }
 
 
-    public DamageProperty getDamageProperty() {
+    public double getGreaterImpactActivationChance() {
+        return configAxesGreaterImpact.getActivationChance();
+    }
+
+    public double getGreaterImpactKnockBackModifier() {
+        return configAxesGreaterImpact.getKnockBackModifier();
+    }
+
+    public double getGreaterImpactBonusDamage() {
+        return configAxesGreaterImpact.getBonusDamage();
+    }
+
+    public DamageProperty getCriticalStrikesDamageProperty() {
         return configAxesCriticalStrikes.getDamageProperty();
         return configAxesCriticalStrikes.getDamageProperty();
     }
     }
 
 

+ 30 - 0
src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxesGreaterImpact.java

@@ -1,7 +1,37 @@
 package com.gmail.nossr50.config.hocon.skills.axes;
 package com.gmail.nossr50.config.hocon.skills.axes;
 
 
+import ninja.leaping.configurate.objectmapping.Setting;
 import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
 import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
 
 
 @ConfigSerializable
 @ConfigSerializable
 public class ConfigAxesGreaterImpact {
 public class ConfigAxesGreaterImpact {
+
+    private static final double ACTIVATION_CHANCE_DEFAULT = 25.0D;
+    public static final double KNOCKBACK_MODIFIER_DEFAULT = 1.5D;
+    public static final double BONUS_DAMAGE_DEFAULT = 2.0D;
+
+    @Setting(value = "Activation-Chance", comment = "Chance for this skill to activate, this does not change." +
+            "\nDefault value: "+ACTIVATION_CHANCE_DEFAULT)
+    private double activationChance = ACTIVATION_CHANCE_DEFAULT;
+
+    @Setting(value = "Knockback-Velocity-Modifier", comment = "Velocity modifier of GreaterImpact hits, this determines how great the knockback is" +
+            "\nThe knockback does not occur in PVP" +
+            "\nDefault value: "+KNOCKBACK_MODIFIER_DEFAULT)
+    private double knockBackModifier = KNOCKBACK_MODIFIER_DEFAULT;
+
+    @Setting(value = "Bonus-Damage", comment = "This value will be added to the total damage when Greater Impact occurs" +
+            "\nDefault value: "+ BONUS_DAMAGE_DEFAULT)
+    private double bonusDamage = BONUS_DAMAGE_DEFAULT;
+
+    public double getActivationChance() {
+        return activationChance;
+    }
+
+    public double getKnockBackModifier() {
+        return knockBackModifier;
+    }
+
+    public double getBonusDamage() {
+        return bonusDamage;
+    }
 }
 }