Binding of Isaac - Afterbirth+ Lua Reference/Guide
EntityPlayer Class Reference
Inheritance diagram for EntityPlayer:
Entity

Public Member Functions

 RenderGlow (Vector position)
 
 RenderBody (Vector position)
 
 RenderHead (Vector position)
 
 RenderTop (Vector position)
 
string GetName ()
 
 AddMaxHearts (integer MaxHearts, boolean IgnoreKeeper)
 
boolean HasFullHearts ()
 
boolean HasFullHeartsAndSoulHearts ()
 
 AddHearts (integer Hearts)
 
 AddEternalHearts (integer EternalHearts)
 
 AddSoulHearts (integer SoulHearts)
 
 AddBlackHearts (integer BlackHearts)
 
 RemoveBlackHeart (integer BlackHeart)
 
boolean IsBlackHeart (integer Heart)
 
 AddJarHearts (integer Hearts)
 
integer GetJarHearts ()
 
 AddJarFlies (integer Flies)
 
integer GetJarFlies ()
 
 AddCoins (integer Amount)
 
 AddBombs (integer Amount)
 
 AddKeys (integer Amount)
 
 AddGoldenKey ()
 
 RemoveGoldenKey ()
 
 AddGoldenBomb ()
 
 RemoveGoldenBomb ()
 
 AddGoldenHearts (integer Hearts)
 
EntityAddBlueSpider (Vector Position)
 
EntityThrowBlueSpider (Vector Position, Vector Target)
 
 RemoveBlueSpider ()
 
EntityAddBlueFlies (integer Amount, Vector Position, Entity Target)
 
 RemoveBlueFly ()
 
 AddPrettyFly ()
 
boolean TryUseKey ()
 
 AddCostume (Config::Item Item, boolean ItemStateOnly)
 
 AddNullCostume (Config::NullItemID NullId)
 for Lua More...
 
 RemoveCostume (Config::Item Item)
 
 RemoveSkinCostume ()
 
 ClearCostumes ()
 
 QueueItem (Config::Item Item, integer Charge, boolean Touched)
 Add Collectible/Trinket after animation is finished. More...
 
boolean FlushQueueItem ()
 called after animation is finished, or on special occasions to prevent bugs More...
 
boolean IsItemQueueEmpty ()
 
 AddCollectible (CollectibleType Type, integer Charge, boolean AddConsumables)
 
integer GetCollectibleCount ()
 
 AddTrinket (TrinketType Type)
 s32 GetCollectibleNum( eCollectibleType Collectible ) const; More...
 
boolean TryRemoveTrinket (TrinketType Type)
 
 DropTrinket (Vector DropPos, boolean ReplaceTick)
 
integer GetMaxTrinkets ()
 
integer GetMaxPoketItems ()
 
 DropPoketItem (integer PocketNum, Vector Pos)
 
 RemoveCollectible (CollectibleType Type)
 
 ClearTemporaryEffects ()
 Will be called when player exits the room. More...
 
 DonateLuck (integer Luck)
 
boolean CanPickBlackHearts ()
 returns true if player has room for more black hearts More...
 
boolean CanPickGoldenHearts ()
 returns true if player has room for more golden hearts More...
 
CollectibleType GetActiveItem ()
 TODO: Replace those calls with new class/structure that contains all item information. More...
 
integer GetActiveCharge ()
 
integer GetBatteryCharge ()
 
integer GetActiveSubCharge ()
 
 SetActiveCharge (integer Charge)
 
 DischargeActiveItem ()
 
boolean NeedsCharge ()
 
boolean FullCharge ()
 return true if the item was fully charged, false otherwise. If player has battery it will first try to fill first charge slot, then the battery slot. More...
 
const PlayerPocketItem & GetPocketItem (integer SlotId)
 
 AddCard (Card Card)
 
 AddPill (PillColor Pill)
 
Card GetCard (integer SlotId)
 
PillColor GetPill (integer SlotId)
 
 SetCard (integer SlotId, Card Card)
 
 SetPill (integer SlotId, PillColor Pill)
 
boolean HasCollectible (CollectibleType Type)
 
integer GetCollectibleNum (CollectibleType Type)
 
boolean HasTrinket (TrinketType Type)
 
boolean HasPlayerForm (PlayerForm Form)
 
boolean CanAddCollectible ()
 
boolean TryHoldTrinket (TrinketType Type)
 
 SetFullHearts ()
 
 AddCacheFlags (integer Flags)
 Reevaluate Damage, Firerate, Shot speed. More...
 
 EvaluateItems ()
 
 RespawnFamiliars ()
 
EntityGetNPCTarget ()
 
Direction GetMovementDirection ()
 
Direction GetFireDirection ()
 
Direction GetHeadDirection ()
 
const VectorGetAimDirection ()
 
const VectorGetMovementVector ()
 
const VectorGetRecentMovementVector ()
 Returns the joystick direction that drives player movement, taking into account certain modifiers like disabled controls and seed effects. More...
 
Vector GetMovementJoystick ()
 
Vector GetShootingJoystick ()
 
boolean AreOpposingShootDirectionsPressed ()
 Returns the non-zero joystick direction from the most recent movement input, but goes to zero after the player comes to a stop. More...
 
const VectorGetLastDirection ()
 
const VectorGetVelocityBeforeUpdate ()
 
float GetSmoothBodyRotation ()
 
float GetTearPoisonDamage ()
 
integer GetBombFlags ()
 
EntityBomb::BombVariant GetBombVariant (integer TearFlags, boolean ForceSmallBomb)
 Pass tear flags to add extra effects to the bomb visual like burn -> hot bombs, even if player doesn't have Hot Bombs collectible. ForceSmallBomb will override large bomb variants for TEAR_PERSISTENT. More...
 
TearParams GetTearHitParams (WeaponType WeaponType, float DamageScale, integer TearDisplacement)
 
integer GetHearts ()
 
integer GetMaxHearts ()
 
integer GetSoulHearts ()
 
integer GetBlackHearts ()
 This does not return the # of black hearts, this returns the bit mask for which soul hearts are black hearts. More...
 
integer GetEternalHearts ()
 
integer GetExtraLives ()
 
integer GetNumBombs ()
 
integer GetNumKeys ()
 
boolean HasGoldenKey ()
 
boolean HasGoldenBomb ()
 
integer GetGoldenHearts ()
 
integer GetNumCoins ()
 
PlayerType GetPlayerType ()
 
