Buffed Impact durability damage and fixed it

This commit is contained in:
nossr50 2019-05-21 13:13:17 -07:00
parent 321684e5f6
commit bfb48ccea3
6 changed files with 18 additions and 28 deletions

View File

@ -1,5 +1,14 @@
Version 2.1.63 Version 2.1.63
Fixed Armor Impact not scaling by skill rank
Significantly Buffed the amount of durability damage incurred by a successful Armor Impact
Added new setting to advanced.yml 'Skills.Axes.ArmorImpact.DamagePerRank' which is multiplied against Armor Impact's skill level to determine damage done to armor
Fixed a bug that caused creative mode players to gain XP when qualifying for early game XP boosts Fixed a bug that caused creative mode players to gain XP when qualifying for early game XP boosts
Removed the damage cap setting for Armor Impact, it is inherently capped now based on its max rank and damage setting
NOTES:
Armor Impact only has a 25% chance to go off, and for it to only incur 20 durability damage seemed incredibly underwhelming, I've buffed it quite a bit.
You can change it back to its underwhelming self by setting DamagePerRank to 1.0
Based on feedback I may tweak the number again or other properties of this skill
Version 2.1.62 Version 2.1.62
Added a new admin notification system, sensitive commands will print chat messages to "admins" (players with either Operator status or admin chat permission) Added a new admin notification system, sensitive commands will print chat messages to "admins" (players with either Operator status or admin chat permission)

View File

@ -164,18 +164,10 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
reason.add("Skills.Axes.GreaterImpact.BonusDamage should be at least 1!"); reason.add("Skills.Axes.GreaterImpact.BonusDamage should be at least 1!");
} }
if (getArmorImpactIncreaseLevel() < 1) {
reason.add("Skills.Axes.ArmorImpact.IncreaseLevel should be at least 1!");
}
if (getImpactChance() < 1) { if (getImpactChance() < 1) {
reason.add("Skills.Axes.ArmorImpact.Chance should be at least 1!"); reason.add("Skills.Axes.ArmorImpact.Chance should be at least 1!");
} }
if (getArmorImpactMaxDurabilityDamage() < 1) {
reason.add("Skills.Axes.ArmorImpact.MaxPercentageDurabilityDamage should be at least 1!");
}
if (getSkullSplitterModifier() < 1) { if (getSkullSplitterModifier() < 1) {
reason.add("Skills.Axes.SkullSplitter.DamageModifier should be at least 1!"); reason.add("Skills.Axes.SkullSplitter.DamageModifier should be at least 1!");
} }
@ -871,17 +863,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
public double getGreaterImpactModifier() { return config.getDouble("Skills.Axes.GreaterImpact.KnockbackModifier", 1.5D); } public double getGreaterImpactModifier() { return config.getDouble("Skills.Axes.GreaterImpact.KnockbackModifier", 1.5D); }
public double getGreaterImpactBonusDamage() { return config.getDouble("Skills.Axes.GreaterImpact.BonusDamage", 2.0D); } public double getGreaterImpactBonusDamage() { return config.getDouble("Skills.Axes.GreaterImpact.BonusDamage", 2.0D); }
public int getArmorImpactIncreaseLevel() {
int increaseLevel = config.getInt("Skills.Axes.ArmorImpact.IncreaseLevel", 5);
if(mcMMO.isRetroModeEnabled())
return increaseLevel * 10;
return increaseLevel;
}
public double getImpactChance() { return config.getDouble("Skills.Axes.ArmorImpact.Chance", 25.0D); } public double getImpactChance() { return config.getDouble("Skills.Axes.ArmorImpact.Chance", 25.0D); }
public double getArmorImpactMaxDurabilityDamage() { return config.getDouble("Skills.Axes.ArmorImpact.MaxPercentageDurabilityDamage", 20.0D); } public double getImpactDurabilityDamageMultiplier() { return config.getDouble("Skills.Axes.ArmorImpact.DamagePerRank", 6.5D); }
public double getSkullSplitterModifier() { return config.getDouble("Skills.Axes.SkullSplitter.DamageModifier", 2.0D); } public double getSkullSplitterModifier() { return config.getDouble("Skills.Axes.SkullSplitter.DamageModifier", 2.0D); }

View File

