From b995fbd16b0d3a6daf258e85d79cfca87bde89d7 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 17 Apr 2020 17:29:35 -0400 Subject: [PATCH] rewrote arbalest drop code to mimic spear of destiny --- NPCs/CalamityGlobalNPCLoot.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 4f8069a000..7e32d17457 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1489,7 +1489,7 @@ namespace CalamityMod.NPCs float spearDropRate = Main.expertMode ? 0.05f : 0.04f; float spearRoll = Main.rand.NextFloat(); bool spearOfDestiny = spearRoll <= 0.005f; // Exact 1/200 chance for rare regardless of difficulty - if(spearRoll < spearDropRate) // 1/25 (1/20 EX) chance of getting Ichor Spear OR Spear of Destiny replacing it + if (spearRoll < spearDropRate) // 1/25 (1/20 EX) chance of getting Ichor Spear OR Spear of Destiny replacing it { DropHelper.DropItemCondition(npc, ModContent.ItemType(), !spearOfDestiny); DropHelper.DropItemCondition(npc, ModContent.ItemType(), spearOfDestiny); @@ -1544,11 +1544,14 @@ namespace CalamityMod.NPCs break; case NPCID.PirateCrossbower: - int crossbowDropRate = Main.expertMode ? 20 : 25; + float crossbowDropRate = Main.expertMode ? 0.05f : 0.04f; float arbalestRoll = Main.rand.NextFloat(); - bool arbalest = arbalestRoll < 0.005f; // Exact 1/200 chance for rare regardless of difficulty - DropHelper.DropItemCondition(npc, ModContent.ItemType(), !arbalest, crossbowDropRate, 1, 1); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), arbalest, crossbowDropRate, 1, 1); + bool arbalest = arbalestRoll <= 0.005f; // Exact 1/200 chance for rare regardless of difficulty + if (arbalestRoll < crossbowDropRate) // 1/25 (1/20 EX) chance of getting Raider's Glory OR Arbalest replacing it + { + DropHelper.DropItemCondition(npc, ModContent.ItemType(), !arbalest); + DropHelper.DropItemCondition(npc, ModContent.ItemType(), arbalest); + } break; case NPCID.GoblinSummoner: