From 2171f4ceb3fab75f22df6ffd934cb72efe55e054 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Sat, 11 Feb 2023 07:33:09 -0600 Subject: [PATCH] 1 - Ceaseless Void Dark Energies emit a bit more dust when they become vulnerable, emit light and have a noticeable pulse effect. 2 - Commander and Defender move a bit further down while swapping sides and actually go down while swapping sides in phase 2. 3 - Ceaseless Void Dark Energy projectiles emit light that scales with opacity. --- NPCs/CeaselessVoid/DarkEnergy.cs | 8 +++++--- NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs | 4 ++-- Projectiles/Boss/DarkEnergyBall.cs | 6 ++++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/NPCs/CeaselessVoid/DarkEnergy.cs b/NPCs/CeaselessVoid/DarkEnergy.cs index e382ed2e0c..4a1ca6c647 100644 --- a/NPCs/CeaselessVoid/DarkEnergy.cs +++ b/NPCs/CeaselessVoid/DarkEnergy.cs @@ -119,7 +119,7 @@ namespace CalamityMod.NPCs.CeaselessVoid { if (NPC.dontTakeDamage) { - for (int k = 0; k < 10; k++) + for (int k = 0; k < 15; k++) { int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0, 0, 0, default, 1f); Main.dust[dust].noGravity = true; @@ -128,12 +128,14 @@ namespace CalamityMod.NPCs.CeaselessVoid NPC.damage = NPC.defDamage; NPC.dontTakeDamage = false; - float scalar = (float)Math.Cos(NPC.Calamity().newAI[1] * MathHelper.TwoPi) / 2f + 0.5f; - NPC.scale = MathHelper.Lerp(0.9f, 1f, scalar); + float scalar = (float)Math.Cos(NPC.Calamity().newAI[1] * 0.33f) / 2f + 0.5f; + NPC.scale = MathHelper.Lerp(0.8f, 1f, scalar); NPC.Opacity = MathHelper.Lerp(0.5f, 1f, scalar); NPC.Calamity().newAI[1] += 1f; } + Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), 0.8f * NPC.Opacity, 0f, 1.2f * NPC.Opacity); + // Force despawn if Ceaseless Void isn't active if (CalamityGlobalNPC.voidBoss < 0 || !Main.npc[CalamityGlobalNPC.voidBoss].active) { diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs b/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs index 5478b14d4d..1112fdae1a 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs @@ -340,7 +340,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians float timeBeforeMoveToOtherSideInPhase1Reset = moveToOtherSideInPhase1GateValue * 2f; float totalGoLowDuration = 240f; float goLowDuration = totalGoLowDuration * 0.5f; - float goLowDistance = 480f; + float goLowDistance = 500f; // Side swap variables for Phase 2 float defenderCommanderGuardPhase2Duration = (bossRush || biomeEnraged) ? 420f : death ? 480f : revenge ? 510f : expertMode ? 540f : 600f; @@ -449,7 +449,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians } Vector2 destination = player.Center + Vector2.UnitX * distanceToStayAwayFromTarget * calamityGlobalNPC.newAI[0]; - if (goLow) + if (goLow || goLowPhase2) destination.Y += goLowDistance; Vector2 targetVector = destination - NPC.Center; diff --git a/Projectiles/Boss/DarkEnergyBall.cs b/Projectiles/Boss/DarkEnergyBall.cs index 1d6eb14d62..16aaa45ed0 100644 --- a/Projectiles/Boss/DarkEnergyBall.cs +++ b/Projectiles/Boss/DarkEnergyBall.cs @@ -51,6 +51,8 @@ namespace CalamityMod.Projectiles.Boss else Projectile.Opacity = MathHelper.Clamp(1f - ((Projectile.timeLeft - 570) / 30f), 0f, 1f); + Lighting.AddLight(Projectile.Center, 0.8f * Projectile.Opacity, 0f, 1.2f * Projectile.Opacity); + Projectile.frameCounter++; if (Projectile.frameCounter > 4) { @@ -73,8 +75,8 @@ namespace CalamityMod.Projectiles.Boss int height = texture.Height / Main.projFrames[Projectile.type]; int drawStart = height * Projectile.frame; Vector2 origin = Projectile.Size / 2; - Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Boss/DarkEnergyBallGlow").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); - Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Boss/DarkEnergyBallGlow2").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Boss/DarkEnergyBallGlow").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White * Projectile.Opacity, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Boss/DarkEnergyBallGlow2").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White * Projectile.Opacity, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 35f, targetHitbox);