Made Dragon Pow's hit effects only work after 75% range

This commit is contained in:
Dominic authored and Cameron Ewell committed 2021-06-10 17:47:41 -04:00
1 parent f964f656d5
commit aca33b42dd
1 file changed
+8
+8
View File
@@ -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<AbyssalFlames>(), 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<AbyssalFlames>(), 480);
target.AddBuff(ModContent.BuffType<HolyFlames>(), 480);