diff --git a/src/main/java/electroblob/wizardry/Settings.java b/src/main/java/electroblob/wizardry/Settings.java index 6895f3dd..1018491e 100644 --- a/src/main/java/electroblob/wizardry/Settings.java +++ b/src/main/java/electroblob/wizardry/Settings.java @@ -156,6 +156,12 @@ public final class Settings { public Pair[] treeBlocks = parseItemMetaStrings(DEFAULT_TREE_BLOCKS); /** [Server-only] The chance for wizard towers to generate with an evil wizard and chest inside. */ public double evilWizardChance = 0.2; + public double cooldownReductionPerLevel = 0.15; + public double potencyIncreasePerTier = 0.15; + public double durationIncreasePerLevel = 0.25; + public double rangeIncreasePerLevel = 0.25; + public double blastIncreasePerLevel = 0.25; + public double frostSlownessIncreasePerLevel = 0.5; /** [Server-only] List of dimension ids in which to generate crystal ore. */ public int[] oreDimensions = {0}; /** [Server-only] List of dimension ids in which to generate crystal flowers. */ @@ -935,6 +941,50 @@ public final class Settings { } } + property = config.get(TWEAKS_CATEGORY, "cooldown_reduction_per_level", 0.15, + "The fraction by which cooldowns are reduced for each level of cooldown upgrade.", + 0.05, Integer.MAX_VALUE); // Sure, I mean you COULD set it to 2^31-1... what could possibly go wrong? + property.setLanguageKey("config." + Wizardry.MODID + ".cast_command_multiplier_limit"); + cooldownReductionPerLevel = property.getDouble(); + propOrder.add(property.getName()); + + property = config.get(TWEAKS_CATEGORY, "potency_increase_per_tier", 0.15, + "The fraction by which potency is increased for each tier of matching wand. May cause extreme lag with high values!", + 0.05, Integer.MAX_VALUE); + property.setLanguageKey("config." + Wizardry.MODID + ".potency_increase_per_tier"); + potencyIncreasePerTier = property.getDouble(); + propOrder.add(property.getName()); + + property = config.get(TWEAKS_CATEGORY, "duration_increase_per_level", 0.25, + "The fraction by which spell duration is increased for each level of duration upgrade.", + 0.05, Integer.MAX_VALUE); + property.setLanguageKey("config." + Wizardry.MODID + ".duration_increase_per_level"); + durationIncreasePerLevel = property.getDouble(); + propOrder.add(property.getName()); + + property = config.get(TWEAKS_CATEGORY, "range_increase_per_level", 0.25, + "The fraction by which spell range is increased for each level of range upgrade. May cause extreme lag with high values!", + 0.05, Integer.MAX_VALUE); + property.setLanguageKey("config." + Wizardry.MODID + ".range_increase_per_level"); + rangeIncreasePerLevel = property.getDouble(); + propOrder.add(property.getName()); + + property = config.get(TWEAKS_CATEGORY, "blast_increase_per_level", 0.25, + "The fraction by which spell blast is increased for each level of blast upgrade. May cause extreme lag with high values!", + 0.05, Integer.MAX_VALUE); + property.setLanguageKey("config." + Wizardry.MODID + ".blast_increase_per_level"); + blastIncreasePerLevel = property.getDouble(); + propOrder.add(property.getName()); + + + property = config.get(TWEAKS_CATEGORY, "frost_slowness_increase_per_level", 0.5, + "The fraction by which movement speed is reduced per level of frost effect.", + 0.05, Integer.MAX_VALUE); + property.setLanguageKey("config." + Wizardry.MODID + ".frost_slowness_increase_per_level"); + frostSlownessIncreasePerLevel = property.getDouble(); + propOrder.add(property.getName()); + + checkForRedundantOptions(TWEAKS_CATEGORY, propOrder); // Must be before the order is set! config.setCategoryPropertyOrder(TWEAKS_CATEGORY, propOrder); diff --git a/src/main/java/electroblob/wizardry/constants/Constants.java b/src/main/java/electroblob/wizardry/constants/Constants.java index c6e6e426..0a6d922e 100644 --- a/src/main/java/electroblob/wizardry/constants/Constants.java +++ b/src/main/java/electroblob/wizardry/constants/Constants.java @@ -1,5 +1,6 @@ package electroblob.wizardry.constants; +import electroblob.wizardry.Wizardry; import electroblob.wizardry.WizardryEventHandler; /** Stores various global constants used in Wizardry. */ @@ -17,17 +18,17 @@ public final class Constants { /** The bonus amount of wand upgrades that can be applied to a non-elemental wand. */ public static final int NON_ELEMENTAL_UPGRADE_BONUS = 3; /** The fraction by which cooldowns are reduced for each level of cooldown upgrade. */ - public static final float COOLDOWN_REDUCTION_PER_LEVEL = 0.15f; + public static float COOLDOWN_REDUCTION_PER_LEVEL = 0.15f; /** The fraction by which maximum charge is increased for each level of storage upgrade. */ public static final float STORAGE_INCREASE_PER_LEVEL = 0.15f; /** The fraction by which potency is increased for each tier of matching wand. */ - public static final float POTENCY_INCREASE_PER_TIER = 0.15f; + public static float POTENCY_INCREASE_PER_TIER = 0.15f; /** The fraction by which spell duration is increased for each level of duration upgrade. */ - public static final float DURATION_INCREASE_PER_LEVEL = 0.25f; + public static float DURATION_INCREASE_PER_LEVEL = 0.25f; /** The fraction by which spell range is increased for each level of range upgrade. */ - public static final float RANGE_INCREASE_PER_LEVEL = 0.25f; + public static float RANGE_INCREASE_PER_LEVEL = 0.25f; /** The fraction by which spell blast radius is increased for each level of range upgrade. */ - public static final float BLAST_RADIUS_INCREASE_PER_LEVEL = 0.25f; + public static float BLAST_RADIUS_INCREASE_PER_LEVEL = 0.25f; /** The fraction by which movement speed is reduced per level of frost effect. */ public static final double FROST_SLOWNESS_PER_LEVEL = 0.5; /** The fraction by which movement speed is reduced per level of decay effect. */ @@ -47,4 +48,14 @@ public final class Constants { */ public static final int DECAY_SPREAD_INTERVAL = 8; + + // making this as an update to the existing values to not break addons directly relying on the fields + static { + POTENCY_INCREASE_PER_TIER = (float) Wizardry.settings.potencyIncreasePerTier; + COOLDOWN_REDUCTION_PER_LEVEL = (float) Wizardry.settings.cooldownReductionPerLevel; + DURATION_INCREASE_PER_LEVEL = (float) Wizardry.settings.durationIncreasePerLevel; + RANGE_INCREASE_PER_LEVEL = (float) Wizardry.settings.rangeIncreasePerLevel; + BLAST_RADIUS_INCREASE_PER_LEVEL = (float) Wizardry.settings.blastIncreasePerLevel; + RANGE_INCREASE_PER_LEVEL = (float) Wizardry.settings.frostSlownessIncreasePerLevel; + } } diff --git a/src/main/resources/assets/ebwizardry/lang/en_us.lang b/src/main/resources/assets/ebwizardry/lang/en_us.lang index 36fa9134..ba49f0b4 100644 --- a/src/main/resources/assets/ebwizardry/lang/en_us.lang +++ b/src/main/resources/assets/ebwizardry/lang/en_us.lang @@ -1532,6 +1532,18 @@ config.ebwizardry.bonemeal_grows_crystal_flowers=Bonemeal Grows Crystal Flowers config.ebwizardry.bonemeal_grows_crystal_flowers.tooltip=Whether using bonemeal on grass blocks has a chance to grow crystal flowers. config.ebwizardry.wands_must_be_held_to_decrement_cooldown=Wands Must Be Held To Decrement Cooldown config.ebwizardry.wands_must_be_held_to_decrement_cooldown.tooltip=Whether wands only decrement their cooldowns if a player holds them. +config.ebwizardry.cooldown_reduction_per_level=Cooldown Reduction Per Level +config.ebwizardry.cooldown_reduction_per_level.tooltip=The fraction by which cooldowns are reduced for each level of cooldown upgrade. +config.ebwizardry.potency_increase_per_tier=Potency Increase Per Tier +config.ebwizardry.potency_increase_per_tier.tooltip=The fraction by which potency is increased for each tier of matching wand. May cause extreme lag with high values! +config.ebwizardry.duration_increase_per_level=Duration Increase Per Level +config.ebwizardry.duration_increase_per_level.tooltip=The fraction by which spell duration is increased for each level of duration upgrade. +config.ebwizardry.range_increase_per_level=Range Increase Per Level +config.ebwizardry.range_increase_per_level.tooltip=The fraction by which spell range is increased for each level of range upgrade. May cause extreme lag with high values! +config.ebwizardry.blast_increase_per_level=Blast Increase Per Level +config.ebwizardry.blast_increase_per_level.tooltip=The fraction by which spell blast is increased for each level of blast upgrade. May cause extreme lag with high values! +config.ebwizardry.frost_slowness_increase_per_level=Frost Slowness Increase Per Level +config.ebwizardry.frost_slowness_increase_per_level.tooltip=The fraction by which movement speed is reduced per level of frost effect. config.ebwizardry.category.difficulty=Difficulty Settings config.ebwizardry.category.difficulty.tooltip=Configure wizardry's difficulty