From ac3a67112a5d06330c570e917777945d73e317eb Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 20 Jan 2024 12:28:36 -0500 Subject: [PATCH] Made ricoshot crit indicator more visible Also added that coins take some time before critting in tooltips --- .../en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson | 4 ++-- Projectiles/Ranged/RicoshotCoin.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 7df6168834..5136d247d3 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -329,7 +329,7 @@ CrackshotColt: { Press to toss a Copper Coin in the air Striking a coin with a bullet causes it to ricochet into the nearest enemy Up to 4 coins can be tossed simultaneously, and shots will ricochet off multiple coins if possible - Ricocheted bullets always critically strike + Ricocheted bullets always critically strike after a short time ''' } @@ -731,7 +731,7 @@ MidasPrime: { Press to toss a Gold Coin or Silver Coin in the air Striking a coin with a bullet causes it to ricochet into the nearest enemy Up to 4 coins can be tossed simultaneously, and shots will ricochet off multiple coins if possible - Ricocheted bullets always critically strike and do bonus damage based on the coins used + Ricocheted bullets always critically strike after a short time and do bonus damage based on the coins used ''' UltrakillEasterEgg: ''' diff --git a/Projectiles/Ranged/RicoshotCoin.cs b/Projectiles/Ranged/RicoshotCoin.cs index e5f0e988df..e22cb7d341 100644 --- a/Projectiles/Ranged/RicoshotCoin.cs +++ b/Projectiles/Ranged/RicoshotCoin.cs @@ -269,8 +269,8 @@ namespace CalamityMod.Projectiles.Ranged // https://www.desmos.com/calculator/ngfg5fc9ds int numUpdatesPassed = CoinLifetime - Projectile.timeLeft; float x = Math.Clamp((float)numUpdatesPassed / CritDelayTime, 0f, 2f); // interpolant for the crit delay sheen - float sheenFunction = Math.Min(MathF.Pow(x + 0.1f, 6f), MathF.Pow(x - 2.1f, 6f)); - float sheenOpacity = Math.Clamp(sheenFunction, 0f, 1f); + float sheenFunction = Math.Min(MathF.Pow(x + 0.1f, 10f), MathF.Pow(x - 2.1f, 10f)); + float sheenOpacity = Math.Clamp(sheenFunction, 0f, 2f); // oh BOY another end begin boy if (sheenOpacity > 0f) @@ -293,7 +293,7 @@ namespace CalamityMod.Projectiles.Ranged }; Main.EntitySpriteDraw(bloomTex, Projectile.Center - Main.screenPosition, null, shineColor * sheenOpacity * 0.3f, MathHelper.PiOver2, bloomTex.Size() / 2f, shineScale * Projectile.scale, SpriteEffects.None, 0); - Main.EntitySpriteDraw(shineTex, Projectile.Center - Main.screenPosition, null, shineColor * sheenOpacity * 0.7f, MathHelper.PiOver2, shineTex.Size() / 2f, shineScale * Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(shineTex, Projectile.Center - Main.screenPosition, null, shineColor * sheenOpacity, MathHelper.PiOver2, shineTex.Size() / 2f, shineScale * Projectile.scale, SpriteEffects.None, 0); Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);