Skip to content

NPCs

getAliveNPCs(entityType?, variant?, subType?, ignoreFriendly?): readonly EntityNPC[]

Defined in: packages/isaacscript-common/src/functions/npcs.ts:64

Helper function to get all of the non-dead NPCs in the room.

This function will not include NPCs on an internal blacklist, such as Death’s scythes or Big Horn holes.

-1 | EntityType

Optional. If specified, will only get the NPCs that match the type. Default is -1, which matches every type.

number = -1

Optional. If specified, will only get the NPCs that match the variant. Default is -1, which matches every variant.

number = -1

Optional. If specified, will only get the NPCs that match the sub-type. Default is -1, which matches every sub-type.

boolean = false

Optional. Default is false.

readonly EntityNPC[]


isAliveExceptionNPC(npc): boolean

Defined in: packages/isaacscript-common/src/functions/npcs.ts:78

Checks for specific NPCs that have “CanShutDoors” set to true naturally by the game, but should not actually keep the doors closed (like Death’s scythes).

EntityNPC

boolean


isDaddyLongLegsChildStompEntity(npc): boolean

Defined in: packages/isaacscript-common/src/functions/npcs.ts:121

Helper function to distinguish between a normal Daddy Long Legs / Triachnid and the child entity that is spawned when the boss does the multi-stomp attack.

When this attack occurs, four extra copies of Daddy Long Legs will be spawned with the same entity type, variant, and sub-type. The Entity.Parent field will be undefined in this case, so the way to tell them apart is to check for a non-undefined Entity.SpawnerEntity field.

EntityNPC

boolean


isDyingDump(npc): boolean

Defined in: packages/isaacscript-common/src/functions/npcs.ts:132

Helper function to detect the custom death state of a Dump. When Dumps die, they go to NPCState.SPECIAL, spit out their head, and then slowly fade away while shooting a burst of tears.

EntityNPC

boolean


isDyingEggyWithNoSpidersLeft(npc): boolean

Defined in: packages/isaacscript-common/src/functions/npcs.ts:146

Helper function to detect the custom death state of an Eggy. Eggies are never actually marked dead by the game. Instead, when Eggies take fatal damage, they go into NPCState.STATE_SUICIDE and spawn 14 Swarm Spiders while their StateFrame ticks upwards.

EntityNPC

boolean


isRaglingDeathPatch(npc): boolean

Defined in: packages/isaacscript-common/src/functions/npcs.ts:162

Helper function to detect the custom death state of a Rag Man Ragling. When Rag Man Raglings die, they turn into a patch on the ground and can be revived by Rag Man at a later time. This causes them to show up as an “alive” enemy, so they should usually be filtered out of lists of alive enemies.

EntityNPC

boolean