From 2329daad4fe2d1921064e5390df2a47fabeef04c Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Thu, 4 Aug 2022 22:05:47 +0200 Subject: [PATCH] Removed all accidental double lcr definitions --- Items/Fishing/AstralCatches/AstralCrate.cs | 18 +++++----- Items/Fishing/SulphurCatches/AbyssalCrate.cs | 33 +++++++++++-------- Items/Fishing/SunkenSeaCatches/SunkenCrate.cs | 13 +++++--- Items/TreasureBags/BleachedAnglingKit.cs | 2 -- Items/TreasureBags/DraedonBag.cs | 3 -- Items/TreasureBags/FleshyGeode.cs | 2 -- Items/TreasureBags/NecromanticGeode.cs | 2 -- Items/TreasureBags/SandyAnglingKit.cs | 2 -- Items/TreasureBags/StarterBag.cs | 3 -- 9 files changed, 38 insertions(+), 40 deletions(-) diff --git a/Items/Fishing/AstralCatches/AstralCrate.cs b/Items/Fishing/AstralCatches/AstralCrate.cs index 73ae03d09a..aecedeb250 100644 --- a/Items/Fishing/AstralCatches/AstralCrate.cs +++ b/Items/Fishing/AstralCatches/AstralCrate.cs @@ -46,20 +46,22 @@ namespace CalamityMod.Items.Fishing.AstralCatches public override bool CanRightClick() => true; public override void ModifyItemLoot(ItemLoot itemLoot) { + var postAstrumAureus = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAstrumAureus); + var postAstrumDeus = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAstrumDeus); + //Materials itemLoot.Add(ModContent.ItemType(), 1, 5, 10); itemLoot.Add(ItemID.FallenStar, 1, 5, 10); itemLoot.Add(ItemID.Meteorite, 5, 10, 20); itemLoot.Add(ItemID.MeteoriteBar, 10, 1, 3); - itemLoot.AddIf(() => DownedBossSystem.downedAstrumAureus, ModContent.ItemType(), 5, 2, 5); - itemLoot.AddIf(() => DownedBossSystem.downedAstrumDeus, ModContent.ItemType(), 5, 10, 20); - itemLoot.AddIf(() => DownedBossSystem.downedAstrumDeus, 10, 1, 3); - itemLoot.AddIf(() => DownedBossSystem.downedAstrumDeus, 4, 5, 10); + postAstrumAureus.Add(ModContent.ItemType(), 5, 2, 5); + postAstrumDeus.Add(ModContent.ItemType(), 5, 10, 20); + postAstrumDeus.Add(ModContent.ItemType(), 10, 1, 3); + postAstrumDeus.Add(ModContent.ItemType(), 4, 5, 10); //Weapons - var lcr = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAstrumAureus); - lcr.Add(new OneFromOptionsNotScaledWithLuckDropRule(10, 1, + postAstrumAureus.Add(new OneFromOptionsNotScaledWithLuckDropRule(10, 1, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), @@ -78,8 +80,8 @@ namespace CalamityMod.Items.Fishing.AstralCatches itemLoot.Add(ItemID.Firefly, 3, 1, 3); //Potions - itemLoot.AddIf(() => DownedBossSystem.downedAstrumAureus, ModContent.ItemType(), 10, 1, 3); - itemLoot.AddIf(() => DownedBossSystem.downedAstrumAureus, ModContent.ItemType(), 10, 1, 3); + postAstrumAureus.Add(ModContent.ItemType(), 10, 1, 3); + postAstrumAureus.Add(ModContent.ItemType(), 10, 1, 3); itemLoot.AddCratePotionRules(); //Money diff --git a/Items/Fishing/SulphurCatches/AbyssalCrate.cs b/Items/Fishing/SulphurCatches/AbyssalCrate.cs index ae3918734f..0396948390 100644 --- a/Items/Fishing/SulphurCatches/AbyssalCrate.cs +++ b/Items/Fishing/SulphurCatches/AbyssalCrate.cs @@ -47,31 +47,38 @@ namespace CalamityMod.Items.Fishing.SulphurCatches public override bool CanRightClick() => true; public override void ModifyItemLoot(ItemLoot itemLoot) { + //LCRs. + var tier1AbyssAvailable = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedSlimeGod || Main.hardMode); + var tier2AbyssAvailable = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedCalamitas); + var scoriaAvailable = itemLoot.DefineConditionalDropSet(() => NPC.downedGolemBoss); + var tier1AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedEoCAcidRain); + var tier2AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAquaticScourgeAcidRain); + var tier3AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedPolterghast && DownedBossSystem.downedBoomerDuke); + + //Materials itemLoot.Add(ModContent.ItemType(), 1, 5, 10); itemLoot.Add(ModContent.ItemType(), 1, 5, 10); itemLoot.Add(ModContent.ItemType(), 1, 5, 10); itemLoot.Add(ModContent.ItemType(), 1, 5, 10); - itemLoot.AddIf(() => DownedBossSystem.downedEoCAcidRain, ModContent.ItemType(), 10, 1, 3); - itemLoot.AddIf(() => DownedBossSystem.downedAquaticScourgeAcidRain, ModContent.ItemType(), 10, 1, 3); - itemLoot.AddIf(() => DownedBossSystem.downedCalamitas, ModContent.ItemType(), 5, 2, 5); - itemLoot.AddIf(() => DownedBossSystem.downedCalamitas, ModContent.ItemType(), 5, 2, 5); - itemLoot.AddIf(() => DownedBossSystem.downedCalamitas, ModContent.ItemType(), 5, 2, 5); - itemLoot.AddIf(() => DownedBossSystem.downedCalamitas, ModContent.ItemType(), 5, 2, 5); - itemLoot.AddIf(() => NPC.downedGolemBoss, ModContent.ItemType(), 5, 16, 28); - itemLoot.AddIf(() => NPC.downedGolemBoss, ModContent.ItemType(), new Fraction(15, 100), 4, 7); - itemLoot.AddIf(() => DownedBossSystem.downedPolterghast && DownedBossSystem.downedBoomerDuke, ModContent.ItemType(), 10, 1, 5); + tier1AcidRain.Add(ModContent.ItemType(), 10, 1, 3); + tier2AcidRain.Add(ModContent.ItemType(), 10, 1, 3); + tier2AbyssAvailable.Add(ModContent.ItemType(), 5, 2, 5); + tier2AbyssAvailable.Add(ModContent.ItemType(), 5, 2, 5); + tier2AbyssAvailable.Add(ModContent.ItemType(), 5, 2, 5); + tier2AbyssAvailable.Add(ModContent.ItemType(), 5, 2, 5); + scoriaAvailable.Add(ModContent.ItemType(), 5, 16, 28); + scoriaAvailable.Add(ModContent.ItemType(), new Fraction(15, 100), 4, 7); + tier3AcidRain.Add(ModContent.ItemType(), 10, 1, 5); // Weapons - var lcrT1Abyss = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedSlimeGod || Main.hardMode); - lcrT1Abyss.Add(new OneFromOptionsNotScaledWithLuckDropRule(10, 1, + tier1AbyssAvailable.Add(new OneFromOptionsNotScaledWithLuckDropRule(10, 1, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType())); - var lcrT2AcidRain = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAquaticScourgeAcidRain); lcrT2AcidRain.Add(new OneFromOptionsNotScaledWithLuckDropRule(10, 1, ModContent.ItemType(), ModContent.ItemType(), @@ -82,7 +89,7 @@ namespace CalamityMod.Items.Fishing.SulphurCatches ModContent.ItemType())); // Equipment - lcrT1Abyss.Add(new OneFromOptionsNotScaledWithLuckDropRule(4, 1, + tier1AbyssAvailable.Add(new OneFromOptionsNotScaledWithLuckDropRule(4, 1, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), diff --git a/Items/Fishing/SunkenSeaCatches/SunkenCrate.cs b/Items/Fishing/SunkenSeaCatches/SunkenCrate.cs index 7014e65bab..b81907e698 100644 --- a/Items/Fishing/SunkenSeaCatches/SunkenCrate.cs +++ b/Items/Fishing/SunkenSeaCatches/SunkenCrate.cs @@ -42,15 +42,18 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches public override bool CanRightClick() => true; public override void ModifyItemLoot(ItemLoot itemLoot) { + var postDesertScourge = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedCLAMHardMode); + var postHardmodeClam = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedCLAMHardMode); + + itemLoot.Add(ModContent.ItemType(), 1, 10, 30); itemLoot.Add(ModContent.ItemType(), 1, 10, 30); - itemLoot.AddIf(() => DownedBossSystem.downedDesertScourge, ModContent.ItemType(), 1, 5, 10); - itemLoot.AddIf(() => DownedBossSystem.downedDesertScourge, ModContent.ItemType(), 5, 2, 5); - itemLoot.AddIf(() => DownedBossSystem.downedCLAMHardMode, ModContent.ItemType(), new Fraction(12, 100), 2, 5); + postDesertScourge.Add(ModContent.ItemType(), 1, 5, 10); + postDesertScourge.Add(ModContent.ItemType(), 5, 2, 5); + postHardmodeClam.Add(ModContent.ItemType(), new Fraction(12, 100), 2, 5); // Weapons - var lcr = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedCLAMHardMode); - lcr.Add(new OneFromOptionsNotScaledWithLuckDropRule(7, 100, + postHardmodeClam.Add(new OneFromOptionsNotScaledWithLuckDropRule(7, 100, ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), diff --git a/Items/TreasureBags/BleachedAnglingKit.cs b/Items/TreasureBags/BleachedAnglingKit.cs index e74148155b..0504c57d93 100644 --- a/Items/TreasureBags/BleachedAnglingKit.cs +++ b/Items/TreasureBags/BleachedAnglingKit.cs @@ -44,7 +44,6 @@ namespace CalamityMod.Items.TreasureBags normalOnly.Add(ItemID.SonarPotion, 4, 2, 3); normalOnly.Add(ItemID.CratePotion, 4, 2, 3); normalOnly.Add(ItemID.GoldenBugNet, 15); - itemLoot.Add(normalOnly); var expertPlus = itemLoot.DefineConditionalDropSet(new Conditions.IsExpert()); expertPlus.Add(ItemID.AnglerTackleBag, 15); @@ -61,7 +60,6 @@ namespace CalamityMod.Items.TreasureBags expertPlus.Add(ItemID.SonarPotion, 2, 2, 3); expertPlus.Add(ItemID.CratePotion, 2, 2, 3); expertPlus.Add(ItemID.GoldenBugNet, 12); - itemLoot.Add(expertPlus); } } } diff --git a/Items/TreasureBags/DraedonBag.cs b/Items/TreasureBags/DraedonBag.cs index e0cb3a1721..857a24630d 100644 --- a/Items/TreasureBags/DraedonBag.cs +++ b/Items/TreasureBags/DraedonBag.cs @@ -58,20 +58,17 @@ namespace CalamityMod.Items.TreasureBags ares.Add(ModContent.ItemType()); ares.Add(ModContent.ItemType()); ares.Add(ModContent.ItemType(), maskFraction); - itemLoot.Add(ares); var thanatos = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedThanatos); thanatos.Add(ModContent.ItemType()); thanatos.Add(ModContent.ItemType()); thanatos.Add(ModContent.ItemType(), maskFraction); - itemLoot.Add(thanatos); var artemisAndApollo = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedArtemisAndApollo); artemisAndApollo.Add(ModContent.ItemType()); artemisAndApollo.Add(ModContent.ItemType()); artemisAndApollo.Add(ModContent.ItemType(), maskFraction); artemisAndApollo.Add(ModContent.ItemType(), maskFraction); - itemLoot.Add(artemisAndApollo); // Equipment itemLoot.Add(ModContent.ItemType()); diff --git a/Items/TreasureBags/FleshyGeode.cs b/Items/TreasureBags/FleshyGeode.cs index 9ea4b57898..5efd123f4e 100644 --- a/Items/TreasureBags/FleshyGeode.cs +++ b/Items/TreasureBags/FleshyGeode.cs @@ -39,7 +39,6 @@ namespace CalamityMod.Items.TreasureBags normalOnly.Add(ModContent.ItemType(), 1, 1, 2); normalOnly.Add(ModContent.ItemType(), 1, 1, 2); normalOnly.Add(ModContent.ItemType(), 1, 1, 2); - itemLoot.Add(normalOnly); var expertPlus = itemLoot.DefineConditionalDropSet(new Conditions.IsExpert()); expertPlus.Add(ModContent.ItemType(), 1, 2, 3); @@ -48,7 +47,6 @@ namespace CalamityMod.Items.TreasureBags expertPlus.Add(ModContent.ItemType(), 1, 1, 3); expertPlus.Add(ModContent.ItemType(), 1, 1, 3); expertPlus.Add(ModContent.ItemType(), 1, 1, 3); - itemLoot.Add(expertPlus); } } } diff --git a/Items/TreasureBags/NecromanticGeode.cs b/Items/TreasureBags/NecromanticGeode.cs index adcd659c63..44181a3cd3 100644 --- a/Items/TreasureBags/NecromanticGeode.cs +++ b/Items/TreasureBags/NecromanticGeode.cs @@ -44,7 +44,6 @@ namespace CalamityMod.Items.TreasureBags normalOnly.Add(ModContent.ItemType(), 2); normalOnly.Add(ModContent.ItemType(), 3); normalOnly.Add(ModContent.ItemType(), 1, 50, 60); - itemLoot.Add(normalOnly); var expertPlus = itemLoot.DefineConditionalDropSet(new Conditions.IsExpert()); expertPlus.Add(ModContent.ItemType(), 1, 7, 12); @@ -56,7 +55,6 @@ namespace CalamityMod.Items.TreasureBags expertPlus.Add(ModContent.ItemType()); expertPlus.Add(ModContent.ItemType(), 2); expertPlus.Add(ModContent.ItemType(), 1, 60, 70); - itemLoot.Add(expertPlus); } } } diff --git a/Items/TreasureBags/SandyAnglingKit.cs b/Items/TreasureBags/SandyAnglingKit.cs index cf2737b44b..92a1450183 100644 --- a/Items/TreasureBags/SandyAnglingKit.cs +++ b/Items/TreasureBags/SandyAnglingKit.cs @@ -43,7 +43,6 @@ namespace CalamityMod.Items.TreasureBags normalOnly.Add(ItemID.SonarPotion, 5, 2, 3); normalOnly.Add(ItemID.CratePotion, 5, 2, 3); normalOnly.AddIf(() => NPC.downedBoss3, ItemID.GoldenBugNet, 20); - itemLoot.Add(normalOnly); var expertPlus = itemLoot.DefineConditionalDropSet(new Conditions.IsExpert()); expertPlus.Add(ItemID.HighTestFishingLine, 12); @@ -59,7 +58,6 @@ namespace CalamityMod.Items.TreasureBags expertPlus.Add(ItemID.SonarPotion, 4, 2, 3); expertPlus.Add(ItemID.CratePotion, 4, 2, 3); expertPlus.AddIf(() => NPC.downedBoss3, ItemID.GoldenBugNet, 18); - itemLoot.Add(expertPlus); } } } diff --git a/Items/TreasureBags/StarterBag.cs b/Items/TreasureBags/StarterBag.cs index ed8e65ff3e..c11574ccf6 100644 --- a/Items/TreasureBags/StarterBag.cs +++ b/Items/TreasureBags/StarterBag.cs @@ -67,9 +67,6 @@ namespace CalamityMod.Items.TreasureBags if (musicMod is not null) itemLoot.Add(musicMod.Find("CalamityMusicbox").Type); - // Add copper/tin specific stuff - itemLoot.Add(tin); - // Aleksh donator item // Name specific: "Aleksh" or "Shark Lad" static bool getsLadPet(DropAttemptInfo info)