TrinketType GetTrinket (integer TrinketIndex)
 
integer GetNumBlueFlies ()
 
integer GetNumBlueSpiders ()
 
CollectibleType GetItemState ()
 
 UseActiveItem (CollectibleType Item, boolean ShowAnim, boolean KeepActiveItem, boolean AllowNonMainPlayer, boolean ToAddCostume)
 
integer GetTearRangeModifier ()
 
integer GetTrinketMultiplier ()
 
TemporaryEffectsGetEffects ()
 
boolean HasWeaponType (WeaponType WeaponType)
 
EntityGetActiveWeaponEntity ()
 
EntityGetTractorBeam ()
 
boolean CanPickupItem ()
 Can Player pick up an item right now? More...
 
boolean IsHoldingItem ()
 Is Player holding up an item (card/collectible/etc) More...
 
boolean IsHeldItemVisible ()
 
 Revive ()
 revive player More...
 
 TryRemoveCollectibleCostume (CollectibleType Collectible, boolean KeepPersistent)
 tries to remove a costume based on some filters More...
 
 TryRemoveTrinketCostume (TrinketType Trinket)
 tries to remove a costume based on some filters More...
 
 TryRemoveNullCostume (Config::NullItemID NullId)
 
 AnimateCollectible (CollectibleType Collectible, string AnimName, string SpriteAnimName)
 
 AnimateTrinket (TrinketType Trinket, string AnimName, string SpriteAnimName)
 
 AnimateCard (Card Card, string AnimName)
 
 AnimatePill (PillColor Pill, string AnimName)
 
 AnimateTrapdoor ()
 end of a stage More...
 
 AnimateLightTravel ()
 end of a stage More...
 
 AnimateAppear ()
 beginning of a stage More...
 
 AnimateTeleport (boolean Up)
 teleport to another room More...
 
 AnimateHappy ()
 thumbs up More...
 
 AnimateSad ()
 oh no! More...
 
 AnimatePitfallIn ()
 Fall into pitfall. More...
 
 AnimatePitfallOut ()
 Jump out of pitfall. More...
 
boolean IsExtraAnimationFinished ()
 
 StopExtraAnimation ()
 
 AddControlsCooldown (integer Cooldown)
 
 PlayExtraAnimation (string Animation)
 
 QueueExtraAnimation (string Animation)
 
integer GetDamageCooldown ()
 
 ResetDamageCooldown ()
 
 SetMinDamageCooldown (integer DamageCooldown)
 
boolean AreControlsEnabled ()
 
 UseCard (Card Card)
 
 UsePill (PillEffect PillEffect, PillColor PillColor)
 
boolean HasInvincibility ()
 returns true when player is in an invincibility state More...
 
 SetShootingCooldown (integer Cooldown)
 
 SetTargetTrapDoor (GridEntity TrapDoor)
 
EntityLaserFireDelayedBrimstone (float Angle, Entity Parent)
 
const EntityRefGetLastDamageSource ()
 
integer GetLastDamageFlags ()
 
integer GetTotalDamageTaken ()
 
EntityTearFireTear (Vector Position, Vector Velocity, boolean CanBeEye, boolean NoTractorBeam, boolean CanTriggerStreakEnd)
 
EntityBombFireBomb (Vector Position, Vector Velocity)
 
EntityLaserFireBrimstone (Vector Direction)
 
EntityLaserFireTechLaser (Vector Position, LaserOffset OffsetID, Vector Direction, boolean LeftEye, boolean OneHit)
 
EntityLaserFireTechXLaser (Vector Position, Vector Direction, float Radius)
 
EntityKnifeFireKnife (Entity Parent, float RotationOffset, boolean CantOverwrite, integer SubType)
 
BabySubType GetBabySkin ()
 
boolean CanShoot ()
 
boolean IsP2Appearing ()
 
boolean IsFullSpriteRendering ()
 
RNGGetCollectibleRNG (CollectibleType ID)
 
RNGGetTrinketRNG (TrinketType ID)
 
RNGGetPillRNG (PillEffect ID)
 
RNGGetCardRNG (Card ID)
 
 AddDeadEyeCharge ()
 
 ClearDeadEyeCharge ()
 
CollectibleType GetZodiacEffect ()
 
boolean IsPosInSpotLight (Vector Position)
 
MultiShotParams GetMultiShotParams ()
 
PosVel GetMultiShotPositionVelocity (integer LoopIndex, WeaponType Weapon, Vector ShotDirection, float ShotSpeed, MultiShotParams params)
 Call this function in a loop with values from 0 to MultiShotParams.NumProjectiles-1 (inclusive) More...
 
Vector GetFlyingOffset ()
 
boolean WillPlayerRevive ()
 
integer GetLastActionTriggers ()
 
float GetGreedDonationBreakChance ()
 
Vector GetMovementInput ()
 
Vector GetShootingInput ()
 
boolean HasTimedItem ()
 Kept for avoiding modding issues. More...
 
 InitBabySkin ()
 
boolean CanTurnHead ()
 returns true if head should react to keys or false otherwise More...
 
 CheckFamiliar (integer FamiliarVariant, integer TargetCount, RNG rng)
 
 UpdateCanShoot ()
 
Vector GetLaserOffset (LaserOffset ID, Vector Direction)
 
Vector GetTearMovementInheritance (Vector ShotDirection)
 
Vector GetCostumeNullPos (string NullFrameName, boolean HeadScale, Vector Direction)
 
 ReplaceCostumeSprite (Config::Item Item, string SpritePath, integer SpriteId)
 
 AddPlayerFormCostume (PlayerForm Form)
 
 ResetItemState ()
 Made this public so Room transtiions can call this to prevent lock ups. More...
 
EntityLaserSpawnMawOfVoid (integer Timeout)
 
 AddDollarBillEffect ()
 
 ShootRedCandle (Vector Direction)
 for ghost pepper item + poop and farts More...
 
 DoZitEffect (Vector Direction)
 
 SwapActiveItems ()
 
 AddBoneHearts (integer Hearts)
 
integer GetBoneHearts ()
 
boolean IsBoneHeart (integer heart)
 
integer GetEffectiveMaxHearts ()
 
integer GetHeartLimit ()
 
boolean CanPickRedHearts ()
 
boolean CanPickSoulHearts ()
 returns true if player has room for more soul hearts More...
 
boolean CanPickBoneHearts ()
 returns true if player has room for more bone hearts More...
 
