From be6247b058b0b1ecbfa8a119e457d5ac28b4b562 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 15 May 2024 08:49:57 -0400 Subject: [PATCH] Thorn Ball visibility improvements --- Projectiles/Boss/ThornBallSpike.cs | 4 +++- Projectiles/Boss/ThornBallSpike.png | Bin 263 -> 304 bytes Projectiles/CalamityGlobalProjectile.cs | 12 ++++++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Projectiles/Boss/ThornBallSpike.cs b/Projectiles/Boss/ThornBallSpike.cs index f3db9317e9..86d5b8d957 100644 --- a/Projectiles/Boss/ThornBallSpike.cs +++ b/Projectiles/Boss/ThornBallSpike.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Boss { if (Projectile.velocity.Length() < MaxVelocity) { - Projectile.velocity *= 1.05f; + Projectile.velocity *= 1.045f; if (Projectile.velocity.Length() > MaxVelocity) { Projectile.velocity.Normalize(); @@ -58,6 +58,8 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.Venom, 90); + public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, Projectile.alpha); + public override bool PreDraw(ref Color lightColor) { if (Projectile.timeLeft > TimeLeft - 5) diff --git a/Projectiles/Boss/ThornBallSpike.png b/Projectiles/Boss/ThornBallSpike.png index a1be17ccd9c9d03017fb77e27eefe5fe8d18885b..9253275e890662c3b017f078fd4cb34ed6ac5351 100644 GIT binary patch delta 261 zcmV+g0s8)j0fhSmY1W=zd6|Sfv(N9!9(}#kOpxki-G8@&l)+uXQXQqZLoVmc`H#N@*C_C zeZk2l;oW|9sgUi`B3<&0z}p{RTO%q&5(9i~bx|uSnw{q-ru&2n5p6*4Gqz9N30#00000 LNkvXXu0mjfMfq)4 delta 220 zcmV<203-jf0*3-2iBL{Q4GJ0x0000DNk~Le0000C0000K2nGNE0J-qo5s@J^f1F7~ zK~y+TW55McWMuw>Fq8`iOi-F=zzC(`0A{L!FgKY0;O$p1J?F_2uv(IBz^Oq;MG%b9 z0rhOa1<2O`3wKcHfUv2wC>THZ^b3q(fO03nLg)0;*I8VfdK$l WCop}*q~fmt0000sTxR diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 83f8b28779..45f9f892d1 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4390,15 +4390,15 @@ namespace CalamityMod.Projectiles if (projectile.type == ProjectileID.ThornBall) { - float startTurningBrownGateValue = 420f; - float timeToReachFullBrown = 180f; - float timeToReachThornExplosion = startTurningBrownGateValue + timeToReachFullBrown; + float startWarningColorGateValue = 420f; + float timeToReachFullIntensity = 180f; + float timeToReachThornExplosion = startWarningColorGateValue + timeToReachFullIntensity; Color initialColor = lightColor; - Color finalColor = new Color(125, 75, 75); + Color finalColor = Color.Lerp(new Color(125, 75, 75), Color.Red, (float)Math.Abs(Math.Sin((projectile.ai[1] - startWarningColorGateValue) * (MathHelper.Pi / 45)))); finalColor.A = (byte)(255 - projectile.alpha); - if (projectile.ai[1] > startTurningBrownGateValue) + if (projectile.ai[1] > startWarningColorGateValue) { - float colorTransitionRatio = (projectile.ai[1] - startTurningBrownGateValue) / timeToReachFullBrown; + float colorTransitionRatio = (projectile.ai[1] - startWarningColorGateValue) / timeToReachFullIntensity; Color dehydratedColor = Color.Lerp(initialColor, finalColor, colorTransitionRatio); return dehydratedColor; }