Toxic Heart only spawns pulses from actual enemies

This commit is contained in:
CongratsIsTrash committed 2025-12-23 00:04:54 -05:00
1 parent 33c0ef0392
commit 2dfdedf824
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Typeless
Player player = Main.player[Projectile.owner];
target.AddBuff(ModContent.BuffType<Plague>(), 420);
if ((target.life <= 0 && target.realLife == -1))
if (target.life <= 0 && target.realLife == -1 && target.IsAnEnemy(false))
{
player.Heal(10);
Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType<PlaguePulse>(), (int)(Projectile.damage * 0.9f), 0f, Projectile.owner, 0, Projectile.ai[1] + 1, 1);
+2 -1
View File
@@ -209,7 +209,8 @@ namespace CalamityMod.Systems.Collections
public static bool[] DoCheckDeadRegardlessRealLife = Factory.CreateBoolSet(NPCType<DevourerofGodsBody>(), NPCType<DevourerofGodsTail>());
/// <summary>
/// If <see langword="true"/> for an NPC type, <see cref="CalamityUtils.IsAnEnemy(NPC, bool, bool, bool)"/> Does not count specified NPC as Enemy
/// If <see langword="true"/> for an NPC type, <see cref="CalamityUtils.IsAnEnemy(NPC, bool, bool, bool)"/> will not count this NPC as an enemy.<br/>
/// Defaults to <see langword="false"/>.
/// </summary>
public static bool[] DontCountAsEnemy = Factory.CreateBoolSet(NPCID.TargetDummy, NPCType<SuperDummyNPC>());