boolean IsSubPlayer ()
 
EntityPlayerGetSubPlayer ()
 
- Public Member Functions inherited from Entity
table GetData ()
 
 Update ()
 
 Render (Vector Offset)
 
boolean RenderShadowLayer (Vector Offset)
 
 PostRender ()
 
boolean TakeDamage (float Damage, integer Flags, EntityRef Source, integer DamageCountdown)
 
boolean HasMortalDamage ()
 
 Kill ()
 Kills the entity and makes a blood splat or gibs. More...
 
 Die ()
 
 Remove ()
 
 BloodExplode ()
 Explodes with gibs and blood. More...
 
 AddVelocity (Vector Velocity)
 
 MultiplyFriction (float Value)
 
 SetColor (Color Color, integer Duration, integer Priority, boolean Fadeout, boolean Share)
 
const ColorGetColor ()
 
 SetSpriteFrame (string AnimationName, integer FrameNum)
 
 SetSpriteOverlayFrame (string AnimationName, integer FrameNum)
 
 SetSize (float Size, Vector SizeMulti, integer NumGridCollisionPoints)
 
boolean CollidesWithGrid ()
 
boolean IsEnemy ()
 return true for NPCs that are not controlled by the player More...
 
boolean IsActiveEnemy (boolean includeDead)
 return true for non background NPCs (ex: every enemy except fire and shopkeepers) More...
 
boolean IsVulnerableEnemy ()
 return true for enemies that can be damaged More...
 
boolean IsFlying ()
 
 AddEntityFlags (integer Flags)
 
 ClearEntityFlags (integer Flags)
 
integer GetEntityFlags ()
 
boolean HasEntityFlags (integer Flags)
 
boolean HasFullHealth ()
 
 AddHealth (float HitPoints)
 
 AddPoison (EntityRef Source, integer Duration, float Damage)
 
 AddFreeze (EntityRef Source, integer Duration)
 
 AddSlowing (EntityRef Source, integer Duration, float SlowValue, Color SlowColor)
 Makes the friction higher. More...
 
 AddCharmed (integer Duration)
 
 AddConfusion (EntityRef Source, integer Duration, boolean IgnoreBosses)
 
 AddMidasFreeze (EntityRef Source, integer Duration)
 
 AddFear (EntityRef Source, integer Duration)
 
 AddBurn (EntityRef Source, integer Duration, float Damage)
 
 AddShrink (EntityRef Source, integer Duration)
 
 RemoveStatusEffects ()
 
boolean Exists ()
 
boolean IsDead ()
 
boolean IsVisible ()
 
boolean IsInvincible ()
 
boolean CanShutDoors ()
 enemies keep the doors shut More...
 
boolean IsBoss ()
 bosses display health bar More...
 
BossId GetBossID ()
 
EntityGetLastParent ()
 
EntityGetLastChild ()
 
boolean HasCommonParentWithEntity (Entity Other)
 
boolean IsFrame (integer Frame, integer Offset)
 true every X frames More...
 
RNGGetDropRNG ()
 
SpriteGetSprite ()
 
EntityPlayer ToPlayer ()
 
EntityEffect ToEffect ()
 
EntityNPC ToNPC ()
 
EntityPickup ToPickup ()
 
EntityFamiliar ToFamiliar ()
 
EntityBomb ToBomb ()
 
EntityKnife ToKnife ()
 
EntityLaser ToLaser ()
 
EntityTear ToTear ()
 
EntityProjectile ToProjectile ()
 

Public Attributes

const VectorTearsOffset
 
boolean ControlsEnabled
 
integer ControlsCooldown
 
const EntityDesc & FriendBallEnemy
 
Vector SpriteScale
 
const integer ControllerIndex
 s32 GetItemStateCooldown( void ) const { return m_ItemStateCooldown; } More...
 
integer FireDelay
 How long until the player can spawn their next tear? More...
 
integer MaxFireDelay
 Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Tears Stat. How long between each tear can spawn? More...
 
float ShotSpeed
 Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the ShotSpeed Stat. How fast does the tear travel when spawned? More...
 
float Damage
 Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Damage Stat. How much damage do the players tears or other main weapons do? More...
 
float TearHeight
 Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Range Stat * -1. How high above the ground is the tear when it spawns? More...
 
float TearFallingSpeed
 Player stat - Only change this in a callback to MC_EVALUATE_CACHE. How fast is the tear moving up or down when it spawns? Affects range. More...
 
float TearFallingAcceleration
 
float MoveSpeed
 Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Speed Stat. How fast can the player move? More...
 
integer TearFlags
 Player stat - Only change this in a callback to MC_EVALUATE_CACHE. Various tear flags More...
 
Color TearColor
 
Color LaserColor
 
boolean CanFly
 Player stat - Only change this in a callback to MC_EVALUATE_CACHE. Can the player fly over rocks and pits? More...
 
float Luck
 Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Luck Stat. Better luck generally means better random events. More...
 
BabySubType BabySkin
 
QueueItemData QueuedItem
 
integer ItemHoldCooldown
 Used for avoiding player get stucked between rocks when switching a flying item with other active item. More...
 
ActiveItemDesc SecondaryActiveItem
 
integer HeadFrameDelay
 
- Public Attributes inherited from Entity
float Friction
 loaded from entity config More...
 
Vector Position
 
Vector Velocity
 
const EntityType Type
 
integer Variant
 void SetType(eEntityType Type); More...
 
integer SubType
 
EntityType SpawnerType
 
integer SpawnerVariant
 
const ColorSplatColor
 
boolean Visible
 
const VectorPositionOffset
 
integer RenderZOffset
 
boolean FlipX
 
const VectorSpriteOffset
 
const VectorSpriteScale
 
float SpriteRotation
 
Vector SizeMulti
 
float Mass
 
float MaxHitPoints
 
float HitPoints
 
const integer Index
 
const VectorTargetPosition
 
GridCollisionClass GridCollisionClass
 
EntityCollisionClass EntityCollisionClass
 
float CollisionDamage
 
const integer SpawnGridIndex
 
EntityParent
 
EntityChild
 
EntityTarget
 
EntitySpawnerEntity
 
const integer FrameCount
 
const integer InitSeed
 
const integer DropSeed
 
float DepthOffset
 

Member Function Documentation

◆ AddBlackHearts()

EntityPlayer::AddBlackHearts ( integer  BlackHearts)

Adds Black hearts to the player. 1 unit is half a heart. Remove them with negative numbers.

