mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Skills which used to unlock at level 5 now unlock at level 1 and some
tweaks to ranks of other skills, and length scaling for super abilities. Early game boost has also been modified.
This commit is contained in:
@ -1,43 +1,38 @@
|
||||
package com.gmail.nossr50.util.player;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class PlayerLevelUtils {
|
||||
HashMap<PrimarySkillType, Integer> earlyGameBoostCutoffs;
|
||||
|
||||
public PlayerLevelUtils()
|
||||
{
|
||||
earlyGameBoostCutoffs = new HashMap<>();
|
||||
calculateEarlyGameBoostCutoffs();
|
||||
}
|
||||
|
||||
private void calculateEarlyGameBoostCutoffs()
|
||||
{
|
||||
for(PrimarySkillType primarySkillType : PrimarySkillType.values())
|
||||
{
|
||||
int levelCap = Config.getInstance().getLevelCap(primarySkillType);
|
||||
int cap;
|
||||
|
||||
if(levelCap == Integer.MAX_VALUE || levelCap <= 0)
|
||||
{
|
||||
cap = Config.getInstance().getIsRetroMode() ? 50 : 5;
|
||||
} else {
|
||||
cap = (int) (levelCap * ExperienceConfig.getInstance().getEarlyGameBoostMultiplier());
|
||||
}
|
||||
|
||||
earlyGameBoostCutoffs.put(primarySkillType, cap);
|
||||
}
|
||||
}
|
||||
// HashMap<PrimarySkillType, Integer> earlyGameBoostCutoffs;
|
||||
//
|
||||
// public PlayerLevelUtils()
|
||||
// {
|
||||
// earlyGameBoostCutoffs = new HashMap<>();
|
||||
// calculateEarlyGameBoostCutoffs();
|
||||
// }
|
||||
// private void calculateEarlyGameBoostCutoffs()
|
||||
// {
|
||||
// for(PrimarySkillType primarySkillType : PrimarySkillType.values())
|
||||
// {
|
||||
// int levelCap = Config.getInstance().getLevelCap(primarySkillType);
|
||||
// int cap;
|
||||
//
|
||||
// if(levelCap == Integer.MAX_VALUE || levelCap <= 0)
|
||||
// {
|
||||
// cap = Config.getInstance().getIsRetroMode() ? 50 : 5;
|
||||
// } else {
|
||||
// cap = (int) (levelCap * ExperienceConfig.getInstance().getEarlyGameBoostMultiplier());
|
||||
// }
|
||||
//
|
||||
// earlyGameBoostCutoffs.put(primarySkillType, cap);
|
||||
// }
|
||||
// }
|
||||
|
||||
public int getEarlyGameCutoff(PrimarySkillType primarySkillType)
|
||||
{
|
||||
return earlyGameBoostCutoffs.get(primarySkillType);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user