Characters
Functions
Section titled “Functions”canCharacterHaveRedHearts()
Section titled “canCharacterHaveRedHearts()”canCharacterHaveRedHearts(
character):boolean
Defined in: packages/isaacscript-common/src/functions/characters.ts:34
Helper function to determine if the given character can have red heart containers. Returns true for characters like Isaac, Magdalene, or Cain. Returns true for Keeper and Tainted Keeper, even though coin containers are not technically the same as red heart containers. Returns false for characters like Blue Baby. Returns false for The Lost and Tainted Lost.
Parameters
Section titled “Parameters”character
Section titled “character”PlayerType
Returns
Section titled “Returns”boolean
canCharacterHaveSoulHearts()
Section titled “canCharacterHaveSoulHearts()”canCharacterHaveSoulHearts(
character):boolean
Defined in: packages/isaacscript-common/src/functions/characters.ts:43
Helper function to determine if the given character can have soul hearts. Returns true for characters like Isaac, Magdalene, or Cain. Returns false for characters like Bethany. Returns false for The Lost and Tainted Lost.
Parameters
Section titled “Parameters”character
Section titled “character”PlayerType
Returns
Section titled “Returns”boolean
canCharacterTakeFreeDevilDeals()
Section titled “canCharacterTakeFreeDevilDeals()”canCharacterTakeFreeDevilDeals(
character):boolean
Defined in: packages/isaacscript-common/src/functions/characters.ts:51
Helper function for determining whether the given character can take free Devil Deals. (e.g. The Lost, Tainted Lost, etc.)
Parameters
Section titled “Parameters”character
Section titled “character”PlayerType
Returns
Section titled “Returns”boolean
doesCharacterGetBlackHeartFromEternalHeart()
Section titled “doesCharacterGetBlackHeartFromEternalHeart()”doesCharacterGetBlackHeartFromEternalHeart(
character):boolean
Defined in: packages/isaacscript-common/src/functions/characters.ts:60
Normally, characters get a red heart container upon reaching a new floor with an eternal heart, but some characters grant a black heart instead. Returns true for Dark Judas and Tainted Judas. Otherwise, returns false.
Parameters
Section titled “Parameters”character
Section titled “character”PlayerType
Returns
Section titled “Returns”boolean
doesCharacterStartWithActiveItem()
Section titled “doesCharacterStartWithActiveItem()”doesCharacterStartWithActiveItem(
character):boolean
Defined in: packages/isaacscript-common/src/functions/characters.ts:72
Helper function to determine if the specified character starts with an active item.
For the purposes of this function, the save file is considered to be fully unlocked (e.g. Isaac is considered to starts with the D6, but this is not the case on a brand new save file).
Parameters
Section titled “Parameters”character
Section titled “character”PlayerType
Returns
Section titled “Returns”boolean
getCharacterDamageMultiplier()
Section titled “getCharacterDamageMultiplier()”getCharacterDamageMultiplier(
character,hasWhoreOfBabylon?):float
Defined in: packages/isaacscript-common/src/functions/characters.ts:87
Helper function to get the numerical damage multiplier for a character.
Parameters
Section titled “Parameters”character
Section titled “character”PlayerType
The character to get.
hasWhoreOfBabylon?
Section titled “hasWhoreOfBabylon?”boolean = false
Optional. Whether the character has the Whore of Babylon effect currently active. Defaults to false. This is necessary because Eve’s damage multiplier changes from 0.75 to 1 when she has Whore of Babylon active.
Returns
Section titled “Returns”float
getCharacterDeathAnimationName()
Section titled “getCharacterDeathAnimationName()”getCharacterDeathAnimationName(
character):string
Defined in: packages/isaacscript-common/src/functions/characters.ts:103
- Most characters have a 56 frame death animation (i.e. the “Death” animation).
- The Lost and Tainted Lost have a 38 frame death animation (i.e. the “LostDeath” animation).
- Tainted Forgotten have a 20 frame death animation (i.e. the “ForgottenDeath” animation).
Parameters
Section titled “Parameters”character
Section titled “character”PlayerType
Returns
Section titled “Returns”string
getCharacterMaxHeartContainers()
Section titled “getCharacterMaxHeartContainers()”getCharacterMaxHeartContainers(
character):int
Defined in: packages/isaacscript-common/src/functions/characters.ts:120
Returns the maximum heart containers that the provided character can have. Normally, this is 12,
but with Keeper it is 3, and with Tainted Keeper it is 2. This does not account for Birthright or
Mother’s Kiss; use the getPlayerMaxHeartContainers helper function for that.
Parameters
Section titled “Parameters”character
Section titled “character”PlayerType
Returns
Section titled “Returns”int
getCharacterName()
Section titled “getCharacterName()”getCharacterName(
character):string
Defined in: packages/isaacscript-common/src/functions/characters.ts:145
Helper function to get the name of a character. Returns “Unknown” for modded characters.
Parameters
Section titled “Parameters”character
Section titled “character”PlayerType
Returns
Section titled “Returns”string
getCharacterSpritePNGFilePath()
Section titled “getCharacterSpritePNGFilePath()”getCharacterSpritePNGFilePath(
character):string
Defined in: packages/isaacscript-common/src/functions/characters.ts:159
Helper function to get the path to the sprite for a particular character.
For example, the file path for PlayerType.ISAAC is
“characters/costumes/character_001_isaac.png”.
Parameters
Section titled “Parameters”character
Section titled “character”PlayerType
Returns
Section titled “Returns”string
getCharacterStartingCollectibleTypes()
Section titled “getCharacterStartingCollectibleTypes()”getCharacterStartingCollectibleTypes(
character): readonlyCollectibleType[]
Defined in: packages/isaacscript-common/src/functions/characters.ts:170
Helper function to get the collectibles that are granted to a particular character at the beginning of a run.
Note that this will return an empty array for Eden and Tainted Eden.
Parameters
Section titled “Parameters”character
Section titled “character”PlayerType
Returns
Section titled “Returns”readonly CollectibleType[]
getCharacterStartingTrinketType()
Section titled “getCharacterStartingTrinketType()”getCharacterStartingTrinketType(
character):TrinketType|undefined
Defined in: packages/isaacscript-common/src/functions/characters.ts:182
Helper function to get the trinket that is granted to a particular character at the beginning of a run. Returns undefined if the character does not start with a trinket.
Note that this will return undefined for Eden and Tainted Eden.
Parameters
Section titled “Parameters”character
Section titled “character”PlayerType
Returns
Section titled “Returns”TrinketType | undefined
getMainCharacter()
Section titled “getMainCharacter()”getMainCharacter(
character):PlayerType
Defined in: packages/isaacscript-common/src/functions/characters.ts:198
Helper function to get the “main” version of the character. In other words, this is the character that selectable from the main menu (and has achievements related to completing the various bosses and so on).
For example, the main character for PlayerType.MAGDALENE (1) is also PlayerType.MAGDALENE
(1), but the main character for PlayerType.LAZARUS_2 (11) would be PlayerType.LAZARUS (8).
For PlayerType.POSSESSOR (-1) and modded characters, the same character will be returned.
Parameters
Section titled “Parameters”character
Section titled “character”PlayerType
Returns
Section titled “Returns”PlayerType
isFlyingCharacter()
Section titled “isFlyingCharacter()”isFlyingCharacter(
character):boolean
Defined in: packages/isaacscript-common/src/functions/characters.ts:246
Parameters
Section titled “Parameters”character
Section titled “character”PlayerType
Returns
Section titled “Returns”boolean
isMainCharacter()
Section titled “isMainCharacter()”isMainCharacter(
character): character is ISAAC | MAGDALENE | CAIN | JUDAS | BLUE_BABY | EVE | SAMSON | AZAZEL | LAZARUS | EDEN | LOST | LILITH | KEEPER | APOLLYON | FORGOTTEN | BETHANY | JACOB | ISAAC_B | MAGDALENE_B | CAIN_B | JUDAS_B | BLUE_BABY_B | EVE_B | SAMSON_B | AZAZEL_B | LAZARUS_B | EDEN_B | LOST_B | LILITH_B | KEEPER_B | APOLLYON_B | FORGOTTEN_B | BETHANY_B | JACOB_B
Defined in: packages/isaacscript-common/src/functions/characters.ts:254
Helper function to check if the provided character is one of the characters that are selectable from the main menu (and have achievements related to completing the various bosses and so on).
Parameters
Section titled “Parameters”character
Section titled “character”PlayerType
Returns
Section titled “Returns”character is ISAAC | MAGDALENE | CAIN | JUDAS | BLUE_BABY | EVE | SAMSON | AZAZEL | LAZARUS | EDEN | LOST | LILITH | KEEPER | APOLLYON | FORGOTTEN | BETHANY | JACOB | ISAAC_B | MAGDALENE_B | CAIN_B | JUDAS_B | BLUE_BABY_B | EVE_B | SAMSON_B | AZAZEL_B | LAZARUS_B | EDEN_B | LOST_B | LILITH_B | KEEPER_B | APOLLYON_B | FORGOTTEN_B | BETHANY_B | JACOB_B
isModdedCharacter()
Section titled “isModdedCharacter()”isModdedCharacter(
character):boolean
Defined in: packages/isaacscript-common/src/functions/characters.ts:260
Parameters
Section titled “Parameters”character
Section titled “character”PlayerType
Returns
Section titled “Returns”boolean
isVanillaCharacter()
Section titled “isVanillaCharacter()”isVanillaCharacter(
character):boolean
Defined in: packages/isaacscript-common/src/functions/characters.ts:264
Parameters
Section titled “Parameters”character
Section titled “character”PlayerType
Returns
Section titled “Returns”boolean