This code adds 1 full black heart to the player.
Isaac.GetPlayer(0):AddBlackHearts(2)

◆ AddBlueFlies()

Entity& EntityPlayer::AddBlueFlies ( integer  Amount,
Vector  Position,
Entity  Target 
)

◆ AddBlueSpider()

Entity& EntityPlayer::AddBlueSpider ( Vector  Position)

◆ AddBombs()

EntityPlayer::AddBombs ( integer  Amount)

Adds bombs to the player. Remove them with negative numbers.

This code removes 1 bomb from the player.
Isaac.GetPlayer(0):AddBombs(-1)

◆ AddBoneHearts()

EntityPlayer::AddBoneHearts ( integer  Hearts)

Adds bone hearts to the player. 1 unit is a single bone heart. Remove them with negative numbers.

This code adds 1 bone heart to the player.
Isaac.GetPlayer(0):AddBoneHearts(1)

◆ AddCacheFlags()

EntityPlayer::AddCacheFlags ( CacheFlag  CacheFlag)

Will reevaluate the cache flags provided in the next cache reevaluation.

◆ AddCard()

EntityPlayer::AddCard ( Card  Card)

◆ AddCoins()

EntityPlayer::AddCoins ( integer  Amount)

Adds coins to the player. Remove them with negative numbers.

This code adds 1 coin to the player.
Isaac.GetPlayer(0):AddCoins(1)

◆ AddCollectible()

EntityPlayer::AddCollectible ( CollectibleType  Type,
integer  Charge,
boolean  AddConsumables 
)

◆ AddControlsCooldown()

EntityPlayer::AddControlsCooldown ( integer  Cooldown)

◆ AddCostume()

EntityPlayer::AddCostume ( Config::Item  Item,
boolean  ItemStateOnly 
)

◆ AddDeadEyeCharge()

EntityPlayer::AddDeadEyeCharge ( )

◆ AddDollarBillEffect()

EntityPlayer::AddDollarBillEffect ( )

◆ AddEternalHearts()

EntityPlayer::AddEternalHearts ( integer  EternalHearts)

Adds eternal hearts to the player. 1 unit is half a heart. Remove them with negative numbers.
(Note that eternal hearts automatically turn to full hearts, when you have more than one.)

This code adds 1 eternal heart to the player.
Isaac.GetPlayer(0):AddEternalHearts(1)

◆ AddGoldenBomb()

EntityPlayer::AddGoldenBomb ( )

◆ AddGoldenHearts()

EntityPlayer::AddGoldenHearts ( integer  Hearts)

Adds golden hearts to the player. 1 unit is a single gold heart. Remove them with negative numbers.

This code adds 1 golden heart to the player.
Isaac.GetPlayer(0):AddGoldenHearts(1)

◆ AddGoldenKey()

EntityPlayer::AddGoldenKey ( )

◆ AddHearts()

EntityPlayer::AddHearts ( integer  Hearts)

Adds red hearts to the player if there are any empty heart containers. 1 unit is half a heart. Remove health with negative numbers.

This code adds 1 full red heart to the player.
Isaac.GetPlayer(0):AddHearts(2)

◆ AddJarFlies()

EntityPlayer::AddJarFlies ( integer  Flies)

◆ AddJarHearts()

EntityPlayer::AddJarHearts ( integer  Hearts)

◆ AddKeys()

EntityPlayer::AddKeys ( integer  Amount)

Adds keys to the player. Remove them with negative numbers.

This code adds 1 key to the player.
Isaac.GetPlayer(0):AddKeys(1)

◆ AddMaxHearts()

EntityPlayer::AddMaxHearts ( integer  MaxHearts,
boolean  IgnoreKeeper 
)

Adds heart containers to the player. 2 units is a full heart container. Remove them with negative numbers.

This code adds 1 heart container to the player.
Isaac.GetPlayer(0):AddMaxHearts(2,true)
  • It is possible to add a half heart container to the player. This will appear as a regular heart container but can only be filled half-way.
  • IgnoreKeeper does not appear to work as intended.
    • Max hearts can be added or removed from Keeper regardless of what this boolean is.
    • If Keeper has Greed's Gullet and this boolean is set to false, max hearts cannot be added to Keeper, but can be removed normally.
    • If Keeper has Greed's Gullet and this boolean is set to true, Max hearts can be added or removed from Keeper normally.

◆ AddNullCostume()

EntityPlayer::AddNullCostume ( Config::NullItemID  NullId)

for Lua

◆ AddPill()

EntityPlayer::AddPill ( PillColor  Pill)

◆ AddPlayerFormCostume()

EntityPlayer::AddPlayerFormCostume ( PlayerForm  Form)

◆ AddPrettyFly()

EntityPlayer::AddPrettyFly ( )

◆ AddSoulHearts()

EntityPlayer::AddSoulHearts ( integer  SoulHearts)

Adds soul hearts to the player. 1 unit is half a heart. Remove them with negative numbers.

This code adds 1 full soul heart to the player.
Isaac.GetPlayer(0):AddSoulHearts(2)

◆ AddTrinket()

EntityPlayer::AddTrinket ( TrinketType  Type)

◆ AnimateAppear()

EntityPlayer::AnimateAppear ( )

Play the animation that is normally played at the beginning of a stage.

◆ AnimateCard()

EntityPlayer::AnimateCard ( Card  Card,
string  AnimName 
)

◆ AnimateCollectible()

EntityPlayer::AnimateCollectible ( CollectibleType  Collectible,
string  AnimName,
string  SpriteAnimName 
)

◆ AnimateHappy()

EntityPlayer::AnimateHappy ( )

thumbs up

◆ AnimateLightTravel()

EntityPlayer::AnimateLightTravel ( )

end of a stage

◆ AnimatePill()

EntityPlayer::AnimatePill ( PillColor  Pill,
string  AnimName 
)

◆ AnimatePitfallIn()

EntityPlayer::AnimatePitfallIn ( )

Fall into pitfall.

◆ AnimatePitfallOut()

EntityPlayer::AnimatePitfallOut ( )

Jump out of pitfall.

◆ AnimateSad()

EntityPlayer::AnimateSad ( )

oh no!

◆ AnimateTeleport()

EntityPlayer::AnimateTeleport ( boolean  Up)

teleport to another room

◆ AnimateTrapdoor()

EntityPlayer::AnimateTrapdoor ( )

end of a stage

