diff --git a/CalamityConfig.cs b/CalamityConfig.cs index a5dfabdaa3..9b8b7cde87 100644 --- a/CalamityConfig.cs +++ b/CalamityConfig.cs @@ -223,6 +223,12 @@ namespace CalamityMod [Tooltip("$Mods.CalamityMod.Config.EntryTooltip.BossZen")] public bool BossZen { get; set; } + [Label("$Mods.CalamityMod.Config.EntryTitle.PotionSelling")] + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(true)] + [Tooltip("$Mods.CalamityMod.Config.EntryTooltip.PotionSelling")] + public bool PotionSelling { get; set; } + [Label("$Mods.CalamityMod.Config.EntryTitle.TownNPCsSpawnAtNight")] [BackgroundColor(192, 54, 64, 192)] [DefaultValue(false)] @@ -425,6 +431,7 @@ namespace CalamityMod new("RemoveReforgeRNG", ItemID.TinHammer), new("EarlyHardmodeProgressionRework", ItemID.Pwnhammer), new("BossZen", ModContent.ItemType()), + new("PotionSelling", ItemID.SpelunkerPotion), new("TownNPCsSpawnAtNight", ItemID.ClothierVoodooDoll), new("TownNPCSpawnRateMultiplier", ItemID.GuideVoodooDoll), new("BossHealthBoost", ItemID.LifeCrystal), diff --git a/Localization/enUS.hjson b/Localization/enUS.hjson index 753cd9e2d4..d27b415217 100644 --- a/Localization/enUS.hjson +++ b/Localization/enUS.hjson @@ -58,6 +58,7 @@ Config: "StealthMeterPosY": "Stealth Meter Y Position", "SulphuricWaterMeterPosX": "Sulphuric Water Poison Meter X Position", "SulphuricWaterMeterPosY": "Sulphuric Water Poison Meter Y Position", + "PotionSelling": "Town NPC Potion Selling", "TownNPCSpawnRateMultiplier": "Town NPC Spawn Rate Multiplier", "TownNPCsSpawnAtNight": "Town NPCs Spawn at Night", "VanillaCooldownDisplay": "Display Vanilla Cooldowns", @@ -106,6 +107,7 @@ Config: "StealthMeterPosY": "The Y position of the Stealth Meter, measured as a % of your screen height.\nThe meter can be dragged with the mouse if Lock Meter Positions is disabled.", "SulphuricWaterMeterPosX": "The X position of the Sulphuric Water Poison Meter, measured as a % of your screen width.\nThe meter can be dragged with the mouse if Lock Meter Positions is disabled.", "SulphuricWaterMeterPosY": "The Y position of the Sulphuric Water Poison Meter, measured as a % of your screen height.\nThe meter can be dragged with the mouse if Lock Meter Positions is disabled.", + "PotionSelling": "Allows town NPCs to sell various potions.\nCertain potions are sold after specific bosses have been defeated.", "TownNPCSpawnRateMultiplier": "Directly multiply the rate at which town NPCs spawn and respawn.\nThis reduces waiting times if a boss or event wipes your whole town.", "TownNPCsSpawnAtNight": "When enabled, town NPCs can spawn and respawn at night.\nThis includes the Old Man.", "VanillaCooldownDisplay": "Adds the vanilla debuffs Potion Sickness and Chaos State to the Cooldown Rack.\nThis doesn't remove them from your buff list, but can help with visibility nontheless", diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 0bccc80db1..ab32c75a00 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -1525,12 +1525,12 @@ namespace CalamityMod.NPCs if (type == NPCID.Merchant) { - SetShopItem(ref shop, ref nextSlot, ItemID.Bottle, true, Item.buyPrice(0, 0, 0, 20)); - SetShopItem(ref shop, ref nextSlot, ItemID.WormholePotion, true, Item.buyPrice(0, 0, 25, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.ArcheryPotion, NPC.downedBoss1, Item.buyPrice(0, goldCost, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.HealingPotion, NPC.downedBoss2); - SetShopItem(ref shop, ref nextSlot, ItemID.ManaPotion, NPC.downedBoss2); - SetShopItem(ref shop, ref nextSlot, ItemID.TitanPotion, NPC.downedBoss3, Item.buyPrice(0, 2, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.Bottle, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, 0, 0, 20)); + SetShopItem(ref shop, ref nextSlot, ItemID.WormholePotion, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, 0, 25, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.ArcheryPotion, CalamityConfig.Instance.PotionSelling && NPC.downedBoss1, Item.buyPrice(0, goldCost, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.HealingPotion, CalamityConfig.Instance.PotionSelling && NPC.downedBoss2); + SetShopItem(ref shop, ref nextSlot, ItemID.ManaPotion, CalamityConfig.Instance.PotionSelling && NPC.downedBoss2); + SetShopItem(ref shop, ref nextSlot, ItemID.TitanPotion, CalamityConfig.Instance.PotionSelling && NPC.downedBoss3, Item.buyPrice(0, 2, 0, 0)); SetShopItem(ref shop, ref nextSlot, ItemID.Flare, (Main.LocalPlayer.HasItem(ItemType()) || Main.LocalPlayer.HasItem(ItemType())) && !Main.LocalPlayer.HasItem(ItemID.FlareGun)); SetShopItem(ref shop, ref nextSlot, ItemID.BlueFlare, (Main.LocalPlayer.HasItem(ItemType()) || Main.LocalPlayer.HasItem(ItemType())) && !Main.LocalPlayer.HasItem(ItemID.FlareGun)); SetShopItem(ref shop, ref nextSlot, ItemID.ApprenticeBait, NPC.downedBoss1); @@ -1547,12 +1547,12 @@ namespace CalamityMod.NPCs if (type == NPCID.Demolitionist) { - SetShopItem(ref shop, ref nextSlot, ItemID.MiningPotion, NPC.downedBoss1, Item.buyPrice(0, 1, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.IronskinPotion, NPC.downedBoss1, Item.buyPrice(0, 1, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.ShinePotion, NPC.downedBoss1, Item.buyPrice(0, 1, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.SpelunkerPotion, NPC.downedBoss2, Item.buyPrice(0, 2, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.ObsidianSkinPotion, NPC.downedBoss3, Item.buyPrice(0, 2, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.EndurancePotion, NPC.downedBoss3, Item.buyPrice(0, goldCost, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.MiningPotion, CalamityConfig.Instance.PotionSelling && NPC.downedBoss1, Item.buyPrice(0, 1, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.IronskinPotion, CalamityConfig.Instance.PotionSelling && NPC.downedBoss1, Item.buyPrice(0, 1, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.ShinePotion, CalamityConfig.Instance.PotionSelling && NPC.downedBoss1, Item.buyPrice(0, 1, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.SpelunkerPotion, CalamityConfig.Instance.PotionSelling && NPC.downedBoss2, Item.buyPrice(0, 2, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.ObsidianSkinPotion, CalamityConfig.Instance.PotionSelling && NPC.downedBoss3, Item.buyPrice(0, 2, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.EndurancePotion, CalamityConfig.Instance.PotionSelling && NPC.downedBoss3, Item.buyPrice(0, goldCost, 0, 0)); } if (type == NPCID.ArmsDealer) @@ -1565,9 +1565,9 @@ namespace CalamityMod.NPCs SetShopItem(ref shop, ref nextSlot, ItemID.TacticalShotgun, NPC.downedGolemBoss, Item.buyPrice(gold: 60)); SetShopItem(ref shop, ref nextSlot, ItemID.SniperRifle, NPC.downedGolemBoss, Item.buyPrice(gold: 60)); SetShopItem(ref shop, ref nextSlot, ItemID.RifleScope, NPC.downedGolemBoss, Item.buyPrice(gold: 60)); - SetShopItem(ref shop, ref nextSlot, ItemID.AmmoReservationPotion, true, Item.buyPrice(0, 1, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.HunterPotion, true, Item.buyPrice(0, 2, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.BattlePotion, NPC.downedBoss2, Item.buyPrice(0, 2, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.AmmoReservationPotion, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, 1, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.HunterPotion, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, 2, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.BattlePotion, CalamityConfig.Instance.PotionSelling && NPC.downedBoss2, Item.buyPrice(0, 2, 0, 0)); } if (type == NPCID.Stylist) @@ -1589,10 +1589,10 @@ namespace CalamityMod.NPCs if (type == NPCID.Dryad) { - SetShopItem(ref shop, ref nextSlot, ItemID.ThornsPotion, true, Item.buyPrice(0, 1, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.FeatherfallPotion, true, Item.buyPrice(0, 1, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.RegenerationPotion, NPC.downedBoss2, Item.buyPrice(0, 2, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.SwiftnessPotion, NPC.downedBoss2, Item.buyPrice(0, goldCost, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.ThornsPotion, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, 1, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.FeatherfallPotion, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, 1, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.RegenerationPotion, CalamityConfig.Instance.PotionSelling && NPC.downedBoss2, Item.buyPrice(0, 2, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.SwiftnessPotion, CalamityConfig.Instance.PotionSelling && NPC.downedBoss2, Item.buyPrice(0, goldCost, 0, 0)); SetShopItem(ref shop, ref nextSlot, ItemID.JungleRose, price: Item.buyPrice(0, 2)); SetShopItem(ref shop, ref nextSlot, ItemID.NaturesGift, price: Item.buyPrice(0, 10)); SetShopItem(ref shop, ref nextSlot, ItemType()); @@ -1600,13 +1600,13 @@ namespace CalamityMod.NPCs if (type == NPCID.GoblinTinkerer) { - SetShopItem(ref shop, ref nextSlot, ItemID.StinkPotion, true, Item.buyPrice(0, 1, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.StinkPotion, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, 1, 0, 0)); SetShopItem(ref shop, ref nextSlot, ItemType()); } if (type == NPCID.Mechanic) { - SetShopItem(ref shop, ref nextSlot, ItemID.BuilderPotion, true, Item.buyPrice(0, 1, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.BuilderPotion, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, 1, 0, 0)); SetShopItem(ref shop, ref nextSlot, ItemID.CombatWrench, true, Item.buyPrice(0, 10, 0, 0)); } @@ -1635,10 +1635,10 @@ namespace CalamityMod.NPCs if (type == NPCID.Wizard) { - SetShopItem(ref shop, ref nextSlot, ItemID.ManaRegenerationPotion, true, Item.buyPrice(0, goldCost, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.MagicPowerPotion, true, Item.buyPrice(0, goldCost, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.GravitationPotion, true, Item.buyPrice(0, 2, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.PotionOfReturn, true, Item.buyPrice(0, goldCost, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.ManaRegenerationPotion, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, goldCost, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.MagicPowerPotion, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, goldCost, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.GravitationPotion, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, 2, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.PotionOfReturn, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, goldCost, 0, 0)); SetShopItem(ref shop, ref nextSlot, ItemType()); SetShopItem(ref shop, ref nextSlot, ItemID.MagicMissile, price: Item.buyPrice(0, 5)); SetShopItem(ref shop, ref nextSlot, ItemID.RodofDiscord, Main.hardMode && Main.LocalPlayer.ZoneHallow, price: Item.buyPrice(10)); @@ -1650,11 +1650,11 @@ namespace CalamityMod.NPCs if (type == NPCID.WitchDoctor) { - SetShopItem(ref shop, ref nextSlot, ItemID.SummoningPotion, true, Item.buyPrice(0, goldCost, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.CalmingPotion, true, Item.buyPrice(0, 1, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.RagePotion, true, Item.buyPrice(0, goldCost, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.WrathPotion, true, Item.buyPrice(0, goldCost, 0, 0)); - SetShopItem(ref shop, ref nextSlot, ItemID.InfernoPotion, true, Item.buyPrice(0, 2, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.SummoningPotion, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, goldCost, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.CalmingPotion, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, 1, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.RagePotion, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, goldCost, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.WrathPotion, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, goldCost, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.InfernoPotion, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, 2, 0, 0)); SetShopItem(ref shop, ref nextSlot, ItemType()); SetShopItem(ref shop, ref nextSlot, ItemType()); SetShopItem(ref shop, ref nextSlot, ItemType(), Main.hardMode); @@ -1664,7 +1664,7 @@ namespace CalamityMod.NPCs if (type == NPCID.PartyGirl) { - SetShopItem(ref shop, ref nextSlot, ItemID.GenderChangePotion, true, Item.buyPrice(0, 1, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.GenderChangePotion, CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, 1, 0, 0)); } if (type == NPCID.Princess) @@ -1674,7 +1674,7 @@ namespace CalamityMod.NPCs if (type == NPCID.SkeletonMerchant) { - SetShopItem(ref shop, ref nextSlot, ItemType(), true, Item.buyPrice(0, 0, 20, 0)); + SetShopItem(ref shop, ref nextSlot, ItemType(), CalamityConfig.Instance.PotionSelling, Item.buyPrice(0, 0, 20, 0)); SetShopItem(ref shop, ref nextSlot, ItemID.Marrow, Main.hardMode, Item.buyPrice(0, 36)); } } diff --git a/NPCs/TownNPCs/DILF.cs b/NPCs/TownNPCs/DILF.cs index 3dd5bc637d..4f959bc7dc 100644 --- a/NPCs/TownNPCs/DILF.cs +++ b/NPCs/TownNPCs/DILF.cs @@ -148,11 +148,6 @@ namespace CalamityMod.NPCs.TownNPCs public override void SetupShop(Chest shop, ref int nextSlot) { - shop.item[nextSlot].SetDefaults(ItemID.WarmthPotion); - shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 2, 0, 0); - if (Main.LocalPlayer.discount) - shop.item[nextSlot].shopCustomPrice = (int)(shop.item[nextSlot].shopCustomPrice * 0.8); - nextSlot++; shop.item[nextSlot].SetDefaults(ModContent.ItemType()); nextSlot++; shop.item[nextSlot].SetDefaults(ModContent.ItemType()); @@ -185,6 +180,14 @@ namespace CalamityMod.NPCs.TownNPCs } shop.item[nextSlot].SetDefaults(ModContent.ItemType()); nextSlot++; + if (CalamityConfig.Instance.PotionSelling) + { + shop.item[nextSlot].SetDefaults(ItemID.WarmthPotion); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 2, 0, 0); + if (Main.LocalPlayer.discount) + shop.item[nextSlot].shopCustomPrice = (int)(shop.item[nextSlot].shopCustomPrice * 0.8); + nextSlot++; + } shop.item[nextSlot].SetDefaults(ItemID.SuperManaPotion); nextSlot++; shop.item[nextSlot].SetDefaults(ModContent.ItemType()); diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index 58d45ccadc..82bace1d21 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -303,18 +303,21 @@ namespace CalamityMod.NPCs.TownNPCs public override void SetupShop(Chest shop, ref int nextSlot) //charges 50% extra than the original alcohol value { - shop.item[nextSlot].SetDefaults(ItemID.HeartreachPotion); - shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 2, 0, 0); - nextSlot++; + if (CalamityConfig.Instance.PotionSelling) + { + shop.item[nextSlot].SetDefaults(ItemID.HeartreachPotion); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 2, 0, 0); + nextSlot++; - shop.item[nextSlot].SetDefaults(ItemID.LifeforcePotion); - int goldCost = NPC.downedMoonlord ? 8 : 4; - shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, goldCost, 0, 0); - nextSlot++; + shop.item[nextSlot].SetDefaults(ItemID.LifeforcePotion); + int goldCost = NPC.downedMoonlord ? 8 : 4; + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, goldCost, 0, 0); + nextSlot++; - shop.item[nextSlot].SetDefaults(ItemID.LovePotion); - shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0); - nextSlot++; + shop.item[nextSlot].SetDefaults(ItemID.LovePotion); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0); + nextSlot++; + } shop.item[nextSlot].SetDefaults(ModContent.ItemType()); shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 0, 30, 0); diff --git a/NPCs/TownNPCs/SEAHOE.cs b/NPCs/TownNPCs/SEAHOE.cs index e26d85f259..2b6937a398 100644 --- a/NPCs/TownNPCs/SEAHOE.cs +++ b/NPCs/TownNPCs/SEAHOE.cs @@ -375,21 +375,24 @@ namespace CalamityMod.NPCs.TownNPCs nextSlot++; shop.item[nextSlot].SetDefaults(ModContent.ItemType()); nextSlot++; - shop.item[nextSlot].SetDefaults(ItemID.GillsPotion); - shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0); - if (Main.LocalPlayer.discount) - shop.item[nextSlot].shopCustomPrice = (int)(shop.item[nextSlot].shopCustomPrice * 0.8); - nextSlot++; - shop.item[nextSlot].SetDefaults(ItemID.WaterWalkingPotion); - shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0); - if (Main.LocalPlayer.discount) - shop.item[nextSlot].shopCustomPrice = (int)(shop.item[nextSlot].shopCustomPrice * 0.8); - nextSlot++; - shop.item[nextSlot].SetDefaults(ItemID.FlipperPotion); - shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0); - if (Main.LocalPlayer.discount) - shop.item[nextSlot].shopCustomPrice = (int)(shop.item[nextSlot].shopCustomPrice * 0.8); - nextSlot++; + if (CalamityConfig.Instance.PotionSelling) + { + shop.item[nextSlot].SetDefaults(ItemID.GillsPotion); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0); + if (Main.LocalPlayer.discount) + shop.item[nextSlot].shopCustomPrice = (int)(shop.item[nextSlot].shopCustomPrice * 0.8); + nextSlot++; + shop.item[nextSlot].SetDefaults(ItemID.WaterWalkingPotion); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0); + if (Main.LocalPlayer.discount) + shop.item[nextSlot].shopCustomPrice = (int)(shop.item[nextSlot].shopCustomPrice * 0.8); + nextSlot++; + shop.item[nextSlot].SetDefaults(ItemID.FlipperPotion); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0); + if (Main.LocalPlayer.discount) + shop.item[nextSlot].shopCustomPrice = (int)(shop.item[nextSlot].shopCustomPrice * 0.8); + nextSlot++; + } if (Main.hardMode) { shop.item[nextSlot].SetDefaults(ItemID.TruffleWorm); diff --git a/NPCs/TownNPCs/THIEF.cs b/NPCs/TownNPCs/THIEF.cs index ac4ce8bc54..484899cb9b 100644 --- a/NPCs/TownNPCs/THIEF.cs +++ b/NPCs/TownNPCs/THIEF.cs @@ -289,15 +289,18 @@ namespace CalamityMod.NPCs.TownNPCs nextSlot++; shop.item[nextSlot].SetDefaults(ItemID.TigerClimbingGear); nextSlot++; - shop.item[nextSlot].SetDefaults(ItemID.InvisibilityPotion); - shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0); - nextSlot++; - shop.item[nextSlot].SetDefaults(ItemID.NightOwlPotion); - shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0); - nextSlot++; - shop.item[nextSlot].SetDefaults(ItemID.TrapsightPotion); - shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0); - nextSlot++; + if (CalamityConfig.Instance.PotionSelling) + { + shop.item[nextSlot].SetDefaults(ItemID.InvisibilityPotion); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0); + nextSlot++; + shop.item[nextSlot].SetDefaults(ItemID.NightOwlPotion); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0); + nextSlot++; + shop.item[nextSlot].SetDefaults(ItemID.TrapsightPotion); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0); + nextSlot++; + } if (Main.hardMode) { shop.item[nextSlot].SetDefaults(ModContent.ItemType());