From 3bd37532e09cbbba78fe334b41f16784c7db9d3a Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 19 Dec 2022 04:59:11 +0700 Subject: [PATCH] Death/Spawn animation colors --- NPCs/Providence/Providence.cs | 2 +- Projectiles/Boss/DyingSun.cs | 5 ++++- Projectiles/Boss/HolyAura.cs | 28 ++++++++++++++++----------- Projectiles/Boss/HolyExplosionBoom.cs | 4 +++- Projectiles/Boss/SwirlingFire.cs | 9 +++++++-- 5 files changed, 32 insertions(+), 16 deletions(-) diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 1db3c21f09..76483804a3 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -2222,7 +2222,7 @@ namespace CalamityMod.NPCs.Providence if (CalamityGlobalNPC.holyBossAttacker != -1) { if (Main.npc[CalamityGlobalNPC.holyBossAttacker].active) - NegativeHealValue = (int)(NegativeHealValue * 2f); + NegativeHealValue *= 2; } Target.HealEffect(-1 * NegativeHealValue, false); diff --git a/Projectiles/Boss/DyingSun.cs b/Projectiles/Boss/DyingSun.cs index 4689cbe717..72b5076e20 100644 --- a/Projectiles/Boss/DyingSun.cs +++ b/Projectiles/Boss/DyingSun.cs @@ -10,6 +10,9 @@ namespace CalamityMod.Projectiles.Boss { public class DyingSun : ModProjectile { + //TODO -- Later replace this new bool with Main.zenithWorld + public bool getFucked = Main.getGoodWorld && Main.masterMode; + public PrimitiveTrail FireDrawer; public ref float Time => ref Projectile.ai[0]; public ref float Radius => ref Projectile.ai[1]; @@ -44,7 +47,7 @@ namespace CalamityMod.Projectiles.Boss public Color SunColorFunction(float completionRatio) { - Color sunColor = Main.dayTime ? Color.Yellow : Color.Cyan; + Color sunColor = getFucked ? (new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB) * 0.8f) : (Main.dayTime ? Color.Yellow : Color.Cyan); return Color.Lerp(sunColor, Color.White, (float)Math.Sin(MathHelper.Pi * completionRatio) * 0.5f + 0.3f) * Projectile.Opacity; } diff --git a/Projectiles/Boss/HolyAura.cs b/Projectiles/Boss/HolyAura.cs index c47a387637..ef6203f36e 100644 --- a/Projectiles/Boss/HolyAura.cs +++ b/Projectiles/Boss/HolyAura.cs @@ -31,6 +31,9 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { + //TODO -- Later replace this new bool with Main.zenithWorld + bool getFucked = Main.getGoodWorld && Main.masterMode; + Texture2D texture = ModContent.Request(Texture).Value; Vector2 origin = texture.Size() / 2f; float time = Main.GlobalTimeWrappedHourly % 10f / 10f; @@ -68,19 +71,22 @@ namespace CalamityMod.Projectiles.Boss Color color = Main.hslToRgb(hue[i] % 1f, 1f, 0.5f) * colorChangeAmt * colorChangeAmt2; bool underworld = Projectile.ai[0] == 2f; - if (Main.dayTime) + if (!getFucked) { - color.R = 255; - if (underworld) - color.B = 0; - } - else - { - color.B = 255; - if (underworld) - color.G = 0; + if (Main.dayTime) + { + color.R = 255; + if (underworld) + color.B = 0; + } else - color.R = 0; + { + color.B = 255; + if (underworld) + color.G = 0; + else + color.R = 0; + } } color.A /= 4; diff --git a/Projectiles/Boss/HolyExplosionBoom.cs b/Projectiles/Boss/HolyExplosionBoom.cs index 81951fb456..e77271709d 100644 --- a/Projectiles/Boss/HolyExplosionBoom.cs +++ b/Projectiles/Boss/HolyExplosionBoom.cs @@ -12,7 +12,9 @@ namespace CalamityMod.Projectiles.Boss public override float GetScreenshakePower(float pulseCompletionRatio) => CalamityUtils.Convert01To010(pulseCompletionRatio) * 16f; public override Color GetCurrentExplosionColor(float pulseCompletionRatio) { - Color explosionColor = Main.dayTime ? Color.Orange : Color.BlueViolet; + //TODO -- Later replace this new bool with Main.zenithWorld + bool getFucked = Main.getGoodWorld && Main.masterMode; + Color explosionColor = getFucked ? new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB) : (Main.dayTime ? Color.Orange : Color.BlueViolet); return Color.Lerp(explosionColor * 1.6f, Color.White, MathHelper.Clamp(pulseCompletionRatio * 2.2f, 0f, 1f)); } public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; diff --git a/Projectiles/Boss/SwirlingFire.cs b/Projectiles/Boss/SwirlingFire.cs index 6ee43cd99b..99b5e38129 100644 --- a/Projectiles/Boss/SwirlingFire.cs +++ b/Projectiles/Boss/SwirlingFire.cs @@ -29,12 +29,17 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { + //TODO -- Later replace this new bool with Main.zenithWorld + bool getFucked = Main.getGoodWorld && Main.masterMode; + Vector2 fireVelocity = (Time / 6f).ToRotationVector2() * Main.rand.NextFloat(1.7f, 2.2f); - Dust fire = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(3f, 3f), Main.dayTime ? 6 : 267); + Dust fire = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(3f, 3f), getFucked || !Main.dayTime ? 267 : 6); fire.velocity = fireVelocity.RotatedBy(MathHelper.PiOver2); fire.scale = Main.rand.NextFloat(1.3f, 1.45f); fire.noGravity = true; - if (!Main.dayTime) + if (getFucked) + fire.color = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); + else if (!Main.dayTime) fire.color = Color.Lerp(Color.Cyan, Color.BlueViolet, Main.rand.NextFloat()); Dust.CloneDust(fire).velocity = fireVelocity.RotatedBy(-MathHelper.PiOver2);