mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
Minor config change
This commit is contained in:
parent
351abae475
commit
c3bacd8de6
@ -201,7 +201,8 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
|
|
||||||
protected String[] calculateLengthDisplayValues(Player player, float skillValue) {
|
protected String[] calculateLengthDisplayValues(Player player, float skillValue) {
|
||||||
int maxLength = skill.getAbility().getMaxLength();
|
int maxLength = skill.getAbility().getMaxLength();
|
||||||
int length = 2 + (int) (skillValue / AdvancedConfig.getInstance().getAbilityLength());
|
int abilityLengthVar = Config.getInstance().getIsRetroMode() ? AdvancedConfig.getInstance().getAbilityLengthRetro() : AdvancedConfig.getInstance().getAbilityLengthStandard();
|
||||||
|
int length = 2 + (int) (skillValue / abilityLengthVar);
|
||||||
int enduranceLength = PerksUtils.handleActivationPerks(player, length, maxLength);
|
int enduranceLength = PerksUtils.handleActivationPerks(player, length, maxLength);
|
||||||
|
|
||||||
if (maxLength != 0) {
|
if (maxLength != 0) {
|
||||||
|
@ -43,8 +43,12 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
checkKeys(reason);
|
checkKeys(reason);
|
||||||
|
|
||||||
/* GENERAL */
|
/* GENERAL */
|
||||||
if (getAbilityLength() < 1) {
|
if (getAbilityLengthRetro() < 1) {
|
||||||
reason.add("Skills.General.Ability.IncreaseLevel should be at least 1!");
|
reason.add("Skills.General.Ability.Length.RetroMode.IncreaseLevel should be at least 1!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getAbilityLengthStandard() < 1) {
|
||||||
|
reason.add("Skills.General.Ability.Length.Standard.IncreaseLevel should be at least 1!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getEnchantBuff() < 1) {
|
if (getEnchantBuff() < 1) {
|
||||||
@ -676,7 +680,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
protected void loadKeys() {}
|
protected void loadKeys() {}
|
||||||
|
|
||||||
/* GENERAL */
|
/* GENERAL */
|
||||||
public int getAbilityLength() { return config.getInt("Skills.General.Ability.IncreaseLevel", 50); }
|
public int getAbilityLengthStandard() { return config.getInt("Skills.General.Ability.Length.Standard.IncreaseLevel", 5); }
|
||||||
|
public int getAbilityLengthRetro() { return config.getInt("Skills.General.Ability.Length.RetroMode.IncreaseLevel", 50); }
|
||||||
public int getEnchantBuff() { return config.getInt("Skills.General.Ability.EnchantBuff", 5); }
|
public int getEnchantBuff() { return config.getInt("Skills.General.Ability.EnchantBuff", 5); }
|
||||||
|
|
||||||
public int getMaxBonusLevel(SubSkillType subSkillType) { return config.getInt(subSkillType.getAdvConfigAddress() + ".MaxBonusLevel"); }
|
public int getMaxBonusLevel(SubSkillType subSkillType) { return config.getInt(subSkillType.getAdvConfigAddress() + ".MaxBonusLevel"); }
|
||||||
|
@ -246,7 +246,7 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
/* General Settings */
|
/* General Settings */
|
||||||
|
|
||||||
//Classic mode will default the value to true if the config file doesn't contain the entry (server is from a previous mcMMO install)
|
//Classic mode will default the value to true if the config file doesn't contain the entry (server is from a previous mcMMO install)
|
||||||
public boolean getUseOldLevelScaling() { return config.getBoolean("General.RetroMode", true); }
|
public boolean getIsRetroMode() { return config.getBoolean("General.RetroMode", true); }
|
||||||
|
|
||||||
//XP needed to level is multiplied by this when using classic mode
|
//XP needed to level is multiplied by this when using classic mode
|
||||||
public int getClassicModeXPFormulaFactor() { return config.getInt("General.Skill_Scaling.RetroMode_XP_Formula_Factor", 1); }
|
public int getClassicModeXPFormulaFactor() { return config.getInt("General.Skill_Scaling.RetroMode_XP_Formula_Factor", 1); }
|
||||||
|
@ -772,7 +772,8 @@ public class McMMOPlayer {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ticks = PerksUtils.handleActivationPerks(player, 2 + (getSkillLevel(skill) / AdvancedConfig.getInstance().getAbilityLength()), ability.getMaxLength());
|
int abilityLengthVar = Config.getInstance().getIsRetroMode() ? AdvancedConfig.getInstance().getAbilityLengthRetro() : AdvancedConfig.getInstance().getAbilityLengthStandard();
|
||||||
|
int ticks = PerksUtils.handleActivationPerks(player, 2 + (getSkillLevel(skill) / abilityLengthVar), ability.getMaxLength());
|
||||||
|
|
||||||
// Notify people that ability has been activated
|
// Notify people that ability has been activated
|
||||||
ParticleEffectUtils.playAbilityEnabledEffect(player);
|
ParticleEffectUtils.playAbilityEnabledEffect(player);
|
||||||
|
@ -27,7 +27,7 @@ public class FormulaManager {
|
|||||||
|
|
||||||
public FormulaManager() {
|
public FormulaManager() {
|
||||||
/* Setting for Classic Mode (Scales a lot of stuff up by * 10) */
|
/* Setting for Classic Mode (Scales a lot of stuff up by * 10) */
|
||||||
classicModeEnabled = Config.getInstance().getUseOldLevelScaling();
|
classicModeEnabled = Config.getInstance().getIsRetroMode();
|
||||||
classicModeXPFormulaFactor = Config.getInstance().getClassicModeXPFormulaFactor();
|
classicModeXPFormulaFactor = Config.getInstance().getClassicModeXPFormulaFactor();
|
||||||
loadFormula();
|
loadFormula();
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,8 @@ public class SkillUtils {
|
|||||||
|
|
||||||
public static String[] calculateLengthDisplayValues(Player player, float skillValue, PrimarySkillType skill) {
|
public static String[] calculateLengthDisplayValues(Player player, float skillValue, PrimarySkillType skill) {
|
||||||
int maxLength = skill.getAbility().getMaxLength();
|
int maxLength = skill.getAbility().getMaxLength();
|
||||||
int length = 2 + (int) (skillValue / AdvancedConfig.getInstance().getAbilityLength());
|
int abilityLengthVar = Config.getInstance().getIsRetroMode() ? AdvancedConfig.getInstance().getAbilityLengthRetro() : AdvancedConfig.getInstance().getAbilityLengthStandard();
|
||||||
|
int length = 2 + (int) (skillValue / abilityLengthVar);
|
||||||
int enduranceLength = PerksUtils.handleActivationPerks(player, length, maxLength);
|
int enduranceLength = PerksUtils.handleActivationPerks(player, length, maxLength);
|
||||||
|
|
||||||
if (maxLength != 0) {
|
if (maxLength != 0) {
|
||||||
@ -180,7 +181,8 @@ public class SkillUtils {
|
|||||||
|
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
PrimarySkillType skill = mcMMOPlayer.getAbilityMode(SuperAbilityType.SUPER_BREAKER) ? PrimarySkillType.MINING : PrimarySkillType.EXCAVATION;
|
PrimarySkillType skill = mcMMOPlayer.getAbilityMode(SuperAbilityType.SUPER_BREAKER) ? PrimarySkillType.MINING : PrimarySkillType.EXCAVATION;
|
||||||
int ticks = PerksUtils.handleActivationPerks(player, 2 + (mcMMOPlayer.getSkillLevel(skill) / AdvancedConfig.getInstance().getAbilityLength()), skill.getAbility().getMaxLength()) * Misc.TICK_CONVERSION_FACTOR;
|
int abilityLengthVar = Config.getInstance().getIsRetroMode() ? AdvancedConfig.getInstance().getAbilityLengthRetro() : AdvancedConfig.getInstance().getAbilityLengthStandard();
|
||||||
|
int ticks = PerksUtils.handleActivationPerks(player, 2 + (mcMMOPlayer.getSkillLevel(skill) / abilityLengthVar), skill.getAbility().getMaxLength()) * Misc.TICK_CONVERSION_FACTOR;
|
||||||
|
|
||||||
PotionEffect abilityBuff = new PotionEffect(PotionEffectType.FAST_DIGGING, duration + ticks, amplifier + 10);
|
PotionEffect abilityBuff = new PotionEffect(PotionEffectType.FAST_DIGGING, duration + ticks, amplifier + 10);
|
||||||
player.addPotionEffect(abilityBuff, true);
|
player.addPotionEffect(abilityBuff, true);
|
||||||
|
@ -30,13 +30,15 @@ Skills:
|
|||||||
ExperienceGain: true
|
ExperienceGain: true
|
||||||
General:
|
General:
|
||||||
Ability:
|
Ability:
|
||||||
|
Length:
|
||||||
|
Standard:
|
||||||
|
IncreaseLevel: 5
|
||||||
|
RetroMode:
|
||||||
|
IncreaseLevel: 50
|
||||||
EnchantBuff: 5
|
EnchantBuff: 5
|
||||||
# IncreaseLevel: This setting will determine when the length of every ability gets longer with 1 second
|
# IncreaseLevel: This setting will determine when the length of every ability gets longer with 1 second
|
||||||
# EnchantBuff: This setting determines how many enchant levels to use when buffing Super Breaker & Giga Drill Breaker
|
# EnchantBuff: This setting determines how many enchant levels to use when buffing Super Breaker & Giga Drill Breaker
|
||||||
Standard:
|
|
||||||
IncreaseLevel: 50
|
|
||||||
RetroMode:
|
|
||||||
IncreaseLevel: 5
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for Acrobatics
|
# Settings for Acrobatics
|
||||||
|
Loading…
Reference in New Issue
Block a user