From 54b7bd674e6b50f9b0981c462cb3e7fc654c8958 Mon Sep 17 00:00:00 2001 From: apotofkoolaid <72956636+apotofkoolaid@users.noreply.github.com> Date: Tue, 30 May 2023 09:29:33 -0500 Subject: [PATCH 1/3] Larger bio lab theme area - Increased lab theme detection radius to 80x80 for all labs, instead of having constricted values for each one --- Scenes/MusicScenes/BioLabMusicScene.cs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Scenes/MusicScenes/BioLabMusicScene.cs b/Scenes/MusicScenes/BioLabMusicScene.cs index 80c80e24fa..8a28d67293 100644 --- a/Scenes/MusicScenes/BioLabMusicScene.cs +++ b/Scenes/MusicScenes/BioLabMusicScene.cs @@ -3,6 +3,7 @@ using CalamityMod.Walls; using CalamityMod.Walls.DraedonStructures; using CalamityMod.World; using Microsoft.Xna.Framework; +using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -28,6 +29,9 @@ namespace CalamityMod.Scenes.MusicScenes float iceLabDistance = Vector2.DistanceSquared(CalamityWorld.IceLabCenter, playerPosition); float cavernLabDistance = Vector2.DistanceSquared(CalamityWorld.CavernLabCenter, playerPosition); + // (Tile range * Pixels per tile)^2 + double labRadius = Math.Pow(80f * 16f, 2); + // Checks if the player is behind any wall that naturally generates in Bio Labs bool behindLabWall = backWall.WallType == WallID.ObsidianBrick || @@ -53,14 +57,14 @@ namespace CalamityMod.Scenes.MusicScenes backWall.WallType == ModContent.WallType() || backWall.WallType == ModContent.WallType(); - // Checks if the player is within a circular area from the center point of any Bio Lab + // Checks if the player is within a specified range from the center point of any Bio Lab bool nearBioLabPoint = - sunkenSeaLabDistance <= 1020f * 1020f || - planetoidLabDistance <= 520f * 520f || - jungleLabDistance <= 620f * 620f || - hellLabDistance <= 700f * 700f || - iceLabDistance <= 720f * 720f || - cavernLabDistance <= 940f * 940f; + sunkenSeaLabDistance <= labRadius || + planetoidLabDistance <= labRadius || + jungleLabDistance <= labRadius || + hellLabDistance <= labRadius || + iceLabDistance <= labRadius || + cavernLabDistance <= labRadius; return BiomeTileCounterSystem.ArsenalLabTiles > 150 && behindLabWall && nearBioLabPoint; } From 5c54fe8a081b7f82d1f7277152788c3a49eabfc3 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Tue, 30 May 2023 09:41:11 -0500 Subject: [PATCH 2/3] Gave GFB drops to most hardmode Calamity bosses. --- CalPlayer/CalamityPlayer.cs | 1 + NPCs/AquaticScourge/AquaticScourgeHead.cs | 3 +++ NPCs/AstrumAureus/AstrumAureus.cs | 7 +++++++ NPCs/BrimstoneElemental/BrimstoneElemental.cs | 3 +++ NPCs/CalClone/CalamitasClone.cs | 3 +++ NPCs/Cryogen/Cryogen.cs | 3 +++ NPCs/Leviathan/Leviathan.cs | 9 +++++++++ 7 files changed, 29 insertions(+) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 4e85fa3409..33e9aea836 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -6422,6 +6422,7 @@ namespace CalamityMod.CalPlayer int proj = Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType(), 9999, 10f, Player.whoAmI); if (Main.projectile[proj].whoAmI.WithinBounds(Main.maxProjectiles)) { + Main.projectile[proj].timeLeft = 10; Main.projectile[proj].scale = 6f; Main.projectile[proj].friendly = true; Main.projectile[proj].netUpdate = true; diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 6c60132232..af4352bf4f 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -255,6 +255,9 @@ namespace CalamityMod.NPCs.AquaticScourge npcLoot.Add(ModContent.ItemType(), 10); npcLoot.DefineConditionalDropSet(DropHelper.RevAndMaster).Add(ModContent.ItemType()); + // GFB troll drop + npcLoot.DefineConditionalDropSet(DropHelper.GFB).Add(ModContent.ItemType()); + // Lore bool firstASKill() => !DownedBossSystem.downedAquaticScourge; npcLoot.AddConditionalPerPlayer(firstASKill, ModContent.ItemType(), desc: DropHelper.FirstKillText); diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index 302754fe5f..4ea1b7d157 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -385,6 +385,13 @@ namespace CalamityMod.NPCs.AstrumAureus // Relic npcLoot.DefineConditionalDropSet(DropHelper.RevAndMaster).Add(ModContent.ItemType()); + // GFB Crab Banner and Asteroid Staff drop + var GFBOnly = npcLoot.DefineConditionalDropSet(DropHelper.GFB); + { + GFBOnly.Add(ItemID.CrabBanner, 1, 1, 9999); + GFBOnly.Add(ModContent.ItemType()); + } + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedAstrumAureus, ModContent.ItemType(), desc: DropHelper.FirstKillText); } diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index a6d795aa55..04c81e882a 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -227,6 +227,9 @@ namespace CalamityMod.NPCs.BrimstoneElemental // Relic npcLoot.DefineConditionalDropSet(DropHelper.RevAndMaster).Add(ModContent.ItemType()); + // GFB Heart of the Elements drop + npcLoot.DefineConditionalDropSet(DropHelper.GFB).Add(ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedBrimstoneElemental, ModContent.ItemType(), desc: DropHelper.FirstKillText); npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedBrimstoneElemental, ModContent.ItemType(), desc: DropHelper.FirstKillText); diff --git a/NPCs/CalClone/CalamitasClone.cs b/NPCs/CalClone/CalamitasClone.cs index 05610195b0..1a164874a9 100644 --- a/NPCs/CalClone/CalamitasClone.cs +++ b/NPCs/CalClone/CalamitasClone.cs @@ -221,6 +221,9 @@ namespace CalamityMod.NPCs.CalClone // Relic npcLoot.DefineConditionalDropSet(DropHelper.RevAndMaster).Add(ModContent.ItemType()); + // GFB Shadowspec Bar drop + npcLoot.DefineConditionalDropSet(DropHelper.GFB).Add(ModContent.ItemType(), 1, 6, 9); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedCalamitasClone, ModContent.ItemType(), desc: DropHelper.FirstKillText); } diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index 8d063e274c..ebb15cb963 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -1314,6 +1314,9 @@ namespace CalamityMod.NPCs.Cryogen // Relic npcLoot.DefineConditionalDropSet(DropHelper.RevAndMaster).Add(ModContent.ItemType()); + // GFB Bloodflare Core drop + npcLoot.DefineConditionalDropSet(DropHelper.GFB).Add(ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedCryogen, ModContent.ItemType(), desc: DropHelper.FirstKillText); } diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index f2a82f8f31..5b4f3b125d 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -826,6 +826,15 @@ namespace CalamityMod.NPCs.Leviathan // Relic npcLoot.DefineConditionalDropSet(DropHelper.RevAndMaster).AddIf((info) => LastAnLStanding(), ModContent.ItemType()); + // GFB Boulder, Pizza and Ring drop + var GFBOnly = npcLoot.DefineConditionalDropSet(DropHelper.GFB); + { + GFBOnly.Add(ItemID.BouncyBoulder, 1, 1, 9999); + GFBOnly.Add(ItemID.Boulder, 1, 1, 9999); + GFBOnly.Add(ItemID.Pizza, 1, 1, 9999); + GFBOnly.Add(ItemID.GreedyRing); + } + // Lore bool shouldDropLore(DropAttemptInfo info) => !DownedBossSystem.downedLeviathan && LastAnLStanding(); npcLoot.AddConditionalPerPlayer(shouldDropLore, ModContent.ItemType(), desc: DropHelper.FirstKillText); From 68d7a5c5a289fbd444d8c6a8cdd09ef63b81adb1 Mon Sep 17 00:00:00 2001 From: NalydddNobel Date: Tue, 30 May 2023 15:46:09 -0700 Subject: [PATCH 3/3] More decraft removals Notes: All Healing/Mana Potions are not decraftable in Vanilla Disabled all Blood Orb potion decrafts (programming note, doesn't actually change anything in-game) Changelogs: -Changed Calcium Potion recipe to be consistent with other Blood Orb recipes (10 orbs per potion) -Added Aerialite Bars to the Bundle of Horseshoe Balloons alt recipes -Added Rouge Emblem to the Emblem shimmer table -Pharaoh's Mask and Robe now shimmer into each other instead of into Pyramid Loot -Removed the following Shimmer decrafts: Supreme Healing Potion recipe Omega Healing Potion recipe Supreme Mana Potion recipe Cosmic Worm recipes Wulfrum Treasure Pinger recipe (decraft and recraft to regenerate durability) Blood Orbs -> Bloody Tear --- Items/CalamityGlobalItem.cs | 5 ---- Items/CalamityGlobalItemTweaks.cs | 11 --------- Items/Materials/BloodOrb.cs | 3 ++- Items/Potions/Alcohol/FabsolsVodka.cs | 3 ++- Items/Potions/AnechoicCoating.cs | 3 ++- Items/Potions/AstralInjection.cs | 3 ++- Items/Potions/BoundingPotion.cs | 3 ++- Items/Potions/CalciumPotion.cs | 10 ++++---- Items/Potions/CeaselessHungerPotion.cs | 3 ++- Items/Potions/GravityNormalizerPotion.cs | 3 ++- Items/Potions/OmegaHealingPotion.cs | 3 ++- Items/Potions/PhotosynthesisPotion.cs | 3 ++- Items/Potions/PotionofOmniscience.cs | 3 ++- Items/Potions/ShadowPotion.cs | 5 ++-- Items/Potions/SoaringPotion.cs | 3 ++- Items/Potions/SulphurskinPotion.cs | 3 ++- Items/Potions/SupremeHealingPotion.cs | 3 ++- Items/Potions/SupremeManaPotion.cs | 3 ++- Items/Potions/TeslaPotion.cs | 3 ++- Items/Potions/ZenPotion.cs | 3 ++- Items/Potions/ZergPotion.cs | 3 ++- Items/SummonItems/CosmicWorm.cs | 6 +++-- Items/Tools/WulfrumTreasurePinger.cs | 3 ++- Systems/RecipeSystem.cs | 7 +++++- Utilities/CalamityRecipes.cs | 29 ++++++++++++++++++++++++ 25 files changed, 84 insertions(+), 43 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 09c6457620..56139256a3 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -132,11 +132,6 @@ namespace CalamityMod.Items } #region SetDefaults - public override void SetStaticDefaults() - { - SetStaticDefaults_ShimmerRecipes(); - } - public override void SetDefaults(Item item) { #region Vanilla Wing Tweaks diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index a5aaf195e1..f21abe0ae6 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -1346,16 +1346,5 @@ namespace CalamityMod.Items #endregion #endregion #endregion - - #region Shimmer Transmutations - private void SetStaticDefaults_ShimmerRecipes() - { - var shimmerTransmute = ItemID.Sets.ShimmerTransformToItem; - - shimmerTransmute[ItemID.AmberHook] = ItemID.SandstorminaBottle; - shimmerTransmute[ItemID.SandstorminaBottle] = ItemID.FlyingCarpet; - shimmerTransmute[ItemID.FlyingCarpet] = ItemID.AmberHook; - } - #endregion } } diff --git a/Items/Materials/BloodOrb.cs b/Items/Materials/BloodOrb.cs index 790b537b14..7bda2e9a14 100644 --- a/Items/Materials/BloodOrb.cs +++ b/Items/Materials/BloodOrb.cs @@ -32,7 +32,8 @@ namespace CalamityMod.Items.Materials { CreateRecipe(10). AddIngredient(ItemID.BloodMoonStarter). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/Alcohol/FabsolsVodka.cs b/Items/Potions/Alcohol/FabsolsVodka.cs index db34910f1e..51e8121b2a 100644 --- a/Items/Potions/Alcohol/FabsolsVodka.cs +++ b/Items/Potions/Alcohol/FabsolsVodka.cs @@ -46,7 +46,8 @@ namespace CalamityMod.Items.Potions.Alcohol AddIngredient(40). AddIngredient(ItemID.CrystalShard). AddTile(TileID.AlchemyTable). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/AnechoicCoating.cs b/Items/Potions/AnechoicCoating.cs index 1e24d6b3cf..135bd72aaa 100644 --- a/Items/Potions/AnechoicCoating.cs +++ b/Items/Potions/AnechoicCoating.cs @@ -37,7 +37,8 @@ namespace CalamityMod.Items.Potions AddIngredient(ItemID.BottledWater). AddIngredient(10). AddTile(TileID.AlchemyTable). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/AstralInjection.cs b/Items/Potions/AstralInjection.cs index 9f72026b94..8c53c512dc 100644 --- a/Items/Potions/AstralInjection.cs +++ b/Items/Potions/AstralInjection.cs @@ -62,7 +62,8 @@ namespace CalamityMod.Items.Potions AddIngredient(5). AddIngredient(). AddTile(TileID.AlchemyTable). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/BoundingPotion.cs b/Items/Potions/BoundingPotion.cs index 6dfc39ce9a..9cebc79b79 100644 --- a/Items/Potions/BoundingPotion.cs +++ b/Items/Potions/BoundingPotion.cs @@ -44,7 +44,8 @@ namespace CalamityMod.Items.Potions AddIngredient(ItemID.BottledWater). AddIngredient(20). AddTile(TileID.AlchemyTable). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/CalciumPotion.cs b/Items/Potions/CalciumPotion.cs index 41e80d842a..364f66dda8 100644 --- a/Items/Potions/CalciumPotion.cs +++ b/Items/Potions/CalciumPotion.cs @@ -37,13 +37,15 @@ namespace CalamityMod.Items.Potions AddIngredient(ItemID.BottledWater, 4). AddIngredient(). AddTile(TileID.Bottles). - Register(); + Register() + .DisableDecraft(); - CreateRecipe(4). + CreateRecipe(). AddIngredient(ItemID.BottledWater). - AddIngredient(). + AddIngredient(10). AddTile(TileID.AlchemyTable). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/CeaselessHungerPotion.cs b/Items/Potions/CeaselessHungerPotion.cs index 20300b45a1..adcdee6be5 100644 --- a/Items/Potions/CeaselessHungerPotion.cs +++ b/Items/Potions/CeaselessHungerPotion.cs @@ -47,7 +47,8 @@ namespace CalamityMod.Items.Potions AddIngredient(20). AddIngredient(). AddTile(TileID.AlchemyTable). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/GravityNormalizerPotion.cs b/Items/Potions/GravityNormalizerPotion.cs index 63c5a1d73d..b112ac0300 100644 --- a/Items/Potions/GravityNormalizerPotion.cs +++ b/Items/Potions/GravityNormalizerPotion.cs @@ -47,7 +47,8 @@ namespace CalamityMod.Items.Potions AddIngredient(10). AddIngredient(). AddTile(TileID.AlchemyTable). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/OmegaHealingPotion.cs b/Items/Potions/OmegaHealingPotion.cs index 98b1b3b932..4ae708dfb1 100644 --- a/Items/Potions/OmegaHealingPotion.cs +++ b/Items/Potions/OmegaHealingPotion.cs @@ -38,7 +38,8 @@ namespace CalamityMod.Items.Potions AddIngredient(20). AddIngredient(). AddTile(TileID.Bottles). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/PhotosynthesisPotion.cs b/Items/Potions/PhotosynthesisPotion.cs index 78526c39db..8a95facd9b 100644 --- a/Items/Potions/PhotosynthesisPotion.cs +++ b/Items/Potions/PhotosynthesisPotion.cs @@ -46,7 +46,8 @@ namespace CalamityMod.Items.Potions AddIngredient(40). AddIngredient(). AddTile(TileID.AlchemyTable). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/PotionofOmniscience.cs b/Items/Potions/PotionofOmniscience.cs index 25a19d19e5..553957d459 100644 --- a/Items/Potions/PotionofOmniscience.cs +++ b/Items/Potions/PotionofOmniscience.cs @@ -44,7 +44,8 @@ namespace CalamityMod.Items.Potions AddIngredient(ItemID.BottledWater). AddIngredient(20). AddTile(TileID.AlchemyTable). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/ShadowPotion.cs b/Items/Potions/ShadowPotion.cs index c90c570e2b..c94076674c 100644 --- a/Items/Potions/ShadowPotion.cs +++ b/Items/Potions/ShadowPotion.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { Item.ResearchUnlockCount = 20; - } + } public override void SetDefaults() { @@ -45,7 +45,8 @@ namespace CalamityMod.Items.Potions AddIngredient(ItemID.BottledWater). AddIngredient(10). AddTile(TileID.AlchemyTable). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/SoaringPotion.cs b/Items/Potions/SoaringPotion.cs index 19976f1438..ca5b7b8b2f 100644 --- a/Items/Potions/SoaringPotion.cs +++ b/Items/Potions/SoaringPotion.cs @@ -48,7 +48,8 @@ namespace CalamityMod.Items.Potions AddIngredient(30). AddIngredient(ItemID.SoulofFlight). AddTile(TileID.AlchemyTable). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/SulphurskinPotion.cs b/Items/Potions/SulphurskinPotion.cs index 3864d0159e..10bb150086 100644 --- a/Items/Potions/SulphurskinPotion.cs +++ b/Items/Potions/SulphurskinPotion.cs @@ -45,7 +45,8 @@ namespace CalamityMod.Items.Potions AddIngredient(ItemID.BottledWater). AddIngredient(10). AddTile(TileID.AlchemyTable). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/SupremeHealingPotion.cs b/Items/Potions/SupremeHealingPotion.cs index a724a1fb74..4b19d3cad3 100644 --- a/Items/Potions/SupremeHealingPotion.cs +++ b/Items/Potions/SupremeHealingPotion.cs @@ -36,7 +36,8 @@ namespace CalamityMod.Items.Potions AddIngredient(ItemID.SuperHealingPotion, 4). AddIngredient(3). AddTile(TileID.Bottles). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/SupremeManaPotion.cs b/Items/Potions/SupremeManaPotion.cs index 8602a1da77..f52a3c8f4e 100644 --- a/Items/Potions/SupremeManaPotion.cs +++ b/Items/Potions/SupremeManaPotion.cs @@ -35,7 +35,8 @@ namespace CalamityMod.Items.Potions AddIngredient(ItemID.SuperManaPotion, 15). AddIngredient(). AddTile(TileID.Bottles). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/TeslaPotion.cs b/Items/Potions/TeslaPotion.cs index 41264123fe..e66398debe 100644 --- a/Items/Potions/TeslaPotion.cs +++ b/Items/Potions/TeslaPotion.cs @@ -49,7 +49,8 @@ namespace CalamityMod.Items.Potions AddIngredient(10). AddIngredient(). AddTile(TileID.AlchemyTable). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/ZenPotion.cs b/Items/Potions/ZenPotion.cs index 03fb8ab4d7..1c1c35e338 100644 --- a/Items/Potions/ZenPotion.cs +++ b/Items/Potions/ZenPotion.cs @@ -47,7 +47,8 @@ namespace CalamityMod.Items.Potions AddIngredient(20). AddIngredient(2). AddTile(TileID.AlchemyTable). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Potions/ZergPotion.cs b/Items/Potions/ZergPotion.cs index 027f81b418..8f50b1f467 100644 --- a/Items/Potions/ZergPotion.cs +++ b/Items/Potions/ZergPotion.cs @@ -47,7 +47,8 @@ namespace CalamityMod.Items.Potions AddIngredient(20). AddIngredient(2). AddTile(TileID.AlchemyTable). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/SummonItems/CosmicWorm.cs b/Items/SummonItems/CosmicWorm.cs index 7d86ebd994..adb247c791 100644 --- a/Items/SummonItems/CosmicWorm.cs +++ b/Items/SummonItems/CosmicWorm.cs @@ -61,7 +61,8 @@ namespace CalamityMod.Items.SummonItems AddIngredient(). AddIngredient(). AddTile(TileID.LunarCraftingStation). - Register(); + Register() + .DisableDecraft(); // sequence breaking recipe CreateRecipe(). @@ -69,7 +70,8 @@ namespace CalamityMod.Items.SummonItems AddIngredient(10). AddIngredient(40). AddTile(TileID.LunarCraftingStation). - Register(); + Register() + .DisableDecraft(); } } } diff --git a/Items/Tools/WulfrumTreasurePinger.cs b/Items/Tools/WulfrumTreasurePinger.cs index caaddaa53b..092ebac554 100644 --- a/Items/Tools/WulfrumTreasurePinger.cs +++ b/Items/Tools/WulfrumTreasurePinger.cs @@ -282,7 +282,8 @@ namespace CalamityMod.Items.Tools //Intentionally craftable anywhere. CreateRecipe(). AddIngredient(6). - Register(); + Register() + .DisableDecraft(); } } diff --git a/Systems/RecipeSystem.cs b/Systems/RecipeSystem.cs index e71963526e..0188211f8e 100644 --- a/Systems/RecipeSystem.cs +++ b/Systems/RecipeSystem.cs @@ -1,4 +1,4 @@ -using System; +using System; using Terraria; using Terraria.ModLoader; @@ -15,6 +15,11 @@ namespace CalamityMod.Systems #endregion #region Recipes + public override void PostSetupContent() + { + CalamityRecipes.AddShimmerRecipes(); + } + public override void AddRecipeGroups() => CalamityRecipes.AddRecipeGroups(); public override void AddRecipes() => CalamityRecipes.AddRecipes(); diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index 64997f65cb..2139d88c69 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -824,6 +824,7 @@ namespace CalamityMod // Tier lock various items to a higher tier (sorted by progression) { Vanilla(ItemID.BundleofBalloons), AddIngredient(ModContent.ItemType(), 3) }, + { r => r.HasResult(ItemID.HorseshoeBundle) && !r.HasIngredient(ItemID.BundleofBalloons), AddIngredient(ModContent.ItemType(), 3) }, { Vanilla(ItemID.NightsEdge), AddIngredient(ModContent.ItemType(), 5) }, { Vanilla(ItemID.SpiritFlame), AddGroup(AnyAdamantiteBar, 2) }, { Vanilla(ItemID.TerraBlade), AddIngredient(ModContent.ItemType(), 12) }, @@ -1227,6 +1228,7 @@ namespace CalamityMod r.AddRecipeGroup("AnyCopperBar", 3); r.AddTile(TileID.Anvils); r.Register(); + r.DisableDecraft(); // Staff of Regrowth r = Recipe.Create(ItemID.StaffofRegrowth); @@ -1846,5 +1848,32 @@ namespace CalamityMod r.Register(); } #endregion + + #region Shimmer Recipes + /// + /// Adds a shimmer recipe, while having the result transform into the ingredient's original result. + /// This is used for inserting items into various shimmer result trees/loops, like the Class Emblem loop. + /// + public static void InsertShimmerResult(int result, int ingredient) + { + ItemID.Sets.ShimmerTransformToItem[result] = ItemID.Sets.ShimmerTransformToItem[ingredient]; + ItemID.Sets.ShimmerTransformToItem[ingredient] = result; + } + public static void AddShimmerRecipes() + { + // shorthand for the ID set + int[] convert = ItemID.Sets.ShimmerTransformToItem; + + InsertShimmerResult(ModContent.ItemType(), ItemID.SummonerEmblem); + + // Pyramid loot edits. There's no good way to have this not be hardcoded. + convert[ItemID.PharaohsMask] = ItemID.PharaohsRobe; + convert[ItemID.PharaohsRobe] = ItemID.PharaohsMask; + + convert[ItemID.AmberHook] = ItemID.SandstorminaBottle; + convert[ItemID.SandstorminaBottle] = ItemID.FlyingCarpet; + convert[ItemID.FlyingCarpet] = ItemID.AmberHook; + } + #endregion } }