Classes

A list of Lua **classes** in the modding API of *The Binding of Isaac: Afterbirth †*. See also Enumerations

## Entity

AddSlowing()
 Arguments
 **EntityRef** SourceThe Entity that the code is referencing to.
**Integer** DurationFor how long the Status Effect is active in frames.
**float** SlowValueThe amount of slowing.
 None.

AddPoison()
 Arguments
 **EntityRef** SourceThe Entity that the code is referencing to.
**Integer** DurationFor how long the Status Effect is active in frames.
 None.

AddMidasFreeze()
 Arguments
 **EntityRef** SourceThe Entity that the code is referencing to.
 None.

AddFreeze()
 Arguments
 **EntityRef** SourceThe Entity that the code is referencing to.
 None.

AddShrink()
 Arguments
 **EntityRef** SourceThe Entity that the code is referencing to.
 None.

AddHealth()
 Arguments
 None.

AddFear()
 Arguments
 **EntityRef** SourceThe Entity that the code is referencing to.
 None.

AddConfusion()
 Arguments
 **EntityRef** SourceThe Entity that the code is referencing to.
**Integer** DurationFor how long the Status Effect is active in frames.
 None.

AddCharmed()
 Arguments
 None.

AddBurn()
 Arguments
 **EntityRef** SourceThe Entity that the code is referencing to.
**Integer** DurationFor how long the Status Effect is active in frames.
 None.

AddEntityFlags()
 Arguments
 None.

## EntityBomb

SetExplosionCountdown()
 Arguments
 None.

## EntityEffect

FollowParent()
 Arguments
 None.

IsPlayerCreep()
 Arguments
 None.

SetDamageSource()
 Arguments
 None.

SetRadii()
 Arguments
 **float** minDefines the minimum knockback.
 None.

SetTimeout()
 Arguments
 None.

## EntityPlayer

AddBlackHearts()
 Arguments
 Example 1Adds 2 Black Hearts to Isaac.
```
player = Isaac.GetPlayer( 0 )
player:AddBlackHearts( 2 )

```

AddBlueFlies()
 Arguments
 **Integer** AmountNumber of Blue Flies to add.
**Vector** PositionCoordinates where Blue Flies should spawn.
 Example 1Spawns 5 Blue Flies whenever Isaac attacks an enemy
```
local exampleMod = RegisterMod( "AddBlueFlies Example", 1 )

function exampleMod:update( target, amount, source, dealer )
  local player = Isaac.GetPlayer( 0 )
  if source == 0 and target:IsActiveEnemy() then
    player = player:AddBlueFlies( 5, player.Position, target )
  end
end

exampleMod:AddCallback( ModCallbacks.MC_ENTITY_TAKE_DMG, exampleMod.update );

```

AddBlueSpider()
 Arguments
 Example 1Spawns a Blue Spider at Isaac's position
```
player = Isaac.GetPlayer( 0 )
player = player:AddBlueSpider( player.Position )

```

AddMaxHearts()
 Arguments
 **Integer** MaxHeartsThe amount of Heart Containers you want to add.
 None.

GetHearts()
 Arguments
 None.
 None.

GetSoulHearts()
 Arguments
 None.
 None.

GetBlackHearts()
 Arguments
 None.
 None.

GetName()
 Arguments
 None.
 Example 1Prints out the name of the character in the debug console.
```
player = Isaac.GetPlayer( 0 )
Isaac.DebugString( player:GetName() )

```

AddNullCostume()
 Arguments
 Example 1Adds a custom made costume to the player upon picking up the item.
```
local costume = {}
local custom_costume = Isaac.GetCostumeIdByPath( "gfx/characters/costume.anm2" )
function afterlife:playerFrameUpdate( _player )
  if game:GetFrameCount() == 1 then
    setCostume( custom_costume, false )
  end
  if not hasCostume( markOfCain_costume ) and _player:HasCollectible( markOfCain_item ) then
    _player:AddNullCostume( custom_costume )
    setCostume( custom_costume, true )
  end
end

function hasCostume( _costume )
  if costume[_costume] ~= nil then
    return costume[_costume]
  else
    return false
  end
end

function setCostume( _costume, _value )
  costume[_costume] = _value
end

afterlife:AddCallback( ModCallbacks.MC_POST_PEFFECT_UPDATE, afterlife.playerFrameUpdate )

```

## RNG

GetSeed()
 Arguments
 None.
 None.

Next()
 Arguments
 None.
 None.

RandomFloat()
 Arguments
 None.
 None.

RandomInt()
 Arguments
 None.

## TemporaryEffects

AddCollectibleEffect()
 Arguments
 **CollectibleType** CollectibleTypeChecks the kind of collectible you are picking up.
 None.

AddNullEffect()
 Arguments
 **Config::NullItemID** NullIdCalls a NullId from the Config class.
 None.

AddTrinketEffect()
 Arguments
 **TrinketType** TrinketTypeChecks what trinket is being picked up.
 None.

ClearEffects()
 Arguments
 None.
 None.