mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Ability lengths now have a default skill cap at which they stop increasing in length, you can change this in advanced.yml
This commit is contained in:
parent
f8b7d5e10d
commit
6c77017658
@ -31,6 +31,7 @@ Version 2.1.0
|
||||
+ (Events) Starting an XP event will now use the title API (toggle this in advanced.yml)
|
||||
+ (Sound) Volume and Pitch of sounds can now be configured in the new sounds.yml file
|
||||
+ (MySQL) Added support for SSL for MySQL/MariaDB (On by default)
|
||||
+ (Skills) Ability Lengths now have a default skill cap at which they stop increasing in length, configurable in advanced.yml
|
||||
+ (Skills) Added a new subskill to some skills 'Understanding The Art' this adds nothing new, but tracks benefits that increase together that seemed unrelated, which was previously a bit obfuscated.
|
||||
+ (Skills) Tool alerts now are sent to the Action Bar
|
||||
+ (Skills) Super Ability activation alerts are now sent to the Action Bar
|
||||
|
@ -224,7 +224,8 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
protected String[] calculateLengthDisplayValues(Player player, float skillValue) {
|
||||
int maxLength = skill.getAbility().getMaxLength();
|
||||
int abilityLengthVar = Config.getInstance().getIsRetroMode() ? AdvancedConfig.getInstance().getAbilityLengthRetro() : AdvancedConfig.getInstance().getAbilityLengthStandard();
|
||||
int length = 2 + (int) (skillValue / abilityLengthVar);
|
||||
int abilityLengthCap = Config.getInstance().getIsRetroMode() ? AdvancedConfig.getInstance().getAbilityLengthCapRetro() : AdvancedConfig.getInstance().getAbilityLengthCapStandard();
|
||||
int length = 2 + (int) (Math.min(abilityLengthCap, skillValue) / abilityLengthVar);
|
||||
int enduranceLength = PerksUtils.handleActivationPerks(player, length, maxLength);
|
||||
|
||||
if (maxLength != 0) {
|
||||
|
@ -668,6 +668,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
|
||||
/* GENERAL */
|
||||
public int getStartingLevel() { return config.getInt("Skills.General.StartingLevel", 1); }
|
||||
public int getAbilityLengthCapStandard() { return config.getInt("Skills.General.Ability.Length.Standard.Cap", 50); }
|
||||
public int getAbilityLengthCapRetro() { return config.getInt("Skills.General.Ability.Length.RetroMode.Cap", 500); }
|
||||
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); }
|
||||
|
@ -817,7 +817,8 @@ public class McMMOPlayer {
|
||||
}
|
||||
|
||||
int abilityLengthVar = Config.getInstance().getIsRetroMode() ? AdvancedConfig.getInstance().getAbilityLengthRetro() : AdvancedConfig.getInstance().getAbilityLengthStandard();
|
||||
int ticks = PerksUtils.handleActivationPerks(player, 2 + (getSkillLevel(skill) / abilityLengthVar), ability.getMaxLength());
|
||||
int abilityLengthCap = Config.getInstance().getIsRetroMode() ? AdvancedConfig.getInstance().getAbilityLengthCapRetro() : AdvancedConfig.getInstance().getAbilityLengthCapStandard();
|
||||
int ticks = PerksUtils.handleActivationPerks(player, 2 + (Math.min(abilityLengthCap, getSkillLevel(skill)) / abilityLengthVar), ability.getMaxLength());
|
||||
|
||||
// Notify people that ability has been activated
|
||||
ParticleEffectUtils.playAbilityEnabledEffect(player);
|
||||
|
@ -188,7 +188,8 @@ public class SkillUtils {
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
PrimarySkillType skill = mcMMOPlayer.getAbilityMode(SuperAbilityType.SUPER_BREAKER) ? PrimarySkillType.MINING : PrimarySkillType.EXCAVATION;
|
||||
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;
|
||||
int abilityLengthCap = Config.getInstance().getIsRetroMode() ? AdvancedConfig.getInstance().getAbilityLengthCapRetro() : AdvancedConfig.getInstance().getAbilityLengthCapStandard();
|
||||
int ticks = PerksUtils.handleActivationPerks(player, 2 + (Math.min(abilityLengthCap, mcMMOPlayer.getSkillLevel(skill)) / abilityLengthVar), skill.getAbility().getMaxLength()) * Misc.TICK_CONVERSION_FACTOR;
|
||||
|
||||
PotionEffect abilityBuff = new PotionEffect(PotionEffectType.FAST_DIGGING, duration + ticks, amplifier + 10);
|
||||
player.addPotionEffect(abilityBuff, true);
|
||||
|
@ -78,8 +78,10 @@ Skills:
|
||||
Ability:
|
||||
Length:
|
||||
Standard:
|
||||
CapLevel: 50
|
||||
IncreaseLevel: 5
|
||||
RetroMode:
|
||||
CapLevel: 500
|
||||
IncreaseLevel: 50
|
||||
EnchantBuff: 5
|
||||
# IncreaseLevel: This setting will determine when the length of every ability gets longer with 1 second
|
||||
|
Loading…
Reference in New Issue
Block a user