diff --git a/NPCs/ExoMechs/Ares/AresLaserCannon.cs b/NPCs/ExoMechs/Ares/AresLaserCannon.cs index f3fb7f4064..9be9af1181 100644 --- a/NPCs/ExoMechs/Ares/AresLaserCannon.cs +++ b/NPCs/ExoMechs/Ares/AresLaserCannon.cs @@ -602,12 +602,12 @@ namespace CalamityMod.NPCs.ExoMechs.Ares Vector2 center = NPC.Center - screenPos; - //Draw an outline to the arm when it charges up + // Draw an outline to the arm when it charges up if ((NPC.Calamity().newAI[2] < deathrayTelegraphDuration) && AIState == (float)Phase.Deathray) { CalamityUtils.EnterShaderRegion(spriteBatch); Color outlineColor = Color.Lerp(Color.OrangeRed, Color.White, NPC.Calamity().newAI[2] / deathrayTelegraphDuration); - Vector3 outlineHSL = Main.rgbToHsl(outlineColor); //BasicTint uses the opposite hue i guess? or smth is fucked with the way shaders get their colors. anyways, we invert it + Vector3 outlineHSL = Main.rgbToHsl(outlineColor); // BasicTint uses the opposite hue i guess? Or something is fucked with the way shaders get their colors. Anyways, we invert it float outlineThickness = MathHelper.Clamp(NPC.Calamity().newAI[2] / deathrayTelegraphDuration * 4f, 0f, 3f); GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(1f); @@ -615,9 +615,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares GameShaders.Misc["CalamityMod:BasicTint"].Apply(); for (float i = 0; i < 1; i += 0.125f) - { spriteBatch.Draw(texture, center + (i * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * outlineThickness, frame, outlineColor, NPC.rotation, vector, NPC.scale, spriteEffects, 0f); - } + CalamityUtils.ExitShaderRegion(spriteBatch); } @@ -644,31 +643,29 @@ namespace CalamityMod.NPCs.ExoMechs.Ares spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - //Update the parameters - - - //Draw a pulsing version of the cannon above the real one. + // Update the parameters + // Draw a pulsing version of the cannon above the real one if ((NPC.Calamity().newAI[2] < deathrayTelegraphDuration) && AIState == (float)Phase.Deathray) { - //Also draw a telegraph line aha + // Also draw a telegraph line Texture2D lineTex = ModContent.Request("CalamityMod/Particles/BloomLine").Value; Color outlineColor = Color.Lerp(Color.OrangeRed, Color.White, NPC.Calamity().newAI[2] / deathrayTelegraphDuration); - spriteBatch.Draw(lineTex, CoreSpritePosition - NPC.rotation.ToRotationVector2() * NPC.spriteDirection * 104 - screenPos, null, outlineColor, NPC.rotation - MathHelper.PiOver2 * NPC.spriteDirection, new Vector2(lineTex.Width / 2f, lineTex.Height), new Vector2(1f * NPC.Calamity().newAI[2] / deathrayTelegraphDuration, 2000f), spriteEffects, 0f); + spriteBatch.Draw(lineTex, CoreSpritePosition - NPC.rotation.ToRotationVector2() * NPC.spriteDirection * 104 - screenPos, null, outlineColor, NPC.rotation - MathHelper.PiOver2 * NPC.spriteDirection, new Vector2(lineTex.Width / 2f, lineTex.Height), new Vector2(1f * NPC.Calamity().newAI[2] / deathrayTelegraphDuration, 4200f), spriteEffects, 0f); float pulseRatio = (NPC.Calamity().newAI[2] % (deathrayTelegraphDuration / 5f)) / (deathrayTelegraphDuration / 5f); float pulseSize = MathHelper.Lerp(0.1f, 0.6f, (float)Math.Floor(NPC.Calamity().newAI[2] / (deathrayTelegraphDuration / 5f)) / 4f); float pulseOpacity = MathHelper.Clamp((float)Math.Floor(NPC.Calamity().newAI[2] / (deathrayTelegraphDuration / 5f)) * 0.3f, 1f, 2f); spriteBatch.Draw(texture, center, frame, Color.OrangeRed * MathHelper.Lerp(1f, 0f, pulseRatio) * pulseOpacity, NPC.rotation, vector, NPC.scale + pulseRatio * pulseSize, spriteEffects, 0f); - //Draw the bloom + // Draw the bloom EnergyDrawer.DrawBloom(CoreSpritePosition); } EnergyDrawer.DrawPulses(CoreSpritePosition); EnergyDrawer.DrawSet(CoreSpritePosition); - //Back to normal + // Back to normal spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index ba38c61571..8b157e4119 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -332,7 +332,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.spriteDirection = NPC.direction; NPC.ai[1] += 1f; - float phaseTimer = 240f; + float phaseTimer = 360f; if (!sirenAlive || phase4) phaseTimer -= 120f * (1f - lifeRatio); @@ -408,7 +408,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.ai[1] += num638 / 2; bool flag103 = false; - float num640 = (!sirenAlive || phase4) ? 30f : 60f; + float num640 = (!sirenAlive || phase4) ? 60f : 40f; if (NPC.ai[1] > num640) { NPC.ai[1] = 0f; @@ -416,7 +416,7 @@ namespace CalamityMod.NPCs.Leviathan flag103 = true; } - int spawnLimit = (sirenAlive && !phase4) ? 2 : (death ? 3 : 4); + int spawnLimit = (sirenAlive && !phase4) ? 1 : (death ? 2 : 3); if (flag103 && NPC.CountNPCS(ModContent.NPCType()) < spawnLimit) { SoundEngine.PlaySound(soundChoice, vector); @@ -468,7 +468,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.direction = playerLocation < 0 ? 1 : -1; NPC.spriteDirection = NPC.direction; - if (NPC.ai[2] > ((sirenAlive && !phase4) ? 2f : 4f)) + if (NPC.ai[2] > spawnLimit) { NPC.ai[0] = canCharge ? (Main.rand.NextBool() ? 2f : 0f) : 0f; NPC.ai[1] = 0f; diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 79cb08063d..33f8c9e58b 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -1688,16 +1688,6 @@ namespace CalamityMod.NPCs.Yharon chargeSpeed *= velocityMult; } - // Increase aggressiveness while invincible. - if (invincible) - { - phaseSwitchTimer *= 0.5f; - acceleration *= 1.1f; - velocity *= 1.1f; - chargeTime -= 4f; - chargeSpeed *= 1.1f; - } - if (Main.getGoodWorld) phaseSwitchTimer *= 0.5f; diff --git a/Projectiles/Boss/AresGaussNukeProjectile.cs b/Projectiles/Boss/AresGaussNukeProjectile.cs index 42a9ddb31a..54fd5d092b 100644 --- a/Projectiles/Boss/AresGaussNukeProjectile.cs +++ b/Projectiles/Boss/AresGaussNukeProjectile.cs @@ -150,7 +150,7 @@ namespace CalamityMod.Projectiles.Boss Main.spriteBatch.EnterShaderRegion(); Texture2D telegraphBase = ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value; - GameShaders.Misc["CalamityMod:CircularAoETelegraph"].UseOpacity(0.4f * MathHelper.Clamp((1 - Projectile.timeLeft / (float)timeLeft) * 8f, 0, 1)); + GameShaders.Misc["CalamityMod:CircularAoETelegraph"].UseOpacity(0.2f * MathHelper.Clamp((1 - Projectile.timeLeft / (float)timeLeft) * 8f, 0, 1)); GameShaders.Misc["CalamityMod:CircularAoETelegraph"].UseColor(Color.Lerp(Color.Goldenrod, Color.Gold, 0.7f * (float)Math.Pow(0.5 + 0.5 * Math.Sin(Main.GlobalTimeWrappedHourly), 3))); GameShaders.Misc["CalamityMod:CircularAoETelegraph"].UseSecondaryColor(Color.Lerp(Color.Yellow, Color.White, 0.5f)); GameShaders.Misc["CalamityMod:CircularAoETelegraph"].UseSaturation(1 - Projectile.timeLeft / (float)timeLeft); @@ -158,11 +158,11 @@ namespace CalamityMod.Projectiles.Boss GameShaders.Misc["CalamityMod:CircularAoETelegraph"].Apply(); Vector2 drawPosition = Projectile.Center - Main.screenPosition; - Main.EntitySpriteDraw(telegraphBase, drawPosition, null, lightColor, 0, telegraphBase.Size() / 2f, 1070f, 0, 0); + Main.EntitySpriteDraw(telegraphBase, drawPosition, null, lightColor, 0, telegraphBase.Size() / 2f, 1480f, 0, 0); Main.spriteBatch.ExitShaderRegion(); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + return false; } diff --git a/Projectiles/Boss/AresGaussNukeProjectileBoom.cs b/Projectiles/Boss/AresGaussNukeProjectileBoom.cs index 74894d87e5..dbec5ba5ba 100644 --- a/Projectiles/Boss/AresGaussNukeProjectileBoom.cs +++ b/Projectiles/Boss/AresGaussNukeProjectileBoom.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Boss //It only fades out near the end else - opacity = (float)Math.Cos(((completion - 0.8f) / 0.2f * MathHelper.Pi) / 2f); ; + opacity = (float)Math.Cos((completion - 0.8f) / 0.2f * MathHelper.Pi / 2f); return opacity * 0.85f; }