diff --git a/Gores/HiveMindGores/HiveMindGore.png b/Gores/HiveMindGores/HiveMindGore.png deleted file mode 100644 index e3f549d02b..0000000000 Binary files a/Gores/HiveMindGores/HiveMindGore.png and /dev/null differ diff --git a/Gores/HiveMindGores/HiveMindGore1.png b/Gores/HiveMindGores/HiveMindGore1.png new file mode 100644 index 0000000000..b105d95095 Binary files /dev/null and b/Gores/HiveMindGores/HiveMindGore1.png differ diff --git a/Gores/HiveMindGores/HiveMindGore2.png b/Gores/HiveMindGores/HiveMindGore2.png index c5d32e5861..a5d94cff05 100644 Binary files a/Gores/HiveMindGores/HiveMindGore2.png and b/Gores/HiveMindGores/HiveMindGore2.png differ diff --git a/Gores/HiveMindGores/HiveMindGore3.png b/Gores/HiveMindGores/HiveMindGore3.png index abd2e50ff2..e192cf2fa0 100644 Binary files a/Gores/HiveMindGores/HiveMindGore3.png and b/Gores/HiveMindGores/HiveMindGore3.png differ diff --git a/Gores/HiveMindGores/HiveMindGore4.png b/Gores/HiveMindGores/HiveMindGore4.png index 34bdd22b3b..59959b89a7 100644 Binary files a/Gores/HiveMindGores/HiveMindGore4.png and b/Gores/HiveMindGores/HiveMindGore4.png differ diff --git a/Gores/HiveMindGores/HiveMindGore5.png b/Gores/HiveMindGores/HiveMindGore5.png new file mode 100644 index 0000000000..c1122c0d25 Binary files /dev/null and b/Gores/HiveMindGores/HiveMindGore5.png differ diff --git a/Gores/HiveMindGores/HiveMindGore6.png b/Gores/HiveMindGores/HiveMindGore6.png new file mode 100644 index 0000000000..cbe1d54243 Binary files /dev/null and b/Gores/HiveMindGores/HiveMindGore6.png differ diff --git a/Gores/HiveMindGores/HiveMindGore7.png b/Gores/HiveMindGores/HiveMindGore7.png new file mode 100644 index 0000000000..d8cb12f44d Binary files /dev/null and b/Gores/HiveMindGores/HiveMindGore7.png differ diff --git a/Gores/HiveMindGores/HiveMindP2Gore.png b/Gores/HiveMindGores/HiveMindP2Gore.png deleted file mode 100644 index eb2c3706bb..0000000000 Binary files a/Gores/HiveMindGores/HiveMindP2Gore.png and /dev/null differ diff --git a/Gores/HiveMindGores/HiveMindP2Gore1.png b/Gores/HiveMindGores/HiveMindP2Gore1.png new file mode 100644 index 0000000000..39f5aca4d4 Binary files /dev/null and b/Gores/HiveMindGores/HiveMindP2Gore1.png differ diff --git a/Gores/HiveMindGores/HiveMindP2Gore10.png b/Gores/HiveMindGores/HiveMindP2Gore10.png new file mode 100644 index 0000000000..223555d910 Binary files /dev/null and b/Gores/HiveMindGores/HiveMindP2Gore10.png differ diff --git a/Gores/HiveMindGores/HiveMindP2Gore2.png b/Gores/HiveMindGores/HiveMindP2Gore2.png index 6890121fb5..89103290de 100644 Binary files a/Gores/HiveMindGores/HiveMindP2Gore2.png and b/Gores/HiveMindGores/HiveMindP2Gore2.png differ diff --git a/Gores/HiveMindGores/HiveMindP2Gore3.png b/Gores/HiveMindGores/HiveMindP2Gore3.png index 55129b743b..f625fce092 100644 Binary files a/Gores/HiveMindGores/HiveMindP2Gore3.png and b/Gores/HiveMindGores/HiveMindP2Gore3.png differ diff --git a/Gores/HiveMindGores/HiveMindP2Gore4.png b/Gores/HiveMindGores/HiveMindP2Gore4.png index 6382073458..4f952e01d3 100644 Binary files a/Gores/HiveMindGores/HiveMindP2Gore4.png and b/Gores/HiveMindGores/HiveMindP2Gore4.png differ diff --git a/Gores/HiveMindGores/HiveMindP2Gore5.png b/Gores/HiveMindGores/HiveMindP2Gore5.png index 8ef7210733..df89ddca60 100644 Binary files a/Gores/HiveMindGores/HiveMindP2Gore5.png and b/Gores/HiveMindGores/HiveMindP2Gore5.png differ diff --git a/Gores/HiveMindGores/HiveMindP2Gore6.png b/Gores/HiveMindGores/HiveMindP2Gore6.png index b7e821b1a7..4c6c8a16f6 100644 Binary files a/Gores/HiveMindGores/HiveMindP2Gore6.png and b/Gores/HiveMindGores/HiveMindP2Gore6.png differ diff --git a/Gores/HiveMindGores/HiveMindP2Gore7.png b/Gores/HiveMindGores/HiveMindP2Gore7.png new file mode 100644 index 0000000000..13e4540f9a Binary files /dev/null and b/Gores/HiveMindGores/HiveMindP2Gore7.png differ diff --git a/Gores/HiveMindGores/HiveMindP2Gore8.png b/Gores/HiveMindGores/HiveMindP2Gore8.png new file mode 100644 index 0000000000..fe185b813d Binary files /dev/null and b/Gores/HiveMindGores/HiveMindP2Gore8.png differ diff --git a/Gores/HiveMindGores/HiveMindP2Gore9.png b/Gores/HiveMindGores/HiveMindP2Gore9.png new file mode 100644 index 0000000000..debe703ec9 Binary files /dev/null and b/Gores/HiveMindGores/HiveMindP2Gore9.png differ diff --git a/NPCs/HiveMind/HiveCyst.png b/NPCs/HiveMind/HiveCyst.png index c6a1b4d33b..bb5611ada1 100644 Binary files a/NPCs/HiveMind/HiveCyst.png and b/NPCs/HiveMind/HiveCyst.png differ diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index 9491d7f0d5..7b6db35df1 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -17,7 +17,7 @@ namespace CalamityMod.NPCs.HiveMind public override void SetStaticDefaults() { DisplayName.SetDefault("The Hive Mind"); - Main.npcFrameCount[npc.type] = 4; + Main.npcFrameCount[npc.type] = 16; } public override void SetDefaults() @@ -303,10 +303,9 @@ namespace CalamityMod.NPCs.HiveMind } else { - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/HiveMindGores/HiveMindGore"), 1f); - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/HiveMindGores/HiveMindGore2"), 1f); - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/HiveMindGores/HiveMindGore3"), 1f); - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/HiveMindGores/HiveMindGore4"), 1f); + int goreAmount = 7; + for (int i = 1; i <= goreAmount; i++) + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/HiveMindGores/HiveMindGore" + i), 1f); if (Main.netMode != NetmodeID.MultiplayerClient) { if (NPC.CountNPCS(ModContent.NPCType()) < 1) diff --git a/NPCs/HiveMind/HiveMind.png b/NPCs/HiveMind/HiveMind.png index 5fbba4ef76..c37e1028cf 100644 Binary files a/NPCs/HiveMind/HiveMind.png and b/NPCs/HiveMind/HiveMind.png differ diff --git a/NPCs/HiveMind/HiveMindP2.cs b/NPCs/HiveMind/HiveMindP2.cs index 4eade8fda8..cf747c844b 100644 --- a/NPCs/HiveMind/HiveMindP2.cs +++ b/NPCs/HiveMind/HiveMindP2.cs @@ -59,19 +59,21 @@ namespace CalamityMod.NPCs.HiveMind int nextState = 0; int reelCount = 0; Vector2 deceleration; + int counter = 0; + bool initialised = false; public override void SetStaticDefaults() { DisplayName.SetDefault("The Hive Mind"); - Main.npcFrameCount[npc.type] = 4; + Main.npcFrameCount[npc.type] = 16; } public override void SetDefaults() { npc.npcSlots = 5f; npc.damage = 35; - npc.width = 150; - npc.height = 120; + npc.width = 177; + npc.height = 142; npc.defense = 5; npc.LifeMaxNERB(5800, 7560, 3000000); double HPBoost = CalamityMod.CalamityConfig.BossHealthPercentageBoost * 0.01; @@ -140,6 +142,8 @@ namespace CalamityMod.NPCs.HiveMind writer.Write(rotation); writer.Write(previousState); writer.Write(reelCount); + writer.Write(counter); + writer.Write(initialised); } public override void ReceiveExtraAI(BinaryReader reader) @@ -152,14 +156,42 @@ namespace CalamityMod.NPCs.HiveMind rotation = reader.ReadDouble(); previousState = reader.ReadInt32(); reelCount = reader.ReadInt32(); + counter = reader.ReadInt32(); + initialised = reader.ReadBoolean(); } public override void FindFrame(int frameHeight) { - npc.frameCounter += 0.15f; - npc.frameCounter %= Main.npcFrameCount[npc.type]; - int frame = (int)npc.frameCounter; - npc.frame.Y = frame * frameHeight; + int width = npc.width; + int height = npc.height; + + if (!initialised) + { + counter = 8; + npc.frameCounter = 6; + initialised = true; + } + + //ensure width and height are set. + npc.frame.Width = width; + npc.frame.Height = height; + npc.frameCounter++; + if (npc.frameCounter > 6) + { + npc.frame.X = counter >= 8 ? width + 3 : 0; + if (counter == 8) + npc.frame.Y = 0; + else + npc.frame.Y += height; + npc.frameCounter = 0; + counter++; + } + if (counter == 16) + { + counter = 1; + npc.frame.Y = 0; + npc.frame.X = 0; + } } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) @@ -169,9 +201,8 @@ namespace CalamityMod.NPCs.HiveMind color24 = npc.GetAlpha(color24); Color color25 = Lighting.GetColor((int)((double)npc.position.X + (double)npc.width * 0.5) / 16, (int)(((double)npc.position.Y + (double)npc.height * 0.5) / 16.0)); Texture2D texture2D3 = ModContent.GetTexture("CalamityMod/NPCs/HiveMind/HiveMindP2"); - int num156 = Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type]; - int y3 = num156 * (int)npc.frameCounter; - Rectangle rectangle = new Rectangle(0, y3, texture2D3.Width, num156); + int num156 = Main.npcTexture[npc.type].Height / 8; + Rectangle rectangle = new Rectangle(npc.frame.X, npc.frame.Y, npc.frame.X, num156); Vector2 origin2 = rectangle.Size() / 2f; int num157 = 8; int num158 = 2; @@ -201,6 +232,9 @@ namespace CalamityMod.NPCs.HiveMind Main.spriteBatch.Draw(texture2D3, value4 + npc.Size / 2f - Main.screenPosition + new Vector2(0, npc.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle), color26, num165 + npc.rotation * num160 * (float)(num161 - 1) * -(float)spriteEffects.HasFlag(SpriteEffects.FlipHorizontally).ToDirectionInt(), origin2, npc.scale, effects, 0f); goto IL_6881; } + + + var something = npc.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; spriteBatch.Draw(Main.npcTexture[npc.type], npc.Center - Main.screenPosition + new Vector2(0, npc.gfxOffY), npc.frame, color24, npc.rotation, npc.frame.Size() / 2, npc.scale, something, 0); return false; @@ -678,12 +712,9 @@ namespace CalamityMod.NPCs.HiveMind } if (npc.life <= 0) { - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/HiveMindGores/HiveMindP2Gore"), 1f); - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/HiveMindGores/HiveMindP2Gore2"), 1f); - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/HiveMindGores/HiveMindP2Gore3"), 1f); - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/HiveMindGores/HiveMindP2Gore4"), 1f); - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/HiveMindGores/HiveMindP2Gore5"), 1f); - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/HiveMindGores/HiveMindP2Gore6"), 1f); + int goreAmount = 10; + for (int i = 1; i <= goreAmount; i++) + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/HiveMindGores/HiveMindP2Gore" + i), 1f); npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 200; diff --git a/NPCs/HiveMind/HiveMindP2.png b/NPCs/HiveMind/HiveMindP2.png index 36e3053d57..05517d66ba 100644 Binary files a/NPCs/HiveMind/HiveMindP2.png and b/NPCs/HiveMind/HiveMindP2.png differ diff --git a/NPCs/HiveMind/HiveMindP2_Head_Boss.png b/NPCs/HiveMind/HiveMindP2_Head_Boss.png index 8f358b7a8c..d0c2a41d77 100644 Binary files a/NPCs/HiveMind/HiveMindP2_Head_Boss.png and b/NPCs/HiveMind/HiveMindP2_Head_Boss.png differ diff --git a/NPCs/HiveMind/HiveMind_Head_Boss.png b/NPCs/HiveMind/HiveMind_Head_Boss.png index 2b3939c1bf..b13f71648e 100644 Binary files a/NPCs/HiveMind/HiveMind_Head_Boss.png and b/NPCs/HiveMind/HiveMind_Head_Boss.png differ