Binding of Isaac - Afterbirth+ Lua Reference/Guide

Public Member Functions | Public Attributes | List of all members
Game Class Reference

## Public Member Functions
| Update ()
| Render ()
boolean | IsPaused ()
| Displays the HUD elements that are moved to the gamepad. More...
Entity & | Spawn (EntityType Type, integer Variant, Vector Position, Vector Velocity, Entity Spawner, integer SubType, integer Seed)
EntityNPC & | SpawnEntityDesc (Entity::EntityDesc desc, Vector Position, Entity Spawner)
| BombDamage (Vector Position, float Damage, float Radius, boolean LineCheck, Entity Source, integer TearFlags, integer DamageFlags, boolean DamageSource)
| BombExplosionEffects (Vector Position, float Damage, integer TearFlags, KColor KColor, Entity Source, float RadiusMult, boolean LineCheck, boolean DamageSource)
| The complete bomb explosion package: Do damage, spawn boomgraphics, and apply tearflag-based effects. More...
| BombTearflagEffects (KAGE::Math::Vector Position, float Radius, integer TearFlags, Entity Source)
| Does bomb-exclusive special effects. More...
| Fart (Vector Position, float Radius, Entity Source, float FartScale, integer FartSubType)
| CharmFart (Vector Position, float Radius, Entity Source)
| ButterBeanFart (Vector Position, float Radius, Entity Source, boolean ShowEffect)
boolean | RerollEnemy (Entity e)
| SpawnParticles (Vector Pos, EntityEffect::Variant ParticleType, integer NumParticles, float Speed, KColor KColor, float Height)
KAGE::Graphics::Font & | GetFont ()
Level & | GetLevel ()
Room & | GetRoom ()
EntityPlayer & | GetPlayer (integer Index)
EntityPlayer & | GetNearestPlayer (Vector Pos)
EntityPlayer & | GetRandomPlayer (Vector Pos, float Radius)
integer | GetNumPlayers ()
History & | GetItemHistory ()
ItemPool & | GetItemPool ()
ItemOverlay & | GetItemOverlay ()
Seeds & | GetSeeds ()
| const std::string& GetStartSeed(void) { return m_StartSeed; } More...
| End (Ending Ending)
| ShowFortune ()
| ShowRule ()
| StartRoomTransition (integer RoomIndex, Direction Direction, RoomTransition::Animation Animation)
| ChangeRoom (integer RoomIndex)
| StartStageTransition (boolean SameStage, StageTransition::Animation Animation)
| MoveToRandomRoom (boolean IAmErrorRoom, integer Seed)
integer | GetFrameCount ()
boolean | GetStateFlag (StateFlag StateFlag)
| SetStateFlag (StateFlag StateFlag, boolean Val)
| SetLastDevilRoomStage (LevelStage Stage)
LevelStage | GetLastDevilRoomStage ()
| AddTreasureRoomsVisited ()
integer | GetTreasureRoomVisitCount ()
| AddStageWithoutHeartsPicked ()
| ClearStagesWithoutHeartsPicked ()
integer | GetStagesWithoutHeartsPicked ()
| AddStageWithoutDamage ()
| ClearStagesWithoutDamage ()
integer | GetStagesWithoutDamage ()
| AddDevilRoomDeal ()
| DonateGreed (integer Donate)
| DonateAngel (integer Donate)
integer | GetDevilRoomDeals ()
integer | GetDonationModGreed ()
integer | GetDonationModAngel ()
| ClearDonationModGreed ()
| ClearDonationModAngel ()
| SetLastLevelWithDamage (LevelStage Stage)
LevelStage | GetLastLevelWithDamage ()
| AddEncounteredBoss (EntityType Boss, integer Variant)
integer | GetNumEncounteredBosses ()
boolean | HasEncounteredBoss (EntityType Boss, integer Variant)
integer | GetGreedWavesNum ()
integer | GetGreedBossWaveNum ()
| SetLastLevelWithoutHalfHp (LevelStage Stage)
LevelStage | GetLastLevelWithoutHalfHp ()
| ShakeScreen (integer Timeout)
| eBossId GetBossId(eEntityType Type, s32 Variant); More...
const integer & | GetScreenShakeCountdown ()
| Darken (float Darkness, integer Timeout)
float | GetDarknessModifier ()
float | GetTargetDarkness ()
integer | GetVictoryLap ()
| NextVictoryLap ()
boolean | IsGreedMode ()
| RerollLevelCollectibles ()
| RerollLevelPickups (integer Seed)
| FinishChallenge ()
| AddPixelation (integer Duration)
| ShowHallucination (integer FrameCount, Backdrop::Backdrop HallucinationBackdrop)
integer | HasHallucination ()
| UpdateStrangeAttractor (Vector Position)
Ambush & | GetAmbush ()
| Fadein (float Speed)
| Fadeout (float Speed, FadeoutTarget Target)

