diff --git a/NPCs/HiveMind/HiveCyst.cs b/NPCs/HiveMind/HiveCyst.cs index 865c16b17e..e750d2dc6f 100644 --- a/NPCs/HiveMind/HiveCyst.cs +++ b/NPCs/HiveMind/HiveCyst.cs @@ -54,6 +54,45 @@ namespace CalamityMod.NPCs.HiveMind NPC.frame.Y = frame * frameHeight; } + public override void AI() + { + //TODO -- Zenith seed. + bool getFuckedAI = Main.getGoodWorld && Main.masterMode; + float timeToSpawn = 120f; + + if (getFuckedAI && NPC.AnyNPCs(ModContent.NPCType())) + { + //Passively spawns random enemies + NPC.ai[0]++; + + if (NPC.ai[0] >= timeToSpawn) + { + int spawnRandomizer = Main.rand.Next(0, 5); + int type = NPCID.EaterofSouls; + + switch (spawnRandomizer) + { + case 0: + case 1: + break; + case 2: + type = NPCID.DevourerHead; + break; + case 3: + type = ModContent.NPCType(); + break; + case 4: + type = ModContent.NPCType(); + break; + default: + break; + } + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, type); + NPC.ai[0] = 0f; + } + } + } + public override float SpawnChance(NPCSpawnInfo spawnInfo) { if (CalamityGlobalNPC.AnyEvents(spawnInfo.Player)) diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index 64f0fa2ee9..c77e9a25b2 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -351,6 +351,13 @@ namespace CalamityMod.NPCs.HiveMind if (choice < 5) NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.position.X + Main.rand.Next(NPC.width), (int)NPC.position.Y + Main.rand.Next(NPC.height), type); } + + //TODO -- Zenith seed. + bool getFuckedAI = Main.getGoodWorld && Main.masterMode; + + //Spawn a Hive Cyst + if (getFuckedAI && NPC.CountNPCS(ModContent.NPCType()) < 3) + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.position.X + Main.rand.Next(NPC.width), (int)NPC.position.Y + Main.rand.Next(NPC.height), ModContent.NPCType()); } private void ReelBack()