From e9ecf632ddb9e613cd75a6f2a5ae7678268fb75f Mon Sep 17 00:00:00 2001 From: Xyk Date: Thu, 25 Jul 2024 15:39:38 -0700 Subject: [PATCH] Fixed Ursa Sergeant bug Didn't trigger on projectile hits, oops! --- CalPlayer/CalamityPlayerHitHurt.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 7d0162d726..ac93ce2dec 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -1320,6 +1320,21 @@ namespace CalamityMod.CalPlayer theBeeCooldown = TheBee.CooldownLength; } + if (ursaSergeant) + { + ursaSergeantCooldown = (int)MathHelper.Clamp(ursaSergeantCooldown - 180, 0, 300); + Player.AddBuff(ModContent.BuffType(), 150); + for (int i = 0; i < 9; i++) + { + Particle spark2 = new LineParticle(Player.Center, new Vector2(8, 8).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1f), false, 20, Main.rand.NextFloat(0.5f, 1.1f), Main.rand.NextBool() ? Color.Coral : Color.DarkTurquoise); + GeneralParticleHandler.SpawnParticle(spark2); + Dust dust2 = Dust.NewDustPerfect(Player.Center, 267, new Vector2(8, 8).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1f)); + dust2.scale = Main.rand.NextFloat(0.75f, 1.2f); + dust2.noGravity = true; + dust2.color = Main.rand.NextBool() ? Color.Coral : Color.DarkTurquoise; + } + } + if (proj.hostile && hurtInfo.Damage > 0) { if (proj.type == ProjectileID.TorchGod)