From 7ea3ba7ab57629b97a62e5ca3e5bfc3c602d707c Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sat, 9 Apr 2022 15:18:50 -0400 Subject: [PATCH] Calamitas Clone sanity checked --- NPCs/Calamitas/CalamitasRun3.cs | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/NPCs/Calamitas/CalamitasRun3.cs b/NPCs/Calamitas/CalamitasRun3.cs index 23f455380d..ce8699c35c 100644 --- a/NPCs/Calamitas/CalamitasRun3.cs +++ b/NPCs/Calamitas/CalamitasRun3.cs @@ -165,18 +165,16 @@ namespace CalamityMod.NPCs.Calamitas public override void ModifyNPCLoot(NPCLoot npcLoot) { npcLoot.Add(ItemDropRule.BossBag(ModContent.ItemType())); - npcLoot.Add(ItemID.BrokenHeroSword); - npcLoot.Add(ModContent.ItemType(), 10); - - // Lore - npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedCalamitas, ModContent.ItemType()); // Normal drops: Everything that would otherwise be in the bag var normalOnly = npcLoot.DefineNormalOnlyDropSet(); { - // Weapons - int[] weapons = new int[] + LeadingConditionRule postProvidence = new LeadingConditionRule(DropHelper.If(() => DownedBossSystem.downedProvidence)); + normalOnly.Add(postProvidence); + + // Items + int[] items = new int[] { ModContent.ItemType(), ModContent.ItemType(), @@ -184,23 +182,27 @@ namespace CalamityMod.NPCs.Calamitas ModContent.ItemType(), ModContent.ItemType(), }; - normalOnly.Add(ItemDropRule.OneFromOptions(DropHelper.NormalWeaponDropRateInt, weapons)); + normalOnly.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, items)); // Equipment normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType())); + normalOnly.Add(ModContent.ItemType(), 10); // Materials normalOnly.Add(ModContent.ItemType(), 1, 4, 8); normalOnly.Add(ModContent.ItemType(), 1, 9, 14); normalOnly.Add(ModContent.ItemType(), 1, 1, 2); + postProvidence.Add(ModContent.ItemType(), 1, 30, 40); // Vanity normalOnly.Add(ModContent.ItemType(), 7); normalOnly.Add(ItemDropRule.Common(ModContent.ItemType(), 10).OnSuccess(ItemDropRule.Common(ModContent.ItemType()))); } - npcLoot.AddIf(() => !Main.expertMode, ModContent.ItemType(), 10); - npcLoot.AddIf(() => !Main.expertMode && DownedBossSystem.downedProvidence, ModContent.ItemType(), 1, 30, 40); + npcLoot.Add(ModContent.ItemType(), 10); + + // Lore + npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedCalamitas, ModContent.ItemType()); } public override void OnKill()