Wire up the new Axes config

This commit is contained in:
nossr50 2019-06-01 03:16:30 -07:00
parent cb9a4e5e5d
commit 9dfbb14c39
6 changed files with 14 additions and 390 deletions

View File

@ -157,319 +157,6 @@ public class AdvancedConfig extends ConfigValidated {
public List<String> validateKeys() { public List<String> validateKeys() {
// Validate all the settings! // Validate all the settings!
List<String> reason = new ArrayList<>(); List<String> reason = new ArrayList<>();
/* GENERAL */
if (getAbilityLength() < 1) {
reason.add(SKILLS + "." + GENERAL + "." + ABILITY + "." + LENGTH + ".<mode>." + INCREASE_LEVEL + " should be at least 1!");
}
if (getEnchantBuff() < 1) {
reason.add(SKILLS + "." + GENERAL + "." + ABILITY + "." + ENCHANT_BUFF + " should be at least 1!");
}
/* ACROBATICS */
if (getMaximumProbability(SubSkillType.ACROBATICS_DODGE) < 1) {
reason.add(SKILLS + "." + ACROBATICS + "." + DODGE + "." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.ACROBATICS_DODGE) < 1) {
reason.add(SKILLS + "." + ACROBATICS + "." + DODGE + "." + MAX_BONUS_LEVEL + " should be at least 1!");
}
if (getDodgeDamageModifier() <= 1) {
reason.add(SKILLS + "." + ACROBATICS + "." + DODGE + "." + DAMAGE_MODIFIER + " should be greater than 1!");
}
if (getMaximumProbability(SubSkillType.ACROBATICS_ROLL) < 1) {
reason.add(SKILLS + "." + ACROBATICS + "." + ROLL + "." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.ACROBATICS_ROLL) < 1) {
reason.add(SKILLS + "." + ACROBATICS + "." + ROLL + "." + MAX_BONUS_LEVEL + " should be at least 1!");
}
if (getRollDamageThreshold() < 0) {
reason.add(SKILLS + "." + ACROBATICS + "." + ROLL + "." + DAMAGE_THRESHOLD + " should be at least 0!");
}
if (getGracefulRollDamageThreshold() < 0) {
reason.add(SKILLS + "." + ACROBATICS + "." + GRACEFUL_ROLL + "." + DAMAGE_THRESHOLD + " should be at least 0!");
}
if (getCatalysisMinSpeed() <= 0) {
reason.add(SKILLS + "." + ALCHEMY + "." + CATALYSIS + "." + MIN_SPEED + " must be greater than 0!");
}
if (getCatalysisMaxSpeed() < getCatalysisMinSpeed()) {
reason.add(SKILLS + "." + ALCHEMY + "." + CATALYSIS + "." + MAX_SPEED + " should be at least Skills.Alchemy.Catalysis." + MIN_SPEED + "!");
}
/* ARCHERY */
if (getSkillShotRankDamageMultiplier() <= 0) {
reason.add(SKILLS + "." + ARCHERY + "." + SKILL_SHOT + "." + RANK_DAMAGE_MULTIPLIER + " should be greater than 0!");
}
if (getMaximumProbability(SubSkillType.ARCHERY_DAZE) < 1) {
reason.add(SKILLS + "." + ARCHERY + "." + DAZE + "." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.ARCHERY_DAZE) < 1) {
reason.add(SKILLS + "." + ARCHERY + "." + DAZE + "." + MAX_BONUS_LEVEL + " should be at least 1!");
}
if (getDazeBonusDamage() < 0) {
reason.add(SKILLS + "." + ARCHERY + "." + DAZE + "." + BONUS_DAMAGE + " should be at least 0!");
}
if (getMaximumProbability(SubSkillType.ARCHERY_ARROW_RETRIEVAL) < 1) {
reason.add(SKILLS + "." + ARCHERY + ".Retrieve." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.ARCHERY_ARROW_RETRIEVAL) < 1) {
reason.add(SKILLS + "." + ARCHERY + ".Retrieve." + MAX_BONUS_LEVEL + " should be at least 1!");
}
if (getForceMultiplier() < 0) {
reason.add(SKILLS + "." + ARCHERY + "." + FORCE_MULTIPLIER + " should be at least 0!");
}
/* AXES */
if (getAxeMasteryRankDamageMultiplier() < 0) {
reason.add(SKILLS + "." + AXES + "." + AXE_MASTERY + "." + RANK_DAMAGE_MULTIPLIER + " should be at least 0!");
}
if (getMaximumProbability(SubSkillType.AXES_CRITICAL_STRIKES) < 1) {
reason.add(SKILLS + "." + AXES + ".CriticalHit." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.AXES_CRITICAL_STRIKES) < 1) {
reason.add(SKILLS + "." + AXES + ".CriticalHit." + MAX_BONUS_LEVEL + " should be at least 1!");
}
if (getCriticalStrikesPVPModifier() < 1) {
reason.add(SKILLS + "." + AXES + "." + CRITICAL_STRIKES + "." + PVP_MODIFIER + " should be at least 1!");
}
if (getCriticalStrikesPVPModifier() < 1) {
reason.add(SKILLS + "." + AXES + "." + CRITICAL_STRIKES + "." + PVE_MODIFIER + " should be at least 1!");
}
if (getGreaterImpactChance() < 1) {
reason.add(SKILLS + "." + AXES + "." + GREATER_IMPACT + "." + CHANCE + " should be at least 1!");
}
if (getGreaterImpactModifier() < 1) {
reason.add(SKILLS + "." + AXES + "." + GREATER_IMPACT + "." + KNOCKBACK_MODIFIER + " should be at least 1!");
}
if (getGreaterImpactBonusDamage() < 1) {
reason.add(SKILLS + "." + AXES + "." + GREATER_IMPACT + "." + BONUS_DAMAGE + " should be at least 1!");
}
/*if (getFishermanDietRankChange() < 1) {
reason.add(SKILLS + "." + FISHING + ".FishermansDiet.RankChange should be at least 1!");
}*/
if (getMasterAnglerBoatModifier() < 1) {
reason.add(SKILLS + "." + FISHING + "." + MASTER_ANGLER + "." + BOAT_MODIFIER + " should be at least 1!");
}
if (getMasterAnglerBiomeModifier() < 1) {
reason.add(SKILLS + "." + FISHING + "." + MASTER_ANGLER + "." + BIOME_MODIFIER + " should be at least 1!");
}
/* HERBALISM */
/*if (getFarmerDietRankChange() < 1) {
reason.add(SKILLS + ".Herbalism.FarmersDiet.RankChange should be at least 1!");
}
if (getGreenThumbStageChange() < 1) {
reason.add(SKILLS + ".Herbalism.GreenThumb.StageChange should be at least 1!");
}*/
if (getMaximumProbability(SubSkillType.HERBALISM_GREEN_THUMB) < 1) {
reason.add(SKILLS + ".Herbalism.GreenThumb." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.HERBALISM_GREEN_THUMB) < 1) {
reason.add(SKILLS + ".Herbalism.GreenThumb." + MAX_BONUS_LEVEL + " should be at least 1!");
}
if (getMaximumProbability(SubSkillType.HERBALISM_DOUBLE_DROPS) < 1) {
reason.add(SKILLS + ".Herbalism.DoubleDrops." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.HERBALISM_DOUBLE_DROPS) < 1) {
reason.add(SKILLS + ".Herbalism.DoubleDrops." + MAX_BONUS_LEVEL + " should be at least 1!");
}
if (getMaximumProbability(SubSkillType.HERBALISM_HYLIAN_LUCK) < 1) {
reason.add(SKILLS + ".Herbalism.HylianLuck." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.HERBALISM_HYLIAN_LUCK) < 1) {
reason.add(SKILLS + ".Herbalism.HylianLuck." + MAX_BONUS_LEVEL + " should be at least 1!");
}
if (getMaximumProbability(SubSkillType.HERBALISM_SHROOM_THUMB) < 1) {
reason.add(SKILLS + ".Herbalism.ShroomThumb." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.HERBALISM_SHROOM_THUMB) < 1) {
reason.add(SKILLS + ".Herbalism.ShroomThumb." + MAX_BONUS_LEVEL + " should be at least 1!");
}
/* MINING */
if (getMaximumProbability(SubSkillType.MINING_DOUBLE_DROPS) < 1) {
reason.add(SKILLS + "." + MINING + ".DoubleDrops." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.MINING_DOUBLE_DROPS) < 1) {
reason.add(SKILLS + "." + MINING + ".DoubleDrops." + MAX_BONUS_LEVEL + " should be at least 1!");
}
/* REPAIR */
/*
if (getRepairMasteryMaxLevel() < 1) {
reason.add(SKILLS + "." + REPAIR + "." + REPAIR_MASTERY + "." + MAX_BONUS_LEVEL + " should be at least 1!");
}*/
if (getRepairMasteryMaxBonus() < 1) {
reason.add(SKILLS + "." + REPAIR + "." + REPAIR_MASTERY + "." + MAX_BONUS_PERCENTAGE + " should be at least 1!");
}
if (getMaximumProbability(SubSkillType.REPAIR_SUPER_REPAIR) < 1) {
reason.add(SKILLS + "." + REPAIR + ".SuperRepair." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.REPAIR_SUPER_REPAIR) < 1) {
reason.add(SKILLS + "." + REPAIR + ".SuperRepair." + MAX_BONUS_LEVEL + " should be at least 1!");
}
/* SMELTING */
if (getMaxBonusLevel(SubSkillType.SMELTING_FUEL_EFFICIENCY) < 1) {
reason.add(SKILLS + "." + SMELTING + "." + FUEL_EFFICIENCY + "." + MAX_BONUS_LEVEL + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.SMELTING_SECOND_SMELT) < 1) {
reason.add(SKILLS + "." + SMELTING + ".SecondSmelt." + MAX_BONUS_LEVEL + " should be at least 1!");
}
if (getMaximumProbability(SubSkillType.SMELTING_SECOND_SMELT) < 1) {
reason.add(SKILLS + "." + SMELTING + ".SecondSmelt." + CHANCE_MAX + " should be at least 1!");
}
/* SWORDS */
if (getMaximumProbability(SubSkillType.SWORDS_RUPTURE) < 1) {
reason.add(SKILLS + "." + SWORDS + "." + RUPTURE + "." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.SWORDS_RUPTURE) < 1) {
reason.add(SKILLS + "." + SWORDS + "." + RUPTURE + "." + MAX_BONUS_LEVEL + " should be at least 1!");
}
if (getRuptureMaxTicks() < 1) {
reason.add(SKILLS + "." + SWORDS + "." + RUPTURE + "." + MAX_TICKS + " should be at least 1!");
}
if (getRuptureMaxTicks() < getRuptureBaseTicks()) {
reason.add(SKILLS + "." + SWORDS + "." + RUPTURE + "." + MAX_TICKS + " should be at least Skills.Swords.Rupture." + BASE_TICKS + "!");
}
if (getRuptureBaseTicks() < 1) {
reason.add(SKILLS + "." + SWORDS + "." + RUPTURE + "." + BASE_TICKS + " should be at least 1!");
}
if (getMaximumProbability(SubSkillType.SWORDS_COUNTER_ATTACK) < 1) {
reason.add(SKILLS + "." + SWORDS + "." + COUNTER_ATTACK + "." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.SWORDS_COUNTER_ATTACK) < 1) {
reason.add(SKILLS + "." + SWORDS + "." + COUNTER_ATTACK + "." + MAX_BONUS_LEVEL + " should be at least 1!");
}
if (getCounterAttackModifier() < 1) {
reason.add(SKILLS + "." + SWORDS + "." + COUNTER_ATTACK + "." + DAMAGE_MODIFIER + " should be at least 1!");
}
if (getSerratedStrikesModifier() < 1) {
reason.add(SKILLS + "." + SWORDS + "." + SERRATED_STRIKES + "." + DAMAGE_MODIFIER + " should be at least 1!");
}
/* TAMING */
if (getMaximumProbability(SubSkillType.TAMING_GORE) < 1) {
reason.add(SKILLS + "." + TAMING + "." + GORE + "." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.TAMING_GORE) < 1) {
reason.add(SKILLS + "." + TAMING + "." + GORE + "." + MAX_BONUS_LEVEL + " should be at least 1!");
}
if (getGoreModifier() < 1) {
reason.add(SKILLS + "." + TAMING + "." + GORE + "." + MODIFIER + " should be at least 1!");
}
if (getFastFoodChance() < 1) {
reason.add(SKILLS + "." + TAMING + "." + FAST_FOOD + "." + CHANCE + " should be at least 1!");
}
if (getThickFurModifier() < 1) {
reason.add(SKILLS + "." + TAMING + "." + THICK_FUR + "." + MODIFIER + " should be at least 1!");
}
if (getShockProofModifier() < 1) {
reason.add(SKILLS + "." + TAMING + "." + SHOCK_PROOF + "." + MODIFIER + " should be at least 1!");
}
if (getSharpenedClawsBonus() < 1) {
reason.add(SKILLS + "." + TAMING + "." + SHARPENED_CLAWS + "." + BONUS + " should be at least 1!");
}
if (getMaxHorseJumpStrength() < 0 || getMaxHorseJumpStrength() > 2) {
reason.add(SKILLS + "." + TAMING + "." + CALL_OF_THE_WILD + "." + MAX_HORSE_JUMP_STRENGTH + " should be between 0 and 2!");
}
/* UNARMED */
if (getMaximumProbability(SubSkillType.UNARMED_DISARM) < 1) {
reason.add(SKILLS + "." + UNARMED + "." + DISARM + "." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.UNARMED_DISARM) < 1) {
reason.add(SKILLS + "." + UNARMED + "." + DISARM + "." + MAX_BONUS_LEVEL + " should be at least 1!");
}
if (getMaximumProbability(SubSkillType.UNARMED_ARROW_DEFLECT) < 1) {
reason.add(SKILLS + "." + UNARMED + "." + ARROW_DEFLECT + "." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.UNARMED_ARROW_DEFLECT) < 1) {
reason.add(SKILLS + "." + UNARMED + "." + ARROW_DEFLECT + "." + MAX_BONUS_LEVEL + " should be at least 1!");
}
if (getMaximumProbability(SubSkillType.UNARMED_IRON_GRIP) < 1) {
reason.add(SKILLS + "." + UNARMED + "." + IRON_GRIP + "." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.UNARMED_IRON_GRIP) < 1) {
reason.add(SKILLS + "." + UNARMED + "." + IRON_GRIP + "." + MAX_BONUS_LEVEL + " should be at least 1!");
}
/* WOODCUTTING */
/*if (getLeafBlowUnlockLevel() < 0) {
reason.add("Skills.Woodcutting.LeafBlower.UnlockLevel should be at least 0!");
}*/
if (getMaximumProbability(SubSkillType.WOODCUTTING_HARVEST_LUMBER) < 1) {
reason.add(SKILLS + "." + WOODCUTTING + "." + HARVEST_LUMBER + "." + CHANCE_MAX + " should be at least 1!");
}
if (getMaxBonusLevel(SubSkillType.WOODCUTTING_HARVEST_LUMBER) < 1) {
reason.add(SKILLS + "." + WOODCUTTING + "." + HARVEST_LUMBER + "." + MAX_BONUS_LEVEL + " should be at least 1!");
}
return reason; return reason;
} }
@ -616,40 +303,6 @@ public class AdvancedConfig extends ConfigValidated {
return getDoubleValue(SKILLS, ARCHERY, FORCE_MULTIPLIER); return getDoubleValue(SKILLS, ARCHERY, FORCE_MULTIPLIER);
} }
/* AXES */
public double getAxeMasteryRankDamageMultiplier() {
return getDoubleValue(SKILLS, AXES, AXE_MASTERY, RANK_DAMAGE_MULTIPLIER);
}
public double getCriticalStrikesPVPModifier() {
return getDoubleValue(SKILLS, AXES, CRITICAL_STRIKES, PVP_MODIFIER);
}
public double getCriticalStrikesPVEModifier() {
return getDoubleValue(SKILLS, AXES, CRITICAL_STRIKES, PVE_MODIFIER);
}
public double getGreaterImpactChance() {
return getDoubleValue(SKILLS, AXES, GREATER_IMPACT, CHANCE);
}
public double getGreaterImpactModifier() {
return getDoubleValue(SKILLS, AXES, GREATER_IMPACT, KNOCKBACK_MODIFIER);
}
public double getGreaterImpactBonusDamage() {
return getDoubleValue(SKILLS, AXES, GREATER_IMPACT, BONUS_DAMAGE);
}
public double getArmorImpactMaxDurabilityDamage() {
return getDoubleValue(SKILLS, AXES, ARMOR_IMPACT, MAX_PERCENTAGE_DURABILITY_DAMAGE);
}
public double getSkullSplitterModifier() {
return getDoubleValue(SKILLS, AXES, SKULL_SPLITTER, DAMAGE_MODIFIER);
}
/* EXCAVATION */ /* EXCAVATION */
//Nothing to configure, everything is already configurable in config.yml //Nothing to configure, everything is already configurable in config.yml

