From b33ecdab1a0333663c78b8d4f1098bd89613772c Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 21 Jul 2024 00:01:52 -0400 Subject: [PATCH] Actually Blunder Booster has reduced opacity instead of being entirely disabled --- .../Mods.CalamityMod.Items.Accessories.hjson | 2 +- Projectiles/Typeless/BlunderBoosterAura.cs | 31 +------------------ 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index b074581b59..a690c6e7f1 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -359,7 +359,7 @@ BlunderBooster: { 12% increased rogue damage and 15% increased rogue projectile velocity Stealth generates 10% faster Summons a red lightning aura around the player that electrifies nearby enemies - The aura's appearance can be toggled with visibility + The aura has reduced opacity if visibility is disabled Press [KEY] to consume 25% of your maximum stealth to perform a swift upwards diagonal dash This dash leaves a trail of red lightning bolts This effect has a 1 second cooldown before it can be used again diff --git a/Projectiles/Typeless/BlunderBoosterAura.cs b/Projectiles/Typeless/BlunderBoosterAura.cs index 61bf31726a..9ef3c27837 100644 --- a/Projectiles/Typeless/BlunderBoosterAura.cs +++ b/Projectiles/Typeless/BlunderBoosterAura.cs @@ -86,42 +86,13 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDraw(ref Color lightColor) { - // Don't draw the aura at all if visibility is toggled off - if (!Main.player[Projectile.owner].Calamity().blunderBoosterVisibility) - return false; - Texture2D sprite = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; Color drawColour = Color.White; Rectangle sourceRect = new Rectangle(Projectile.width * (int)Projectile.localAI[1], Projectile.height * (int)Projectile.localAI[0], Projectile.width, Projectile.height); Vector2 origin = new Vector2(Projectile.width / 2, Projectile.height / 2); - float opacity = 1f; - int sparkCount = 0; - int fadeTime = 20; - - if (Projectile.timeLeft < fadeTime) - { - opacity = Projectile.timeLeft * (1f / fadeTime); - sparkCount = fadeTime - Projectile.timeLeft; - } - - for (int i = 0; i < sparkCount * 2; i++) - { - int dustType = 132; - if (Main.rand.NextBool()) - { - dustType = 264; - } - float rangeDiff = 2f; - - Vector2 dustPos = new Vector2(Main.rand.NextFloat(-1, 1), Main.rand.NextFloat(-1, 1)); - dustPos.Normalize(); - dustPos *= radius + Main.rand.NextFloat(-rangeDiff, rangeDiff); - - int dust = Dust.NewDust(Projectile.Center + dustPos, 1, 1, dustType, 0, 0, 0, default, 0.75f); - Main.dust[dust].noGravity = true; - } + float opacity = Main.player[Projectile.owner].Calamity().blunderBoosterVisibility ? 1f : 0.25f; Main.EntitySpriteDraw(sprite, Projectile.Center - Main.screenPosition, sourceRect, drawColour * opacity, Projectile.rotation, origin, 1f, SpriteEffects.None, 0); return false;