From 3218c544dc2d4e693edcbd9f359a6872f16da1af Mon Sep 17 00:00:00 2001 From: nossr50 Date: Wed, 2 May 2012 06:10:32 -0700 Subject: [PATCH] Added level curve modifier --- Changelog.txt | 1 + src/main/java/com/gmail/nossr50/config/Config.java | 1 + src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java | 2 +- src/main/resources/config.yml | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index 875afd68c..6581b3638 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -11,6 +11,7 @@ Version 1.3.07 + Added new configurable Hardcore mode functionality to mcMMO + Added new configurable Vampirism PVP stat leech for Hardcore mode + Added new bypass permission node for the negative penalties of Hardcore mode 'mcmmo.bypass.hardcoremode' + + Added configurable level curve multiplier which allows for tweaking the steepness of the XP needed to level formula + Added a permission node for Archery bonus damage + Added a permission node for Greater Impact ability + Added permission nodes for Treasure & Magic Hunter for Fishing diff --git a/src/main/java/com/gmail/nossr50/config/Config.java b/src/main/java/com/gmail/nossr50/config/Config.java index ef997ec8e..470b8634b 100644 --- a/src/main/java/com/gmail/nossr50/config/Config.java +++ b/src/main/java/com/gmail/nossr50/config/Config.java @@ -355,6 +355,7 @@ public class Config extends ConfigLoader { public double getIronGolemXP() { return config.getDouble("Experience.Combat.Multiplier.Iron_Golem", 2.0); } /* XP Formula Multiplier */ + public int getFormulaMultiplierCurve() { return config.getInt("Experience.Formula.Curve_Modifier", 20); } public double getFormulaMultiplierTaming() { return config.getDouble("Experience.Formula.Multiplier.Taming", 1.0); } public double getFormulaMultiplierMining() { return config.getDouble("Experience.Formula.Multiplier.Mining", 1.0); } public double getFormulaMultiplierRepair() { return config.getDouble("Experience.Formula.Multiplier.Repair", 1.0); } diff --git a/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java b/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java index d9865070e..97a4ff58b 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java +++ b/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java @@ -1112,7 +1112,7 @@ public class PlayerProfile { * @return the XP remaining until next level */ public int getXpToLevel(SkillType skillType) { - return (int) (1020 + (skills.get(skillType) * 20)); //Do we REALLY need to cast to int here? + return 1020 + (skills.get(skillType) * Config.getInstance().getFormulaMultiplierCurve()); //Do we REALLY need to cast to int here? } /** diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 8364203df..60c740506 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -229,6 +229,7 @@ Experience: PVP: Rewards: true Formula: + Curve_Modifier: 20 Multiplier: Swords: 1.0 Taming: 1.0