From b0bd4f2ffc675d3ce9968cc25875d8cf3d0044e7 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Wed, 8 Feb 2023 08:37:25 -0600 Subject: [PATCH] Aureus Spawn color drawing fix and more fucking Dark Energy changes. --- NPCs/AstrumAureus/AureusSpawn.cs | 2 +- NPCs/CeaselessVoid/DarkEnergy.cs | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/NPCs/AstrumAureus/AureusSpawn.cs b/NPCs/AstrumAureus/AureusSpawn.cs index a1a8b4024a..b6c42d7994 100644 --- a/NPCs/AstrumAureus/AureusSpawn.cs +++ b/NPCs/AstrumAureus/AureusSpawn.cs @@ -236,7 +236,7 @@ namespace CalamityMod.NPCs.AstrumAureus spriteEffects = SpriteEffects.FlipHorizontally; if (NPC.ai[0] >= 60f) - NPC.DrawBackglow(Color.Lerp(Color.Cyan, Color.Orange, (float)Math.Sin(Main.GlobalTimeWrappedHourly) / 2f + 1f) with { A = 0 }, 2f + 8f * ((float)Math.Sin(Main.GlobalTimeWrappedHourly * MathHelper.TwoPi) + 1f), spriteEffects, NPC.frame, screenPos); + NPC.DrawBackglow(Color.Lerp(Color.Cyan, Color.Orange, (float)Math.Sin(Main.GlobalTimeWrappedHourly) / 2f + 0.5f) with { A = 0 }, 2f + 8f * ((float)Math.Sin(Main.GlobalTimeWrappedHourly * MathHelper.TwoPi) + 1f), spriteEffects, NPC.frame, screenPos); Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; Vector2 vector11 = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); diff --git a/NPCs/CeaselessVoid/DarkEnergy.cs b/NPCs/CeaselessVoid/DarkEnergy.cs index 964501b652..e382ed2e0c 100644 --- a/NPCs/CeaselessVoid/DarkEnergy.cs +++ b/NPCs/CeaselessVoid/DarkEnergy.cs @@ -105,7 +105,7 @@ namespace CalamityMod.NPCs.CeaselessVoid } // Stay invincible for 200 frames to avoid being instantly killed and don't deal damage to avoid unfair hits - if (NPC.Opacity < 1f) + if (NPC.Opacity < 1f && NPC.dontTakeDamage) { NPC.damage = 0; @@ -117,8 +117,21 @@ namespace CalamityMod.NPCs.CeaselessVoid } else { + if (NPC.dontTakeDamage) + { + for (int k = 0; k < 10; k++) + { + int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0, 0, 0, default, 1f); + Main.dust[dust].noGravity = true; + } + } + 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); + NPC.Opacity = MathHelper.Lerp(0.5f, 1f, scalar); + NPC.Calamity().newAI[1] += 1f; } // Force despawn if Ceaseless Void isn't active