This commit is contained in:
nossr50
2019-05-03 01:08:29 -07:00
parent 661564df36
commit f61917e8fe
5 changed files with 25 additions and 9 deletions

View File

@ -137,6 +137,9 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
return noErrorsInConfig(reason);
}
public boolean isEarlyGameBoostEnabled() { return config.getBoolean("EarlyGameBoost.Enabled", true); }
public double getEarlyGameBoostMultiplier() { return config.getDouble("EarlyGameBoost.MaxLevelMultiplier", 0.05D); }
/*
* FORMULA SETTINGS
*/

View File

@ -95,17 +95,21 @@ public class SelfListener implements Listener {
return;
}
int earlyLevelBonusXPCap = mcMMO.isRetroModeEnabled() ? 50 : 5;
int earlyGameBonusXP = 0;
//Give some bonus XP for low levels
if(mcMMOPlayer.getSkillLevel(primarySkillType) < earlyLevelBonusXPCap)
if(ExperienceConfig.getInstance().isEarlyGameBoostEnabled())
{
earlyGameBonusXP += (mcMMOPlayer.getXpToLevel(primarySkillType) * 0.05);
event.setRawXpGained(event.getRawXpGained() + earlyGameBonusXP);
int earlyLevelBonusXPCap = (int) (ExperienceConfig.getInstance().getEarlyGameBoostMultiplier() * Config.getInstance().getLevelCap(event.getSkill()));
int earlyGameBonusXP = 0;
//Give some bonus XP for low levels
if(mcMMOPlayer.getSkillLevel(primarySkillType) < earlyLevelBonusXPCap)
{
earlyGameBonusXP += (mcMMOPlayer.getXpToLevel(primarySkillType) * 0.05);
event.setRawXpGained(event.getRawXpGained() + earlyGameBonusXP);
}
}
int threshold = ExperienceConfig.getInstance().getDiminishedReturnsThreshold(primarySkillType);
if (threshold <= 0 || !ExperienceConfig.getInstance().getDiminishedReturnsEnabled()) {

View File

@ -22,6 +22,10 @@
# Splits the boss bar into 6 segments
#SOLID
# The bar is one solid piece
EarlyGameBoost:
Enabled: true
#Used to determine the cap of the max boot, with default level cap it will be 5 on standard, and 50 on retro
MaxLevelMultiplier: 0.05
ExploitFix:
# Prevent many exploits related to fishing
Fishing: true