## Public Attributes
integer | BossRushParTime
| Number of frames of game time. More...
integer | BlueWombParTime
const Vector & | ScreenShakeOffset
Challenge | Challenge
const Difficulty | Difficulty
integer | TimeCounter
| same as FrameCounter but can be modified, mostly used for timed events (bossrush, daily, ...) and not for timestepping More...

## Member Function Documentation

## ◆ AddDevilRoomDeal()

Game::AddDevilRoomDeal | ( |  | ) |

## ◆ AddEncounteredBoss()

Game::AddEncounteredBoss | ( | EntityType | Boss,
|  | integer | Variant
| ) |  |

## ◆ AddPixelation()

Game::AddPixelation | ( | integer | Duration | ) |

## ◆ AddStageWithoutDamage()

Game::AddStageWithoutDamage | ( |  | ) |

## ◆ AddStageWithoutHeartsPicked()

Game::AddStageWithoutHeartsPicked | ( |  | ) |

## ◆ AddTreasureRoomsVisited()

Game::AddTreasureRoomsVisited | ( |  | ) |

## ◆ BombDamage()

Game::BombDamage | ( | Vector | Position,
|  | float | Damage,
|  | float | Radius,
|  | boolean | LineCheck,
|  | Entity | Source,
|  | integer | TearFlags,
|  | integer | DamageFlags,
|  | boolean | DamageSource
| ) |  |

## ◆ BombExplosionEffects()

Game::BombExplosionEffects | ( | Vector | Position,
|  | float | Damage,
|  | integer | TearFlags,
|  | KColor | KColor,
|  | Entity | Source,
|  | float | RadiusMult,
|  | boolean | LineCheck,
|  | boolean | DamageSource
| ) |  |

The complete bomb explosion package: Do damage, spawn boomgraphics, and apply tearflag-based effects.

## ◆ BombTearflagEffects()

Game::BombTearflagEffects | ( | KAGE::Math::Vector | Position,
|  | float | Radius,
|  | integer | TearFlags,
|  | Entity | Source
| ) |  |

Does bomb-exclusive special effects.

## ◆ ButterBeanFart()

Game::ButterBeanFart | ( | Vector | Position,
|  | float | Radius,
|  | Entity | Source,
|  | boolean | ShowEffect
| ) |  |

## ◆ ChangeRoom()

Game::ChangeRoom | ( | integer | RoomIndex | ) |

## ◆ CharmFart()

Game::CharmFart | ( | Vector | Position,
|  | float | Radius,
|  | Entity | Source
| ) |  |

## ◆ ClearDonationModAngel()

Game::ClearDonationModAngel | ( |  | ) |

## ◆ ClearDonationModGreed()

Game::ClearDonationModGreed | ( |  | ) |

## ◆ ClearStagesWithoutDamage()

Game::ClearStagesWithoutDamage | ( |  | ) |

## ◆ ClearStagesWithoutHeartsPicked()

Game::ClearStagesWithoutHeartsPicked | ( |  | ) |

## ◆ Darken()

Game::Darken | ( | float | Darkness,
|  | integer | Timeout
| ) |  |

## ◆ DonateAngel()

Game::DonateAngel | ( | integer | Donate | ) |

## ◆ DonateGreed()

Game::DonateGreed | ( | integer | Donate | ) |

## ◆ End()

Game::End | ( | Ending | Ending | ) |

remove entity from the update list (render only) void EnableEntity(Entity* e); add entity back to the update list (update + render) void DisableEntity(Entity* e);

