diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index e0f4cd83d9..b27286e1b0 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -68,7 +68,7 @@ namespace CalamityMod.NPCs.AquaticScourge if (CalamityWorld.LegendaryMode) NPC.lifeMax *= 2; NPC.knockBackResist = 0f; - NPC.value = Item.buyPrice(0, 16, 0, 0); + NPC.value = Item.buyPrice(gold: 12); NPC.behindTiles = true; NPC.chaseable = false; NPC.noGravity = true; diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index 1c9e667883..e763e953a1 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -103,7 +103,7 @@ namespace CalamityMod.NPCs.AstrumAureus NPC.aiStyle = -1; AIType = -1; NPC.knockBackResist = 0f; - NPC.value = Item.buyPrice(0, 25, 0, 0); + NPC.value = Item.buyPrice(gold: 15); NPC.boss = true; NPC.DeathSound = DeathSound; NPC.Calamity().VulnerableToHeat = true; diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index a1dcd445a8..ef457e55a0 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -98,7 +98,7 @@ namespace CalamityMod.NPCs.AstrumDeus NPC.boss = true; NPC.BossBar = ModContent.GetInstance(); - NPC.value = Item.buyPrice(0, 50, 0, 0); + NPC.value = Item.buyPrice(gold: 50); NPC.alpha = 255; NPC.behindTiles = true; NPC.noGravity = true; diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index 2e544b9c1d..04643f9cb1 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -72,7 +72,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental NPC.width = 100; NPC.height = 150; NPC.defense = 15; - NPC.value = Item.buyPrice(0, 16, 0, 0); + NPC.value = Item.buyPrice(gold: 12); NPC.LifeMaxNERB(41000, 49200, 500000); NPC.DR_NERD(0.2f); NPC.knockBackResist = 0f; diff --git a/NPCs/CalClone/CalamitasClone.cs b/NPCs/CalClone/CalamitasClone.cs index 7f4eff2654..42adb9dc50 100644 --- a/NPCs/CalClone/CalamitasClone.cs +++ b/NPCs/CalClone/CalamitasClone.cs @@ -73,7 +73,7 @@ namespace CalamityMod.NPCs.CalClone NPC.scale *= 0.8f; NPC.defense = 25; - NPC.value = Item.buyPrice(0, 20, 0, 0); + NPC.value = Item.buyPrice(gold: 15); NPC.LifeMaxNERB(39000, 46875, 520000); NPC.aiStyle = -1; AIType = -1; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index e94414509d..74554f3e29 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1557,8 +1557,6 @@ namespace CalamityMod.NPCs if (BossRushEvent.BossRushActive) BossRushStatChanges(npc, Mod); - BossValueChanges(npc); - if (CalamityWorld.revenge) RevDeathStatChanges(npc, Mod); @@ -1695,16 +1693,6 @@ namespace CalamityMod.NPCs } #endregion - #region Boss Value Changes - private void BossValueChanges(NPC npc) - { - if (BossValueDict.TryGet(npc.type, out var value)) - { - npc.value = value; - } - } - #endregion - #region Revengeance and Death Mode Stat Changes private void RevDeathStatChanges(NPC npc, Mod mod) { diff --git a/NPCs/Crabulon/Crabulon.cs b/NPCs/Crabulon/Crabulon.cs index 9f15b00127..bb0e496fd7 100644 --- a/NPCs/Crabulon/Crabulon.cs +++ b/NPCs/Crabulon/Crabulon.cs @@ -88,7 +88,7 @@ namespace CalamityMod.NPCs.Crabulon NPC.noTileCollide = false; NPC.boss = true; NPC.knockBackResist = 0f; - NPC.value = Item.buyPrice(0, 5, 0, 0); + NPC.value = Item.buyPrice(gold: 5); NPC.HitSound = HitSound; NPC.DeathSound = DeathSound; NPC.Calamity().VulnerableToHeat = true; diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index 06023f7ed4..a0b4654f83 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -102,7 +102,7 @@ namespace CalamityMod.NPCs.Cryogen NPC.aiStyle = -1; AIType = -1; NPC.knockBackResist = 0f; - NPC.value = Item.buyPrice(0, 16, 0, 0); + NPC.value = Item.buyPrice(gold: 6); NPC.boss = true; NPC.BossBar = ModContent.GetInstance(); NPC.noGravity = true; diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index dc6f2e09ea..1dac4d20e7 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -100,7 +100,7 @@ namespace CalamityMod.NPCs.DesertScourge AIType = -1; NPC.knockBackResist = 0f; NPC.boss = true; - NPC.value = Item.buyPrice(0, 2, 0, 0); + NPC.value = Item.buyPrice(gold: 1); NPC.alpha = 255; NPC.behindTiles = true; NPC.noGravity = true; diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index b010fd6fc2..1b0b104adb 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -151,7 +151,7 @@ namespace CalamityMod.NPCs.HiveMind NPC.aiStyle = -1; AIType = -1; NPC.knockBackResist = 0f; - NPC.value = Item.buyPrice(0, 8, 0, 0); + NPC.value = Item.buyPrice(gold: 5); NPC.boss = true; NPC.HitSound = SoundID.NPCHit1; NPC.DeathSound = SoundID.NPCDeath1; diff --git a/NPCs/Leviathan/Anahita.cs b/NPCs/Leviathan/Anahita.cs index 454cfa8f41..860b96950a 100644 --- a/NPCs/Leviathan/Anahita.cs +++ b/NPCs/Leviathan/Anahita.cs @@ -73,7 +73,7 @@ namespace CalamityMod.NPCs.Leviathan AIType = -1; NPC.boss = true; NPC.BossBar = ModContent.GetInstance(); - NPC.value = Item.buyPrice(0, 12, 50, 0); + NPC.value = Item.buyPrice(gold: 7, silver: 50); NPC.noGravity = true; NPC.noTileCollide = true; NPC.HitSound = HitSound; diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index a031c11e5f..78c72865ab 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -71,7 +71,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.aiStyle = -1; AIType = -1; NPC.Opacity = 0f; - NPC.value = Item.buyPrice(0, 12, 50, 0); + NPC.value = Item.buyPrice(gold: 7, silver: 50); NPC.HitSound = SoundID.NPCHit56; NPC.DeathSound = SoundID.NPCDeath60; NPC.noTileCollide = true; diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 35876de3ff..798ee21b20 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -75,7 +75,7 @@ namespace CalamityMod.NPCs.Perforator NPC.aiStyle = -1; AIType = -1; NPC.knockBackResist = 0f; - NPC.value = Item.buyPrice(0, 8, 0, 0); + NPC.value = Item.buyPrice(gold: 5); NPC.boss = true; NPC.noGravity = true; NPC.noTileCollide = true; diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 652243aaa9..3eb7a1b5f9 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -98,7 +98,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath NPC.aiStyle = -1; AIType = -1; NPC.boss = true; - NPC.value = Item.buyPrice(0, 30, 0, 0); + NPC.value = Item.buyPrice(gold: 25); NPC.noGravity = true; NPC.noTileCollide = true; NPC.HitSound = SoundID.NPCHit4; diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 200da5f0c8..cf399c21ed 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -80,7 +80,7 @@ namespace CalamityMod.NPCs.Ravager NPC.width = 332; NPC.height = 214; NPC.defense = 55; - NPC.value = Item.buyPrice(0, 30, 0, 0); + NPC.value = Item.buyPrice(gold: 25); NPC.DR_NERD(0.35f); NPC.LifeMaxNERB(45000, 54000, 460000); if (DownedBossSystem.downedProvidence && !BossRushEvent.BossRushActive) @@ -88,7 +88,7 @@ namespace CalamityMod.NPCs.Ravager NPC.damage = (int)(NPC.damage * 1.5); NPC.defense *= 2; NPC.lifeMax *= 4; - NPC.value *= 3f; + NPC.value *= 4f; } NPC.knockBackResist = 0f; AIType = -1; diff --git a/NPCs/SlimeGod/SplitCrimulanPaladin.cs b/NPCs/SlimeGod/SplitCrimulanPaladin.cs index 42c34c95c1..035d46262b 100644 --- a/NPCs/SlimeGod/SplitCrimulanPaladin.cs +++ b/NPCs/SlimeGod/SplitCrimulanPaladin.cs @@ -47,7 +47,7 @@ namespace CalamityMod.NPCs.SlimeGod NPC.height = Height; NPC.defense = 10; NPC.knockBackResist = 0f; - NPC.value = Item.buyPrice(0, 1, 0, 0); + NPC.value = Item.buyPrice(gold: 1); NPC.Opacity = 1f; NPC.lavaImmune = false; NPC.noGravity = false; diff --git a/NPCs/SlimeGod/SplitEbonianPaladin.cs b/NPCs/SlimeGod/SplitEbonianPaladin.cs index 5ec2ecb787..c8e2cc3210 100644 --- a/NPCs/SlimeGod/SplitEbonianPaladin.cs +++ b/NPCs/SlimeGod/SplitEbonianPaladin.cs @@ -49,7 +49,7 @@ namespace CalamityMod.NPCs.SlimeGod NPC.aiStyle = -1; AIType = -1; NPC.knockBackResist = 0f; - NPC.value = Item.buyPrice(0, 1, 0, 0); + NPC.value = Item.buyPrice(gold: 1); NPC.Opacity = 1f; NPC.lavaImmune = false; NPC.noGravity = false; diff --git a/Systems/Collections/NPCs/BossValueDict.cs b/Systems/Collections/NPCs/BossValueDict.cs deleted file mode 100644 index 43b450ad80..0000000000 --- a/Systems/Collections/NPCs/BossValueDict.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System.Collections.Generic; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Systems.Collections -{ - public sealed class BossValueDict : ModSystem - { - public static IDictionary Dict { get; private set; } - - public override void OnModLoad() - { - // NOTE: This does not account for Calamity's base value increases - Dict = new SortedDictionary - { - { NPCID.KingSlime, Item.buyPrice(0, 2) }, - { NPCID.EyeofCthulhu, Item.buyPrice(0, 2) }, - // Evil bosses drop 5 gold in vanilla; unmodified - { NPCID.QueenBee, Item.buyPrice(0, 8) }, - { NPCID.Deerclops, Item.buyPrice(0, 8) }, - { NPCID.SkeletronHead, Item.buyPrice(0, 12) }, - { NPCID.WallofFlesh, Item.buyPrice(0, 12) }, - { NPCID.QueenSlimeBoss, Item.buyPrice(0, 16) }, - { NPCID.Spazmatism, Item.buyPrice(0, 16) }, - { NPCID.Retinazer, Item.buyPrice(0, 16) }, - { NPCID.TheDestroyer, Item.buyPrice(0, 16) }, - { NPCID.SkeletronPrime, Item.buyPrice(0, 16) }, - { NPCID.Plantera, Item.buyPrice(0, 20) }, - { NPCID.Golem, Item.buyPrice(0, 25) }, - { NPCID.HallowBoss, Item.buyPrice(0, 30) }, - { NPCID.DukeFishron, Item.buyPrice(0, 30) }, - { NPCID.CultistBoss, Item.buyPrice(0, 50) } - // Moon Lord drops 1 plat in vanilla; unmodified - }; - } - - public override void Unload() - { - Dict?.Clear(); - Dict = null; - } - - public static bool TryGet(int npcType, out int value) - { - return Dict.TryGetValue(npcType, out value); - } - } -}