@ -14,9 +14,7 @@ public class Axes {
public static double criticalHitPVPModifier = AdvancedConfig.getInstance().getCriticalStrikesPVPModifier(); public static double criticalHitPVPModifier = AdvancedConfig.getInstance().getCriticalStrikesPVPModifier();
public static double criticalHitPVEModifier = AdvancedConfig.getInstance().getCriticalStrikesPVEModifier(); public static double criticalHitPVEModifier = AdvancedConfig.getInstance().getCriticalStrikesPVEModifier();
public static int impactIncreaseLevel = AdvancedConfig.getInstance().getArmorImpactIncreaseLevel();
public static double impactChance = AdvancedConfig.getInstance().getImpactChance(); public static double impactChance = AdvancedConfig.getInstance().getImpactChance();
public static double impactMaxDurabilityModifier = AdvancedConfig.getInstance().getArmorImpactMaxDurabilityDamage() / 100D;
public static double greaterImpactBonusDamage = AdvancedConfig.getInstance().getGreaterImpactBonusDamage(); public static double greaterImpactBonusDamage = AdvancedConfig.getInstance().getGreaterImpactBonusDamage();
public static double greaterImpactChance = AdvancedConfig.getInstance().getGreaterImpactChance(); public static double greaterImpactChance = AdvancedConfig.getInstance().getGreaterImpactChance();

View File

@ -1,5 +1,6 @@
package com.gmail.nossr50.skills.axes; package com.gmail.nossr50.skills.axes;
import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.datatypes.interactions.NotificationType; import com.gmail.nossr50.datatypes.interactions.NotificationType;
import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
@ -113,19 +114,19 @@ public class AxesManager extends SkillManager {
* @param target The {@link LivingEntity} being affected by Impact * @param target The {@link LivingEntity} being affected by Impact
*/ */
public void impactCheck(LivingEntity target) { public void impactCheck(LivingEntity target) {
int durabilityDamage = getImpactDurabilityDamage(); double durabilityDamage = getImpactDurabilityDamage();
for (ItemStack armor : target.getEquipment().getArmorContents()) { for (ItemStack armor : target.getEquipment().getArmorContents()) {
if (armor != null && ItemUtils.isArmor(armor)) { if (armor != null && ItemUtils.isArmor(armor)) {
if (RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_STATIC_CHANCE, SubSkillType.AXES_ARMOR_IMPACT, getPlayer())) { if (RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_STATIC_CHANCE, SubSkillType.AXES_ARMOR_IMPACT, getPlayer())) {
SkillUtils.handleDurabilityChange(armor, durabilityDamage, Axes.impactMaxDurabilityModifier); SkillUtils.handleDurabilityChange(armor, durabilityDamage, 1);
} }
} }
} }
} }
public int getImpactDurabilityDamage() { public double getImpactDurabilityDamage() {
return 1 + (getSkillLevel() / Axes.impactIncreaseLevel); return AdvancedConfig.getInstance().getImpactDurabilityDamageMultiplier() * RankUtils.getRank(getPlayer(), SubSkillType.AXES_ARMOR_IMPACT);
} }
/** /**

View File

@ -240,7 +240,7 @@ public class SkillUtils {
* @param durabilityModifier the amount to modify the durability by * @param durabilityModifier the amount to modify the durability by
* @param maxDamageModifier the amount to adjust the max damage by * @param maxDamageModifier the amount to adjust the max damage by
*/ */
public static void handleDurabilityChange(ItemStack itemStack, int durabilityModifier, double maxDamageModifier) { public static void handleDurabilityChange(ItemStack itemStack, double durabilityModifier, double maxDamageModifier) {
if (itemStack.hasItemMeta() && itemStack.getItemMeta().isUnbreakable()) { if (itemStack.hasItemMeta() && itemStack.getItemMeta().isUnbreakable()) {
return; return;
} }

View File

@ -186,13 +186,12 @@ Skills:
BonusDamage: 2.0 BonusDamage: 2.0
ArmorImpact: ArmorImpact:
# Multiplied against the skill rank to determine how much damage to do
DamagePerRank: 6.5
# IncreaseLevel: Every <IncreaseLevel> the durability damage goes up with 1 # IncreaseLevel: Every <IncreaseLevel> the durability damage goes up with 1
# Chance: Chance of hitting with ArmorImpact # Chance: Chance of hitting with ArmorImpact
# MaxPercentageDurabilityDamage: Durability damage cap for ArmorImpact, 20% means that you can never destroy a piece of armor in less than 5 hits # MaxPercentageDurabilityDamage: Durability damage cap for ArmorImpact, 20% means that you can never destroy a piece of armor in less than 5 hits
IncreaseLevel: 5
Chance: 25.0 Chance: 25.0
MaxPercentageDurabilityDamage: 20.0
SkullSplitter: SkullSplitter:
# DamageModifier: Damage will get divided by this modifier # DamageModifier: Damage will get divided by this modifier
DamageModifier: 2.0 DamageModifier: 2.0