From e228983eb73255b186fd94caa67953f6085ea736 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Thu, 29 Jun 2023 13:57:20 -0500 Subject: [PATCH] 1 - Angling Kit drop adjustments. 2 - Removed most potion selling. --- .../MiscGrabBags/BleachedAnglingKit.cs | 28 ++++-------------- .../MiscGrabBags/SandyAnglingKit.cs | 26 ++++------------- NPCs/CalamityGlobalTownNPC.cs | 29 ++----------------- NPCs/TownNPCs/DILF.cs | 1 - NPCs/TownNPCs/FAP.cs | 20 +------------ NPCs/TownNPCs/SEAHOE.cs | 4 --- NPCs/TownNPCs/THIEF.cs | 1 - 7 files changed, 16 insertions(+), 93 deletions(-) diff --git a/Items/TreasureBags/MiscGrabBags/BleachedAnglingKit.cs b/Items/TreasureBags/MiscGrabBags/BleachedAnglingKit.cs index 8e76345408..b9217b7821 100644 --- a/Items/TreasureBags/MiscGrabBags/BleachedAnglingKit.cs +++ b/Items/TreasureBags/MiscGrabBags/BleachedAnglingKit.cs @@ -34,37 +34,21 @@ namespace CalamityMod.Items.TreasureBags.MiscGrabBags { // Different drop rates on Normal and Expert, so define normal first, then expert var normalOnly = itemLoot.DefineNormalOnlyDropSet(); - normalOnly.Add(ItemID.AnglerTackleBag, 72); - normalOnly.Add(ItemID.HighTestFishingLine, 48); - normalOnly.Add(ItemID.TackleBox, 48); - normalOnly.Add(ItemID.AnglerEarring, 48); - normalOnly.Add(ItemID.FishermansGuide, 36); - normalOnly.Add(ItemID.WeatherRadio, 36); - normalOnly.Add(ItemID.Sextant, 36); - normalOnly.Add(ItemID.AnglerHat, 16); - normalOnly.Add(ItemID.AnglerVest, 16); - normalOnly.Add(ItemID.AnglerPants, 16); + normalOnly.Add(ItemID.FishermansGuide, 18); + normalOnly.Add(ItemID.WeatherRadio, 18); + normalOnly.Add(ItemID.Sextant, 18); normalOnly.Add(ItemID.FishingPotion, 3, 2, 3); normalOnly.Add(ItemID.SonarPotion, 3, 2, 3); normalOnly.Add(ItemID.CratePotion, 3, 2, 3); - normalOnly.Add(ItemID.GoldenBugNet, 60); normalOnly.Add(ItemID.GoldCoin, 1, 3, 4); var expertPlus = itemLoot.DefineConditionalDropSet(new Conditions.IsExpert()); - expertPlus.Add(ItemID.AnglerTackleBag, 58); - expertPlus.Add(ItemID.HighTestFishingLine, 38); - expertPlus.Add(ItemID.TackleBox, 38); - expertPlus.Add(ItemID.AnglerEarring, 38); - expertPlus.Add(ItemID.FishermansGuide, 28); - expertPlus.Add(ItemID.WeatherRadio, 28); - expertPlus.Add(ItemID.Sextant, 28); - expertPlus.Add(ItemID.AnglerHat, 12); - expertPlus.Add(ItemID.AnglerVest, 12); - expertPlus.Add(ItemID.AnglerPants, 12); + expertPlus.Add(ItemID.FishermansGuide, 14); + expertPlus.Add(ItemID.WeatherRadio, 14); + expertPlus.Add(ItemID.Sextant, 14); expertPlus.Add(ItemID.FishingPotion, 2, 2, 3); expertPlus.Add(ItemID.SonarPotion, 2, 2, 3); expertPlus.Add(ItemID.CratePotion, 2, 2, 3); - expertPlus.Add(ItemID.GoldenBugNet, 48); expertPlus.Add(ItemID.GoldCoin, 1, 4, 5); } } diff --git a/Items/TreasureBags/MiscGrabBags/SandyAnglingKit.cs b/Items/TreasureBags/MiscGrabBags/SandyAnglingKit.cs index 755137f377..1ebaa2977e 100644 --- a/Items/TreasureBags/MiscGrabBags/SandyAnglingKit.cs +++ b/Items/TreasureBags/MiscGrabBags/SandyAnglingKit.cs @@ -33,35 +33,21 @@ namespace CalamityMod.Items.TreasureBags.MiscGrabBags { // Different drop rates on Normal and Expert, so define normal first, then expert var normalOnly = itemLoot.DefineNormalOnlyDropSet(); - normalOnly.Add(ItemID.HighTestFishingLine, 60); - normalOnly.Add(ItemID.TackleBox, 60); - normalOnly.Add(ItemID.AnglerEarring, 60); - normalOnly.Add(ItemID.FishermansGuide, 40); - normalOnly.Add(ItemID.WeatherRadio, 40); - normalOnly.Add(ItemID.Sextant, 40); - normalOnly.Add(ItemID.AnglerHat, 20); - normalOnly.Add(ItemID.AnglerVest, 20); - normalOnly.Add(ItemID.AnglerPants, 20); + normalOnly.Add(ItemID.FishermansGuide, 20); + normalOnly.Add(ItemID.WeatherRadio, 20); + normalOnly.Add(ItemID.Sextant, 20); normalOnly.Add(ItemID.FishingPotion, 3, 2, 3); normalOnly.Add(ItemID.SonarPotion, 3, 2, 3); normalOnly.Add(ItemID.CratePotion, 3, 2, 3); - normalOnly.AddIf(() => NPC.downedBoss3, ItemID.GoldenBugNet, 80); normalOnly.Add(ItemID.GoldCoin, 1, 1, 2); var expertPlus = itemLoot.DefineConditionalDropSet(new Conditions.IsExpert()); - expertPlus.Add(ItemID.HighTestFishingLine, 48); - expertPlus.Add(ItemID.TackleBox, 48); - expertPlus.Add(ItemID.AnglerEarring, 48); - expertPlus.Add(ItemID.FishermansGuide, 32); - expertPlus.Add(ItemID.WeatherRadio, 32); - expertPlus.Add(ItemID.Sextant, 32); - expertPlus.Add(ItemID.AnglerHat, 16); - expertPlus.Add(ItemID.AnglerVest, 16); - expertPlus.Add(ItemID.AnglerPants, 16); + expertPlus.Add(ItemID.FishermansGuide, 16); + expertPlus.Add(ItemID.WeatherRadio, 16); + expertPlus.Add(ItemID.Sextant, 16); expertPlus.Add(ItemID.FishingPotion, 2, 2, 3); expertPlus.Add(ItemID.SonarPotion, 2, 2, 3); expertPlus.Add(ItemID.CratePotion, 2, 2, 3); - expertPlus.AddIf(() => NPC.downedBoss3, ItemID.GoldenBugNet, 64); expertPlus.Add(ItemID.GoldCoin, 1, 2, 3); } } diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 2c6292fd2d..73d7af491c 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -1284,7 +1284,6 @@ namespace CalamityMod.NPCs AddScalingPotion(ref shop, ItemID.ArcheryPotion, Condition.DownedEyeOfCthulhu); shop.Add(ItemID.HealingPotion, potionSells, Condition.HappyEnough, Condition.DownedEowOrBoc) .Add(ItemID.ManaPotion, potionSells, Condition.HappyEnough, Condition.DownedEowOrBoc) - .AddWithCustomValue(ItemID.TitanPotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough, Condition.DownedSkeletron) .Add(ItemID.Flare, hasFlareGunUpgrade) .Add(ItemID.BlueFlare, hasFlareGunUpgrade) .Add(ItemID.ApprenticeBait, Condition.DownedEyeOfCthulhu) @@ -1304,13 +1303,6 @@ namespace CalamityMod.NPCs if (type == NPCID.Demolitionist) { - - shop.AddWithCustomValue(ItemID.MiningPotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough, Condition.DownedEyeOfCthulhu); - AddScalingPotion(ref shop, ItemID.IronskinPotion, Condition.DownedEyeOfCthulhu); - shop.AddWithCustomValue(ItemID.ShinePotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough, Condition.DownedEowOrBoc) - .AddWithCustomValue(ItemID.SpelunkerPotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough, Condition.DownedEowOrBoc) - .AddWithCustomValue(ItemID.ObsidianSkinPotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough, Condition.DownedSkeletron); - AddScalingPotion(ref shop, ItemID.EndurancePotion, Condition.DownedSkeletron); shop.Add(ModContent.ItemType(), Condition.DownedMechBossAny); } @@ -1323,10 +1315,7 @@ namespace CalamityMod.NPCs .AddWithCustomValue(ItemID.Uzi, Item.buyPrice(gold: 45), Condition.DownedPlantera) .AddWithCustomValue(ItemID.TacticalShotgun, Item.buyPrice(gold: 60), Condition.DownedGolem) .AddWithCustomValue(ItemID.SniperRifle, Item.buyPrice(gold: 60), Condition.DownedGolem) - .AddWithCustomValue(ItemID.RifleScope, Item.buyPrice(gold: 60), Condition.DownedGolem) - .AddWithCustomValue(ItemID.AmmoReservationPotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough) - .AddWithCustomValue(ItemID.HunterPotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough) - .AddWithCustomValue(ItemID.BattlePotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough, Condition.DownedEowOrBoc); + .AddWithCustomValue(ItemID.RifleScope, Item.buyPrice(gold: 60), Condition.DownedGolem); } if (type == NPCID.Stylist) @@ -1349,10 +1338,6 @@ namespace CalamityMod.NPCs if (type == NPCID.Dryad) { - shop.AddWithCustomValue(ItemID.ThornsPotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough) - .AddWithCustomValue(ItemID.FeatherfallPotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough) - .AddWithCustomValue(ItemID.RegenerationPotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough, Condition.DownedEowOrBoc); - AddScalingPotion(ref shop, ItemID.SwiftnessPotion, Condition.DownedEowOrBoc); shop.AddWithCustomValue(ItemID.JungleRose, Item.buyPrice(gold: 2)) .AddWithCustomValue(ItemID.NaturesGift, Item.buyPrice(gold: 10)) .Add(ItemType()) @@ -1397,10 +1382,7 @@ namespace CalamityMod.NPCs if (type == NPCID.Wizard) { - AddScalingPotion(ref shop, ItemID.ManaRegenerationPotion); - AddScalingPotion(ref shop, ItemID.MagicPowerPotion); - shop.AddWithCustomValue(ItemID.GravitationPotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough) - .Add(ItemType()) + shop.Add(ItemType()) .AddWithCustomValue(ItemID.MagicMissile, Item.buyPrice(gold: 5)) .AddWithCustomValue(ItemID.RodofDiscord, Item.buyPrice(gold: 10), Condition.Hardmode, Condition.InHallow) .AddWithCustomValue(ItemID.SpectreStaff, Item.buyPrice(gold: 25), Condition.DownedGolem) @@ -1411,12 +1393,7 @@ namespace CalamityMod.NPCs if (type == NPCID.WitchDoctor) { - AddScalingPotion(ref shop, ItemID.SummoningPotion); - shop.AddWithCustomValue(ItemID.CalmingPotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough); - AddScalingPotion(ref shop, ItemID.RagePotion); - AddScalingPotion(ref shop, ItemID.WrathPotion); - shop.AddWithCustomValue(ItemID.InfernoPotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough) - .Add(ItemType()) + shop.Add(ItemType()) .Add(ItemType()) .Add(ItemType(), Condition.Hardmode) .Add(ItemType(), Condition.Hardmode) diff --git a/NPCs/TownNPCs/DILF.cs b/NPCs/TownNPCs/DILF.cs index 6e7e895ad4..2768d78a9c 100644 --- a/NPCs/TownNPCs/DILF.cs +++ b/NPCs/TownNPCs/DILF.cs @@ -155,7 +155,6 @@ namespace CalamityMod.NPCs.TownNPCs .Add(ModContent.ItemType(), Condition.DownedEverscream, Condition.DownedSantaNK1, Condition.DownedIceQueen) .Add(ModContent.ItemType(), Condition.DownedEverscream, Condition.DownedSantaNK1, Condition.DownedIceQueen) .Add(ModContent.ItemType()) - .AddWithCustomValue(ItemID.WarmthPotion, Item.buyPrice(0, 4), potionSells, Condition.HappyEnough) .Add(ItemID.SuperManaPotion) .Add(ModContent.ItemType()) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(5)) diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index c65d86595e..0eeb74ae75 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -302,9 +302,7 @@ namespace CalamityMod.NPCs.TownNPCs Condition downedAureus = new("If Astrum Aureus has been defeated", () => DownedBossSystem.downedAstrumAureus); NPCShop shop = new(Type); - shop.AddWithCustomValue(ItemID.HeartreachPotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough) - .AddWithCustomValue(ItemID.LifeforcePotion, Item.buyPrice(gold: 8), potionSells, Condition.HappyEnough) - .AddWithCustomValue(ItemID.LovePotion, Item.buyPrice(silver: 25), potionSells, Condition.HappyEnough) + shop.AddWithCustomValue(ItemID.LovePotion, Item.buyPrice(silver: 25), potionSells, Condition.HappyEnough) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(silver: 30)) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 1)) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 2)) @@ -340,22 +338,6 @@ namespace CalamityMod.NPCs.TownNPCs .Register(); } - public override void ModifyActiveShop(string shopName, Item[] items) - { - foreach (Item i in items) - { - if (i == null || i.type == ItemID.None) - continue; - - // Double the price of Lifeforce Potion PML - if (i.type == ItemID.LifeforcePotion && NPC.downedMoonlord) - { - int oldValue = i.shopCustomPrice ?? i.value; - i.shopCustomPrice = oldValue * 2; - } - } - } - // Make this Town NPC teleport to the Queen statue when triggered. public override bool CanGoToStatue(bool toKingStatue) => !toKingStatue; diff --git a/NPCs/TownNPCs/SEAHOE.cs b/NPCs/TownNPCs/SEAHOE.cs index f0f73626aa..2bfcf36d6d 100644 --- a/NPCs/TownNPCs/SEAHOE.cs +++ b/NPCs/TownNPCs/SEAHOE.cs @@ -201,7 +201,6 @@ namespace CalamityMod.NPCs.TownNPCs } public override void AddShops() { - Condition potionSells = new("While the Town NPC Potion Selling configuration option is enabled", () => CalamityConfig.Instance.PotionSelling); Condition downedOldDuke = new("If The Old Duke has been defeated", () => DownedBossSystem.downedBoomerDuke); NPCShop shop = new(Type); @@ -214,9 +213,6 @@ namespace CalamityMod.NPCs.TownNPCs .Add(ModContent.ItemType()) .Add(ModContent.ItemType()) .Add(ModContent.ItemType()) - .AddWithCustomValue(ItemID.GillsPotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough) - .AddWithCustomValue(ItemID.WaterWalkingPotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough) - .AddWithCustomValue(ItemID.FlipperPotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough) .AddWithCustomValue(ItemID.TruffleWorm, Item.buyPrice(gold: 10), Condition.Hardmode) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(2), downedOldDuke) .AddWithCustomValue(ItemID.ShrimpPoBoy, Item.buyPrice(gold: 2, silver: 50), Condition.HappyEnough, Condition.InBeach) diff --git a/NPCs/TownNPCs/THIEF.cs b/NPCs/TownNPCs/THIEF.cs index 406a0f24d8..18c93cb361 100644 --- a/NPCs/TownNPCs/THIEF.cs +++ b/NPCs/TownNPCs/THIEF.cs @@ -273,7 +273,6 @@ namespace CalamityMod.NPCs.TownNPCs .Add(ItemID.TigerClimbingGear) .AddWithCustomValue(ItemID.InvisibilityPotion, Item.buyPrice(silver: 25), potionSells, Condition.HappyEnough) .AddWithCustomValue(ItemID.NightOwlPotion, Item.buyPrice(silver: 25), potionSells, Condition.HappyEnough) - .AddWithCustomValue(ItemID.TrapsightPotion, Item.buyPrice(gold: 4), potionSells, Condition.HappyEnough) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 25), Condition.Hardmode) .Add(ModContent.ItemType(), Condition.DownedPirates) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 60), Condition.DownedMechBossAll)