View File

@ -7,39 +7,7 @@ import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable @ConfigSerializable
public class ConfigAxes { public class ConfigAxes {
/*
public static double getAxeMasteryRankDamageMultiplier() {
return axeMasteryRankDamageMultiplier;
}
public double getImpactDamageMultiplier() {
return impactDamageMultiplier;
}
public double getCriticalHitPVPModifier() {
return criticalHitPVPModifier;
}
public double getCriticalHitPVEModifier() {
return criticalHitPVEModifier;
}
public double getGreaterImpactBonusDamage() {
return greaterImpactBonusDamage;
}
public double getGreaterImpactKnockbackMultiplier() {
return greaterImpactKnockbackMultiplier;
}
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
# 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
Chance: 25.0
*/
@Setting(value = "Axe-Mastery") @Setting(value = "Axe-Mastery")
private ConfigAxesAxeMastery configAxesAxeMastery = new ConfigAxesAxeMastery(); private ConfigAxesAxeMastery configAxesAxeMastery = new ConfigAxesAxeMastery();

View File

@ -6,8 +6,8 @@ import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable @ConfigSerializable
public class ConfigAxesImpact { public class ConfigAxesImpact {
public static final double IMPACT_CHANCE_DEFAULT = 25.0D; private static final double IMPACT_CHANCE_DEFAULT = 25.0D;
public static final double IMPACT_DURABILITY_MULTIPLIER_DEFAULT = 6.5D; private static final double IMPACT_DURABILITY_MULTIPLIER_DEFAULT = 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." + @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) "\nDefault value: "+IMPACT_CHANCE_DEFAULT)

View File

@ -1,6 +1,7 @@
package com.gmail.nossr50.skills.axes; package com.gmail.nossr50.skills.axes;
import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.util.ItemUtils; import com.gmail.nossr50.util.ItemUtils;
import com.gmail.nossr50.util.skills.RankUtils; import com.gmail.nossr50.util.skills.RankUtils;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
@ -26,6 +27,6 @@ public class Axes {
* @return The axe mastery bonus damage which will be added to their attack * @return The axe mastery bonus damage which will be added to their attack
*/ */
public static double getAxeMasteryBonusDamage(Player player) { public static double getAxeMasteryBonusDamage(Player player) {
return RankUtils.getRank(player, SubSkillType.AXES_AXE_MASTERY) * Axes.axeMasteryRankDamageMultiplier; return RankUtils.getRank(player, SubSkillType.AXES_AXE_MASTERY) * mcMMO.getConfigManager().getConfigAxes().getAxeMasteryMultiplier();
} }
} }

View File

@ -7,6 +7,7 @@ import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType;
import com.gmail.nossr50.datatypes.skills.SuperAbilityType; import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
import com.gmail.nossr50.datatypes.skills.ToolType; import com.gmail.nossr50.datatypes.skills.ToolType;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.skills.SkillManager; import com.gmail.nossr50.skills.SkillManager;
import com.gmail.nossr50.util.ItemUtils; import com.gmail.nossr50.util.ItemUtils;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
@ -99,9 +100,9 @@ public class AxesManager extends SkillManager {
NotificationManager.sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Axes.Combat.CritStruck"); NotificationManager.sendPlayerInformation(defender, NotificationType.SUBSKILL_MESSAGE, "Axes.Combat.CritStruck");
} }
damage = (damage * Axes.criticalHitPVPModifier) - damage; damage = (damage * mcMMO.getConfigManager().getConfigAxes().getConfigAxesCriticalStrikes().getDamageProperty().getPVPModifier()) - damage;
} else { } else {
damage = (damage * Axes.criticalHitPVEModifier) - damage; damage = (damage * mcMMO.getConfigManager().getConfigAxes().getConfigAxesCriticalStrikes().getDamageProperty().getPVEModifier()) - damage;
} }
return damage; return damage;
@ -125,7 +126,7 @@ public class AxesManager extends SkillManager {
} }
public double getImpactDurabilityDamage() { public double getImpactDurabilityDamage() {
return AdvancedConfig.getInstance().getImpactDurabilityDamageMultiplier() * RankUtils.getRank(getPlayer(), SubSkillType.AXES_ARMOR_IMPACT); return mcMMO.getConfigManager().getConfigAxes().getConfigAxesImpact().getImpactDurabilityDamageModifier() * RankUtils.getRank(getPlayer(), SubSkillType.AXES_ARMOR_IMPACT);
} }
/** /**
@ -142,7 +143,7 @@ public class AxesManager extends SkillManager {
Player player = getPlayer(); Player player = getPlayer();
ParticleEffectUtils.playGreaterImpactEffect(target); ParticleEffectUtils.playGreaterImpactEffect(target);
target.setVelocity(player.getLocation().getDirection().normalize().multiply(Axes.greaterImpactKnockbackMultiplier)); target.setVelocity(player.getLocation().getDirection().normalize().multiply(mcMMO.getConfigManager().getConfigAxes().getGreaterImpactKnockBackModifier()));
if (mcMMOPlayer.useChatNotifications()) { if (mcMMOPlayer.useChatNotifications()) {
NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Axes.Combat.GI.Proc"); NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Axes.Combat.GI.Proc");
@ -156,7 +157,7 @@ public class AxesManager extends SkillManager {
} }
} }
return Axes.greaterImpactBonusDamage; return mcMMO.getConfigManager().getConfigAxes().getConfigAxesGreaterImpact().getBonusDamage();
} }
/** /**
@ -166,6 +167,6 @@ public class AxesManager extends SkillManager {
* @param damage The amount of damage initially dealt by the event * @param damage The amount of damage initially dealt by the event
*/ */
public void skullSplitterCheck(LivingEntity target, double damage, Map<DamageModifier, Double> modifiers) { public void skullSplitterCheck(LivingEntity target, double damage, Map<DamageModifier, Double> modifiers) {
CombatUtils.applyAbilityAoE(getPlayer(), target, damage / Axes.skullSplitterModifier, modifiers, skill); CombatUtils.applyAbilityAoE(getPlayer(), target, damage / mcMMO.getConfigManager().getConfigAxes().getConfigAxesSkullSplitter().getSkullSplitterDamageDivisor(), modifiers, skill);
} }
} }