◆ AnimateTrinket()

EntityPlayer::AnimateTrinket ( TrinketType  Trinket,
string  AnimName,
string  SpriteAnimName 
)

◆ AreControlsEnabled()

boolean EntityPlayer::AreControlsEnabled ( )

◆ AreOpposingShootDirectionsPressed()

boolean EntityPlayer::AreOpposingShootDirectionsPressed ( )

Returns the non-zero joystick direction from the most recent movement input, but goes to zero after the player comes to a stop.

◆ CanAddCollectible()

boolean EntityPlayer::CanAddCollectible ( )

◆ CanPickBlackHearts()

boolean EntityPlayer::CanPickBlackHearts ( )

returns true if player has room for more black hearts

◆ CanPickBoneHearts()

boolean EntityPlayer::CanPickBoneHearts ( )

returns true if player has room for more bone hearts

◆ CanPickGoldenHearts()

boolean EntityPlayer::CanPickGoldenHearts ( )

returns true if player has room for more golden hearts

◆ CanPickRedHearts()

boolean EntityPlayer::CanPickRedHearts ( )

◆ CanPickSoulHearts()

boolean EntityPlayer::CanPickSoulHearts ( )

returns true if player has room for more soul hearts

◆ CanPickupItem()

boolean EntityPlayer::CanPickupItem ( )

Can Player pick up an item right now?

◆ CanShoot()

boolean EntityPlayer::CanShoot ( )

◆ CanTurnHead()

boolean EntityPlayer::CanTurnHead ( )

returns true if head should react to keys or false otherwise

◆ CheckFamiliar()

EntityPlayer::CheckFamiliar ( integer  FamiliarVariant,
integer  TargetCount,
RNG  rng 
)

◆ ClearCostumes()

EntityPlayer::ClearCostumes ( )

◆ ClearDeadEyeCharge()

EntityPlayer::ClearDeadEyeCharge ( )

◆ ClearTemporaryEffects()

EntityPlayer::ClearTemporaryEffects ( )

Will be called when player exits the room.

◆ DischargeActiveItem()

EntityPlayer::DischargeActiveItem ( )

Sets the charge of your active item to 0 without triggering the active item effect.

◆ DonateLuck()

EntityPlayer::DonateLuck ( integer  Luck)

◆ DoZitEffect()

EntityPlayer::DoZitEffect ( Vector  Direction)

◆ DropPoketItem()

EntityPlayer::DropPoketItem ( integer  PocketNum,
Vector  Pos 
)

Drops a held pocketitem (Card, Pill, Rune...) from the given itemslot at the given position. Possible pocketnumbers are [0, 1]

This function is spelled wrong.

Removing the pocketitem in slot 0, while having a second item in slot 1 will not update the UI correctly. The second item will still be in the second slot, which will in turn prevent the player from using this card right away. The player needs to switch between cards to fix this.

◆ DropTrinket()

EntityPlayer::DropTrinket ( Vector  DropPos,
boolean  ReplaceTick 
)

◆ EvaluateItems()

EntityPlayer::EvaluateItems ( )

Triggers a cache reevaluation. Will trigger the MC_EVALUATE_CACHE callback.

◆ FireBomb()

EntityBomb& EntityPlayer::FireBomb ( Vector  Position,
Vector  Velocity 
)

◆ FireBrimstone()

EntityLaser& EntityPlayer::FireBrimstone ( Vector  Direction)

◆ FireDelayedBrimstone()

EntityLaser& EntityPlayer::FireDelayedBrimstone ( float  Angle,
Entity  Parent 
)

◆ FireKnife()

EntityKnife& EntityPlayer::FireKnife ( Entity  Parent,
float  RotationOffset,
boolean  CantOverwrite,
integer  SubType 
)

◆ FireTear()

EntityTear& EntityPlayer::FireTear ( Vector  Position,
Vector  Velocity,
boolean  CanBeEye,
boolean  NoTractorBeam,
boolean  CanTriggerStreakEnd 
)

This replaces the protected fire_tear() to allow other entities (Such as bombs) to easily shoot tears in the same manner and with all the effects the player does. (Ex. Sad Bombs)

◆ FireTechLaser()

EntityLaser& EntityPlayer::FireTechLaser ( Vector  Position,
LaserOffset  OffsetID,
Vector  Direction,
boolean  LeftEye,
boolean  OneHit 
)

◆ FireTechXLaser()

EntityLaser& EntityPlayer::FireTechXLaser ( Vector  Position,
Vector  Direction,
float  Radius 
)

◆ FlushQueueItem()

boolean EntityPlayer::FlushQueueItem ( )

called after animation is finished, or on special occasions to prevent bugs

◆ FullCharge()

boolean EntityPlayer::FullCharge ( )

Fully charges the active item. Returns true if the item was fully charged, false otherwise. If player has battery it will first try to fill first charge slot, then the battery slot.

◆ GetActiveCharge()

integer EntityPlayer::GetActiveCharge ( )

Get the current charge of your active item.

◆ GetActiveItem()

CollectibleType EntityPlayer::GetActiveItem ( )

Returns the currently held item.

◆ GetActiveSubCharge()

integer EntityPlayer::GetActiveSubCharge ( )

Get the current items subcharge. (Useful for items that charge up over time.)

◆ GetActiveWeaponEntity()

Entity& EntityPlayer::GetActiveWeaponEntity ( )

◆ GetAimDirection()

const Vector& EntityPlayer::GetAimDirection ( )

◆ GetBabySkin()

BabySubType EntityPlayer::GetBabySkin ( )

◆ GetBatteryCharge()

integer EntityPlayer::GetBatteryCharge ( )

Get the current charge progress of the second charge of your current active item. This bar is only active, when you have the Collectible "The Battery"

◆ GetBlackHearts()

integer EntityPlayer::GetBlackHearts ( )

This does not return the # of black hearts, this returns the bit mask for which soul hearts are black hearts.

◆ GetBombFlags()

integer EntityPlayer::GetBombFlags ( )

◆ GetBombVariant()

EntityBomb::BombVariant EntityPlayer::GetBombVariant ( integer  TearFlags,
boolean  ForceSmallBomb 
)

Pass tear flags to add extra effects to the bomb visual like burn -> hot bombs, even if player doesn't have Hot Bombs collectible. ForceSmallBomb will override large bomb variants for TEAR_PERSISTENT.

◆ GetBoneHearts()

integer EntityPlayer::GetBoneHearts ( )

