From fed6146ea723bf8e0c6276b77b4acac17c8a12e5 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Sat, 17 May 2025 18:55:50 -0700 Subject: [PATCH] ghost bell swarm spwaning adjustments --- NPCs/SunkenSea/GhostBell.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/NPCs/SunkenSea/GhostBell.cs b/NPCs/SunkenSea/GhostBell.cs index dfd43215ca..4e22f9a242 100644 --- a/NPCs/SunkenSea/GhostBell.cs +++ b/NPCs/SunkenSea/GhostBell.cs @@ -138,14 +138,26 @@ namespace CalamityMod.NPCs.SunkenSea NPC.TargetClosest(); if (Phase == (int)PhaseType.Idle) { - int jellyAmt = Main.player[NPC.target].Calamity().ZonePolypForest ? Main.rand.Next(3, 5) : Main.rand.Next(2, 4); + // 1-3 in the Polyp Forest, 3-4 in the burrows + int jellyAmt = Main.player[NPC.target].Calamity().ZonePolypForest ? Main.rand.Next(2, 4) : Main.rand.Next(3, 5); + // A swarm of babies spawns if the jelly is in the Polyp Forest + if (Main.player[NPC.target].Calamity().ZonePolypForest) + { + for (int i = 0; i < jellyAmt; i++) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int bebe = NPC.NewNPC(NPC.GetSource_FromThis(), (int)(NPC.Center.X + Main.rand.NextFloat(1f, 2f)), (int)(NPC.Center.Y + Main.rand.NextFloat(1f, 2f)), ModContent.NPCType(), ai0: -1); + Main.npc[bebe].rotation = Main.rand.NextFloat(0, MathHelper.TwoPi); + } + } + } + // Spawn more adults for (int i = 0; i < jellyAmt; i++) { if (Main.netMode != NetmodeID.MultiplayerClient) { NPC.NewNPC(NPC.GetSource_FromThis(), (int)(NPC.Center.X + Main.rand.NextFloat(1f, 2f)), (int)(NPC.Center.Y + Main.rand.NextFloat(1f, 2f)), Type, ai0: -1, ai2: Main.rand.Next(0, 60)); - int bebe = NPC.NewNPC(NPC.GetSource_FromThis(), (int)(NPC.Center.X + Main.rand.NextFloat(1f, 2f)), (int)(NPC.Center.Y + Main.rand.NextFloat(1f, 2f)), ModContent.NPCType(), ai0: -1); - Main.npc[bebe].rotation = Main.rand.NextFloat(0, MathHelper.TwoPi); } } }