isaacscript-common
Version:
Helper functions and features for IsaacScript mods.
50 lines • 2.73 kB
TypeScript
import { EntityType } from "isaac-typescript-definitions";
/**
* 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.
*
* @param entityType Optional. If specified, will only get the NPCs that match the type. Default is
* -1, which matches every type.
* @param variant Optional. If specified, will only get the NPCs that match the variant. Default is
* -1, which matches every variant.
* @param subType Optional. If specified, will only get the NPCs that match the sub-type. Default is
* -1, which matches every sub-type.
* @param ignoreFriendly Optional. Default is false.
*/
export declare function getAliveNPCs(entityType?: EntityType | -1, variant?: number, subType?: number, ignoreFriendly?: boolean): readonly EntityNPC[];
/**
* 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).
*/
export declare function isAliveExceptionNPC(npc: EntityNPC): boolean;
/**
* 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.
*/
export declare function isDaddyLongLegsChildStompEntity(npc: EntityNPC): boolean;
/**
* 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.
*/
export declare function isDyingDump(npc: EntityNPC): boolean;
/**
* 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.
*/
export declare function isDyingEggyWithNoSpidersLeft(npc: EntityNPC): boolean;
/**
* 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.
*/
export declare function isRaglingDeathPatch(npc: EntityNPC): boolean;
//# sourceMappingURL=npcs.d.ts.map