From aca33b42dd7d2958130c4b0d486dc8a5b8f717ac Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:08:57 -0500 Subject: [PATCH] Made Dragon Pow's hit effects only work after 75% range --- Projectiles/Melee/DragonPowFlail.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Projectiles/Melee/DragonPowFlail.cs b/Projectiles/Melee/DragonPowFlail.cs index 14a731eadc..f011f2b2bd 100644 --- a/Projectiles/Melee/DragonPowFlail.cs +++ b/Projectiles/Melee/DragonPowFlail.cs @@ -138,6 +138,10 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { + // Only perform hit effects after reaching approximately 75% of the way out. + if (projectile.WithinRange(Main.player[projectile.owner].Center, 1100f)) + return; + // Inflicts Daybroken, Abyssal Flames and Holy Flames for 8 seconds on-hit target.AddBuff(BuffID.Daybreak, 480); target.AddBuff(ModContent.BuffType(), 480); @@ -152,6 +156,10 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitPvp(Player target, int damage, bool crit) { + // Only perform hit effects after reaching approximately 75% of the way out. + if (projectile.WithinRange(Main.player[projectile.owner].Center, 1100f)) + return; + // Inflicts Abyssal Flames and Holy Flames for 8 seconds on-hit target.AddBuff(ModContent.BuffType(), 480); target.AddBuff(ModContent.BuffType(), 480);