AdvancedConfig.java 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. package com.gmail.nossr50.config;
  2. import com.gmail.nossr50.datatypes.interactions.NotificationType;
  3. import com.gmail.nossr50.datatypes.skills.SubSkillType;
  4. import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill;
  5. import com.gmail.nossr50.mcMMO;
  6. import net.md_5.bungee.api.ChatColor;
  7. import java.util.ArrayList;
  8. import java.util.List;
  9. public class AdvancedConfig extends ConfigLoaderConfigurable {
  10. private static AdvancedConfig instance;
  11. private AdvancedConfig() {
  12. super(mcMMO.p.getDataFolder(), "advanced.yml");
  13. }
  14. public static AdvancedConfig getInstance() {
  15. if (instance == null) {
  16. instance = new AdvancedConfig();
  17. }
  18. return instance;
  19. }
  20. @Override
  21. public List<String> validateKeys() {
  22. // Validate all the settings!
  23. List<String> reason = new ArrayList<String>();
  24. /* GENERAL */
  25. if (getAbilityLength() < 1) {
  26. reason.add("Skills.General.Ability.Length.<mode>.IncreaseLevel should be at least 1!");
  27. }
  28. if (getEnchantBuff() < 1) {
  29. reason.add("Skills.General.Ability.EnchantBuff should be at least 1!");
  30. }
  31. /* ACROBATICS */
  32. if (getMaximumProbability(SubSkillType.ACROBATICS_DODGE) < 1) {
  33. reason.add("Skills.Acrobatics.Dodge.ChanceMax should be at least 1!");
  34. }
  35. if (getMaxBonusLevel(SubSkillType.ACROBATICS_DODGE) < 1) {
  36. reason.add("Skills.Acrobatics.Dodge.MaxBonusLevel should be at least 1!");
  37. }
  38. if (getDodgeDamageModifier() <= 1) {
  39. reason.add("Skills.Acrobatics.Dodge.DamageModifier should be greater than 1!");
  40. }
  41. if (getMaximumProbability(SubSkillType.ACROBATICS_ROLL) < 1) {
  42. reason.add("Skills.Acrobatics.Roll.ChanceMax should be at least 1!");
  43. }
  44. if (getMaxBonusLevel(SubSkillType.ACROBATICS_ROLL) < 1) {
  45. reason.add("Skills.Acrobatics.Roll.MaxBonusLevel should be at least 1!");
  46. }
  47. if (getRollDamageThreshold() < 0) {
  48. reason.add("Skills.Acrobatics.Roll.DamageThreshold should be at least 0!");
  49. }
  50. if (getGracefulRollDamageThreshold() < 0) {
  51. reason.add("Skills.Acrobatics.GracefulRoll.DamageThreshold should be at least 0!");
  52. }
  53. if (getCatalysisMinSpeed() <= 0) {
  54. reason.add("Skills.Alchemy.Catalysis.MinSpeed must be greater than 0!");
  55. }
  56. if (getCatalysisMaxSpeed() < getCatalysisMinSpeed()) {
  57. reason.add("Skills.Alchemy.Catalysis.MaxSpeed should be at least Skills.Alchemy.Catalysis.MinSpeed!");
  58. }
  59. /* ARCHERY */
  60. if (getSkillShotRankDamageMultiplier() <= 0) {
  61. reason.add("Skills.Archery.SkillShot.RankDamageMultiplier should be greater than 0!");
  62. }
  63. if (getMaximumProbability(SubSkillType.ARCHERY_DAZE) < 1) {
  64. reason.add("Skills.Archery.Daze.ChanceMax should be at least 1!");
  65. }
  66. if (getMaxBonusLevel(SubSkillType.ARCHERY_DAZE) < 1) {
  67. reason.add("Skills.Archery.Daze.MaxBonusLevel should be at least 1!");
  68. }
  69. if (getDazeBonusDamage() < 0) {
  70. reason.add("Skills.Archery.Daze.BonusDamage should be at least 0!");
  71. }
  72. if (getMaximumProbability(SubSkillType.ARCHERY_ARROW_RETRIEVAL) < 1) {
  73. reason.add("Skills.Archery.Retrieve.ChanceMax should be at least 1!");
  74. }
  75. if (getMaxBonusLevel(SubSkillType.ARCHERY_ARROW_RETRIEVAL) < 1) {
  76. reason.add("Skills.Archery.Retrieve.MaxBonusLevel should be at least 1!");
  77. }
  78. if (getForceMultiplier() < 0) {
  79. reason.add("Skills.Archery.ForceMultiplier should be at least 0!");
  80. }
  81. /* AXES */
  82. if(getAxeMasteryRankDamageMultiplier() < 0)
  83. {
  84. reason.add("Skills.Axes.AxeMastery.RankDamageMultiplier should be at least 0!");
  85. }
  86. if (getMaximumProbability(SubSkillType.AXES_CRITICAL_STRIKES) < 1) {
  87. reason.add("Skills.Axes.CriticalHit.ChanceMax should be at least 1!");
  88. }
  89. if (getMaxBonusLevel(SubSkillType.AXES_CRITICAL_STRIKES) < 1) {
  90. reason.add("Skills.Axes.CriticalHit.MaxBonusLevel should be at least 1!");
  91. }
  92. if (getCriticalStrikesPVPModifier() < 1) {
  93. reason.add("Skills.Axes.CriticalStrikes.PVP_Modifier should be at least 1!");
  94. }
  95. if (getCriticalStrikesPVPModifier() < 1) {
  96. reason.add("Skills.Axes.CriticalStrikes.PVE_Modifier should be at least 1!");
  97. }
  98. if (getGreaterImpactChance() < 1) {
  99. reason.add("Skills.Axes.GreaterImpact.Chance should be at least 1!");
  100. }
  101. if (getGreaterImpactModifier() < 1) {
  102. reason.add("Skills.Axes.GreaterImpact.KnockbackModifier should be at least 1!");
  103. }
  104. if (getGreaterImpactBonusDamage() < 1) {
  105. reason.add("Skills.Axes.GreaterImpact.BonusDamage should be at least 1!");
  106. }
  107. if (getArmorImpactIncreaseLevel() < 1) {
  108. reason.add("Skills.Axes.ArmorImpact.IncreaseLevel should be at least 1!");
  109. }
  110. if (getImpactChance() < 1) {
  111. reason.add("Skills.Axes.ArmorImpact.Chance should be at least 1!");
  112. }
  113. if (getArmorImpactMaxDurabilityDamage() < 1) {
  114. reason.add("Skills.Axes.ArmorImpact.MaxPercentageDurabilityDamage should be at least 1!");
  115. }
  116. if (getSkullSplitterModifier() < 1) {
  117. reason.add("Skills.Axes.SkullSplitter.DamageModifier should be at least 1!");
  118. }
  119. if (getFishermanDietRankChange() < 1) {
  120. reason.add("Skills.Fishing.FishermansDiet.RankChange should be at least 1!");
  121. }
  122. if (getMasterAnglerBoatModifier() < 1) {
  123. reason.add("Skills.Fishing.MasterAngler.BoatModifier should be at least 1!");
  124. }
  125. if (getMasterAnglerBiomeModifier() < 1) {
  126. reason.add("Skills.Fishing.MasterAngler.BiomeModifier should be at least 1!");
  127. }
  128. /* HERBALISM */
  129. if (getFarmerDietRankChange() < 1) {
  130. reason.add("Skills.Herbalism.FarmersDiet.RankChange should be at least 1!");
  131. }
  132. if (getGreenThumbStageChange() < 1) {
  133. reason.add("Skills.Herbalism.GreenThumb.StageChange should be at least 1!");
  134. }
  135. if (getMaximumProbability(SubSkillType.HERBALISM_GREEN_THUMB) < 1) {
  136. reason.add("Skills.Herbalism.GreenThumb.ChanceMax should be at least 1!");
  137. }
  138. if (getMaxBonusLevel(SubSkillType.HERBALISM_GREEN_THUMB) < 1) {
  139. reason.add("Skills.Herbalism.GreenThumb.MaxBonusLevel should be at least 1!");
  140. }
  141. if (getMaximumProbability(SubSkillType.HERBALISM_DOUBLE_DROPS) < 1) {
  142. reason.add("Skills.Herbalism.DoubleDrops.ChanceMax should be at least 1!");
  143. }
  144. if (getMaxBonusLevel(SubSkillType.HERBALISM_DOUBLE_DROPS) < 1) {
  145. reason.add("Skills.Herbalism.DoubleDrops.MaxBonusLevel should be at least 1!");
  146. }
  147. if (getMaximumProbability(SubSkillType.HERBALISM_HYLIAN_LUCK) < 1) {
  148. reason.add("Skills.Herbalism.HylianLuck.ChanceMax should be at least 1!");
  149. }
  150. if (getMaxBonusLevel(SubSkillType.HERBALISM_HYLIAN_LUCK) < 1) {
  151. reason.add("Skills.Herbalism.HylianLuck.MaxBonusLevel should be at least 1!");
  152. }
  153. if (getMaximumProbability(SubSkillType.HERBALISM_SHROOM_THUMB) < 1) {
  154. reason.add("Skills.Herbalism.ShroomThumb.ChanceMax should be at least 1!");
  155. }
  156. if (getMaxBonusLevel(SubSkillType.HERBALISM_SHROOM_THUMB) < 1) {
  157. reason.add("Skills.Herbalism.ShroomThumb.MaxBonusLevel should be at least 1!");
  158. }
  159. /* MINING */
  160. if (getMaximumProbability(SubSkillType.MINING_DOUBLE_DROPS) < 1) {
  161. reason.add("Skills.Mining.DoubleDrops.ChanceMax should be at least 1!");
  162. }
  163. if (getMaxBonusLevel(SubSkillType.MINING_DOUBLE_DROPS) < 1) {
  164. reason.add("Skills.Mining.DoubleDrops.MaxBonusLevel should be at least 1!");
  165. }
  166. /* REPAIR */
  167. if (getRepairMasteryMaxBonus() < 1) {
  168. reason.add("Skills.Repair.RepairMastery.MaxBonusPercentage should be at least 1!");
  169. }
  170. if (getRepairMasteryMaxLevel() < 1) {
  171. reason.add("Skills.Repair.RepairMastery.MaxBonusLevel should be at least 1!");
  172. }
  173. if (getMaximumProbability(SubSkillType.REPAIR_SUPER_REPAIR) < 1) {
  174. reason.add("Skills.Repair.SuperRepair.ChanceMax should be at least 1!");
  175. }
  176. if (getMaxBonusLevel(SubSkillType.REPAIR_SUPER_REPAIR) < 1) {
  177. reason.add("Skills.Repair.SuperRepair.MaxBonusLevel should be at least 1!");
  178. }
  179. /* SMELTING */
  180. if (getBurnModifierMaxLevel() < 1) {
  181. reason.add("Skills.Smelting.FuelEfficiency.MaxBonusLevel should be at least 1!");
  182. }
  183. if (getMaxBonusLevel(SubSkillType.SMELTING_SECOND_SMELT) < 1) {
  184. reason.add("Skills.Smelting.SecondSmelt.MaxBonusLevel should be at least 1!");
  185. }
  186. if (getMaximumProbability(SubSkillType.SMELTING_SECOND_SMELT) < 1) {
  187. reason.add("Skills.Smelting.SecondSmelt.ChanceMax should be at least 1!");
  188. }
  189. if (getFluxMiningChance() < 1) {
  190. reason.add("Skills.Smelting.FluxMining.Chance should be at least 1!");
  191. }
  192. /* SWORDS */
  193. if (getMaximumProbability(SubSkillType.SWORDS_RUPTURE) < 1) {
  194. reason.add("Skills.Swords.Rupture.ChanceMax should be at least 1!");
  195. }
  196. if (getMaxBonusLevel(SubSkillType.SWORDS_RUPTURE) < 1) {
  197. reason.add("Skills.Swords.Rupture.MaxBonusLevel should be at least 1!");
  198. }
  199. if (getRuptureMaxTicks() < 1) {
  200. reason.add("Skills.Swords.Rupture.MaxTicks should be at least 1!");
  201. }
  202. if (getRuptureMaxTicks() < getRuptureBaseTicks()) {
  203. reason.add("Skills.Swords.Rupture.MaxTicks should be at least Skills.Swords.Rupture.BaseTicks!");
  204. }
  205. if (getRuptureBaseTicks() < 1) {
  206. reason.add("Skills.Swords.Rupture.BaseTicks should be at least 1!");
  207. }
  208. if (getMaximumProbability(SubSkillType.SWORDS_COUNTER_ATTACK) < 1) {
  209. reason.add("Skills.Swords.CounterAttack.ChanceMax should be at least 1!");
  210. }
  211. if (getMaxBonusLevel(SubSkillType.SWORDS_COUNTER_ATTACK) < 1) {
  212. reason.add("Skills.Swords.CounterAttack.MaxBonusLevel should be at least 1!");
  213. }
  214. if (getCounterModifier() < 1) {
  215. reason.add("Skills.Swords.CounterAttack.DamageModifier should be at least 1!");
  216. }
  217. if (getSerratedStrikesModifier() < 1) {
  218. reason.add("Skills.Swords.SerratedStrikes.DamageModifier should be at least 1!");
  219. }
  220. if (getSerratedStrikesTicks() < 1) {
  221. reason.add("Skills.Swords.SerratedStrikes.RuptureTicks should be at least 1!");
  222. }
  223. /* TAMING */
  224. if (getMaximumProbability(SubSkillType.TAMING_GORE) < 1) {
  225. reason.add("Skills.Taming.Gore.ChanceMax should be at least 1!");
  226. }
  227. if (getMaxBonusLevel(SubSkillType.TAMING_GORE) < 1) {
  228. reason.add("Skills.Taming.Gore.MaxBonusLevel should be at least 1!");
  229. }
  230. if (getGoreModifier() < 1) {
  231. reason.add("Skills.Taming.Gore.Modifier should be at least 1!");
  232. }
  233. if (getFastFoodChance() < 1) {
  234. reason.add("Skills.Taming.FastFood.Chance should be at least 1!");
  235. }
  236. if (getThickFurModifier() < 1) {
  237. reason.add("Skills.Taming.ThickFur.Modifier should be at least 1!");
  238. }
  239. if (getShockProofModifier() < 1) {
  240. reason.add("Skills.Taming.ShockProof.Modifier should be at least 1!");
  241. }
  242. if (getSharpenedClawsBonus() < 1) {
  243. reason.add("Skills.Taming.SharpenedClaws.Bonus should be at least 1!");
  244. }
  245. if (getMaxHorseJumpStrength() < 0 || getMaxHorseJumpStrength() > 2) {
  246. reason.add("Skills.Taming.CallOfTheWild.MaxHorseJumpStrength should be between 0 and 2!");
  247. }
  248. /* UNARMED */
  249. if (getMaximumProbability(SubSkillType.UNARMED_DISARM) < 1) {
  250. reason.add("Skills.Unarmed.Disarm.ChanceMax should be at least 1!");
  251. }
  252. if (getMaxBonusLevel(SubSkillType.UNARMED_DISARM) < 1) {
  253. reason.add("Skills.Unarmed.Disarm.MaxBonusLevel should be at least 1!");
  254. }
  255. if (getMaximumProbability(SubSkillType.UNARMED_ARROW_DEFLECT) < 1) {
  256. reason.add("Skills.Unarmed.ArrowDeflect.ChanceMax should be at least 1!");
  257. }
  258. if (getMaxBonusLevel(SubSkillType.UNARMED_ARROW_DEFLECT) < 1) {
  259. reason.add("Skills.Unarmed.ArrowDeflect.MaxBonusLevel should be at least 1!");
  260. }
  261. if (getMaximumProbability(SubSkillType.UNARMED_IRON_GRIP) < 1) {
  262. reason.add("Skills.Unarmed.IronGrip.ChanceMax should be at least 1!");
  263. }
  264. if (getMaxBonusLevel(SubSkillType.UNARMED_IRON_GRIP) < 1) {
  265. reason.add("Skills.Unarmed.IronGrip.MaxBonusLevel should be at least 1!");
  266. }
  267. /* WOODCUTTING */
  268. /*if (getLeafBlowUnlockLevel() < 0) {
  269. reason.add("Skills.Woodcutting.LeafBlower.UnlockLevel should be at least 0!");
  270. }*/
  271. if (getMaximumProbability(SubSkillType.WOODCUTTING_HARVEST_LUMBER) < 1) {
  272. reason.add("Skills.Woodcutting.HarvestLumber.ChanceMax should be at least 1!");
  273. }
  274. if (getMaxBonusLevel(SubSkillType.WOODCUTTING_HARVEST_LUMBER) < 1) {
  275. reason.add("Skills.Woodcutting.HarvestLumber.MaxBonusLevel should be at least 1!");
  276. }
  277. return reason;
  278. }
  279. /* GENERAL */
  280. public int getStartingLevel() { return getIntValue("Skills.General.StartingLevel"); }
  281. /**
  282. * This returns the maximum level at which superabilities will stop lengthening from scaling alongside skill level.
  283. * It returns a different value depending on whether or not the server is in retro mode
  284. * @return the level at which abilities stop increasing in length
  285. */
  286. public int getAbilityLengthCap() {
  287. if(!mcMMO.isRetroModeEnabled())
  288. return getIntValue("Skills.General.Ability.Length.Standard.CapLevel");
  289. else
  290. return getIntValue("Skills.General.Ability.Length.RetroMode.CapLevel");
  291. }
  292. /**
  293. * This returns the frequency at which abilities will increase in length
  294. * It returns a different value depending on whether or not the server is in retro mode
  295. * @return the number of levels required per ability length increase
  296. */
  297. public int getAbilityLength() {
  298. if(!mcMMO.isRetroModeEnabled())
  299. return getIntValue("Skills.General.Ability.Length.Standard.IncreaseLevel");
  300. else
  301. return getIntValue("Skills.General.Ability.Length.RetroMode.IncreaseLevel");
  302. }
  303. public int getEnchantBuff() { return getIntValue("Skills.General.Ability.EnchantBuff"); }
  304. /**
  305. * Grabs the max bonus level for a skill used in RNG calculations
  306. * All max level values in the config are multiplied by 10 if the server is in retro mode as the values in the config are based around the new 1-100 skill system scaling
  307. * A value of 10 in the file will be returned as 100 for retro mode servers to accommodate the change in scaling
  308. * @param subSkillType target subskill
  309. * @return the level at which this skills max benefits will be reached on the curve
  310. */
  311. public int getMaxBonusLevel(SubSkillType subSkillType) {
  312. String keyPath = subSkillType.getAdvConfigAddress() + ".MaxBonusLevel.";
  313. return mcMMO.isRetroModeEnabled() ? getIntValue(keyPath+"RetroMode") : getIntValue(keyPath+"Standard");
  314. }
  315. public int getMaxBonusLevel(AbstractSubSkill abstractSubSkill) {
  316. return getMaxBonusLevel(abstractSubSkill.getSubSkillType());
  317. }
  318. public double getMaximumProbability(SubSkillType subSkillType) {
  319. double maximumProbability = getDoubleValue(subSkillType.getAdvConfigAddress() + ".ChanceMax");
  320. return maximumProbability;
  321. }
  322. public double getMaximumProbability(AbstractSubSkill abstractSubSkill)
  323. {
  324. return getMaximumProbability(abstractSubSkill.getSubSkillType());
  325. }
  326. /* Notification Settings */
  327. public boolean doesSkillCommandSendBlankLines()
  328. {
  329. return getBooleanValue("Feedback.SkillCommand.BlankLinesAboveHeader");
  330. }
  331. public boolean doesNotificationUseActionBar(NotificationType notificationType)
  332. {
  333. return getBooleanValue("Feedback.ActionBarNotifications."+notificationType.toString()+".Enabled");
  334. }
  335. public boolean doesNotificationSendCopyToChat(NotificationType notificationType)
  336. {
  337. return getBooleanValue("Feedback.ActionBarNotifications."+notificationType.toString()+".SendCopyOfMessageToChat");
  338. }
  339. public boolean useTitlesForXPEvent()
  340. {
  341. return getBooleanValue("Feedback.Events.XP.SendTitles");
  342. }
  343. private ChatColor getChatColorFromKey(String keyLocation) {
  344. String colorName = getStringValue(keyLocation);
  345. return getChatColor(colorName);
  346. }
  347. private ChatColor getChatColor(String configColor) {
  348. for (ChatColor chatColor : ChatColor.values()) {
  349. if (configColor.equalsIgnoreCase(chatColor.getName()))
  350. return chatColor;
  351. }
  352. //Invalid Color
  353. System.out.println("[mcMMO] " + configColor + " is an invalid color value");
  354. return ChatColor.WHITE;
  355. }
  356. /**
  357. * Some SubSkills have the ability to retain classic functionality
  358. * @param subSkillType SubSkillType with classic functionality
  359. * @return true if the subskill is in classic mode
  360. */
  361. public boolean isSubSkillClassic(SubSkillType subSkillType)
  362. {
  363. return getBooleanValue(subSkillType.getAdvConfigAddress()+".Classic");
  364. }
  365. /* ACROBATICS */
  366. public double getDodgeDamageModifier() { return getDoubleValue("Skills.Acrobatics.Dodge.DamageModifier"); }
  367. public double getRollDamageThreshold() { return getDoubleValue("Skills.Acrobatics.Roll.DamageThreshold"); }
  368. public double getGracefulRollDamageThreshold() { return getDoubleValue("Skills.Acrobatics.GracefulRoll.DamageThreshold"); }
  369. /* ALCHEMY */
  370. public int getCatalysisMaxBonusLevel() { return getIntValue("Skills.Alchemy.Catalysis.MaxBonusLevel"); }
  371. public double getCatalysisMinSpeed() { return getDoubleValue("Skills.Alchemy.Catalysis.MinSpeed"); }
  372. public double getCatalysisMaxSpeed() { return getDoubleValue("Skills.Alchemy.Catalysis.MaxSpeed"); }
  373. /* ARCHERY */
  374. public double getSkillShotRankDamageMultiplier() { return getDoubleValue("Skills.Archery.SkillShot.RankDamageMultiplier"); }
  375. public double getSkillShotDamageMax() { return getDoubleValue("Skills.Archery.SkillShot.MaxDamage"); }
  376. public double getDazeBonusDamage() { return getDoubleValue("Skills.Archery.Daze.BonusDamage"); }
  377. public double getForceMultiplier() { return getDoubleValue("Skills.Archery.ForceMultiplier"); }
  378. /* AXES */
  379. public double getAxeMasteryRankDamageMultiplier() { return getDoubleValue("Skills.Axes.AxeMastery.RankDamageMultiplier"); }
  380. public double getCriticalStrikesPVPModifier() { return getDoubleValue("Skills.Axes.CriticalStrikes.PVP_Modifier"); }
  381. public double getCriticalStrikesPVEModifier() { return getDoubleValue("Skills.Axes.CriticalStrikes.PVE_Modifier"); }
  382. public double getGreaterImpactChance() { return getDoubleValue("Skills.Axes.GreaterImpact.Chance"); }
  383. public double getGreaterImpactModifier() { return getDoubleValue("Skills.Axes.GreaterImpact.KnockbackModifier"); }
  384. public double getGreaterImpactBonusDamage() { return getDoubleValue("Skills.Axes.GreaterImpact.BonusDamage"); }
  385. public int getArmorImpactIncreaseLevel() {
  386. int increaseLevel = getIntValue("Skills.Axes.ArmorImpact.IncreaseLevel");
  387. if(mcMMO.isRetroModeEnabled())
  388. return increaseLevel * 10;
  389. return increaseLevel;
  390. }
  391. public double getImpactChance() { return getDoubleValue("Skills.Axes.ArmorImpact.Chance"); }
  392. public double getArmorImpactMaxDurabilityDamage() { return getDoubleValue("Skills.Axes.ArmorImpact.MaxPercentageDurabilityDamage"); }
  393. public double getSkullSplitterModifier() { return getDoubleValue("Skills.Axes.SkullSplitter.DamageModifier"); }
  394. /* EXCAVATION */
  395. //Nothing to configure, everything is already configurable in config.yml
  396. /* FISHING */
  397. public double getShakeChance(int rank) { return getDoubleValue("Skills.Fishing.ShakeChance.Rank_" + rank); }
  398. public int getFishingVanillaXPModifier(int rank) { return getIntValue("Skills.Fishing.VanillaXPMultiplier.Rank_" + rank); }
  399. public int getFishermanDietRankChange() { return getIntValue("Skills.Fishing.FishermansDiet.RankChange"); }
  400. public double getMasterAnglerBoatModifier() {return getDoubleValue("Skills.Fishing.MasterAngler.BoatModifier"); }
  401. public double getMasterAnglerBiomeModifier() {return getDoubleValue("Skills.Fishing.MasterAngler.BiomeModifier"); }
  402. /* HERBALISM */
  403. public int getFarmerDietRankChange() { return getIntValue("Skills.Herbalism.FarmersDiet.RankChange"); }
  404. public int getGreenThumbStageChange() { return getIntValue("Skills.Herbalism.GreenThumb.StageChange"); }
  405. /* MINING */
  406. public boolean getDoubleDropSilkTouchEnabled() { return config.getBoolean("Skills.Mining.DoubleDrops.SilkTouch", true); }
  407. public int getBlastMiningRankLevel(int rank) { return config.getInt("Skills.Mining.BlastMining.Rank_Levels.Rank_" + rank); }
  408. public double getBlastDamageDecrease(int rank) { return config.getDouble("Skills.Mining.BlastMining.BlastDamageDecrease.Rank_" + rank); }
  409. public double getOreBonus(int rank) { return config.getDouble("Skills.Mining.BlastMining.OreBonus.Rank_" + rank); }
  410. public double getDebrisReduction(int rank) { return config.getDouble("Skills.Mining.BlastMining.DebrisReduction.Rank_" + rank); }
  411. public int getDropMultiplier(int rank) { return config.getInt("Skills.Mining.BlastMining.DropMultiplier.Rank_" + rank); }
  412. public double getBlastRadiusModifier(int rank) { return config.getDouble("Skills.Mining.BlastMining.BlastRadiusModifier.Rank_" + rank); }
  413. /* REPAIR */
  414. public double getRepairMasteryMaxBonus() { return getDoubleValue("Skills.Repair.RepairMastery.MaxBonusPercentage"); }
  415. public int getRepairMasteryMaxLevel() { return getIntValue("Skills.Repair.RepairMastery.MaxBonusLevel"); }
  416. /* Arcane Forging */
  417. public boolean getArcaneForgingEnchantLossEnabled() { return getBooleanValue("Skills.Repair.ArcaneForging.May_Lose_Enchants"); }
  418. public double getArcaneForgingKeepEnchantsChance(int rank) { return getDoubleValue("Skills.Repair.ArcaneForging.Keep_Enchants_Chance.Rank_" + rank); }
  419. public boolean getArcaneForgingDowngradeEnabled() { return getBooleanValue("Skills.Repair.ArcaneForging.Downgrades_Enabled"); }
  420. public double getArcaneForgingDowngradeChance(int rank) { return getDoubleValue("Skills.Repair.ArcaneForging.Downgrades_Chance.Rank_" + rank); }
  421. /* SALVAGE */
  422. public boolean getArcaneSalvageEnchantDowngradeEnabled() { return getBooleanValue("Skills.Salvage.ArcaneSalvage.EnchantDowngradeEnabled"); }
  423. public boolean getArcaneSalvageEnchantLossEnabled() { return getBooleanValue("Skills.Salvage.ArcaneSalvage.EnchantLossEnabled"); }
  424. public double getArcaneSalvageExtractFullEnchantsChance(int rank) { return getDoubleValue("Skills.Salvage.ArcaneSalvage.ExtractFullEnchant.Rank_" + rank); }
  425. public double getArcaneSalvageExtractPartialEnchantsChance(int rank) { return getDoubleValue("Skills.Salvage.ArcaneSalvage.ExtractPartialEnchant.Rank_" + rank); }
  426. /* SMELTING */
  427. public int getBurnModifierMaxLevel() { return getIntValue("Skills.Smelting.FuelEfficiency.MaxBonusLevel"); }
  428. public double getBurnTimeMultiplier() { return getDoubleValue("Skills.Smelting.FuelEfficiency.Multiplier"); }
  429. public double getFluxMiningChance() { return getDoubleValue("Skills.Smelting.FluxMining.Chance"); }
  430. public int getSmeltingRankLevel(int rank) { return getIntValue("Skills.Smelting.Rank_Levels.Rank_" + rank); }
  431. public int getSmeltingVanillaXPBoostMultiplier(int rank) { return getIntValue("Skills.Smelting.VanillaXPMultiplier.Rank_" + rank); }
  432. /* SWORDS */
  433. public double getRuptureDamagePlayer() { return getDoubleValue("Skills.Swords.Rupture.DamagePlayer"); }
  434. public double getRuptureDamageMobs() { return getDoubleValue("Skills.Swords.Rupture.DamageMobs"); }
  435. public int getRuptureMaxTicks() { return getIntValue("Skills.Swords.Rupture.MaxTicks"); }
  436. public int getRuptureBaseTicks() { return getIntValue("Skills.Swords.Rupture.BaseTicks"); }
  437. public double getCounterModifier() { return getDoubleValue("Skills.Swords.CounterAttack.DamageModifier"); }
  438. public double getSerratedStrikesModifier() { return getDoubleValue("Skills.Swords.SerratedStrikes.DamageModifier"); }
  439. public int getSerratedStrikesTicks() { return getIntValue("Skills.Swords.SerratedStrikes.RuptureTicks"); }
  440. /* TAMING */
  441. public double getGoreModifier() { return getDoubleValue("Skills.Taming.Gore.Modifier"); }
  442. public double getFastFoodChance() { return getDoubleValue("Skills.Taming.FastFoodService.Chance"); }
  443. public double getPummelChance() { return getDoubleValue("Skills.Taming.Pummel.Chance"); }
  444. public double getThickFurModifier() { return getDoubleValue("Skills.Taming.ThickFur.Modifier"); }
  445. public double getShockProofModifier() { return getDoubleValue("Skills.Taming.ShockProof.Modifier"); }
  446. public double getSharpenedClawsBonus() { return getDoubleValue("Skills.Taming.SharpenedClaws.Bonus"); }
  447. public double getMinHorseJumpStrength() { return getDoubleValue("Skills.Taming.CallOfTheWild.MinHorseJumpStrength"); }
  448. public double getMaxHorseJumpStrength() { return getDoubleValue("Skills.Taming.CallOfTheWild.MaxHorseJumpStrength"); }
  449. /* UNARMED */
  450. public boolean getDisarmProtected() { return getBooleanValue("Skills.Unarmed.Disarm.AntiTheft"); }
  451. /* WOODCUTTING */
  452. }