diff --git a/src/main/java/electroblob/wizardry/Settings.java b/src/main/java/electroblob/wizardry/Settings.java index 1996f08f..6f85bad5 100644 --- a/src/main/java/electroblob/wizardry/Settings.java +++ b/src/main/java/electroblob/wizardry/Settings.java @@ -283,6 +283,8 @@ public final class Settings { public int siphonManaPerLevel = 5; /** [Server-only] The number of ticks between each mana increase for wands with the condenser upgrade. */ public int condenserTickInterval = 50; + /** [Server-only] The number of spell slots a wand has with no attunement upgrades applied. */ + public int baseSpellSlots = 5; // Commands (these don't need synchronising since typing a command always queries the server). /** @@ -573,6 +575,8 @@ public final class Settings { electroblob.wizardry.constants.Constants.FROST_SLOWNESS_PER_LEVEL = (float) this.frostSlownessIncreasePerLevel; electroblob.wizardry.constants.Constants.SIPHON_MANA_PER_LEVEL = this.siphonManaPerLevel; electroblob.wizardry.constants.Constants.CONDENSER_TICK_INTERVAL = this.condenserTickInterval; + electroblob.wizardry.item.ItemWand.BASE_SPELL_SLOTS = this.baseSpellSlots; + electroblob.wizardry.data.WizardData.MAX_RECENT_SPELLS = this.baseSpellSlots; } void checkForRedundantOptions(String categoryName, Collection validKeys){ @@ -753,6 +757,13 @@ public final class Settings { condenserTickInterval = property.getInt(); propOrder.add(property.getName()); + property = config.get(GAMEPLAY_CATEGORY, "baseSpellSlots", 5, + "The number of spell slots a wand has with no attunement upgrades applied.", 1, 5); + property.setLanguageKey("config." + Wizardry.MODID + ".base_spell_slots"); + Wizardry.proxy.setToNumberSliderEntry(property); + baseSpellSlots = property.getInt(); + propOrder.add(property.getName()); + property = config.get(GAMEPLAY_CATEGORY, "playersMoveEachOther", true, "Whether to allow players to move other players around using magic."); property.setLanguageKey("config." + Wizardry.MODID + ".players_move_each_other"); diff --git a/src/main/java/electroblob/wizardry/data/WizardData.java b/src/main/java/electroblob/wizardry/data/WizardData.java index 40bb0a94..fc1f17d9 100644 --- a/src/main/java/electroblob/wizardry/data/WizardData.java +++ b/src/main/java/electroblob/wizardry/data/WizardData.java @@ -74,7 +74,7 @@ public class WizardData implements INBTSerializable { private static final Set storedVariables = new HashSet<>(); /** The maximum number of recent spells to track. */ - public static final int MAX_RECENT_SPELLS = ItemWand.BASE_SPELL_SLOTS; + public static int MAX_RECENT_SPELLS; private static final int IMBUEMENT_UPDATE_INTERVAL = 20; diff --git a/src/main/java/electroblob/wizardry/item/ItemWand.java b/src/main/java/electroblob/wizardry/item/ItemWand.java index 631b7173..b95bdff1 100644 --- a/src/main/java/electroblob/wizardry/item/ItemWand.java +++ b/src/main/java/electroblob/wizardry/item/ItemWand.java @@ -70,7 +70,7 @@ import java.util.Random; public class ItemWand extends Item implements IWorkbenchItem, ISpellCastingItem, IManaStoringItem { /** The number of spell slots a wand has with no attunement upgrades applied. */ - public static final int BASE_SPELL_SLOTS = 5; + public static int BASE_SPELL_SLOTS; /** The number of ticks between each time a continuous spell is added to the player's recently-cast spells. */ private static final int CONTINUOUS_TRACKING_INTERVAL = 20; diff --git a/src/main/resources/assets/ebwizardry/lang/en_us.lang b/src/main/resources/assets/ebwizardry/lang/en_us.lang index d508ebb8..a359baad 100644 --- a/src/main/resources/assets/ebwizardry/lang/en_us.lang +++ b/src/main/resources/assets/ebwizardry/lang/en_us.lang @@ -1555,6 +1555,8 @@ config.ebwizardry.siphon_mana_per_level=Siphon Mana Per Level config.ebwizardry.siphon_mana_per_level.tooltip=The amount of mana given for a kill for each level of siphon upgrade. config.ebwizardry.condenser_tick_interval=Condenser Tick Interval config.ebwizardry.condenser_tick_interval.tooltip=The number of ticks between each mana increase for wands with the condenser upgrade. +config.ebwizardry.base_spell_slots=Base Spell Slots +config.ebwizardry.base_spell_slots.tooltip=The number of spell slots a wand has with no attunement upgrades applied. config.ebwizardry.telekinetic_disarmament=Telekinetic Disarmament config.ebwizardry.telekinetic_disarmament.tooltip=Whether to allow players to disarm other players using the telekinesis spell. Disable to prevent stealing of items. config.ebwizardry.telekinetic_disarmament.true=Yes - let people steal things