Add advanced.yml config options for Smelting.

This commit is contained in:
GJ 2013-01-23 17:07:26 -05:00
parent 6f45e479bd
commit 64137995c2
5 changed files with 82 additions and 21 deletions

View File

@ -135,6 +135,28 @@ public class AdvancedConfig extends ConfigLoader {
public int getArcaneForgingRankLevels3() { return config.getInt("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_3", 500); }
public int getArcaneForgingRankLevels4() { return config.getInt("Skills.Repair.Arcane_Forging.Rank_Levels.Rank_4", 750); }
/* SMELTING */
public int getBurnModifierMaxLevel() { return config.getInt("Skills.Smelting.FuelEfficiency_MaxBonusLevel", 1000); }
public double getBurnTimeMultiplier() { return config.getDouble("Skills.Smelting.FuelEfficiency_Multiplier", 3.0D); }
public int getSecondSmeltMaxLevel() { return config.getInt("Skills.Smelting.SecondSmelt_MaxBonusLevel", 1000); }
public double getSecondSmeltMaxChance() { return config.getDouble("Skills.Smelting.SecondSmelt_MaxBonusChance", 100.0D); }
public int getFluxMiningUnlockLevel() { return config.getInt("Skills.Smelting.FluxMining_UnlockLevel", 250); }
public double getFluxMiningChance() { return config.getDouble("Skills.Smelting.FluxMining_Chance", 33.0D); }
public int getSmeltingVanillaXPBoostRank1Level() { return config.getInt("Skills.Smelting.VanillaXPBoost_Rank1Level", 100); }
public int getSmeltingVanillaXPBoostRank2Level() { return config.getInt("Skills.Smelting.VanillaXPBoost_Rank2Level", 300); }
public int getSmeltingVanillaXPBoostRank3Level() { return config.getInt("Skills.Smelting.VanillaXPBoost_Rank3Level", 500); }
public int getSmeltingVanillaXPBoostRank4Level() { return config.getInt("Skills.Smelting.VanillaXPBoost_Rank4Level", 700); }
public int getSmeltingVanillaXPBoostRank5Level() { return config.getInt("Skills.Smelting.VanillaXPBoost_Rank5Level", 900); }
public int getSmeltingVanillaXPBoostRank1Multiplier() { return config.getInt("Skills.Smelting.VanillaXPBoost_Rank1Multiplier", 2); }
public int getSmeltingVanillaXPBoostRank2Multiplier() { return config.getInt("Skills.Smelting.VanillaXPBoost_Rank2Multiplier", 3); }
public int getSmeltingVanillaXPBoostRank3Multiplier() { return config.getInt("Skills.Smelting.VanillaXPBoost_Rank3Multiplier", 4); }
public int getSmeltingVanillaXPBoostRank4Multiplier() { return config.getInt("Skills.Smelting.VanillaXPBoost_Rank4Multiplier", 5); }
public int getSmeltingVanillaXPBoostRank5Multiplier() { return config.getInt("Skills.Smelting.VanillaXPBoost_Rank5Multiplier", 6); }
/* SWORDS */
public double getBleedChanceMax() { return config.getDouble("Skills.Swords.Bleed_ChanceMax", 75.0D); }
public int getBleedMaxBonusLevel() { return config.getInt("Skills.Swords.Bleed_MaxBonusLevel", 750); }

View File

@ -1,18 +1,26 @@
package com.gmail.nossr50.skills.smelting;
import com.gmail.nossr50.config.AdvancedConfig;
public class Smelting {
public static int burnModifierMaxLevel = 1000;
public static double burnTimeMultiplier = 3.0;
public static int burnModifierMaxLevel = AdvancedConfig.getInstance().getBurnModifierMaxLevel();
public static double burnTimeMultiplier = AdvancedConfig.getInstance().getBurnTimeMultiplier();
public static double secondSmeltMaxChance = 100;
public static int secondSmeltMaxLevel = 1000;
public static double secondSmeltMaxChance = AdvancedConfig.getInstance().getSecondSmeltMaxChance();
public static int secondSmeltMaxLevel = AdvancedConfig.getInstance().getSecondSmeltMaxLevel();
public static int fluxMiningUnlockLevel = 200;
public static double fluxMiningChance = 33.0;
public static int fluxMiningUnlockLevel = AdvancedConfig.getInstance().getFluxMiningUnlockLevel();
public static double fluxMiningChance = AdvancedConfig.getInstance().getFluxMiningChance();
public static int vanillaXPBoostRank1Level = 100;
public static int vanillaXPBoostRank2Level = 300;
public static int vanillaXPBoostRank3Level = 500;
public static int vanillaXPBoostRank4Level = 700;
public static int vanillaXPBoostRank5Level = 900;
public static int vanillaXPBoostRank1Level = AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank1Level();
public static int vanillaXPBoostRank2Level = AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank2Level();
public static int vanillaXPBoostRank3Level = AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank3Level();
public static int vanillaXPBoostRank4Level = AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank4Level();
public static int vanillaXPBoostRank5Level = AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank5Level();
public static int vanillaXPBoostRank1Multiplier = AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank1Multiplier();
public static int vanillaXPBoostRank2Multiplier = AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank2Multiplier();
public static int vanillaXPBoostRank3Multiplier = AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank3Multiplier();
public static int vanillaXPBoostRank4Multiplier = AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank4Multiplier();
public static int vanillaXPBoostRank5Multiplier = AdvancedConfig.getInstance().getSmeltingVanillaXPBoostRank5Multiplier();
}

View File

@ -40,19 +40,19 @@ public class SmeltingCommand extends SkillCommand {
//VANILLA XP BOOST
if (skillValue >= Smelting.vanillaXPBoostRank5Level) {
vanillaXPModifier = "6";
vanillaXPModifier = String.valueOf(Smelting.vanillaXPBoostRank5Multiplier);
}
else if (skillValue >= Smelting.vanillaXPBoostRank4Level) {
vanillaXPModifier = "5";
vanillaXPModifier = String.valueOf(Smelting.vanillaXPBoostRank4Multiplier);
}
else if (skillValue >= Smelting.vanillaXPBoostRank3Level) {
vanillaXPModifier = "4";
vanillaXPModifier = String.valueOf(Smelting.vanillaXPBoostRank3Multiplier);
}
else if (skillValue >= Smelting.vanillaXPBoostRank2Level) {
vanillaXPModifier = "3";
vanillaXPModifier = String.valueOf(Smelting.vanillaXPBoostRank2Multiplier);
}
else {
vanillaXPModifier = "2";
vanillaXPModifier = String.valueOf(Smelting.vanillaXPBoostRank1Multiplier);
}
}

View File

@ -16,19 +16,19 @@ public class SmeltingVanillaXPEventHandler {
int skillLevel = manager.getSkillLevel();
if (skillLevel >= Smelting.vanillaXPBoostRank5Level) {
xpBoostModifier = 6;
xpBoostModifier = Smelting.vanillaXPBoostRank5Multiplier;
}
else if (skillLevel >= Smelting.vanillaXPBoostRank4Level) {
xpBoostModifier = 5;
xpBoostModifier = Smelting.vanillaXPBoostRank4Multiplier;
}
else if (skillLevel >= Smelting.vanillaXPBoostRank3Level) {
xpBoostModifier = 4;
xpBoostModifier = Smelting.vanillaXPBoostRank3Multiplier;
}
else if (skillLevel >= Smelting.vanillaXPBoostRank2Level) {
xpBoostModifier = 3;
xpBoostModifier = Smelting.vanillaXPBoostRank2Multiplier;
}
else {
xpBoostModifier = 2;
xpBoostModifier = Smelting.vanillaXPBoostRank1Multiplier;
}
}

View File

@ -195,6 +195,37 @@ Skills:
Rank_2: 50
Rank_1: 75
#
# Settings for Smelting
###
Smelting:
# FuelEfficiency_Multiplier: The furnace burn time will be multiplied by this value.
# FuelEfficiency_MaxBonusLevel: On this level, the efficiency multiplier will stop increasing
FuelEfficiency_Multiplier: 3.0
FuelEfficiency_MaxBonusLevel: 1000
# SecondSmelt_MaxBonusChance: Maximum chance of triggering Second Smelt
# SecondSmelt_MaxBonusLevel: On this level, the chance to cause Second Smelt will be SecondSmelt_MaxBonusChance
SecondSmelt_MaxBonusChance: 100
SecondSmelt_MaxBonusLevel: 1000
# FluxMining_UnlockLevel: Level when Flux Mining becomes available
# FluxMining_Chance: Chance for Flux Mining to activate
FluxMining_UnlockLevel: 250
FluxMining_Chance: 33.0
# These are the levels at which each progressive level of Vanilla XP Boost unlocks.
VanillaXPBoost_Rank1Level: 100
VanillaXPBoost_Rank2Level: 300
VanillaXPBoost_Rank3Level: 500
VanillaXPBoost_Rank4Level: 700
VanillaXPBoost_Rank5Level: 900
# These are the multipliers for each rank.
VanillaXPBoost_Rank1Multiplier: 2
VanillaXPBoost_Rank2Multiplier: 3
VanillaXPBoost_Rank3Multiplier: 4
VanillaXPBoost_Rank4Multiplier: 5
VanillaXPBoost_Rank5Multiplier: 6
#
# Settings for Swords
###
Swords: