Binding of Isaac - Afterbirth+ Lua Reference/Guide

Public Member Functions | Public Attributes | List of all members
EntityPlayer Class Reference
Inheritance diagram for EntityPlayer:

## 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)
Entity & | AddBlueSpider (Vector Position)
Entity & | ThrowBlueSpider (Vector Position, Vector Target)
| RemoveBlueSpider ()
Entity & | AddBlueFlies (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 ()
Entity & | GetNPCTarget ()
Direction | GetMovementDirection ()
Direction | GetFireDirection ()
Direction | GetHeadDirection ()
const Vector & | GetAimDirection ()
const Vector & | GetMovementVector ()
const Vector & | GetRecentMovementVector ()
| 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 Vector & | GetLastDirection ()
const Vector & | GetVelocityBeforeUpdate ()
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 ()
integer | GetEternalHearts ()
| This does not return the # of black hearts, this returns the bit mask for which soul hearts are black hearts. More...
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 ()
TemporaryEffects & | GetEffects ()
boolean | HasWeaponType (WeaponType WeaponType)
Entity & | GetActiveWeaponEntity ()
Entity & | GetTractorBeam ()
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)
EntityLaser & | FireDelayedBrimstone (float Angle, Entity Parent)
const EntityRef & | GetLastDamageSource ()
integer | GetLastDamageFlags ()
integer | GetTotalDamageTaken ()
EntityTear & | FireTear (Vector Position, Vector Velocity, boolean CanBeEye, boolean NoTractorBeam, boolean CanTriggerStreakEnd)
EntityBomb & | FireBomb (Vector Position, Vector Velocity)
EntityLaser & | FireBrimstone (Vector Direction)
EntityLaser & | FireTechLaser (Vector Position, LaserOffset OffsetID, Vector Direction, boolean LeftEye, boolean OneHit)
EntityLaser & | FireTechXLaser (Vector Position, Vector Direction, float Radius)
EntityKnife & | FireKnife (Entity Parent, float RotationOffset, boolean CantOverwrite, integer SubType)
BabySubType | GetBabySkin ()
boolean | CanShoot ()
boolean | IsP2Appearing ()
boolean | IsFullSpriteRendering ()
RNG & | GetCollectibleRNG (CollectibleType ID)
RNG & | GetTrinketRNG (TrinketType ID)
RNG & | GetPillRNG (PillEffect ID)
RNG & | GetCardRNG (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...
EntityLaser & | SpawnMawOfVoid (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 ()
EntityPlayer & | GetSubPlayer ()
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 (KColor KColor, integer Duration, integer Priority, boolean Fadeout, boolean Share)
const KColor & | GetColor ()
| 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, KColor 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 ()
Entity & | GetLastParent ()
Entity & | GetLastChild ()
boolean | HasCommonParentWithEntity (Entity Other)
boolean | IsFrame (integer Frame, integer Offset)
| true every X frames More...
RNG & | GetDropRNG ()
Sprite & | GetSprite ()
EntityPlayer | ToPlayer ()
EntityEffect | ToEffect ()
EntityNPC | ToNPC ()
EntityPickup | ToPickup ()
EntityFamiliar | ToFamiliar ()
EntityBomb | ToBomb ()
EntityKnife | ToKnife ()
EntityLaser | ToLaser ()
EntityTear | ToTear ()
EntityProjectile | ToProjectile ()

## Public Attributes
const Vector & | TearsOffset
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. How long between each tear can spawn? More...
float | ShotSpeed
| Player stat - Only change this in a callback to MC_EVALUATE_CACHE. How fast does the tear travel when spawned? More...
float | Damage
| Player stat - Only change this in a callback to MC_EVALUATE_CACHE. 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. How high above the ground is the tear when it spawns? Affects range. 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. How fast can the player move? More...
integer | TearFlags
| Player stat - Only change this in a callback to MC_EVALUATE_CACHE. How much gravity does the tear have to start? Affects range. More...
KColor | TearColor
KColor | 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. 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 KColor & | SplatColor
boolean | Visible
const Vector & | PositionOffset
integer | RenderZOffset
boolean | FlipX
const Vector & | SpriteOffset
const Vector & | SpriteScale
float | SpriteRotation
Vector | SizeMulti
float | Mass
float | MaxHitPoints
float | HitPoints
const integer | Index
const Vector & | TargetPosition
GridCollisionClass | GridCollisionClass
EntityCollisionClass | EntityCollisionClass
float | CollisionDamage
const integer | SpawnGridIndex
Entity & | Parent
Entity & | Child
Entity & | Target
Entity & | SpawnerEntity
const integer | FrameCount
const integer | InitSeed
const integer | DropSeed
float | DepthOffset

## Member Function Documentation

## ◆ AddBlackHearts()

EntityPlayer::AddBlackHearts | ( | integer | BlackHearts | ) |

## ◆ AddBlueFlies()

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

## ◆ AddBlueSpider()

Entity& EntityPlayer::AddBlueSpider | ( | Vector | Position | ) |

## ◆ AddBombs()

EntityPlayer::AddBombs | ( | integer | Amount | ) |

## ◆ AddBoneHearts()

EntityPlayer::AddBoneHearts | ( | integer | Hearts | ) |

## ◆ AddCacheFlags()

EntityPlayer::AddCacheFlags | ( | integer | Flags | ) |

Reevaluate Damage, Firerate, Shot speed.

## ◆ AddCard()

EntityPlayer::AddCard | ( | Card | Card | ) |

## ◆ AddCoins()

EntityPlayer::AddCoins | ( | integer | Amount | ) |

## ◆ 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 | ) |

## ◆ AddGoldenBomb()

EntityPlayer::AddGoldenBomb | ( |  | ) |

## ◆ AddGoldenHearts()

EntityPlayer::AddGoldenHearts | ( | integer | Hearts | ) |

## ◆ AddGoldenKey()

EntityPlayer::AddGoldenKey | ( |  | ) |

## ◆ AddHearts()

EntityPlayer::AddHearts | ( | integer | Hearts | ) |

## ◆ AddJarFlies()

EntityPlayer::AddJarFlies | ( | integer | Flies | ) |

## ◆ AddJarHearts()

EntityPlayer::AddJarHearts | ( | integer | Hearts | ) |

## ◆ AddKeys()

EntityPlayer::AddKeys | ( | integer | Amount | ) |

## ◆ AddMaxHearts()

EntityPlayer::AddMaxHearts | ( | integer | MaxHearts,
|  | boolean | IgnoreKeeper
| ) |  |

## ◆ 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 | ) |

## ◆ AddTrinket()

EntityPlayer::AddTrinket | ( | TrinketType | Type | ) |

s32 GetCollectibleNum( eCollectibleType Collectible ) const;

## ◆ AnimateAppear()

EntityPlayer::AnimateAppear | ( |  | ) |

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 | ( |  | ) |

## ◆ DonateLuck()

EntityPlayer::DonateLuck | ( | integer | Luck | ) |

## ◆ DoZitEffect()

EntityPlayer::DoZitEffect | ( | Vector | Direction | ) |

## ◆ DropPoketItem()

EntityPlayer::DropPoketItem | ( | integer | PocketNum,
|  | Vector | Pos
| ) |  |

## ◆ DropTrinket()

EntityPlayer::DropTrinket | ( | Vector | DropPos,
|  | boolean | ReplaceTick
| ) |  |

## ◆ EvaluateItems()

EntityPlayer::EvaluateItems | ( |  | ) |

## ◆ 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 | ( |  | ) |

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.

## ◆ GetActiveCharge()

integer EntityPlayer::GetActiveCharge | ( |  | ) |

## ◆ GetActiveItem()

CollectibleType EntityPlayer::GetActiveItem | ( |  | ) |

TODO: Replace those calls with new class/structure that contains all item information.

## ◆ GetActiveSubCharge()

integer EntityPlayer::GetActiveSubCharge | ( |  | ) |

## ◆ GetActiveWeaponEntity()

Entity& EntityPlayer::GetActiveWeaponEntity | ( |  | ) |

## ◆ GetAimDirection()

const Vector& EntityPlayer::GetAimDirection | ( |  | ) |

## ◆ GetBabySkin()

BabySubType EntityPlayer::GetBabySkin | ( |  | ) |

## ◆ GetBatteryCharge()

integer EntityPlayer::GetBatteryCharge | ( |  | ) |

## ◆ GetBlackHearts()

integer EntityPlayer::GetBlackHearts | ( |  | ) |

## ◆ 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 | ( |  | ) |

## ◆ GetCard()

Card EntityPlayer::GetCard | ( | integer | SlotId | ) |

## ◆ 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 | ( |  | ) |

## ◆ GetEffects()

TemporaryEffects& EntityPlayer::GetEffects | ( |  | ) |

## ◆ GetEternalHearts()

integer EntityPlayer::GetEternalHearts | ( |  | ) |

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

## ◆ GetExtraLives()

integer EntityPlayer::GetExtraLives | ( |  | ) |

## ◆ GetFireDirection()

Direction EntityPlayer::GetFireDirection | ( |  | ) |

## ◆ GetFlyingOffset()

Vector EntityPlayer::GetFlyingOffset | ( |  | ) |

## ◆ GetGoldenHearts()

integer EntityPlayer::GetGoldenHearts | ( |  | ) |

## ◆ GetGreedDonationBreakChance()

float EntityPlayer::GetGreedDonationBreakChance | ( |  | ) |

## ◆ GetHeadDirection()

Direction EntityPlayer::GetHeadDirection | ( |  | ) |

## ◆ GetHeartLimit()

integer EntityPlayer::GetHeartLimit | ( |  | ) |

## ◆ GetHearts()

integer EntityPlayer::GetHearts | ( |  | ) |

## ◆ 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 | ( |  | ) |

## ◆ GetMaxPoketItems()

integer EntityPlayer::GetMaxPoketItems | ( |  | ) |

## ◆ GetMaxTrinkets()

integer EntityPlayer::GetMaxTrinkets | ( |  | ) |

## ◆ 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 | ( |  | ) |

## ◆ 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 | ) |

## ◆ GetPillRNG()

RNG& EntityPlayer::GetPillRNG | ( | PillEffect | ID | ) |

## ◆ GetPlayerType()

PlayerType EntityPlayer::GetPlayerType | ( |  | ) |

## ◆ GetPocketItem()

const PlayerPocketItem& EntityPlayer::GetPocketItem | ( | integer | SlotId | ) |

## ◆ 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 | ( |  | ) |

## ◆ GetSubPlayer()

EntityPlayer& EntityPlayer::GetSubPlayer | ( |  | ) |

## ◆ GetTearHitParams()

TearParams EntityPlayer::GetTearHitParams | ( | WeaponType | WeaponType,
|  | float | DamageScale,
|  | integer | TearDisplacement
| ) |  |

For Lua s32 GetBombVariant( u32 UpperBits, u32 LowerBits) const { return GetBombVariant( (uint64_t)UpperBits << 32 | LowerBits, false ); } ; 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 | ) |

## ◆ 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
| ) |  |

## ◆ SetFullHearts()

EntityPlayer::SetFullHearts | ( |  | ) |

## ◆ SetMinDamageCooldown()

EntityPlayer::SetMinDamageCooldown | ( | integer | DamageCooldown | ) |

## ◆ SetPill()

EntityPlayer::SetPill | ( | integer | SlotId,
|  | PillColor | Pill
| ) |  |

## ◆ 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. 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

KColor EntityPlayer::LaserColor

## ◆ Luck

float EntityPlayer::Luck

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. Better luck generally means better random events.

## ◆ MaxFireDelay

integer EntityPlayer::MaxFireDelay

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. How long between each tear can spawn?

## ◆ MoveSpeed

float EntityPlayer::MoveSpeed

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. 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. How fast does the tear travel when spawned?

## ◆ SpriteScale

Vector EntityPlayer::SpriteScale

## ◆ TearColor

KColor 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. How much gravity does the tear have to start? Affects range.

## ◆ TearHeight

float EntityPlayer::TearHeight

Player stat - Only change this in a callback to MC_EVALUATE_CACHE. How high above the ground is the tear when it spawns? Affects range.

## ◆ TearsOffset

const Vector& EntityPlayer::TearsOffset