ghost bell swarm spwaning adjustments

This commit is contained in:
GinYuH authored and Cameron Ewell committed 2025-05-22 15:43:23 -04:00
1 parent 1d75f1126f
commit fed6146ea7
1 file changed
+15 -3
+15 -3
View File
@@ -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<BabyGhostBell>(), 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<BabyGhostBell>(), ai0: -1);
Main.npc[bebe].rotation = Main.rand.NextFloat(0, MathHelper.TwoPi);
}
}
}