From 9204b23d5107c27138dec22185f12aa64b4c71a3 Mon Sep 17 00:00:00 2001 From: GJ Date: Tue, 15 Jan 2013 17:00:56 -0500 Subject: [PATCH] Allow configuration of Skull Splitter damage modifier. --- src/main/java/com/gmail/nossr50/config/AdvancedConfig.java | 2 ++ src/main/java/com/gmail/nossr50/skills/axes/Axes.java | 2 ++ .../gmail/nossr50/skills/axes/SkullSplitterEventHandler.java | 2 +- src/main/resources/advanced.yml | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java b/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java index 3ffbb37cc..c405437de 100644 --- a/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java +++ b/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java @@ -63,6 +63,8 @@ public class AdvancedConfig extends ConfigLoader { public int getArmorImpactIncreaseLevel() { return config.getInt("Skills.Axes.ArmorImpact_IncreaseLevel", 50); } public double getArmorImpactMaxDurabilityDamage() { return config.getDouble("Skills.Axes.ArmorImpact_MaxPercentageDurabilityDamage", 20.0D); } + public int getSkullSplitterModifier() { return config.getInt("Skills.Axes.SkullSplitter_DamagerModifier", 2); } + /* EXCAVATION */ //Nothing to configure, everything is already configurable in config.yml diff --git a/src/main/java/com/gmail/nossr50/skills/axes/Axes.java b/src/main/java/com/gmail/nossr50/skills/axes/Axes.java index 5b9daad9e..0fd7d60a5 100644 --- a/src/main/java/com/gmail/nossr50/skills/axes/Axes.java +++ b/src/main/java/com/gmail/nossr50/skills/axes/Axes.java @@ -17,4 +17,6 @@ public class Axes { public static double greaterImpactChance = AdvancedConfig.getInstance().getGreaterImpactChance(); public static double greaterImpactKnockbackMultiplier = AdvancedConfig.getInstance().getGreaterImpactModifier(); public static int greaterImpactBonusDamage = AdvancedConfig.getInstance().getGreaterImpactBonusDamage(); + + public static int skullSplitterModifier = AdvancedConfig.getInstance().getSkullSplitterModifier(); } diff --git a/src/main/java/com/gmail/nossr50/skills/axes/SkullSplitterEventHandler.java b/src/main/java/com/gmail/nossr50/skills/axes/SkullSplitterEventHandler.java index 30b6b3a1e..66d4c1a0a 100644 --- a/src/main/java/com/gmail/nossr50/skills/axes/SkullSplitterEventHandler.java +++ b/src/main/java/com/gmail/nossr50/skills/axes/SkullSplitterEventHandler.java @@ -19,6 +19,6 @@ public class SkullSplitterEventHandler { } protected void applyAbilityEffects() { - Combat.applyAbilityAoE(player, target, damage / 2, SkillType.AXES); + Combat.applyAbilityAoE(player, target, damage / Axes.skullSplitterModifier, SkillType.AXES); } } diff --git a/src/main/resources/advanced.yml b/src/main/resources/advanced.yml index debb78c66..8c4d6fa6b 100644 --- a/src/main/resources/advanced.yml +++ b/src/main/resources/advanced.yml @@ -90,6 +90,9 @@ Skills: # ArmorImpact_MaxPercentageDurabilityDamage: Durability damage cap for ArmorImpact, 20% means that you can never destroy a piece of armor in less than 5 hits ArmorImpact_IncreaseLevel: 50 ArmorImpact_MaxPercentageDurabilityDamage: 20.0 + + # SkullSplitter_DamageModifier: Damage will get divided by this modifier + SkullSplitter_DamageModifier: 2 # # Settings for Fishing ###