View File

@ -6,6 +6,7 @@ import com.gmail.nossr50.datatypes.skills.SubSkillType;
import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill; import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill;
import com.gmail.nossr50.events.skills.secondaryabilities.SubSkillEvent; import com.gmail.nossr50.events.skills.secondaryabilities.SubSkillEvent;
import com.gmail.nossr50.events.skills.secondaryabilities.SubSkillRandomCheckEvent; import com.gmail.nossr50.events.skills.secondaryabilities.SubSkillRandomCheckEvent;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.util.EventUtils; import com.gmail.nossr50.util.EventUtils;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.skills.SkillActivationType; import com.gmail.nossr50.util.skills.SkillActivationType;
@ -227,9 +228,9 @@ public class RandomChanceUtil {
public static double getStaticRandomChance(SubSkillType subSkillType) throws InvalidStaticChance { public static double getStaticRandomChance(SubSkillType subSkillType) throws InvalidStaticChance {
switch (subSkillType) { switch (subSkillType) {
case AXES_ARMOR_IMPACT: case AXES_ARMOR_IMPACT:
return AdvancedConfig.getInstance().getImpactChance(); return mcMMO.getConfigManager().getConfigAxes().getImpactChance();
case AXES_GREATER_IMPACT: case AXES_GREATER_IMPACT:
return AdvancedConfig.getInstance().getGreaterImpactChance(); return mcMMO.getConfigManager().getConfigAxes().getGreaterImpactActivationChance();
case TAMING_FAST_FOOD_SERVICE: case TAMING_FAST_FOOD_SERVICE:
return AdvancedConfig.getInstance().getFastFoodChance(); return AdvancedConfig.getInstance().getFastFoodChance();
default: default: