diff --git a/Gores/AstrumDeus/AstrumDeusAltBody1.png b/Gores/AstrumDeus/AstrumDeusAltBody1.png new file mode 100644 index 0000000000..acab1252d3 Binary files /dev/null and b/Gores/AstrumDeus/AstrumDeusAltBody1.png differ diff --git a/Gores/AstrumDeus/AstrumDeusAltBody2.png b/Gores/AstrumDeus/AstrumDeusAltBody2.png new file mode 100644 index 0000000000..daaf2ab482 Binary files /dev/null and b/Gores/AstrumDeus/AstrumDeusAltBody2.png differ diff --git a/Gores/AstrumDeus/AstrumDeusBody1.png b/Gores/AstrumDeus/AstrumDeusBody1.png new file mode 100644 index 0000000000..8d3631cbb5 Binary files /dev/null and b/Gores/AstrumDeus/AstrumDeusBody1.png differ diff --git a/Gores/AstrumDeus/AstrumDeusBody2.png b/Gores/AstrumDeus/AstrumDeusBody2.png new file mode 100644 index 0000000000..64fa91c5e0 Binary files /dev/null and b/Gores/AstrumDeus/AstrumDeusBody2.png differ diff --git a/Gores/AstrumDeus/AstrumDeusHead1.png b/Gores/AstrumDeus/AstrumDeusHead1.png new file mode 100644 index 0000000000..5ac5311160 Binary files /dev/null and b/Gores/AstrumDeus/AstrumDeusHead1.png differ diff --git a/Gores/AstrumDeus/AstrumDeusHead2.png b/Gores/AstrumDeus/AstrumDeusHead2.png new file mode 100644 index 0000000000..22de1f18bd Binary files /dev/null and b/Gores/AstrumDeus/AstrumDeusHead2.png differ diff --git a/Gores/AstrumDeus/AstrumDeusHead3.png b/Gores/AstrumDeus/AstrumDeusHead3.png new file mode 100644 index 0000000000..ad1854a577 Binary files /dev/null and b/Gores/AstrumDeus/AstrumDeusHead3.png differ diff --git a/Gores/AstrumDeus/AstrumDeusTail1.png b/Gores/AstrumDeus/AstrumDeusTail1.png new file mode 100644 index 0000000000..b709f74c46 Binary files /dev/null and b/Gores/AstrumDeus/AstrumDeusTail1.png differ diff --git a/Gores/AstrumDeus/AstrumDeusTail2.png b/Gores/AstrumDeus/AstrumDeusTail2.png new file mode 100644 index 0000000000..a4f10db191 Binary files /dev/null and b/Gores/AstrumDeus/AstrumDeusTail2.png differ diff --git a/NPCs/AstrumDeus/AstrumDeusBody.cs b/NPCs/AstrumDeus/AstrumDeusBody.cs index 5c50aba21c..931fe6c15a 100644 --- a/NPCs/AstrumDeus/AstrumDeusBody.cs +++ b/NPCs/AstrumDeus/AstrumDeusBody.cs @@ -194,6 +194,20 @@ namespace CalamityMod.NPCs.AstrumDeus astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 2f); Main.dust[astralDust].velocity *= 2f; } + if (Main.netMode != NetmodeID.Server) + { + float randomSpread = Main.rand.Next(-200, 201) / 100f; + if (NPC.localAI[3] == 1f) + { + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find("AstrumDeusAltBody1").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find("AstrumDeusAltBody2").Type, 1f); + } + else + { + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find("AstrumDeusBody1").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find("AstrumDeusBody2").Type, 1f); + } + } } } diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index 5be7ed4304..4ebacbee89 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -228,6 +228,13 @@ namespace CalamityMod.NPCs.AstrumDeus astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 2f); Main.dust[astralDust].velocity *= 2f; } + if (Main.netMode != NetmodeID.Server) + { + float randomSpread = Main.rand.Next(-200, 201) / 100f; + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find("AstrumDeusHead1").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find("AstrumDeusHead2").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find("AstrumDeusHead3").Type, 1f); + } } } } diff --git a/NPCs/AstrumDeus/AstrumDeusTail.cs b/NPCs/AstrumDeus/AstrumDeusTail.cs index 5f671f1e2a..e951bf803a 100644 --- a/NPCs/AstrumDeus/AstrumDeusTail.cs +++ b/NPCs/AstrumDeus/AstrumDeusTail.cs @@ -165,6 +165,12 @@ namespace CalamityMod.NPCs.AstrumDeus astralDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType(), 0f, 0f, 100, default, 2f); Main.dust[astralDust].velocity *= 2f; } + if (Main.netMode != NetmodeID.Server) + { + float randomSpread = Main.rand.Next(-200, 201) / 100f; + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find("AstrumDeusTail1").Type, 1f); + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find("AstrumDeusTail2").Type, 1f); + } } } diff --git a/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs index 09ac47f3cf..826432bb36 100644 --- a/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs +++ b/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs @@ -774,98 +774,102 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs float shootProjectile = (doubleWormPhase && expertMode) ? 200 : 400; float timer = npc.ai[0] + 15f; float divisor = timer + shootProjectile; + bool canFireProjectiles = npc.Opacity >= 1f; bool shootGodRays = phase2 || deathModeEnragePhase_BodyAndTail; - if (!flyAtTarget || deathModeEnragePhase_BodyAndTail) + if (canFireProjectiles) { - float laserDivisor = (phase2 && !deathModeEnragePhase_BodyAndTail) ? 4f : 2f; - if (npc.localAI[0] % divisor == 0f && npc.ai[0] % laserDivisor == 0f) + if (!flyAtTarget || deathModeEnragePhase_BodyAndTail) { - npc.TargetClosest(); - - if (Main.netMode != NetmodeID.MultiplayerClient) + float laserDivisor = (phase2 && !deathModeEnragePhase_BodyAndTail) ? 4f : 2f; + if (npc.localAI[0] % divisor == 0f && npc.ai[0] % laserDivisor == 0f) { - if (deathModeEnragePhase_BodyAndTail) - { - Vector2 velocity = Vector2.Zero; - if (movingMines) - { - Vector2 randomMineMovement = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101)); - randomMineMovement.Normalize(); - randomMineMovement *= Main.rand.Next(90, 121) * 0.01f; - velocity = randomMineMovement; - } + npc.TargetClosest(); - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - float split = (splittingMines && npc.ai[0] % 3f == 0f) ? 1f : 0f; - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, velocity, type, damage, 0f, Main.myPlayer, split, 0f); - } - } - - if (Vector2.Distance(player.Center, npc.Center) > 80f) - { if (Main.netMode != NetmodeID.MultiplayerClient) { - float deusLaserSpeed = (death ? 16f : revenge ? 14f : 13f) + enrageScale * 4f; - - Vector2 deusLaserCenter = npc.Center; - float deusLaserTargetX = player.Center.X - deusLaserCenter.X; - float deusLaserTargetY = player.Center.Y - deusLaserCenter.Y; - float deusLaserTargetDist = (float)Math.Sqrt(deusLaserTargetX * deusLaserTargetX + deusLaserTargetY * deusLaserTargetY); - deusLaserTargetDist = deusLaserSpeed / deusLaserTargetDist; - deusLaserTargetX *= deusLaserTargetDist; - deusLaserTargetY *= deusLaserTargetDist; - deusLaserCenter.X += deusLaserTargetX * 5f; - deusLaserCenter.Y += deusLaserTargetY * 5f; - - Vector2 shootDirection = new Vector2(deusLaserTargetX, deusLaserTargetY).SafeNormalize(Vector2.UnitY); - Vector2 laserVelocity = shootDirection * deusLaserSpeed; - - int type = shootGodRays ? ModContent.ProjectileType() : ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - if (shootGodRays) + if (deathModeEnragePhase_BodyAndTail) { - SoundEngine.PlaySound(AstrumDeusHead.GodRaySound, npc.Center); - // Waving beams need to start offset so they cross each other neatly. - float waveSideOffset = Main.rand.NextFloat(9f, 14f); - Vector2 perp = shootDirection.RotatedBy(-MathHelper.PiOver2) * waveSideOffset; - - for (int i = -1; i <= 1; i += 2) + Vector2 velocity = Vector2.Zero; + if (movingMines) { - Vector2 laserStartPos = deusLaserCenter + i * perp + Main.rand.NextVector2CircularEdge(6f, 6f); - Projectile godRay = Projectile.NewProjectileDirect(npc.GetSource_FromAI(), laserStartPos, laserVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); - - // Tell this Phased God Ray exactly which way it should be waving. - godRay.localAI[1] = i * 0.5f; + Vector2 randomMineMovement = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101)); + randomMineMovement.Normalize(); + randomMineMovement *= Main.rand.Next(90, 121) * 0.01f; + velocity = randomMineMovement; } + + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + float split = (splittingMines && npc.ai[0] % 3f == 0f) ? 1f : 0f; + Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, velocity, type, damage, 0f, Main.myPlayer, split, 0f); } - else + } + + if (Vector2.Distance(player.Center, npc.Center) > 80f) + { + if (Main.netMode != NetmodeID.MultiplayerClient) { - SoundEngine.PlaySound(AstrumDeusHead.LaserSound, npc.Center); - Projectile.NewProjectile(npc.GetSource_FromAI(), deusLaserCenter, laserVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); + float deusLaserSpeed = (death ? 16f : revenge ? 14f : 13f) + enrageScale * 4f; + + Vector2 deusLaserCenter = npc.Center; + float deusLaserTargetX = player.Center.X - deusLaserCenter.X; + float deusLaserTargetY = player.Center.Y - deusLaserCenter.Y; + float deusLaserTargetDist = (float)Math.Sqrt(deusLaserTargetX * deusLaserTargetX + deusLaserTargetY * deusLaserTargetY); + deusLaserTargetDist = deusLaserSpeed / deusLaserTargetDist; + deusLaserTargetX *= deusLaserTargetDist; + deusLaserTargetY *= deusLaserTargetDist; + deusLaserCenter.X += deusLaserTargetX * 5f; + deusLaserCenter.Y += deusLaserTargetY * 5f; + + Vector2 shootDirection = new Vector2(deusLaserTargetX, deusLaserTargetY).SafeNormalize(Vector2.UnitY); + Vector2 laserVelocity = shootDirection * deusLaserSpeed; + + int type = shootGodRays ? ModContent.ProjectileType() : ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + if (shootGodRays) + { + SoundEngine.PlaySound(AstrumDeusHead.GodRaySound, npc.Center); + // Waving beams need to start offset so they cross each other neatly. + float waveSideOffset = Main.rand.NextFloat(9f, 14f); + Vector2 perp = shootDirection.RotatedBy(-MathHelper.PiOver2) * waveSideOffset; + + for (int i = -1; i <= 1; i += 2) + { + Vector2 laserStartPos = deusLaserCenter + i * perp + Main.rand.NextVector2CircularEdge(6f, 6f); + Projectile godRay = Projectile.NewProjectileDirect(npc.GetSource_FromAI(), laserStartPos, laserVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); + + // Tell this Phased God Ray exactly which way it should be waving. + godRay.localAI[1] = i * 0.5f; + } + } + else + { + SoundEngine.PlaySound(AstrumDeusHead.LaserSound, npc.Center); + Projectile.NewProjectile(npc.GetSource_FromAI(), deusLaserCenter, laserVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); + } } } } } - } - else - { - if (npc.localAI[0] % divisor == 0f && npc.ai[0] % 2f == 0f) + else { - Vector2 velocity = Vector2.Zero; - if (movingMines) + if (npc.localAI[0] % divisor == 0f && npc.ai[0] % 2f == 0f) { - Vector2 randomMineMovement = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101)); - randomMineMovement.Normalize(); - randomMineMovement *= Main.rand.Next(30, 121) * 0.01f; - velocity = randomMineMovement; - } + Vector2 velocity = Vector2.Zero; + if (movingMines) + { + Vector2 randomMineMovement = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101)); + randomMineMovement.Normalize(); + randomMineMovement *= Main.rand.Next(30, 121) * 0.01f; + velocity = randomMineMovement; + } - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - float split = (splittingMines && npc.ai[0] % 3f == 0f) ? 1f : 0f; - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, velocity, type, damage, 0f, Main.myPlayer, split, 0f); + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + float split = (splittingMines && npc.ai[0] % 3f == 0f) ? 1f : 0f; + Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, velocity, type, damage, 0f, Main.myPlayer, split, 0f); + } } } }