mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Added new experience curve option
This commit is contained in:
parent
001f1dbd3c
commit
435eb7f8b9
@ -9,6 +9,7 @@ Key:
|
|||||||
|
|
||||||
Version 1.4.07-dev
|
Version 1.4.07-dev
|
||||||
+ Added snow to excavation
|
+ Added snow to excavation
|
||||||
|
+ Added new experience curve option. Cumulative curve, calculates experience needed for next level using power level.
|
||||||
= Fixed bug with Skull Splitter not finding the locale string
|
= Fixed bug with Skull Splitter not finding the locale string
|
||||||
= Fixed issue where locale strings could cause the scoreboard header to be longer than 16 characters.
|
= Fixed issue where locale strings could cause the scoreboard header to be longer than 16 characters.
|
||||||
! Improved profile saving
|
! Improved profile saving
|
||||||
|
@ -294,5 +294,6 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
|
|
||||||
/* XP Formula Multiplier */
|
/* XP Formula Multiplier */
|
||||||
public int getFormulaMultiplierCurve() { return config.getInt("Experience.Formula.Curve_Modifier", 20); }
|
public int getFormulaMultiplierCurve() { return config.getInt("Experience.Formula.Curve_Modifier", 20); }
|
||||||
|
public boolean getCumulativeCurveEnabled() { return config.getBoolean("Experience.Formula.Cumulative_Curve", false); }
|
||||||
public double getFormulaSkillModifier(SkillType skill) { return config.getDouble("Experience.Formula.Modifier." + StringUtils.getCapitalized(skill.toString())); }
|
public double getFormulaSkillModifier(SkillType skill) { return config.getDouble("Experience.Formula.Modifier." + StringUtils.getCapitalized(skill.toString())); }
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ import com.gmail.nossr50.datatypes.skills.SkillType;
|
|||||||
import com.gmail.nossr50.datatypes.spout.huds.HudType;
|
import com.gmail.nossr50.datatypes.spout.huds.HudType;
|
||||||
import com.gmail.nossr50.datatypes.spout.huds.McMMOHud;
|
import com.gmail.nossr50.datatypes.spout.huds.McMMOHud;
|
||||||
import com.gmail.nossr50.skills.child.FamilyTree;
|
import com.gmail.nossr50.skills.child.FamilyTree;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
public class PlayerProfile {
|
public class PlayerProfile {
|
||||||
private final String playerName;
|
private final String playerName;
|
||||||
@ -274,6 +275,10 @@ public class PlayerProfile {
|
|||||||
* @return the Xp remaining until next level
|
* @return the Xp remaining until next level
|
||||||
*/
|
*/
|
||||||
public int getXpToLevel(SkillType skillType) {
|
public int getXpToLevel(SkillType skillType) {
|
||||||
|
if (Config.getInstance().getCumulativeCurveEnabled()) {
|
||||||
|
return 1020 + (UserManager.getPlayer(playerName).getPowerLevel() * Config.getInstance().getFormulaMultiplierCurve());
|
||||||
|
}
|
||||||
|
|
||||||
return 1020 + (skills.get(skillType) * Config.getInstance().getFormulaMultiplierCurve());
|
return 1020 + (skills.get(skillType) * Config.getInstance().getFormulaMultiplierCurve());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -290,6 +290,10 @@ Experience:
|
|||||||
Formula:
|
Formula:
|
||||||
Curve_Modifier: 20
|
Curve_Modifier: 20
|
||||||
|
|
||||||
|
# Cumulative experience curves will use a players power level instead of their skill level,
|
||||||
|
# players with high power levels will have to gain a lot more experience to reach the next level in every skill.
|
||||||
|
Cumulative_Curve: false
|
||||||
|
|
||||||
# Experience gained will get divided by these values. 1.0 by default, 2.0 means two times lower
|
# Experience gained will get divided by these values. 1.0 by default, 2.0 means two times lower
|
||||||
Modifier:
|
Modifier:
|
||||||
Swords: 1.0
|
Swords: 1.0
|
||||||
|
Loading…
Reference in New Issue
Block a user