Returns the number of bone hearts as an integer value. 1 Boneheart = 1.

This code gets the total amount of red heart containers including bone hearts. The bonehearts need to be mulltiplied by 2, since in GetMaxHearts() 2 equals 1 full heart.
local player = Isaac.GetPlayer(0)
player:GetMaxHearts()+player:GetBoneHearts()*2

◆ GetCard()

Card EntityPlayer::GetCard ( integer  SlotId)

Gets the ID of the card the player is holding in the given itemslot (0 or 1).

◆ GetCardRNG()

RNG& EntityPlayer::GetCardRNG ( Card  ID)

◆ GetCollectibleCount()

integer EntityPlayer::GetCollectibleCount ( )

◆ GetCollectibleNum()

integer EntityPlayer::GetCollectibleNum ( CollectibleType  Type)

◆ GetCollectibleRNG()

RNG& EntityPlayer::GetCollectibleRNG ( CollectibleType  ID)

◆ GetCostumeNullPos()

Vector EntityPlayer::GetCostumeNullPos ( string  NullFrameName,
boolean  HeadScale,
Vector  Direction 
)

◆ GetDamageCooldown()

integer EntityPlayer::GetDamageCooldown ( )

◆ GetEffectiveMaxHearts()

integer EntityPlayer::GetEffectiveMaxHearts ( )

Returns the amount of Red Hearts the player can contain in their Heart Containers and Bone Hearts. 1 unit is half a red heart.

Example: you have 3 red heart container and one bone heart. 6(red) + 2(bone) = 8

◆ GetEffects()

TemporaryEffects& EntityPlayer::GetEffects ( )

◆ GetEternalHearts()

integer EntityPlayer::GetEternalHearts ( )

Returns the amount of eternal hearts the player has.

◆ GetExtraLives()

integer EntityPlayer::GetExtraLives ( )

◆ GetFireDirection()

Direction EntityPlayer::GetFireDirection ( )

◆ GetFlyingOffset()

Vector EntityPlayer::GetFlyingOffset ( )

◆ GetGoldenHearts()

integer EntityPlayer::GetGoldenHearts ( )

Returns the amount of golden hearts the player has.

◆ GetGreedDonationBreakChance()

float EntityPlayer::GetGreedDonationBreakChance ( )

◆ GetHeadDirection()

Direction EntityPlayer::GetHeadDirection ( )

◆ GetHeartLimit()

integer EntityPlayer::GetHeartLimit ( )

◆ GetHearts()

integer EntityPlayer::GetHearts ( )

Returns the amount of red hearts the player has inside their heart containers and bone hearts. 1 unit is half a heart.

◆ GetItemState()

CollectibleType EntityPlayer::GetItemState ( )

◆ GetJarFlies()

integer EntityPlayer::GetJarFlies ( )

◆ GetJarHearts()

integer EntityPlayer::GetJarHearts ( )

◆ GetLaserOffset()

Vector EntityPlayer::GetLaserOffset ( LaserOffset  ID,
Vector  Direction 
)

◆ GetLastActionTriggers()

integer EntityPlayer::GetLastActionTriggers ( )

◆ GetLastDamageFlags()

integer EntityPlayer::GetLastDamageFlags ( )

◆ GetLastDamageSource()

const EntityRef& EntityPlayer::GetLastDamageSource ( )

◆ GetLastDirection()

const Vector& EntityPlayer::GetLastDirection ( )

◆ GetMaxHearts()

integer EntityPlayer::GetMaxHearts ( )

Returns the amount of Heart Containers the player has. 1 unit is half a heart container.

◆ GetMaxPoketItems()

integer EntityPlayer::GetMaxPoketItems ( )

Get the number of Pickup items you can carry. (1 on default. 2 with belly button or similar)

This function is spelled wrong.

◆ GetMaxTrinkets()

integer EntityPlayer::GetMaxTrinkets ( )

Get the number of trinkets you can carry. (1 on default. 2 with moms purse or similar)

◆ GetMovementDirection()

Direction EntityPlayer::GetMovementDirection ( )

◆ GetMovementInput()

Vector EntityPlayer::GetMovementInput ( )

◆ GetMovementJoystick()

Vector EntityPlayer::GetMovementJoystick ( )

◆ GetMovementVector()

const Vector& EntityPlayer::GetMovementVector ( )

◆ GetMultiShotParams()

MultiShotParams EntityPlayer::GetMultiShotParams ( )

◆ GetMultiShotPositionVelocity()

PosVel EntityPlayer::GetMultiShotPositionVelocity ( integer  LoopIndex,
WeaponType  Weapon,
Vector  ShotDirection,
float  ShotSpeed,
MultiShotParams  params 
)

Call this function in a loop with values from 0 to MultiShotParams.NumProjectiles-1 (inclusive)

◆ GetName()

string EntityPlayer::GetName ( )

Returns the name of the player. (Isaac, Cain, Azazel,...)

◆ GetNPCTarget()

Entity& EntityPlayer::GetNPCTarget ( )

normally returns the player itself. Can redirect enemy attacks to a different entity such as Best Friend

◆ GetNumBlueFlies()

integer EntityPlayer::GetNumBlueFlies ( )

◆ GetNumBlueSpiders()

integer EntityPlayer::GetNumBlueSpiders ( )

◆ GetNumBombs()

integer EntityPlayer::GetNumBombs ( )

◆ GetNumCoins()

integer EntityPlayer::GetNumCoins ( )

◆ GetNumKeys()

integer EntityPlayer::GetNumKeys ( )

◆ GetPill()

PillColor EntityPlayer::GetPill ( integer  SlotId)

Gets the ID of the pill the player is holding in the given itemslot (0 or 1).

◆ GetPillRNG()

RNG& EntityPlayer::GetPillRNG ( PillEffect  ID)

◆ GetPlayerType()

PlayerType EntityPlayer::GetPlayerType ( )

◆ GetPocketItem()

const PlayerPocketItem& EntityPlayer::GetPocketItem ( integer  SlotId)

Get the userdata of the pocketitem (Card,Pill,rune) in a said slot.

This function returns userdata, which cant be processed. It is therefore broken and should not be used!

◆ GetRecentMovementVector()

const Vector& EntityPlayer::GetRecentMovementVector ( )

Returns the joystick direction that drives player movement, taking into account certain modifiers like disabled controls and seed effects.

◆ GetShootingInput()

Vector EntityPlayer::GetShootingInput ( )