## ◆ Fadein()

Game::Fadein | ( | float | Speed | ) |

## ◆ Fadeout()

Game::Fadeout | ( | float | Speed,
|  | FadeoutTarget | Target
| ) |  |

## ◆ Fart()

Game::Fart | ( | Vector | Position,
|  | float | Radius,
|  | Entity | Source,
|  | float | FartScale,
|  | integer | FartSubType
| ) |  |

## ◆ FinishChallenge()

Game::FinishChallenge | ( |  | ) |

## ◆ GetAmbush()

Ambush& Game::GetAmbush | ( |  | ) |

## ◆ GetDarknessModifier()

float Game::GetDarknessModifier | ( |  | ) |

## ◆ GetDevilRoomDeals()

integer Game::GetDevilRoomDeals | ( |  | ) |

## ◆ GetDonationModAngel()

integer Game::GetDonationModAngel | ( |  | ) |

## ◆ GetDonationModGreed()

integer Game::GetDonationModGreed | ( |  | ) |

## ◆ GetFont()

KAGE::Graphics::Font& Game::GetFont | ( |  | ) |

## ◆ GetFrameCount()

integer Game::GetFrameCount | ( |  | ) |

## ◆ GetGreedBossWaveNum()

integer Game::GetGreedBossWaveNum | ( |  | ) |

## ◆ GetGreedWavesNum()

integer Game::GetGreedWavesNum | ( |  | ) |

## ◆ GetItemHistory()

History& Game::GetItemHistory | ( |  | ) |

## ◆ GetItemOverlay()

ItemOverlay& Game::GetItemOverlay | ( |  | ) |

## ◆ GetItemPool()

ItemPool& Game::GetItemPool | ( |  | ) |

## ◆ GetLastDevilRoomStage()

LevelStage Game::GetLastDevilRoomStage | ( |  | ) |

## ◆ GetLastLevelWithDamage()

LevelStage Game::GetLastLevelWithDamage | ( |  | ) |

## ◆ GetLastLevelWithoutHalfHp()

LevelStage Game::GetLastLevelWithoutHalfHp | ( |  | ) |

## ◆ GetLevel()

Level& Game::GetLevel | ( |  | ) |

## ◆ GetNearestPlayer()

EntityPlayer& Game::GetNearestPlayer | ( | Vector | Pos | ) |

## ◆ GetNumEncounteredBosses()

integer Game::GetNumEncounteredBosses | ( |  | ) |

## ◆ GetNumPlayers()

integer Game::GetNumPlayers | ( |  | ) |

## ◆ GetPlayer()

EntityPlayer& Game::GetPlayer | ( | integer | Index | ) |

## ◆ GetRandomPlayer()

EntityPlayer& Game::GetRandomPlayer | ( | Vector | Pos,
|  | float | Radius
| ) |  |

## ◆ GetRoom()

Room& Game::GetRoom | ( |  | ) |

## ◆ GetScreenShakeCountdown()

const integer& Game::GetScreenShakeCountdown | ( |  | ) |

## ◆ GetSeeds()

Seeds& Game::GetSeeds | ( |  | ) |

const std::string& GetStartSeed(void) { return m_StartSeed; }

## ◆ GetStagesWithoutDamage()

integer Game::GetStagesWithoutDamage | ( |  | ) |

## ◆ GetStagesWithoutHeartsPicked()

integer Game::GetStagesWithoutHeartsPicked | ( |  | ) |

## ◆ GetStateFlag()

boolean Game::GetStateFlag | ( | StateFlag | StateFlag | ) |

## ◆ GetTargetDarkness()

float Game::GetTargetDarkness | ( |  | ) |

## ◆ GetTreasureRoomVisitCount()

integer Game::GetTreasureRoomVisitCount | ( |  | ) |

## ◆ GetVictoryLap()

integer Game::GetVictoryLap | ( |  | ) |

## ◆ HasEncounteredBoss()

boolean Game::HasEncounteredBoss | ( | EntityType | Boss,
|  | integer | Variant
| ) |  |

## ◆ HasHallucination()

integer Game::HasHallucination | ( |  | ) |

## ◆ IsGreedMode()

