Added ability to cap overall power level.

This commit is contained in:
GJ 2012-04-02 13:45:33 -04:00
parent e40e10da61
commit b84a03082e
4 changed files with 6 additions and 2 deletions

View File

@ -10,6 +10,7 @@ Key:
Version 1.3.05-dev
+ Added bonus damage to Archery, every 50 levels you gain 10% bonus damage
+ Added ExperienceAPI and PartyAPI classes for developer use
+ Added ability to cap overall power level
= Fixed errors when Spout would disable itself after start-up
= Fixed XP bar not updating when XP was gained
= Fixed bug with repairing wooden tools

View File

@ -106,7 +106,8 @@ public class LoadProperties extends ConfigLoader{
/* Level Caps */
public static int levelCapAcrobatics, levelCapArchery, levelCapAxes, levelCapExcavation,
levelCapFishing, levelCapHerbalism, levelCapMining, levelCapRepair,
levelCapSwords, levelCapTaming, levelCapUnarmed, levelCapWoodcutting;
levelCapSwords, levelCapTaming, levelCapUnarmed, levelCapWoodcutting,
powerLevelCap;
/*
* XP SETTINGS
@ -328,6 +329,7 @@ public class LoadProperties extends ConfigLoader{
statsTracking = config.getBoolean("General.Stats_Tracking", true);
eventCallback = config.getBoolean("General.Event_Callback", true);
perLevelTools = config.getBoolean("General.Per_Level_Tools", false);
powerLevelCap = config.getInt("General.Power_Level_Cap", 0);
enableCobbleToMossy = config.getBoolean("Skills.Herbalism.Green_Thumb.Cobble_To_Mossy", true);
enableSmoothToMossy = config.getBoolean("Skills.Herbalism.Green_Thumb.SmoothBrick_To_MossyBrick", true);

View File

@ -195,7 +195,7 @@ public class Skills {
if (PP.getSkillXpLevel(skillType) >= PP.getXpToLevel(skillType)) {
while (PP.getSkillXpLevel(skillType) >= PP.getXpToLevel(skillType)) {
if (skillType.getMaxLevel() >= PP.getSkillLevel(skillType) + 1) {
if ((skillType.getMaxLevel() >= PP.getSkillLevel(skillType) + 1) && (LoadProperties.powerLevelCap >= PP.getPowerLevel() + 1)) {
skillups++;
PP.addLevels(skillType, 1);

View File

@ -17,6 +17,7 @@ General:
#Allow mcMMO to inform other plugins of damage being dealt
Event_Callback: true
Per_Level_Tools: false
Power_Level_Cap: 0
#
# Settings for using a mySQL database