From 762b7cb06108e77436d03f6e791f24f2fa677f19 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 2 Sep 2024 21:45:37 +0700 Subject: [PATCH] suggestions - All Mothron drops are now accessible without Mechs defeated - Moved a chat message in reference to an oversight - Rebalanced all Calamity NPCs except Sea King - Removed DPS Meter recipe and allowed all 3 Travelling Merchant Cell Phone parts to be cyclically shimmered --- Localization/en-US/Mods.CalamityMod.Vanilla.hjson | 2 +- NPCs/CalamityGlobalNPCLoot.cs | 11 ++++++++++- NPCs/CalamityGlobalTownNPC.cs | 8 ++++---- NPCs/TownNPCs/DILF.cs | 6 +++--- NPCs/TownNPCs/FAP.cs | 6 +++--- NPCs/TownNPCs/THIEF.cs | 4 ++-- NPCs/TownNPCs/WITCH.cs | 4 ++-- Systems/RecipeSystem.cs | 13 +++++-------- 8 files changed, 30 insertions(+), 24 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index 1fcc336b2e..72448ef62f 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -82,6 +82,7 @@ HerbTooltips: { } MechanicChat: { + HasPortalGun: Just what is that contraption? It makes my Teleporters look like child's play! MoonLordDefeated: What do you mean your traps aren't making the cut? Don't look at me! Eclipse: Um... should my nightlight be on? AcidRain: Maybe I should've waterproofed my gadgets... They're starting to corrode. @@ -143,7 +144,6 @@ SeedTooltips: { SkeletonMerchantChat.Normal: What'dya buyin'? SteampunkerChat: { - HasPortalGun: Just what is that contraption? It makes my Teleporters look like child's play! MoonLordDefeated: Yep! I'm also considering being a space pirate now. Astral: Some of my machines are starting to go haywire thanks to this Astral Infection. I probably shouldn't have built them here. Hallow: I'm sorry I really don't have any Unicorn proof tech here, you're on your own. diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 96db52e4c2..61c1daf600 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -623,8 +623,17 @@ namespace CalamityMod.NPCs break; // Mothron - // 20-30 Darksun Fragment @ 100% IF Devourer of Gods dead case NPCID.Mothron: + // Make all drops accessible pre-Mechs as Mothrons already only spawn post-Plantera (linearity rule removal) + // This is identical to vanilla drop rates + // This loot is already reported in vanilla regardless of condition so we don't need to report it twice + LeadingConditionRule postMechs = new LeadingConditionRule(new Conditions.DownedAllMechBosses()); + postMechs.OnFailedConditions(ItemDropRule.ExpertGetsRerolls(ItemID.BrokenHeroSword, 4, 1), hideLootReport: true); + postMechs.OnFailedConditions(ItemDropRule.ExpertGetsRerolls(ItemID.MothronWings, 20, 1), hideLootReport: true); + postMechs.OnFailedConditions(ItemDropRule.ExpertGetsRerolls(ItemID.TheEyeOfCthulhu, 3, 1), hideLootReport: true); + npcLoot.Add(postMechs); + + // 20-30 Darksun Fragment @ 100% IF Devourer of Gods dead postDoG.Add(ModContent.ItemType(), 1, 20, 30); break; diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 8d612d1dcd..bda2934fed 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -847,7 +847,9 @@ namespace CalamityMod.NPCs break; case NPCID.Mechanic: - if (Main.rand.NextBool(5) && NPC.downedMoonlord) + if (Main.rand.NextBool(5) && Main.LocalPlayer.InventoryHas(ItemID.PortalGun)) + chat = CalamityUtils.GetTextValue("Vanilla.MechanicChat.HasPortalGun"); + else if (Main.rand.NextBool(5) && NPC.downedMoonlord) chat = CalamityUtils.GetTextValue("Vanilla.MechanicChat.MoonLordDefeated"); else if (Main.rand.NextBool(5) && Main.eclipse) chat = CalamityUtils.GetTextValue("Vanilla.MechanicChat.Eclipse"); @@ -928,9 +930,7 @@ namespace CalamityMod.NPCs break; case NPCID.Steampunker: - if (Main.rand.NextBool(5) && Main.LocalPlayer.InventoryHas(ItemID.PortalGun)) - chat = CalamityUtils.GetTextValue("Vanilla.SteampunkerChat.HasPortalGun"); - else if (Main.rand.NextBool(5) && NPC.downedMoonlord) + if (Main.rand.NextBool(5) && NPC.downedMoonlord) chat = CalamityUtils.GetTextValue("Vanilla.SteampunkerChat.MoonLordDefeated"); else if (Main.rand.NextBool(5) && Main.LocalPlayer.Calamity().ZoneAstral) chat = CalamityUtils.GetTextValue("Vanilla.SteampunkerChat.Astral"); diff --git a/NPCs/TownNPCs/DILF.cs b/NPCs/TownNPCs/DILF.cs index 9b2de8371c..9db36f1af2 100644 --- a/NPCs/TownNPCs/DILF.cs +++ b/NPCs/TownNPCs/DILF.cs @@ -169,14 +169,14 @@ namespace CalamityMod.NPCs.TownNPCs public override void TownNPCAttackStrength(ref int damage, ref float knockback) { - damage = 20; + damage = 150; knockback = 9f; } public override void TownNPCAttackCooldown(ref int cooldown, ref int randExtraCooldown) { - cooldown = 10; - randExtraCooldown = 50; + cooldown = 30; + randExtraCooldown = 15; } public override void TownNPCAttackProj(ref int projType, ref int attackDelay) diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index df48e4ee91..5e48543849 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -939,14 +939,14 @@ namespace CalamityMod.NPCs.TownNPCs public override void TownNPCAttackStrength(ref int damage, ref float knockback) { - damage = 15; + damage = 60; knockback = 2f; } public override void TownNPCAttackCooldown(ref int cooldown, ref int randExtraCooldown) { - cooldown = 180; - randExtraCooldown = 60; + cooldown = 60; + randExtraCooldown = 15; } public override void TownNPCAttackProj(ref int projType, ref int attackDelay) diff --git a/NPCs/TownNPCs/THIEF.cs b/NPCs/TownNPCs/THIEF.cs index 6f9d0a7d19..9433ea95d2 100644 --- a/NPCs/TownNPCs/THIEF.cs +++ b/NPCs/TownNPCs/THIEF.cs @@ -354,8 +354,8 @@ namespace CalamityMod.NPCs.TownNPCs public override void TownNPCAttackCooldown(ref int cooldown, ref int randExtraCooldown) { - cooldown = 180; - randExtraCooldown = 60; + cooldown = 90; + randExtraCooldown = 15; } public override void TownNPCAttackProj(ref int projType, ref int attackDelay) diff --git a/NPCs/TownNPCs/WITCH.cs b/NPCs/TownNPCs/WITCH.cs index beefa5a4fb..6d435ce455 100644 --- a/NPCs/TownNPCs/WITCH.cs +++ b/NPCs/TownNPCs/WITCH.cs @@ -152,14 +152,14 @@ namespace CalamityMod.NPCs.TownNPCs public override void TownNPCAttackStrength(ref int damage, ref float knockback) { - damage = 50; + damage = 300; knockback = 10f; } public override void TownNPCAttackCooldown(ref int cooldown, ref int randExtraCooldown) { cooldown = 10; - randExtraCooldown = 50; + randExtraCooldown = 15; } public override bool PreAI() diff --git a/Systems/RecipeSystem.cs b/Systems/RecipeSystem.cs index 22c09a7d10..24c5e535d2 100644 --- a/Systems/RecipeSystem.cs +++ b/Systems/RecipeSystem.cs @@ -995,6 +995,11 @@ namespace CalamityMod.Systems InsertShimmerResult(ModContent.ItemType(), ItemID.SummonerEmblem); + // Cyclical Travelling Merchant Cell Phone materials + convert[ItemID.DPSMeter] = ItemID.LifeformAnalyzer; + convert[ItemID.LifeformAnalyzer] = ItemID.Stopwatch; + convert[ItemID.Stopwatch] = ItemID.DPSMeter; + // Pyramid loot edits. There's no good way to have this not be hardcoded. convert[ItemID.PharaohsMask] = ItemID.PharaohsRobe; convert[ItemID.PharaohsRobe] = ItemID.PharaohsMask; @@ -1659,14 +1664,6 @@ namespace CalamityMod.Systems r.Register(); r.DisableDecraft(); - // DPS Meter - r = Recipe.Create(ItemID.DPSMeter); - r.AddIngredient(ItemID.Wire, 10); - r.AddRecipeGroup(AnyGoldBar, 5); - r.AddTile(TileID.Anvils); - r.Register(); - r.DisableDecraft(); - // Hand Warmer r = Recipe.Create(ItemID.HandWarmer); r.AddIngredient(ItemID.Silk, 10);