◆ GetShootingJoystick()

Vector EntityPlayer::GetShootingJoystick ( )

◆ GetSmoothBodyRotation()

float EntityPlayer::GetSmoothBodyRotation ( )

◆ GetSoulHearts()

integer EntityPlayer::GetSoulHearts ( )

Returns the amount of Soul Hearts the player has. 1 unit is half a heart.

  • Black Hearts count toward this total, as the game sees them as soul hearts.

◆ GetSubPlayer()

EntityPlayer& EntityPlayer::GetSubPlayer ( )

◆ GetTearHitParams()

TearParams EntityPlayer::GetTearHitParams ( WeaponType  WeaponType,
float  DamageScale,
integer  TearDisplacement 
)
Used for tear parameters that are calculated on hit (ex: Tough love, Common cold), DamageScale is used for scale calculation based on damage

◆ GetTearMovementInheritance()

Vector EntityPlayer::GetTearMovementInheritance ( Vector  ShotDirection)

◆ GetTearPoisonDamage()

float EntityPlayer::GetTearPoisonDamage ( )

◆ GetTearRangeModifier()

integer EntityPlayer::GetTearRangeModifier ( )

◆ GetTotalDamageTaken()

integer EntityPlayer::GetTotalDamageTaken ( )

◆ GetTractorBeam()

Entity& EntityPlayer::GetTractorBeam ( )

◆ GetTrinket()

TrinketType EntityPlayer::GetTrinket ( integer  TrinketIndex)

Gets the ID of the trinket the player is holding in the given trinketslot (0 or 1).

◆ GetTrinketMultiplier()

integer EntityPlayer::GetTrinketMultiplier ( )

◆ GetTrinketRNG()

RNG& EntityPlayer::GetTrinketRNG ( TrinketType  ID)

◆ GetVelocityBeforeUpdate()

const Vector& EntityPlayer::GetVelocityBeforeUpdate ( )

◆ GetZodiacEffect()

CollectibleType EntityPlayer::GetZodiacEffect ( )

◆ HasCollectible()

boolean EntityPlayer::HasCollectible ( CollectibleType  Type)

◆ HasFullHearts()

boolean EntityPlayer::HasFullHearts ( )

◆ HasFullHeartsAndSoulHearts()

boolean EntityPlayer::HasFullHeartsAndSoulHearts ( )

◆ HasGoldenBomb()

boolean EntityPlayer::HasGoldenBomb ( )

◆ HasGoldenKey()

boolean EntityPlayer::HasGoldenKey ( )

◆ HasInvincibility()

boolean EntityPlayer::HasInvincibility ( )

returns true when player is in an invincibility state

◆ HasPlayerForm()

boolean EntityPlayer::HasPlayerForm ( PlayerForm  Form)

◆ HasTimedItem()

boolean EntityPlayer::HasTimedItem ( )

Kept for avoiding modding issues.

◆ HasTrinket()

boolean EntityPlayer::HasTrinket ( TrinketType  Type)

◆ HasWeaponType()

boolean EntityPlayer::HasWeaponType ( WeaponType  WeaponType)

◆ InitBabySkin()

EntityPlayer::InitBabySkin ( )

◆ IsBlackHeart()

boolean EntityPlayer::IsBlackHeart ( integer  Heart)

◆ IsBoneHeart()

boolean EntityPlayer::IsBoneHeart ( integer  heart)

◆ IsExtraAnimationFinished()

boolean EntityPlayer::IsExtraAnimationFinished ( )

◆ IsFullSpriteRendering()

boolean EntityPlayer::IsFullSpriteRendering ( )

◆ IsHeldItemVisible()

boolean EntityPlayer::IsHeldItemVisible ( )

◆ IsHoldingItem()

boolean EntityPlayer::IsHoldingItem ( )

Is Player holding up an item (card/collectible/etc)

◆ IsItemQueueEmpty()

boolean EntityPlayer::IsItemQueueEmpty ( )

◆ IsP2Appearing()

boolean EntityPlayer::IsP2Appearing ( )

◆ IsPosInSpotLight()

boolean EntityPlayer::IsPosInSpotLight ( Vector  Position)

◆ IsSubPlayer()

boolean EntityPlayer::IsSubPlayer ( )

This is for players that require multiple player entities, such as the Forgotten (this has nothing to do with co-players!)

◆ NeedsCharge()

boolean EntityPlayer::NeedsCharge ( )

◆ PlayExtraAnimation()

EntityPlayer::PlayExtraAnimation ( string  Animation)

◆ QueueExtraAnimation()

EntityPlayer::QueueExtraAnimation ( string  Animation)

◆ QueueItem()

EntityPlayer::QueueItem ( Config::Item  Item,
integer  Charge,
boolean  Touched 
)

Add Collectible/Trinket after animation is finished.

◆ RemoveBlackHeart()

EntityPlayer::RemoveBlackHeart ( integer  BlackHeart)

◆ RemoveBlueFly()

EntityPlayer::RemoveBlueFly ( )

◆ RemoveBlueSpider()

EntityPlayer::RemoveBlueSpider ( )

◆ RemoveCollectible()

EntityPlayer::RemoveCollectible ( CollectibleType  Type)

◆ RemoveCostume()

EntityPlayer::RemoveCostume ( Config::Item  Item)

◆ RemoveGoldenBomb()

EntityPlayer::RemoveGoldenBomb ( )

◆ RemoveGoldenKey()

EntityPlayer::RemoveGoldenKey ( )

◆ RemoveSkinCostume()

EntityPlayer::RemoveSkinCostume ( )

◆ RenderBody()

EntityPlayer::RenderBody ( Vector  position)

◆ RenderGlow()

EntityPlayer::RenderGlow ( Vector  position)

◆ RenderHead()

EntityPlayer::RenderHead ( Vector  position)

◆ RenderTop()

EntityPlayer::RenderTop ( Vector  position)

◆ ReplaceCostumeSprite()

EntityPlayer::ReplaceCostumeSprite ( Config::Item  Item,
string  SpritePath,
integer  SpriteId 
)

◆ ResetDamageCooldown()

EntityPlayer::ResetDamageCooldown ( )

◆ ResetItemState()

EntityPlayer::ResetItemState ( )

Made this public so Room transtiions can call this to prevent lock ups.

◆ RespawnFamiliars()

EntityPlayer::RespawnFamiliars ( )

◆ Revive()