boolean Game::IsGreedMode | ( |  | ) |

## ◆ IsPaused()

boolean Game::IsPaused | ( |  | ) |

Displays the HUD elements that are moved to the gamepad.

## ◆ MoveToRandomRoom()

Game::MoveToRandomRoom | ( | boolean | IAmErrorRoom,
|  | integer | Seed
| ) |  |

## ◆ NextVictoryLap()

Game::NextVictoryLap | ( |  | ) |

## ◆ Render()

Game::Render | ( |  | ) |

## ◆ RerollEnemy()

boolean Game::RerollEnemy | ( | Entity | e | ) |

void LaserDamageAngle(const Vector& Pos, float AngleDegrees, float Damage, Entity* Source = NULL); void AcidDamagePlayer(const Vector& CenterPoint, s32 Damage, float Radius, Entity* Source = NULL); void LightDamage(const Vector& Pos, float Radius, Entity* Source = NULL); void HolyWaterDamage(const Vector& CenterPoint, float Damage, float Radius, Entity* Source = NULL);

## ◆ RerollLevelCollectibles()

Game::RerollLevelCollectibles | ( |  | ) |

## ◆ RerollLevelPickups()

Game::RerollLevelPickups | ( | integer | Seed | ) |

## ◆ SetLastDevilRoomStage()

Game::SetLastDevilRoomStage | ( | LevelStage | Stage | ) |

## ◆ SetLastLevelWithDamage()

Game::SetLastLevelWithDamage | ( | LevelStage | Stage | ) |

## ◆ SetLastLevelWithoutHalfHp()

Game::SetLastLevelWithoutHalfHp | ( | LevelStage | Stage | ) |

## ◆ SetStateFlag()

Game::SetStateFlag | ( | StateFlag | StateFlag,
|  | boolean | Val
| ) |  |

## ◆ ShakeScreen()

Game::ShakeScreen | ( | integer | Timeout | ) |

eBossId GetBossId(eEntityType Type, s32 Variant);

## ◆ ShowFortune()

Game::ShowFortune | ( |  | ) |

## ◆ ShowHallucination()

Game::ShowHallucination | ( | integer | FrameCount,
|  | Backdrop::Backdrop | HallucinationBackdrop
| ) |  |

## ◆ ShowRule()

Game::ShowRule | ( |  | ) |

## ◆ Spawn()

Entity& Game::Spawn | ( | EntityType | Type,
|  | integer | Variant,
|  | Vector | Position,
|  | Vector | Velocity,
|  | Entity | Spawner,
|  | integer | SubType,
|  | integer | Seed
| ) |  |

## ◆ SpawnEntityDesc()

EntityNPC& Game::SpawnEntityDesc | ( | Entity::EntityDesc | desc,
|  | Vector | Position,
|  | Entity | Spawner
| ) |  |

## ◆ SpawnParticles()

Game::SpawnParticles | ( | Vector | Pos,
|  | EntityEffect::Variant | ParticleType,
|  | integer | NumParticles,
|  | float | Speed,
|  | KColor | KColor,
|  | float | Height
| ) |  |

## ◆ StartRoomTransition()

Game::StartRoomTransition | ( | integer | RoomIndex,
|  | Direction | Direction,
|  | RoomTransition::Animation | Animation
| ) |  |

## ◆ StartStageTransition()

Game::StartStageTransition | ( | boolean | SameStage,
|  | StageTransition::Animation | Animation
| ) |  |

## ◆ Update()

Game::Update | ( |  | ) |

## ◆ UpdateStrangeAttractor()

Game::UpdateStrangeAttractor | ( | Vector | Position | ) |

## Member Data Documentation

## ◆ BlueWombParTime

integer Game::BlueWombParTime

## ◆ BossRushParTime

integer Game::BossRushParTime

Number of frames of game time.

## ◆ Challenge

Challenge Game::Challenge

## ◆ Difficulty

const Difficulty Game::Difficulty

## ◆ ScreenShakeOffset

const Vector& Game::ScreenShakeOffset

## ◆ TimeCounter

integer Game::TimeCounter

same as FrameCounter but can be modified, mostly used for timed events (bossrush, daily, ...) and not for timestepping