| 
														
															@@ -1,13 +1,28 @@ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 package com.gmail.nossr50.config.hocon.playerleveling; 
														 | 
														
														 | 
														
															 package com.gmail.nossr50.config.hocon.playerleveling; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.gmail.nossr50.datatypes.experience.FormulaType; 
														 | 
														
														 | 
														
															 import com.gmail.nossr50.datatypes.experience.FormulaType; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.gmail.nossr50.datatypes.skills.PrimarySkillType; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import ninja.leaping.configurate.objectmapping.Setting; 
														 | 
														
														 | 
														
															 import ninja.leaping.configurate.objectmapping.Setting; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; 
														 | 
														
														 | 
														
															 import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import java.util.HashMap; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 @ConfigSerializable 
														 | 
														
														 | 
														
															 @ConfigSerializable 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 public class ConfigExperienceFormula { 
														 | 
														
														 | 
														
															 public class ConfigExperienceFormula { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public static final boolean CUMULATIVE_CURVE_DEFAULT = false; 
														 | 
														
														 | 
														
															     public static final boolean CUMULATIVE_CURVE_DEFAULT = false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    private static final HashMap<PrimarySkillType, Double> SKILL_FORMULA_MODIFIER_DEFAULT; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    static { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        SKILL_FORMULA_MODIFIER_DEFAULT = new HashMap<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        for(PrimarySkillType primarySkillType : PrimarySkillType.values()) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if(primarySkillType.isChildSkill()) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                continue; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            SKILL_FORMULA_MODIFIER_DEFAULT.put(primarySkillType, 1.0D); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     @Setting(value = "Player-XP-Formula-Type", comment = "Determines which formula is used to determine XP needed to level" + 
														 | 
														
														 | 
														
															     @Setting(value = "Player-XP-Formula-Type", comment = "Determines which formula is used to determine XP needed to level" + 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             "\nDefault value: LINEAR") 
														 | 
														
														 | 
														
															             "\nDefault value: LINEAR") 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -26,10 +41,18 @@ public class ConfigExperienceFormula { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             "\nDefault value: " + CUMULATIVE_CURVE_DEFAULT) 
														 | 
														
														 | 
														
															             "\nDefault value: " + CUMULATIVE_CURVE_DEFAULT) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     private boolean cumulativeCurveEnabled = CUMULATIVE_CURVE_DEFAULT; 
														 | 
														
														 | 
														
															     private boolean cumulativeCurveEnabled = CUMULATIVE_CURVE_DEFAULT; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    @Setting(value = "Skill-Formula-Multipliers", comment = "The end result of how much XP is needed to level is determined by multiplying against this value" + 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            "\nHigher values will make skills take longer to level, lower values will decrease time to level instead.") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    private HashMap<PrimarySkillType, Double> skillXpModifier = SKILL_FORMULA_MODIFIER_DEFAULT; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public FormulaType getFormulaType() { 
														 | 
														
														 | 
														
															     public FormulaType getFormulaType() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         return formulaType; 
														 | 
														
														 | 
														
															         return formulaType; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    public double getSkillXpFormulaModifier(PrimarySkillType primarySkillType) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        return skillXpModifier.get(primarySkillType); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public ConfigExperienceFormulaLinear getConfigExperienceFormulaLinear() { 
														 | 
														
														 | 
														
															     public ConfigExperienceFormulaLinear getConfigExperienceFormulaLinear() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         return configExperienceFormulaLinear; 
														 | 
														
														 | 
														
															         return configExperienceFormulaLinear; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 |