EntityPlayer::Revive ( )

revive player

◆ SetActiveCharge()

EntityPlayer::SetActiveCharge ( integer  Charge)

◆ SetCard()

EntityPlayer::SetCard ( integer  SlotId,
Card  Card 
)

Change the card/rune the player is holding in the given itemslot (0 or 1).

◆ SetFullHearts()

EntityPlayer::SetFullHearts ( )

◆ SetMinDamageCooldown()

EntityPlayer::SetMinDamageCooldown ( integer  DamageCooldown)

◆ SetPill()

EntityPlayer::SetPill ( integer  SlotId,
PillColor  Pill 
)

Change the pill the player is holding in the given itemslot (0 or 1).

◆ SetShootingCooldown()

EntityPlayer::SetShootingCooldown ( integer  Cooldown)

◆ SetTargetTrapDoor()

EntityPlayer::SetTargetTrapDoor ( GridEntity  TrapDoor)

◆ ShootRedCandle()

EntityPlayer::ShootRedCandle ( Vector  Direction)

for ghost pepper item + poop and farts

◆ SpawnMawOfVoid()

EntityLaser& EntityPlayer::SpawnMawOfVoid ( integer  Timeout)

◆ StopExtraAnimation()

EntityPlayer::StopExtraAnimation ( )

◆ SwapActiveItems()

EntityPlayer::SwapActiveItems ( )

◆ ThrowBlueSpider()

Entity& EntityPlayer::ThrowBlueSpider ( Vector  Position,
Vector  Target 
)

◆ TryHoldTrinket()

boolean EntityPlayer::TryHoldTrinket ( TrinketType  Type)

Returns true if an active item pickup cooldown is over. returns true if trinket can be added, else false

◆ TryRemoveCollectibleCostume()

EntityPlayer::TryRemoveCollectibleCostume ( CollectibleType  Collectible,
boolean  KeepPersistent 
)

tries to remove a costume based on some filters

◆ TryRemoveNullCostume()

EntityPlayer::TryRemoveNullCostume ( Config::NullItemID  NullId)

◆ TryRemoveTrinket()

boolean EntityPlayer::TryRemoveTrinket ( TrinketType  Type)

◆ TryRemoveTrinketCostume()

EntityPlayer::TryRemoveTrinketCostume ( TrinketType  Trinket)

tries to remove a costume based on some filters

◆ TryUseKey()

boolean EntityPlayer::TryUseKey ( )

◆ UpdateCanShoot()

EntityPlayer::UpdateCanShoot ( )

◆ UseActiveItem()

EntityPlayer::UseActiveItem ( CollectibleType  Item,
boolean  ShowAnim,
boolean  KeepActiveItem,
boolean  AllowNonMainPlayer,
boolean  ToAddCostume 
)

◆ UseCard()

EntityPlayer::UseCard ( Card  Card)

◆ UsePill()

EntityPlayer::UsePill ( PillEffect  PillEffect,
PillColor  PillColor 
)

◆ WillPlayerRevive()

boolean EntityPlayer::WillPlayerRevive ( )

Member Data Documentation

◆ BabySkin

BabySubType EntityPlayer::BabySkin

P2 Skin section Used to hold the selected skin (in case of glitched baby it will pick a random one)

◆ CanFly

boolean EntityPlayer::CanFly

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. Can the player fly over rocks and pits?

◆ ControllerIndex

const integer EntityPlayer::ControllerIndex

s32 GetItemStateCooldown( void ) const { return m_ItemStateCooldown; }

◆ ControlsCooldown

integer EntityPlayer::ControlsCooldown

◆ ControlsEnabled

boolean EntityPlayer::ControlsEnabled

◆ Damage

float EntityPlayer::Damage

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Damage Stat. How much damage do the players tears or other main weapons do?

◆ FireDelay

integer EntityPlayer::FireDelay

How long until the player can spawn their next tear?

◆ FriendBallEnemy

const EntityDesc& EntityPlayer::FriendBallEnemy

◆ HeadFrameDelay

integer EntityPlayer::HeadFrameDelay

◆ ItemHoldCooldown

integer EntityPlayer::ItemHoldCooldown

Used for avoiding player get stucked between rocks when switching a flying item with other active item.

◆ LaserColor

Color EntityPlayer::LaserColor

◆ Luck

float EntityPlayer::Luck

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Luck Stat. Better luck generally means better random events.

◆ MaxFireDelay

integer EntityPlayer::MaxFireDelay

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Tears Stat. How long between each tear can spawn?

◆ MoveSpeed

float EntityPlayer::MoveSpeed

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Speed Stat. How fast can the player move?

◆ QueuedItem

QueueItemData EntityPlayer::QueuedItem

item queue for when the player is picking up an item. the item is in effect as soon as the animation is finished and will be removed from the queue.

◆ SecondaryActiveItem

ActiveItemDesc EntityPlayer::SecondaryActiveItem

◆ ShotSpeed

float EntityPlayer::ShotSpeed

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the ShotSpeed Stat. How fast does the tear travel when spawned?

◆ SpriteScale

Vector EntityPlayer::SpriteScale

◆ TearColor

Color EntityPlayer::TearColor

◆ TearFallingAcceleration

float EntityPlayer::TearFallingAcceleration

◆ TearFallingSpeed

float EntityPlayer::TearFallingSpeed

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. How fast is the tear moving up or down when it spawns? Affects range.

◆ TearFlags

integer EntityPlayer::TearFlags

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. Various tear flags.

This code makes Isaac's tears spectral.
local mod:OnEvaluateTearFlags(player, flag)
    player.TearFlags = player.TearFlags | TearFlags.TEAR_SPECTRAL
end

mod:AddCallback(ModCallbacks.MC_EVALUATE_CACHE, mod.OnEvaluateTearFlags, CacheFlag.CACHE_TEARFLAG)

◆ TearHeight

float EntityPlayer::TearHeight

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. This is equal to the Range Stat * -1. How high above the ground is the tear when it spawns?

This code gives Isaac a +5 range up.
local mod:OnEvaluateRange(player, flag)
    -- we give -5 because the TearHeight stat is always negative; the lower the number - the further the tear travels
    player.TearHeight = player.TearHeight - 5
end

mod:AddCallback(ModCallbacks.MC_EVALUATE_CACHE, mod.OnEvaluateRange, CacheFlag.CACHE_RANGE)

◆ TearsOffset

const Vector& EntityPlayer::TearsOffset