From 47b2865762038aeec3a381fa6b3e23be321f6bf5 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 11 Nov 2025 10:18:55 -0800 Subject: [PATCH 01/51] feat: new ChallengeParams defs --- .../src/types/classes/ChallengeParams.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/ChallengeParams.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/ChallengeParams.d.ts index 7a0618ea0..c801ec380 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/ChallengeParams.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/ChallengeParams.d.ts @@ -83,8 +83,12 @@ declare global { /** Returns an array of trinkets that the player starts with in the challenge. */ GetTrinketList: () => TrinketType[]; + /** Returns whether the player must go through the Alt Path. */ IsAltPath: () => boolean; + /** Returns whether the player must go through ascent and defeat The Beast. */ + IsBeastPath: () => boolean; + /** Returns whether the player's range is forced to be at its maximum value at 16.50. */ IsBigRangeEnabled: () => boolean; From 79b50fa2cde1228eb50a076af6badf3720e8ffc3 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 11 Nov 2025 10:25:53 -0800 Subject: [PATCH 02/51] fix: ColorParams definitions --- .../src/types/classes/ColorParams.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/ColorParams.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/ColorParams.d.ts index b16e80e7b..f9e71ddec 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/ColorParams.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/ColorParams.d.ts @@ -2,8 +2,7 @@ declare function ColorParams( this: void, color: Color, priority: int, - duration1: int, - duration2: int, + duration: int, fadeout: boolean, shared: boolean, ): ColorParams; From 9ed0d9ce7517e580526128063e00b5eb18c9015b Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 11 Nov 2025 10:27:50 -0800 Subject: [PATCH 03/51] chore: updated Console.GetHistory docs --- .../src/types/classes/Console.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Console.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Console.d.ts index 6096d7c91..90b8254ba 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Console.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Console.d.ts @@ -17,7 +17,7 @@ declare global { * Returns an array of all text output to the console, including user input and command outputs. * * The elements in the returned array are ordered last-to-first. The first element is always an - * empty string and the last element is always "Repentance Console". + * empty string and the last element is always "Repentance+ Console". */ function GetHistory(): string[]; From fa4f07625e9d6e823c8869e5a809310c0500dec2 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 11 Nov 2025 10:34:36 -0800 Subject: [PATCH 04/51] fix: Debug return method --- .../src/types/classes/Debug.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Debug.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Debug.d.ts index dc17a049b..dc1762b63 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Debug.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Debug.d.ts @@ -13,7 +13,9 @@ declare namespace Debug { * * Passing an invalid address will throw an error. */ - function GetSignature(address: int): string; + function GetSignature( + address: int, + ): LuaMultiReturn<[status: int, signature: string | boolean]>; /** Returns an array of all scripts currently loaded in the Lua environment. */ function ListLoadedFiles(): string[]; From a640a770b557c0179289897d0dec1569f7a6e98a Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 11 Nov 2025 10:40:13 -0800 Subject: [PATCH 05/51] feat: new Delirium.Transform parameter --- .../src/types/classes/entity/EntityDelirium.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityDelirium.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityDelirium.d.ts index 55fa28570..da1a571aa 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityDelirium.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityDelirium.d.ts @@ -37,8 +37,14 @@ declare global { * The transformation is not effective immediately; it will only take place on the next frame. * * @param variant Optional. Default is 0. + * @param triggerCallback Optional. Whether to trigger the transformation callback. Default is + * false. */ - Transform: (entityType: EntityType, variant?: int) => void; + Transform: ( + entityType: EntityType, + variant?: int, + triggerCallback?: boolean, + ) => void; /** * Returns the angle of Delirium's projectiles. From 632a6533bf39e1a244095347c9fbba178a0f45a1 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 11 Nov 2025 10:52:23 -0800 Subject: [PATCH 06/51] feat: new EntityConfigEntity definitions --- .../entity-config/EntityConfigEntity.d.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity-config/EntityConfigEntity.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity-config/EntityConfigEntity.d.ts index bfdcee4d5..4e1caf622 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity-config/EntityConfigEntity.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity-config/EntityConfigEntity.d.ts @@ -52,6 +52,12 @@ declare global { */ GetBestiaryOffset: () => Readonly; + /** + * Returns the overlay animation name of the entity's bestiary animation, as defined in + * `entities2.xml`. + */ + GetBestiaryOverlay: () => string; + /** Returns the scale of the entity's bestiary sprite, as defined in `entities2.xml`. */ GetBestiaryScale: () => number; @@ -76,6 +82,12 @@ declare global { */ GetCollisionRadiusMultiplier: () => Readonly; + /** + * Returns the `EntityConfigEntity` of what this entity would devolve to when using D10. + * Returns undefined there is no valid entity it can devolve into. + */ + GetDevolvedEntity: () => EntityConfigEntity | undefined; + /** * Returns an array containing all of the tags defined in the entity's `customtags` attribute in * `entities2.xml`. Tags are always provided in all lowercase. @@ -92,7 +104,10 @@ declare global { GetGibFlags: () => BitFlags; /** Returns the amount of gibs the entity leaves, as defined in `entities2.xml`. */ - GetGibAmount: () => int; + GetGibsAmount: () => int; + + /** Returns the grid collision points the entity has, as defined in `entities2.xml`. */ + GetGridCollisionPoints: () => int; /** Returns the entity's mass, as defined in `entities2.xml`. */ GetMass: () => number; From 39725ca7ae3362e1b3afc28dd94c02c201ec7bed Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 11 Nov 2025 10:56:23 -0800 Subject: [PATCH 07/51] fix: EntitiesSaveStateVector types --- .../types/classes/room-config/EntitiesSaveStateVector.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/room-config/EntitiesSaveStateVector.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/room-config/EntitiesSaveStateVector.d.ts index 14e48eaf7..23437eac7 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/room-config/EntitiesSaveStateVector.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/room-config/EntitiesSaveStateVector.d.ts @@ -9,7 +9,7 @@ declare global { interface EntitiesSaveStateVector extends IsaacAPIClass { Clear: () => void; - Get: (index: int) => EntitiesSaveState | undefined; + Get: (index: int) => EntitiesSaveState; /** * @param entityType @@ -20,7 +20,7 @@ declare global { entityType: EntityType, variant?: int, subType?: int, - ) => EntitiesSaveState | undefined; + ) => EntitiesSaveState[]; len: LuaLengthMethod; } From dc35fcdf47148e7caf0d353ea0293187e3142ea2 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 11 Nov 2025 10:59:06 -0800 Subject: [PATCH 08/51] feat: new GridEntitiesSaveStateVector methods & fixes --- .../classes/room-config/GridEntitiesSaveStateVector.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/room-config/GridEntitiesSaveStateVector.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/room-config/GridEntitiesSaveStateVector.d.ts index 06987e5df..f436fbecc 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/room-config/GridEntitiesSaveStateVector.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/room-config/GridEntitiesSaveStateVector.d.ts @@ -7,8 +7,9 @@ declare global { * @see https://repentogon.com/ */ interface GridEntitiesSaveStateVector extends IsaacAPIClass { - Get: (index: int) => GridEntityDesc | undefined; - GetByType: (gridEntityType: GridEntityType) => GridEntityDesc | undefined; + Clear: () => void; + Get: (index: int) => GridEntityDesc; + GetByType: (gridEntityType: GridEntityType) => GridEntityDesc[]; len: LuaLengthMethod; } From d6c6143e94151361faddf4194acc25c1b0366fa4 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 11 Nov 2025 11:30:09 -0800 Subject: [PATCH 09/51] feat: FXLayers --- .../src/types/classes/FXLayers.d.ts | 8 ++++++++ .../src/types/classes/Room.d.ts | 2 ++ .../src/types/index.d.ts | 1 + 3 files changed, 11 insertions(+) create mode 100644 packages/isaac-typescript-definitions-repentogon/src/types/classes/FXLayers.d.ts diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/FXLayers.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/FXLayers.d.ts new file mode 100644 index 000000000..7c803313d --- /dev/null +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/FXLayers.d.ts @@ -0,0 +1,8 @@ +/** + * This class is for REPENTOGON, an exe-hack which expands the modding API. + * + * @see https://repentogon.com/ + */ +declare interface FXLayers { + AddPoopFx: (color: Color) => void; +} diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Room.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Room.d.ts index 97fb65d4f..06d9ac421 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Room.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Room.d.ts @@ -162,6 +162,8 @@ declare global { */ SetBackdropType: (backdrop: BackdropType, unknown: int) => void; + GetFXLayers: () => FXLayers; + /** Sets the greed wave timer. */ SetGreedWaveTimer: (time: int) => void; diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/index.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/index.d.ts index d37a32420..54f272282 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/index.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/index.d.ts @@ -102,6 +102,7 @@ /// /// /// +/// /// /// /// From 9e76423fb80cc84c33c5eb71808f658ea5044bbd Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 11 Nov 2025 11:41:04 -0800 Subject: [PATCH 10/51] feat: new Game definitions --- .../src/types/classes/Game.d.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Game.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Game.d.ts index 064ad1ad1..db7606eca 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Game.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Game.d.ts @@ -1,6 +1,7 @@ import type { EntityType, StageTransitionType, + TearFlag, } from "isaac-typescript-definitions"; import type { CompletionMarkType } from "../../enums/CompletionMarkType"; import type { PauseMenuState } from "../../enums/PauseMenuState"; @@ -19,11 +20,24 @@ declare global { AchievementUnlocksDisallowed: () => boolean; /** Enables one or more debug flags. */ - AddDebugFlags: (flags: BitFlag | BitFlags) => void; + AddDebugFlags: (flags: DebugFlag | BitFlags) => void; /** Increases the unique amount of shops visited in this run. */ AddShopVisits: (count: int) => void; + /** + * @param position + * @param baseDamage Optional. Default is 3.5. + * @param tearFlags Optional. Default is `TearFlag.NORMAL`. + * @param spawner Optional. Default is undefined. + */ + ChainLightning: ( + position: Vector, + baseDamage?: number, + tearFlags?: TearFlag | BitFlags, + spawner?: Entity, + ) => EntityEffect; + /** * Clears the list of enemies that were erased by the Eraser item, allowing them to appear * again. From 27fbeb42640a5084d60b249fda32e88925401119 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 11 Nov 2025 11:45:15 -0800 Subject: [PATCH 11/51] feat: new Input definitions --- .../src/types/classes/Input.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Input.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Input.d.ts index 26c49d91b..037624618 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Input.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Input.d.ts @@ -3,5 +3,6 @@ import type { ControllerIndex } from "isaac-typescript-definitions"; declare global { namespace Input { function GetDeviceNameByIdx(index: ControllerIndex): string | undefined; + function GetMouseWheel(): Vector; } } From bae423e30b936bb928643a0f923cd39a19c7dc24 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 11 Nov 2025 21:41:48 -0800 Subject: [PATCH 12/51] feat: new Isaac definitions --- .../src/enums/DwmWindowsAttribute.ts | 6 +- .../src/types/classes/Isaac.d.ts | 112 ++++++++++++++++-- 2 files changed, 105 insertions(+), 13 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/enums/DwmWindowsAttribute.ts b/packages/isaac-typescript-definitions-repentogon/src/enums/DwmWindowsAttribute.ts index 556fcce26..2f7951a41 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/enums/DwmWindowsAttribute.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/enums/DwmWindowsAttribute.ts @@ -17,8 +17,10 @@ export enum DwmWindowAttribute { HAS_ICONIC_BITMAP = 10, DISALLOW_PEEK = 11, EXCLUDED_FROM_PEEK = 12, - CLOAK = 13, - CLOAKED = 14, + + // REPENTOGON blocks the CLOAK and CLOAKED attributes from being used. Therefore, they have been + // omitted from this enum. + FREEZE_REPRESENTATION = 15, PASSIVE_UPDATE_MODE = 16, USE_HOST_BACKDROP_BRUSH = 17, diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts index db2ea05b8..f257cab51 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts @@ -1,14 +1,17 @@ import type { BackdropType, Challenge, + CollectibleType, Cutscene, EntityPartition, + EntityType, ItemPoolType, LanguageAbbreviation, Music, NullItemID, PlayerType, StageID, + TrinketType, WeaponType, } from "isaac-typescript-definitions"; import type { Achievement } from "../../enums/Achievement"; @@ -22,6 +25,7 @@ import type { GiantbookType } from "../../enums/GiantbookType"; import type { MainMenuType } from "../../enums/MainMenuType"; import type { TaintedMarksGroup } from "../../enums/TaintedMarksGroup"; import type { WindowIcon } from "../../enums/WindowIcon"; +import type { BossColorXMLIndex } from "../../enums/xml/BossColorXMLIndex"; declare global { /** @noSelf */ @@ -78,14 +82,17 @@ declare global { * * @param timerFunction * @param delay The delay in frames between each time `timerFunction` is ran. - * @param times How many times `timerFunction` is ran. - * @param persistent Whether the timer persists across rooms. + * @param times Optional. Default is 1. + * @param persistent Optional. Whether the timer persists across rooms. Default is true. + * @deprecated As this method spawns an invisible EntityEffect to keep track of the time, it's + * possible for the effect to be prematurely deleted by another mod or even the game. You should + * use `ISCFeature.RUN_IN_N_FRAMES` instead to prevent such edge cases from happening. */ function CreateTimer( timerFunction: () => void, delay: int, - times: int, - persistent: boolean, + times?: int, + persistent?: boolean, ): EntityEffect; /** @@ -103,26 +110,40 @@ declare global { * Draws a line between two positions. * * This method must be called in a render callback. + * + * @param startPos + * @param endPos + * @param startColor + * @param endColor + * @param thickness Optional. Default is 1. */ function DrawLine( startPos: Vector, endPos: Vector, startColor: KColor, endColor: KColor, - thickness: int, + thickness?: int, ): void; /** * Draws a quadrilateral from the four positions. * * This method must be called in a render callback. + * + * @param topLeftPos + * @param topRightPos + * @param bottomLeftPos + * @param bottomRightPos + * @param color + * @param thickness Optional. Default is 1. */ function DrawQuad( topLeftPos: Vector, topRightPos: Vector, bottomLeftPos: Vector, + bottomRightPos: Vector, color: KColor, - thickness: int, + thickness?: int, ): void; /** Completes all of the completion marks for the specified character. */ @@ -132,7 +153,7 @@ declare global { * Returns an array of entities inside the specified capsule. * * @param capsule - * @param partitions Optional. Default is `EntityPartitionZero`. + * @param partitions */ function FindInCapsule( capsule: Capsule, @@ -165,6 +186,9 @@ declare global { */ function GetAchievementByName(name: string): Achievement; + // GetAxisAlignedUnitVectorFromDir is not implemented in favor of Isaacscript Common's + // `directionToVector` function. + /** * This method is meant to be used when creating local enums that represent custom backdrops. * (We have to retrieve the ID of the backdrop at run-time, because it is dynamically calculated @@ -180,6 +204,11 @@ declare global { */ function GetBackdropIdByName(name: string): BackdropType; + function GetBossColorIdxByName(name: string): BossColorXMLIndex; + + /** Returns the sprite used to render the controller buttons. */ + function GetButtonsSprite(): Sprite; + /** * Returns the contents of the clipboard as long if it's in text form. Returns undefined if the * contents are not text or if it's empty. @@ -221,8 +250,8 @@ declare global { */ function GetCutsceneIdByName(name: string): Cutscene; - /** Returns the window's current Dwm attribute. */ - function GetDwmWindowAttribute(): DwmWindowAttribute; + /** Returns the window's current Dwm attribute value. */ + function GetDwmWindowAttribute(attribute: DwmWindowAttribute): int; /** * This method is meant to be used when creating local enums that represent custom modded @@ -277,6 +306,9 @@ declare global { */ function GetModChallengeClearCount(challenge: Challenge): int; + /** Returns the current time in nanoseconds. */ + function GetNanoTime(): int; + /** * This method is meant to be used when creating local enums that represent custom null items. * (We have to retrieve the ID of the null item at run-time, because it is dynamically @@ -335,6 +367,9 @@ declare global { /** Returns whether a run is ongoing and a cutscene is not playing. */ function IsInGame(): boolean; + /** Returns whether the game is shutting down. */ + function IsShuttingDown(): boolean; + /** Creates a new blank `LevelGeneratorEntry`. */ function LevelGeneratorEntry(): LevelGeneratorEntry; @@ -350,11 +385,41 @@ declare global { */ function PlayCutscene(cutscene: Cutscene, clearGameState?: boolean): void; + /** + * Forces the Birthright effect of the provided `PlayerType` to have no behavior at all. + * This method allows you to easily rework an existing birthright effect without the need of + * creating a fake collectible or wrestling with the birthright's existing behavior. + * + * This method will only work when called while mods are loading. After all mods have loaded, + * calling this method will result in an error. + */ + function ReworkBirthright(playerType: PlayerType): void; + + /** + * Forces the provided collectible to have no behavior at all. This method allows you to easily + * rework an existing collectible without the need of creating a fake collectible or wrestling + * with the item's existing behavior. + * + * This method will only work when called while mods are loading. After all mods have loaded, + * calling this method will result in an error. + */ + function ReworkCollectible(collectible: CollectibleType): void; + + /** + * Forces the provided trinket to have no behavior at all. This method allows you to easily + * rework an existing trinket without the need of creating a fake trinket or wrestling with the + * trinket's existing behavior. + * + * This method will only work when called while mods are loading. After all mods have loaded, + * calling this method will result in an error. + */ + function ReworkTrinket(trinket: TrinketType): void; + /** * Sets the contents of the clipboard to the specified string. Returns whether the contents were * set successfully. */ - function SetClipboard(contents: string): void; + function SetClipboard(contents: string): boolean; /** Sets the value of the specified completion mark for a character. */ function SetCompletionMarks( @@ -391,7 +456,10 @@ declare global { function SetCurrentFlorName(name: string): void; /** Sets the game's Dwm window attribute. */ - function SetDwmWindowAttribute(attribute: DwmWindowAttribute): void; + function SetDwmWindowAttribute( + attribute: DwmWindowAttribute, + value: int, + ): void; /** * Sets the game's taskbar icon. @@ -430,6 +498,28 @@ declare global { dialogButtons?: DialogButton, ): DialogReturn; + /** + * Spawns a boss. This method will error if you attempt to spawn an entity that's not an + * EntityNPC. + * + * @param entityType + * @param variant + * @param subType + * @param position + * @param velocity + * @param spawner Optional. Default is undefined. + * @param seed Optional. Default is the current room's seed. + */ + function SpawnBoss( + entityType: EntityType, + variant: int, + subType: int, + position: Vector, + velocity: Vector, + spawner?: Entity, + seed?: Seed, + ): EntityNPC; + /** * @param playerType Optional. Default is `PlayerType.Isaac`. * @param challenge Optional. Default is undefined. From 25e0c8bcd698c183d92b1ef7716a01f312027139 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Sat, 22 Nov 2025 10:59:29 -0800 Subject: [PATCH 13/51] feat: callback documentation fixes & additions - Fixes a lot of mistakes in callback definitions - Better documentation for some callbacks - Adds some new callbacks --- .../src/enums/ModCallbackRepentogon.ts | 197 ++++++++++++++---- .../AddCallbackParametersRepentogon.d.ts | 48 +++-- 2 files changed, 191 insertions(+), 54 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/enums/ModCallbackRepentogon.ts b/packages/isaac-typescript-definitions-repentogon/src/enums/ModCallbackRepentogon.ts index 4d001dfad..4a9dbba6d 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/enums/ModCallbackRepentogon.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/enums/ModCallbackRepentogon.ts @@ -212,6 +212,20 @@ export enum ModCallbackRepentogon { */ PRE_BOMB_COLLISION = 60, + /** + * A modified version of `ModCallback.POST_ENTITY_KILL`. This callback now provides an EntityRef + * of whoever killed the entity. + * + * When registering this callback with the `Mod.AddCallbackRepentogon` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `EntityType` provided. + * + * ```ts + * function postEntityKill(entity: Entity, source: EntityRef): void {} + * ``` + */ + POST_ENTITY_KILL = 68, + /** * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it @@ -263,6 +277,8 @@ export enum ModCallbackRepentogon { POST_ADD_COLLECTIBLE = 1005, /** + * Fires after an entity takes damage. + * * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EntityType` provided. @@ -406,6 +422,8 @@ export enum ModCallbackRepentogon { PRE_HUD_RENDER = 1022, /** + * Fires each time the main menu renders on the screen. + * * You cannot filter this callback. * * ```ts @@ -460,6 +478,8 @@ export enum ModCallbackRepentogon { POST_SFX_PLAY = 1031, /** + * Fires after a projectile is destroyed. + * * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `ProjectileVariant` provided. @@ -471,6 +491,8 @@ export enum ModCallbackRepentogon { POST_PROJECTILE_DEATH = 1032, /** + * Fires after a tear is destroyed. + * * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `TearVariant` provided. @@ -581,6 +603,17 @@ export enum ModCallbackRepentogon { */ PRE_ROOM_EXIT = 1043, + /** + * Fires after all entities in the room have been rendered. + * + * You cannot filter this callback. + * + * ```ts + * function postRoomRenderEntities(): void {} + * ``` + */ + POST_ROOM_RENDER_ENTITIES = 1044, + /** * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it @@ -850,16 +883,20 @@ export enum ModCallbackRepentogon { POST_PLAYER_NEW_LEVEL = 1078, /** - * You cannot filter this callback. + * Fires after an active item is rendered on the player's HUD. + * + * When registering this callback with the `Mod.AddCallback` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `CollectibleType` provided. * * ```ts * function postPlayerHUDRenderActiveItem( * player: EntityPlayer, * slot: ActiveSlot, - * offset: Vector, + * position: Vector, * alpha: float, * scale: float, - * chargeBarOffset: Vector + * chargeBarPosition: Vector * ): void {} * ``` */ @@ -1127,6 +1164,17 @@ export enum ModCallbackRepentogon { */ POST_GRID_ENTITY_SPAWN = 1101, + /** + * Fires each frame the nightmare scene renders. + * + * You cannot filter this callback. + * + * ```ts + * function postNightmareSceneRender(): void {} + * ``` + */ + POST_NIGHTMARE_SCENE_RENDER = 1102, + /** * You cannot filter this callback. * @@ -1291,17 +1339,23 @@ export enum ModCallbackRepentogon { PRE_PLAYER_HUD_RENDER_HEARTS = 1118, /** - * You cannot filter this callback. + * Fires before an active item is rendered on the player's HUD. Return true to prevent the item + * from rendering. You can return an object with various fields to override how the item renders + * on the HUD. + * + * When registering this callback with the `Mod.AddCallback` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `CollectibleType` provided. * * ```ts * function prePlayerHudRenderActiveItem( * player: EntityPlayer, * slot: ActiveSlot, - * offset: Vector, + * position: Vector, * alpha: float, * scale: number, - * chargeBarOffset: Vector - * ): boolean | undefined {} + * chargeBarPosition: Vector + * ): {Position?: Vector, Scale?: number, CropOffset?: Vector} boolean | undefined {} * ``` */ PRE_PLAYER_HUD_RENDER_ACTIVE_ITEM = 1119, @@ -1893,6 +1947,10 @@ export enum ModCallbackRepentogon { POST_NPC_GRID_COLLISION = 1184, /** + * Fires before the player's active item is morphed from the 'M trinket. Return false to prevent + * the item from being rerolled. Return a `CollectibleType` to override what the item rerolls + * into. + * * You cannot filter this callback. * * ```ts @@ -1905,6 +1963,9 @@ export enum ModCallbackRepentogon { PRE_M_MORPH_ACTIVE = 1190, /** + * Fires before an NPC is split from the Meat Cleaver item effect. Return true to prevent the NPC + * from splitting. NPCs will still take damage from the Meat Cleaver even if you return true. + * * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EntityType` provided. @@ -2069,6 +2130,9 @@ export enum ModCallbackRepentogon { POST_PAUSE_SCREEN_RENDER = 1219, /** + * Fires when the player is about to place a bomb. Return false to prevent the bomb from being + * placed. + * * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerVariant` provided. @@ -2102,6 +2166,8 @@ export enum ModCallbackRepentogon { PRE_NPC_PICK_TARGET = 1222, /** + * Fires when a Dark Red Champion NPC regenerates from a pile of goo. + * * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `EntityType` provided. @@ -2273,6 +2339,9 @@ export enum ModCallbackRepentogon { POST_NPC_COLLISION = 1247, /** + * Fires when an `EntityLaser` is about to collide with an entity. Return true to prevent the + * collision from happening. + * * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `LaserVariant` provided. @@ -2434,11 +2503,16 @@ export enum ModCallbackRepentogon { GET_IS_PERSISTENT_ROOM_ENTITY = 1263, /** - * You cannot filter this callback. + * Fires before a trinket is rendered on the player's HUD. Return true to prevent the trinket from + * rendering. You can return an object with various fields to override how the trinket renders on + * the HUD. + * + * When registering this callback with the `Mod.AddCallback` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `TrinketSlot` provided. * * ```ts * function prePlayerHUDRenderTrinket( - * slot: TrinketSlot, * position: Vector, * scale: number, * player: EntityPlayer, @@ -2449,6 +2523,9 @@ export enum ModCallbackRepentogon { PRE_PLAYER_HUD_RENDER_TRINKET = 1264, /** + * Fires before a pickup is consumed from effects such as Void and Black Rune. Return false to + * prevent the pickup from being consumed. + * * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PickupVariant` provided. @@ -2460,6 +2537,9 @@ export enum ModCallbackRepentogon { PRE_PICKUP_VOIDED = 1265, /** + * Fires before a pickup is consumed from The Abyss. Return false to prevent the pickup from being + * consumed. + * * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PickupVariant` provided. @@ -2471,6 +2551,9 @@ export enum ModCallbackRepentogon { PRE_PICKUP_VOIDED_ABYSS = 1266, /** + * Fires before a pickup is consumed from Compost. Return false to prevent the pickup from being + * consumed. + * * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PickupVariant` provided. @@ -2529,24 +2612,6 @@ export enum ModCallbackRepentogon { */ POST_ROOM_TRANSITION_RENDER = 1272, - /** - * You cannot filter this callback. - * - * ```ts - * function postGlowingHourglassSave(slot: int): void {} - * ``` - */ - POST_GLOWING_HOURGLASS_SAVE = 1300, - - /** - * You cannot filter this callback. - * - * ```ts - * function postGlowingHourglassSave(slot: int): void {} - * ``` - */ - POST_GLOWING_HOURGLASS_LOAD = 1301, - /** * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it @@ -2614,31 +2679,34 @@ export enum ModCallbackRepentogon { POST_PLAYER_REMOVE_COSTUME = 1284, /** - * When registering this callback with the `Mod.AddCallback` method: - * - You can provide an optional third argument that will make the callback only fire if it - * matches the `BedSubType` provided. + * Fires before the effects of sleeping on a bed are granted after the cutscene, such as healing. + * Return true to prevent the effects from activating. + * + * This callback does not prevent the sleep cutscene from happening. To prevent this, use + * `ModCallbackRepentogon.PRE_BED_SLEEP`. + * + * You cannot filter this callback. * * ```ts - * function preTriggerBedSleepEffect( - * player: EntityPlayer, - * bed: EntityPickup - * ): boolean | undefined {} + * function preTriggerBedSleepEffect(player: EntityPlayer): boolean | undefined {} * ``` */ PRE_TRIGGER_BED_SLEEP_EFFECT = 1285, /** - * When registering this callback with the `Mod.AddCallback` method: - * - You can provide an optional third argument that will make the callback only fire if it - * matches the `BedSubType` provided. + * Fires after the effects of sleeping on a bed are granted after the cutscene, such as healing. + * + * You cannot filter this callback. * * ```ts - * function postTriggerBedSleepEffect(player: EntityPlayer, bed: EntityPickup): void {} + * function postTriggerBedSleepEffect(player: EntityPlayer): boolean | undefined {} * ``` */ POST_TRIGGER_BED_SLEEP_EFFECT = 1286, /** + * Fires before the player's pocket items are swapped. Return true to prevent them from swapping. + * * You cannot filter this callback. * * ```ts @@ -2648,6 +2716,9 @@ export enum ModCallbackRepentogon { PRE_PLAYER_POCKET_ITEMS_SWAP = 1287, /** + * Fires before the player sleeps on a bed after colliding with it. Return true to prevent the + * player from sleeping on the bed. + * * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `BedSubType` provided. @@ -2658,6 +2729,40 @@ export enum ModCallbackRepentogon { */ PRE_BED_SLEEP = 1288, + /** + * You cannot filter this callback. + * + * ```ts + * function postGlowingHourglassSave(slot: int): void {} + * ``` + */ + POST_GLOWING_HOURGLASS_SAVE = 1300, + + /** + * You cannot filter this callback. + * + * ```ts + * function postGlowingHourglassSave(slot: int): void {} + * ``` + */ + POST_GLOWING_HOURGLASS_LOAD = 1301, + + /** + * Fires when a room previously encountered on a floor is loaded back into the game during the + * Ascent route. + * + * You cannot filter this callback. + * + * ```ts + * function postBackwardsRoomRestore( + * stage: LevelStage, + * roomDesc: RoomDescriptor, + * id: string + * ): void {} + * ``` + */ + POST_BACKWARDS_ROOM_RESTOORE = 1308, + /** * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it @@ -2686,13 +2791,13 @@ export enum ModCallbackRepentogon { PRE_PICKUP_GET_LOOT_LIST = 1334, /** + * Fires before the ghost pickup effect from Guppy's Eye updates. Return false to prevent the + * ghost pickups from displaying. + * * You cannot filter this callback. * * ```ts - * function prePickupGetLootList( - * pickup: EntityPickup, - * shouldAdvance: boolean - * ) => boolean | undefined {} + * function prePickupUpdateGhostPickups(pickup: EntityPickup) => boolean | undefined {} * ``` */ PRE_PICKUP_UPDATE_GHOST_PICKUPS = 1335, @@ -3679,6 +3784,9 @@ export enum ModCallbackRepentogon { POST_CHALLENGE_DONE = 1472, /** + * Fires before the player gives birth to a familiar due to Cambion Conception. Return false to + * prevent the player from spawning the familiar. + * * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `ConceptionFamiliarFlag` provided. @@ -3693,6 +3801,9 @@ export enum ModCallbackRepentogon { PRE_PLAYER_GIVE_BIRTH_CAMBION = 1474, /** + * Fires before the player gives birth to a familiar due to Immaculate Conception. Return false to + * prevent the player from spawning the familiar. + * * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `ConceptionFamiliarFlag` provided. @@ -3738,6 +3849,8 @@ export enum ModCallbackRepentogon { PRE_FORTUNE_DISPLAY = 1483, /** + * Fires before the item display text appears. Return false to prevent it from appearing. + * * You cannot filter this callback. * * ```ts diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/unofficial/AddCallbackParametersRepentogon.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/unofficial/AddCallbackParametersRepentogon.d.ts index 00e1805f3..7504beeff 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/unofficial/AddCallbackParametersRepentogon.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/unofficial/AddCallbackParametersRepentogon.d.ts @@ -204,6 +204,12 @@ declare global { bombVariant?: BombVariant, ]; + // 68 + [ModCallbackRepentogon.POST_ENTITY_KILL]: [ + callback: (entity: Entity, source: EntityRef) => void, + entityType?: EntityType, + ]; + // 1004 [ModCallbackRepentogon.PRE_ADD_COLLECTIBLE]: [ callback: ( @@ -447,6 +453,9 @@ declare global { callback: (player: EntityPlayer, newLevel: boolean) => void, ]; + // 1044 + [ModCallbackRepentogon.POST_ROOM_RENDER_ENTITIES]: [callback: () => void]; + // 1047 [ModCallbackRepentogon.PRE_COMPLETION_MARK_GET]: [ callback: ( @@ -619,6 +628,7 @@ declare global { scale: float, chargeBarOffset: Vector, ) => void, + collectible?: CollectibleType, ]; // 1080 @@ -810,6 +820,9 @@ declare global { gridEntityType?: GridEntityType, ]; + // 1102 + [ModCallbackRepentogon.POST_NIGHTMARE_SCENE_RENDER]: [callback: () => void]; + // 1103 [ModCallbackRepentogon.POST_NIGHTMARE_SCENE_SHOW]: [ callback: (unknown: boolean) => void, @@ -906,11 +919,15 @@ declare global { callback: ( player: EntityPlayer, slot: ActiveSlot, - offset: Vector, + position: Vector, alpha: float, scale: number, - chargeBarOffset: Vector, - ) => boolean | undefined, + chargeBarPosition: Vector, + ) => + | { Position?: Vector; Scale?: number; CropOffset?: Vector } + | boolean + | undefined, + collectible?: CollectibleType, ]; // 1120 @@ -1570,7 +1587,6 @@ declare global { // 1264 [ModCallbackRepentogon.PRE_PLAYER_HUD_RENDER_TRINKET]: [ callback: ( - slot: TrinketSlot, position: Vector, scale: number, player: EntityPlayer, @@ -1579,6 +1595,7 @@ declare global { | { Position?: Vector; Scale?: number; CropOffset?: Vector } | boolean | undefined, + slot?: TrinketSlot, ]; // 1265 @@ -1667,17 +1684,12 @@ declare global { // 1285 [ModCallbackRepentogon.PRE_TRIGGER_BED_SLEEP_EFFECT]: [ - callback: ( - player: EntityPlayer, - bed: EntityPickup, - ) => boolean | undefined, - bedSubType?: BedSubType, + callback: (player: EntityPlayer) => boolean | undefined, ]; // 1286 [ModCallbackRepentogon.POST_TRIGGER_BED_SLEEP_EFFECT]: [ - callback: (itemConfig: ItemConfigItem, player: EntityPlayer) => void, - bedSubType?: BedSubType, + callback: (player: EntityPlayer) => void, ]; // 1287 @@ -1687,7 +1699,10 @@ declare global { // 1288 [ModCallbackRepentogon.PRE_BED_SLEEP]: [ - callback: (player: EntityPlayer, bed: BedSubType) => boolean | undefined, + callback: ( + player: EntityPlayer, + bed: EntityPickup, + ) => boolean | undefined, bedSubType?: BedSubType, ]; @@ -1701,6 +1716,15 @@ declare global { callback: (slot: int) => void, ]; + // 1308 + [ModCallbackRepentogon.POST_BACKWARDS_ROOM_RESTOORE]: [ + callback: ( + stage: LevelStage, + roomDesc: RoomDescriptor, + id: string, + ) => void, + ]; + // 1333 [ModCallbackRepentogon.PRE_RENDER_CUSTOM_CHARACTER_MENU]: [ callback: ( From bb3cf0b72b4fcfe2c46844078f09a8b164869056 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Wed, 26 Nov 2025 08:04:46 -0800 Subject: [PATCH 14/51] chore: definition fixes --- .../src/types/classes/Isaac.d.ts | 13 +++++++------ .../src/types/classes/Weapon.d.ts | 3 +++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts index f257cab51..4f175a380 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts @@ -85,8 +85,9 @@ declare global { * @param times Optional. Default is 1. * @param persistent Optional. Whether the timer persists across rooms. Default is true. * @deprecated As this method spawns an invisible EntityEffect to keep track of the time, it's - * possible for the effect to be prematurely deleted by another mod or even the game. You should - * use `ISCFeature.RUN_IN_N_FRAMES` instead to prevent such edge cases from happening. + * possible for the effect to be prematurely deleted by another mod or even the + * game. You should use `ISCFeature.RUN_IN_N_FRAMES` instead to prevent such edge + * cases from happening. */ function CreateTimer( timerFunction: () => void, @@ -288,7 +289,7 @@ declare global { * Returns an array of all of the loaded script files. The key for each element is the file's * path and the value is what the file returns. */ - function GetLoadedModules(): Array>; + function GetLoadedModules(): LuaMap; /** * Returns the translation string associated with the specified key in the specified category. @@ -386,9 +387,9 @@ declare global { function PlayCutscene(cutscene: Cutscene, clearGameState?: boolean): void; /** - * Forces the Birthright effect of the provided `PlayerType` to have no behavior at all. - * This method allows you to easily rework an existing birthright effect without the need of - * creating a fake collectible or wrestling with the birthright's existing behavior. + * Forces the Birthright effect of the provided `PlayerType` to have no behavior at all. This + * method allows you to easily rework an existing birthright effect without the need of creating + * a fake collectible or wrestling with the birthright's existing behavior. * * This method will only work when called while mods are loading. After all mods have loaded, * calling this method will result in an error. diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Weapon.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Weapon.d.ts index e4e9e2282..0b2f4480a 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Weapon.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Weapon.d.ts @@ -24,6 +24,9 @@ declare global { /** Returns the weapon's current fire delay. */ GetFireDelay: () => int; + /** Returns the max charge of the weapon. */ + GetMaxCharge: () => int; + /** Returns the weapon's max fire delay. */ GetMaxFireDelay: () => int; From 8b50b14e868bd4ff5fc39504cec4436dd6790bdd Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Sat, 13 Dec 2025 09:48:41 -0800 Subject: [PATCH 15/51] fix: SetMode definitions --- .../src/types/classes/rendering/BlendMode.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/rendering/BlendMode.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/rendering/BlendMode.d.ts index 8aa8ad6c1..255ff052b 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/rendering/BlendMode.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/rendering/BlendMode.d.ts @@ -17,10 +17,10 @@ declare global { */ SetMode: ((blendMode: BlendMode) => void) & (( - rgbSrc?: int, - rgbDst?: int, - alphaSrc?: int, - alphaDst?: int, + rgbSrc?: BlendFactor, + rgbDst?: BlendFactor, + alphaSrc?: BlendFactor, + alphaDst?: BlendFactor, equation?: BlendEquation, ) => void); From 4417b17efc0dd03d35ae95a0483af70dd1c673fa Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Sat, 13 Dec 2025 09:57:50 -0800 Subject: [PATCH 16/51] fix: no self in some classes --- .../src/types/classes/Color.d.ts | 1 + .../src/types/classes/ColorModifier.d.ts | 1 + .../src/types/classes/WeightedOutcomePicker.d.ts | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Color.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Color.d.ts index a024fbad8..c7bd9fcf0 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Color.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Color.d.ts @@ -12,6 +12,7 @@ * @param ac Optional. Default is 0. */ declare function Color( + this: void, r?: float, g?: float, b?: float, diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/ColorModifier.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/ColorModifier.d.ts index 16ff17227..f7df4b5cf 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/ColorModifier.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/ColorModifier.d.ts @@ -11,6 +11,7 @@ * @see https://repentogon.com/ */ declare function ColorModifier( + this: void, r?: float, g?: float, b?: float, diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/WeightedOutcomePicker.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/WeightedOutcomePicker.d.ts index 148484f06..158e35206 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/WeightedOutcomePicker.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/WeightedOutcomePicker.d.ts @@ -5,7 +5,7 @@ * * @see https://repentogon.com/ */ -declare function WeightedOutcomePicker(): WeightedOutcomePicker; +declare function WeightedOutcomePicker(this: void): WeightedOutcomePicker; /** * This class is for REPENTOGON, an exe-hack which expands the modding API. From 65fc1dd5ecbff5dc6fca762fec4b9b4eb72bf408 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 16 Dec 2025 16:25:23 -0800 Subject: [PATCH 17/51] fix: EntityConfig definitions --- .../src/types/classes/Isaac.d.ts | 4 ---- .../types/classes/entity-config/EntityConfigEntity.d.ts | 9 ++++++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts index 4f175a380..4bd0667e8 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts @@ -84,10 +84,6 @@ declare global { * @param delay The delay in frames between each time `timerFunction` is ran. * @param times Optional. Default is 1. * @param persistent Optional. Whether the timer persists across rooms. Default is true. - * @deprecated As this method spawns an invisible EntityEffect to keep track of the time, it's - * possible for the effect to be prematurely deleted by another mod or even the - * game. You should use `ISCFeature.RUN_IN_N_FRAMES` instead to prevent such edge - * cases from happening. */ function CreateTimer( timerFunction: () => void, diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity-config/EntityConfigEntity.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity-config/EntityConfigEntity.d.ts index 4e1caf622..dc2ab4703 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity-config/EntityConfigEntity.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity-config/EntityConfigEntity.d.ts @@ -20,7 +20,7 @@ declare global { * Returns true if the entity can be rerolled into another entity, as defined in * `entities2.xml`. */ - CanBeReRolledInto: () => boolean; + CanBeRerolledInto: () => boolean; /** * Returns true if the entity causes the doors in an uncleared room to close while alive, as @@ -83,8 +83,8 @@ declare global { GetCollisionRadiusMultiplier: () => Readonly; /** - * Returns the `EntityConfigEntity` of what this entity would devolve to when using D10. - * Returns undefined there is no valid entity it can devolve into. + * Returns the `EntityConfigEntity` of what this entity would devolve to when using D10. Returns + * undefined there is no valid entity it can devolve into. */ GetDevolvedEntity: () => EntityConfigEntity | undefined; @@ -133,6 +133,9 @@ declare global { /** Returns the entity's stage HP, as defined in `entities2.xml`. */ GetStageHP: () => number; + /** Returns the entity's SubType, as defined in `entities2.xml`. */ + GetSubType: () => int; + /** Returns the entity's `EntityType`. */ GetType: () => EntityType; From 896afee78032519ec66a65f4c70184c181786cf8 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 16 Dec 2025 17:32:33 -0800 Subject: [PATCH 18/51] fix: EntityDesc defs --- .../src/types/classes/EntityDesc.d.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/EntityDesc.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/EntityDesc.d.ts index 44f3d7090..df68f8f87 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/EntityDesc.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/EntityDesc.d.ts @@ -2,7 +2,8 @@ import type { ChampionColor, EntityType } from "isaac-typescript-definitions"; declare global { /** - * Constructs an EntityDesc object. + * Constructs an `EntityDesc` object. EntityDesc objects can only be constructed for NPCs, + * therefore passing an `EntityType` that does not correspond to a NPC will result in an error. * * @param this * @param entityType Optional. Default is `EntityType.NULL`. @@ -26,13 +27,15 @@ declare global { interface EntityDesc extends IsaacAPIClass { GetHealth: () => void; - GetMaxHealth: () => void; + GetChampionId: () => ChampionColor | -1; + GetMaxHealth: () => number; GetSubtype: () => int; GetType: () => EntityType; GetVariant: () => int; IsPlayerControlled: () => boolean; + SetChampionId: (championColor: ChampionColor | -1) => void; SetHealth: (health: int) => void; - SetMaxHealth: (maxHealth: int) => void; + SetMaxHealth: (maxHealth: number) => void; SetPlayerControlled: (controlled: boolean) => void; SetSubtype: (subType: int) => void; SetType: (entityType: EntityType) => void; From 51506bacb3cf5f5ca55952345b25a072ccc7493b Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 16 Dec 2025 18:27:34 -0800 Subject: [PATCH 19/51] fix: EntitiesSaveState defs --- .../src/types/classes/room-config/EntitiesSaveState.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/room-config/EntitiesSaveState.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/room-config/EntitiesSaveState.d.ts index 8c28167fd..34b7c6e54 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/room-config/EntitiesSaveState.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/room-config/EntitiesSaveState.d.ts @@ -27,7 +27,9 @@ declare global { GetSpawnerVariant: () => int; GetSubType: () => int; GetType: () => EntityType; - GetU1: () => int; + + /** Returns a boolean if the entity is an `EntityPickup`, otherwise it returns an integer. */ + GetU1: () => boolean | int; GetVariant: () => int; SetB1: (b1: boolean) => void; SetB2: (b2: boolean) => void; @@ -44,7 +46,7 @@ declare global { SetPos: (position: Vector) => void; SetSubType: (subType: int) => void; SetType: (entityType: EntityType) => void; - SetU1: (num: int) => void; + SetU1: (num: boolean | int) => void; SetVariant: (variant: int) => void; } } From 02d61480aa64fd3b7de43c905a73ad3862fae9f8 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 16 Dec 2025 18:29:14 -0800 Subject: [PATCH 20/51] fix: game defs --- .../isaac-typescript-definitions/src/types/classes/Game.d.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/isaac-typescript-definitions/src/types/classes/Game.d.ts b/packages/isaac-typescript-definitions/src/types/classes/Game.d.ts index f18c0f786..e289cf8ca 100644 --- a/packages/isaac-typescript-definitions/src/types/classes/Game.d.ts +++ b/packages/isaac-typescript-definitions/src/types/classes/Game.d.ts @@ -193,9 +193,6 @@ declare global { GetHUD: () => HUD; GetItemPool: () => ItemPool; - /** @deprecated This method is bugged and returns useless `userdata`. */ - GetLastDevilRoomStage: () => LuaUserdata; - GetLastLevelWithDamage: () => LevelStage; GetLastLevelWithoutHalfHp: () => LevelStage; GetLevel: () => Level; From 8c9ee63432e1a4ee11d0b50fa6b6fac8f2c8b9b0 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 16 Dec 2025 18:33:55 -0800 Subject: [PATCH 21/51] feat: game defs --- .../src/types/classes/Game.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Game.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Game.d.ts index db7606eca..d7a2404ad 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Game.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Game.d.ts @@ -117,6 +117,12 @@ declare global { /** Returns whether the run is a "re-run", meaning the player manually set the seed. */ IsRerun: () => boolean; + /** + * Returns whether the game is currently starting from a continued state or not. Once + * `ModCallback.POST_GAME_STARTED` has been called, this will always return false. + */ + IsStartingFromState: () => boolean; + /** * Records the provided completion type for all players in the current run, unlocking the * relevant achievements and giving them the relevant completion mark. @@ -177,7 +183,7 @@ declare global { StartStageTransitionEx: ( sameStage: boolean, stageTransitionType: StageTransitionType, - player: EntityPlayer | undefined, + player?: EntityPlayer, ) => void; } } From def25f163210e3c47450775310969853cc4a44e4 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 16 Dec 2025 18:40:05 -0800 Subject: [PATCH 22/51] fix: EntityBomb defs --- .../src/types/classes/entity/EntityBomb.d.ts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityBomb.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityBomb.d.ts index 39ec9f9e9..79ef2fb42 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityBomb.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityBomb.d.ts @@ -8,11 +8,13 @@ declare global { /** Returns how many frames until the bomb explodes. */ GetExplosionCountdown: () => int; - /** Returns the bomb's falling speed. */ - GetFallingSpeed: () => number; + // `GetFallingSpeed` is ommitted due to being mislabeled as `GetFallAcceleration`. - /** Returns how high the bomb is from the ground. */ - GetHeight: () => number; + GetFallAcceleration: () => number; + + GetFallSpeed: () => number; + + // `GetHeight` is ommitted due to being mislabeled as `GetFallSpeed`. /** Returns an array containing all of the entity indexes the bomb hit with its explosion. */ GetHitList: () => int[]; @@ -40,11 +42,12 @@ declare global { /** Returns whether the bomb was created through the Angelic Prism effect. */ IsPrismTouched: () => boolean; - /** Sets the bomb's falling speed. */ - SetFallingSpeed: (speed: number) => void; + // `SetFallingSpeed` is ommitted due to being mislabeled as `SetFallAcceleration`. + + SetFallAcceleration: (acceleration: number) => void; - /** Sets the bomb's height. */ - SetHeight: (height: number) => void; + // `SetHeight` is ommitted due to being mislabeled as `SetFallSpeed`. + SetFallSpeed: (speed: number) => void; /** Sets whether the bomb should load the costumes. */ SetLoadCostumes: (load: boolean) => void; From 4d2c5a46eecbe12d2a36ad69ecc7f0ee4aad7fa2 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 16 Dec 2025 18:42:38 -0800 Subject: [PATCH 23/51] feat: new EntityTear defs --- .../src/types/classes/entity/EntityTear.d.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityTear.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityTear.d.ts index 869d8485c..cfff12f29 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityTear.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityTear.d.ts @@ -1,4 +1,4 @@ -import type { TearVariant } from "isaac-typescript-definitions"; +import type { SoundEffect, TearVariant } from "isaac-typescript-definitions"; import type { SplitTearType } from "../../../enums/SplitTearType"; declare global { @@ -87,6 +87,17 @@ declare global { */ ResetSpriteScaleEx: (force?: boolean) => void; + /** + * Sets the sound that the tear plays when the tear is first spawned. This function must be + * called in `ModCallback.POST_TEAR_INIT`. Use this function over calling `sfxmanager.Stop` on + * the default tear manager sound as it's possible for the default sound to still briefly play + * for a single frame. + * + * @param soundId + * @returns + */ + SetInitSound: (soundId: SoundEffect) => void; + /** Sets whether the tear was created through the Multidimensional Baby effect. */ SetMultidimensionalTouched: (touched: boolean) => void; From 690ee564d2a38593b6737e01467ad71fa989ad49 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 16 Dec 2025 18:53:04 -0800 Subject: [PATCH 24/51] feat: new Isaac defs --- .../src/types/classes/Isaac.d.ts | 17 +++++++++++++++-- .../src/types/classes/entity/EntityTear.d.ts | 1 - 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts index 4bd0667e8..87b193a57 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts @@ -60,7 +60,7 @@ declare global { * @param ignoreNPCs Optional. If false, all NPCs in the room that aren't friendly and are * capable of keeping the doors closed are killed. Default is false. */ - function ClearBossHazards(ignoreNPCs?: EntityNPC): void; + function ClearBossHazards(ignoreNPCs?: boolean): void; /** Sets the specified challenge as completed. */ function ClearChallenge(challenge: Challenge): void; @@ -86,7 +86,7 @@ declare global { * @param persistent Optional. Whether the timer persists across rooms. Default is true. */ function CreateTimer( - timerFunction: () => void, + timerFunction: (effect: EntityEffect) => void, delay: int, times?: int, persistent?: boolean, @@ -382,6 +382,19 @@ declare global { */ function PlayCutscene(cutscene: Cutscene, clearGameState?: boolean): void; + /** + * @param collectible + * @param position + * @param scale Optional. Default is `VectorOne`. + * @param color Optional. Default is `ColorDefault`. + */ + function RenderCollectionItem( + collectible: CollectibleType, + position: Vector, + scale?: Vector, + color?: Color, + ): void; + /** * Forces the Birthright effect of the provided `PlayerType` to have no behavior at all. This * method allows you to easily rework an existing birthright effect without the need of creating diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityTear.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityTear.d.ts index cfff12f29..6e60930df 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityTear.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityTear.d.ts @@ -94,7 +94,6 @@ declare global { * for a single frame. * * @param soundId - * @returns */ SetInitSound: (soundId: SoundEffect) => void; From 205f5bbcfb3ff1363728da6e9b12dcdbf2be5065 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Wed, 17 Dec 2025 10:29:36 -0800 Subject: [PATCH 25/51] fix: ItemConfig defs --- .../src/types/classes/item-config/ItemConfig.d.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts index 4ab6548b1..ef3caa98a 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts @@ -1,7 +1,6 @@ import type { CollectibleType, ItemConfigTag, - TrinketType, } from "isaac-typescript-definitions"; declare global { @@ -14,7 +13,7 @@ declare global { tags: ItemConfigTag | BitFlags, ) => ItemConfigItem[]; - /** Returns whether the trinket is valid. */ - IsValidTrinket: (trinketType: TrinketType) => boolean; + // IsValidTrinket seems to be commented out for some reason in the API yet is documented as + // existing. } } From 89392f0e1b3b61b63a6117a26f28eb5b0032a454 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Wed, 17 Dec 2025 10:30:40 -0800 Subject: [PATCH 26/51] Update ItemOverlay.d.ts --- .../src/types/classes/ItemOverlay.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/ItemOverlay.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/ItemOverlay.d.ts index 7616fbdc2..8191cf7b4 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/ItemOverlay.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/ItemOverlay.d.ts @@ -24,7 +24,7 @@ declare namespace ItemOverlay { * Returns the player that triggered the last played giantbook animation. Returns undefined if no * player triggered the animation. */ - function GetPlayer(): EntityPlayer; + function GetPlayer(): EntityPlayer | undefined; /** Returns the sprite used for the giantbook animations. */ function GetSprite(): Sprite; From 389a20b35143b40cfce08e66dda7908f5444d3c1 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Wed, 17 Dec 2025 10:41:27 -0800 Subject: [PATCH 27/51] fix: ItemPool defs --- .../src/types/classes/ItemPool.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/ItemPool.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/ItemPool.d.ts index 4f67ec9d7..d65d0f21e 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/ItemPool.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/ItemPool.d.ts @@ -105,11 +105,11 @@ declare global { isWhitelist?: boolean, ) => ItemPoolType; - /** Returns an array of collectibles removed from all pools. */ - GetRemovedCollectibles: () => CollectibleType[]; + /** Returns a map of collectibles removed from all pools. */ + GetRemovedCollectibles: () => LuaMap; /** Returns an array of all collectibles blacklisted in the current room. */ - GetRoomBlacklistedCollectibles: () => CollectibleType[]; + GetRoomBlacklistedCollectibles: () => LuaMap; /** Returns whether the specified collectible is available in item pools. */ HasCollectible: (collectible: CollectibleType) => boolean; From bd69e781b0050afe4db0e0f4746ab0efa8d2e5f8 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Wed, 17 Dec 2025 11:05:25 -0800 Subject: [PATCH 28/51] feat: Level defs & fixes --- .../src/types/classes/Level.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Level.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Level.d.ts index f083528e5..4136839ba 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Level.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Level.d.ts @@ -82,6 +82,8 @@ declare global { */ GetForceSpecialQuest: () => SpecialQuest; + GetGenerationRNG: () => RNG; + /** Returns the number of Greed Mode waves cleared without a player taking Red Heart damage. */ GetGreedWavesClearedWithoutRedHeartDamage: () => int; @@ -127,7 +129,7 @@ declare global { * Returns whether the specified level and stage combination can be generated in any given run * and is not locked behind an achievement. */ - IsStageAvailable: (level: LevelStage, stage: StageType) => void; + IsStageAvailable: (level: LevelStage, stage: StageType) => boolean; /** * Attempts to place a room. From 5afb7cddb7f1d98a5373fbb0eda6e874c2e35d0e Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Wed, 17 Dec 2025 11:11:31 -0800 Subject: [PATCH 29/51] fix: LevelGeneratorEntry defs --- .../classes/level-generator/LevelGeneratorEntry.d.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/level-generator/LevelGeneratorEntry.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/level-generator/LevelGeneratorEntry.d.ts index 40b25713d..7a147b742 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/level-generator/LevelGeneratorEntry.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/level-generator/LevelGeneratorEntry.d.ts @@ -7,12 +7,9 @@ declare global { * @see https://repentogon.com/ */ interface LevelGeneratorEntry extends IsaacAPIClass { - SetAllowedDoors: ( - room: LevelGeneratorRoom, - doors: DoorSlotFlag | BitFlags, - ) => void; + SetAllowedDoors: (doors: DoorSlotFlag | BitFlags) => void; - SetColIdx: (room: LevelGeneratorRoom, columnIndex: int) => void; - SetLineIdx: (room: LevelGeneratorRoom, columnIndex: int) => void; + SetColIdx: (columnIndex: int) => void; + SetLineIdx: (lineIndex: int) => void; } } From eb161c655b05eccacfe2ecc99bfb6513828da363 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Mon, 22 Dec 2025 15:56:47 -0800 Subject: [PATCH 30/51] fix: BitFlag union typing --- .../src/types/classes/entity/Entity.d.ts | 2 +- .../src/types/classes/entity/EntityPlayer.d.ts | 2 +- .../src/types/classes/grid-entity/GridEntity.d.ts | 2 +- .../src/types/classes/room-config/RoomConfig.d.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/Entity.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/Entity.d.ts index d9bda3e08..6cf78b104 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/Entity.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/Entity.d.ts @@ -452,7 +452,7 @@ declare global { SetSpeedMultiplier: (multiplier: number) => void; /** Sets the entity's water clip flags. */ - SetWaterClipFlags: (flags: BitFlags) => void; + SetWaterClipFlags: (flags: WaterClipFlag | BitFlags) => void; /** * Updates the remaining frames until the weakness status effect is removed. If the entity does diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityPlayer.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityPlayer.d.ts index b559ccc3c..6d9167d85 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityPlayer.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityPlayer.d.ts @@ -226,7 +226,7 @@ declare global { * @param amount Optional. Default is 1. */ AddSoulLocketBonus: ( - cacheFlags?: BitFlags, + cacheFlags?: CacheFlag | BitFlags, amount?: int, ) => void; diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/grid-entity/GridEntity.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/grid-entity/GridEntity.d.ts index ad4622c4a..28a53e401 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/grid-entity/GridEntity.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/grid-entity/GridEntity.d.ts @@ -30,6 +30,6 @@ declare global { IsBreakableRock: () => boolean; ResetWaterClipFlags: () => void; - SetWaterClipFlags: (flags: BitFlags) => void; + SetWaterClipFlags: (flags: WaterClipFlag | BitFlags) => void; } } diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/room-config/RoomConfig.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/room-config/RoomConfig.d.ts index 9019d3c31..c65d520bc 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/room-config/RoomConfig.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/room-config/RoomConfig.d.ts @@ -76,7 +76,7 @@ declare global { maxVariant?: int, minDifficulty?: int, maxDifficulty?: int, - doors?: BitFlags, + doors?: DoorSlotFlag | BitFlags, subType?: int, gameMode?: GameMode, ): RoomConfig; From a35c0c2e4c187987100ea63b94f7019e4b485eef Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Mon, 22 Dec 2025 16:04:37 -0800 Subject: [PATCH 31/51] fix: NullFrame functions --- .../src/types/classes/sprite/{NullLayer.d.ts => NullFrame.d.ts} | 2 +- .../src/types/classes/sprite/Sprite.d.ts | 2 +- .../src/types/index.d.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename packages/isaac-typescript-definitions-repentogon/src/types/classes/sprite/{NullLayer.d.ts => NullFrame.d.ts} (90%) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/sprite/NullLayer.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/sprite/NullFrame.d.ts similarity index 90% rename from packages/isaac-typescript-definitions-repentogon/src/types/classes/sprite/NullLayer.d.ts rename to packages/isaac-typescript-definitions-repentogon/src/types/classes/sprite/NullFrame.d.ts index 5c53e0dab..394d2292f 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/sprite/NullLayer.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/sprite/NullFrame.d.ts @@ -16,6 +16,6 @@ declare interface NullFrame extends IsaacAPIClass { /** Returns the frame's scale. */ GetScale: () => Vector; - /* *Returns whether the frame is visible. */ + /** Returns whether the frame is visible. */ IsVisible: () => boolean; } diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/sprite/Sprite.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/sprite/Sprite.d.ts index 4983bf8bc..17e17225b 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/sprite/Sprite.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/sprite/Sprite.d.ts @@ -83,7 +83,7 @@ declare global { * Returns the null frame from the specified layer name of the current overlay animation. * Returns undefined if the null frame does not exist. */ - GetOverlayNullFrame: () => AnimationData | undefined; + GetOverlayNullFrame: () => NullFrame | undefined; /** Returns a bitmask of the sprite's `AnimationRenderFlag`. */ GetRenderFlags: () => BitFlags; diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/index.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/index.d.ts index 54f272282..b4a555175 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/index.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/index.d.ts @@ -85,7 +85,7 @@ /// /// /// -/// +/// /// /// /// From 2f8ff26bf31c6bc5fe54cf76293f500b9449bfd4 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Mon, 22 Dec 2025 16:16:54 -0800 Subject: [PATCH 32/51] feat: new Options defs --- .../src/types/classes/Options.d.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Options.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Options.d.ts index cf59d02f8..5c354a59f 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Options.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Options.d.ts @@ -1,7 +1,15 @@ declare namespace Options { + let AimLockEnabled: boolean; + let AscentVoiceOver: boolean; + /** Whether The Void will draw from all unlocked floors, including alt path ones. */ let BetterVoidGeneration: boolean; + let BossHPOnBottom: boolean; + let Brightness: number; + let Contrast: number; + let Exposure: number; + /** * Whether the patch for the vanilla bug that causes Hush to have no attack cooldown below 50% * health is applied. @@ -12,7 +20,7 @@ declare namespace Options { let KeyMasterDealChance: boolean; /** Whether mod updates are disabled. */ - let PreventModUpdates: boolean; + const PreventModUpdates: boolean; /** Whether quick room clear is enabled. */ let QuickRoomClear: boolean; @@ -24,4 +32,13 @@ declare namespace Options { * the HUD is rendering. */ let StatHUDPlanetarium: boolean; + + let TouchMode: int; + let WindowHeight: int; + let WindowPosX: int; + let WindowPosY: int; + let WindowWidth: int; + + // While REPENTOGON does expose readonly settings used for Isaac Online, they are excluded as + // Isaac Online is disabled for mods. Therefore, their definitions are redundant. } From e3537616abd25cb5e4a244c2a8e6dcd242763a22 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Mon, 22 Dec 2025 16:31:08 -0800 Subject: [PATCH 33/51] fix: PersistentGameData defs --- .../src/types/classes/PersistentGameData.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/PersistentGameData.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/PersistentGameData.d.ts index 554fa1b38..b30f8e48d 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/PersistentGameData.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/PersistentGameData.d.ts @@ -16,13 +16,13 @@ declare global { * * @see https://repentogon.com/ */ - interface PersistentGameData { + interface PersistentGameData extends IsaacAPIClass { /** - * Adds a kill to the bestiary entry. + * Adds a kill to the bestiary entry. Returns whether the kill was successfully added. * * @param variant Optional. Default is 0. */ - AddBestiaryKill: (entityType: EntityType, variant?: int) => void; + AddBestiaryKill: (entityType: EntityType, variant?: int) => boolean; /** Marks the boss as killed and unlocks its relevant achievements if conditions are met. */ AddBossKilled: (bossID: BossID) => void; @@ -51,10 +51,10 @@ declare global { IsBossKilled: (bossID: BossID) => boolean; /** Returns whether the provided `Challenge` has been completed. */ - IsChallengeComplete: (challenge: Challenge) => boolean; + IsChallengeCompleted: (challenge: Challenge) => boolean; /** Returns whether the provided collectible is in the items page in the stats menu. */ - IsItemInCollection: (collectible: CollectibleType) => void; + IsItemInCollection: (collectible: CollectibleType) => boolean; /** * Tries to unlock the provided `Achievement`. Returns whether the achievement was unlocked From e0f1aa783332c4ebbf08c01b5e078534bd7dcc5c Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Mon, 22 Dec 2025 16:38:21 -0800 Subject: [PATCH 34/51] fix: PlayerManager defs --- .../src/types/classes/PlayerManager.d.ts | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/PlayerManager.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/PlayerManager.d.ts index 5ad9d67bd..532761761 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/PlayerManager.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/PlayerManager.d.ts @@ -104,8 +104,13 @@ declare global { lazarusSharedGlobalTag?: boolean, ): EntityPlayer | undefined; + function FirstTrinketOwner( + trinket: TrinketType, + lazarusSharedGlobalTag?: boolean, + ): EntityPlayer | undefined; + /** @param index Optional. Default is 0. */ - function GetEsauJrState(index?: int): EntityPlayer; + function GetEsauJrState(index?: int): EntityPlayer | undefined; /** * Returns the total number of collectibles of the provided `CollectibleType` held by all @@ -121,6 +126,30 @@ declare global { */ function GetPlayers(): EntityPlayer[]; + /** + * Returns a random player who owns the provided `CollectibleType`, along with the player's + * collectible RNG. Returns undefined if no player has the provided `CollectibleType`. + * + * @param collectible + * @param seed + */ + function GetRandomCollectibleOwner( + collectible: CollectibleType, + seed: Seed, + ): undefined | LuaMultiReturn<[EntityPlayer, RNG]>; + + /** + * Returns a random player who owns the provided `TrinketType`, along with the player's trinket + * RNG. Returns undefined if no player has the provided `TrinketType`. + * + * @param trinket + * @param seed + */ + function GetRandomTrinketOwner( + trinket: TrinketType, + seed: Seed, + ): undefined | LuaMultiReturn<[EntityPlayer, RNG]>; + /** Returns the total multiplier granted by the provided `TrinketType` across all players. */ function GetTotalTrinketMultiplier(trinket: TrinketType): int; From d955da09fe827bef1eac2fa6002f77c26a6a0a2a Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Mon, 22 Dec 2025 16:49:51 -0800 Subject: [PATCH 35/51] feat: new RNG defs --- .../src/types/classes/RNG.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/RNG.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/RNG.d.ts index 5930ebb04..9474a7cd4 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/RNG.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/RNG.d.ts @@ -18,7 +18,7 @@ declare interface RNG extends IsaacAPIClass { * This does not call the `RNG.Next` method before retrieving the random number. If this is not * desired, use the `RNG.RandomInt` method instead. */ - PhantomInt: (max: int) => int; + PhantomInt: ((max: int) => int) & ((min: int, max: int) => int); /** * Returns the next seed of the RNG object as if it has been "iterated". @@ -47,6 +47,8 @@ declare interface RNG extends IsaacAPIClass { /** "Iterates" the RNG object's seed backwards and returns the new seed. */ Previous: () => int; + RandomInt: (min: int, max: int) => int; + /** * Returns a random vector with a length of 1. * From bded50df36f7d69215055aec298181715e6bfd0a Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Mon, 22 Dec 2025 16:53:54 -0800 Subject: [PATCH 36/51] feat: new Seeds def --- .../src/types/classes/Seeds.d.ts | 7 +++++++ .../src/types/index.d.ts | 1 + 2 files changed, 8 insertions(+) create mode 100644 packages/isaac-typescript-definitions-repentogon/src/types/classes/Seeds.d.ts diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Seeds.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Seeds.d.ts new file mode 100644 index 000000000..9f734af9d --- /dev/null +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Seeds.d.ts @@ -0,0 +1,7 @@ +import type { LevelStage } from "isaac-typescript-definitions"; + +declare global { + interface Seeds extends IsaacAPIClass { + SetStageSeed: (stage: LevelStage, seed: Seed) => void; + } +} diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/index.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/index.d.ts index b4a555175..43af050fd 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/index.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/index.d.ts @@ -131,6 +131,7 @@ /// /// /// +/// /// /// /// From ee03af86000bbe798d647b49f2112536b13370cc Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Mon, 22 Dec 2025 16:56:46 -0800 Subject: [PATCH 37/51] feat: new Shape defs --- .../src/types/classes/rendering/Shape.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/rendering/Shape.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/rendering/Shape.d.ts index 64de40279..3e94dcc02 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/rendering/Shape.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/rendering/Shape.d.ts @@ -4,8 +4,8 @@ * @see https://repentogon.com/ */ declare interface Shape extends IsaacAPIClass { + Circle: (pos: Vector, size: number) => void; GetTimeout: () => int; - SetTimeout: (timeout: int) => void; /** Assigns a capsule collider to the shape. */ From 4a2894e98db6ec39f01f72ab4c68562d0f0a4f33 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Mon, 22 Dec 2025 17:21:23 -0800 Subject: [PATCH 38/51] feat: Weapon defs --- .../src/types/classes/Weapon.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Weapon.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Weapon.d.ts index 0b2f4480a..0f195bbde 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Weapon.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Weapon.d.ts @@ -24,6 +24,12 @@ declare global { /** Returns the weapon's current fire delay. */ GetFireDelay: () => int; + /** + * Returns the active entity used by the weapon. Returns undefined if the active entity is not + * found. + */ + GetMainEntity: () => Entity | undefined; + /** Returns the max charge of the weapon. */ GetMaxCharge: () => int; From b8fdb4ff1cba3e50133ed7b68bf451384f41ccab Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Mon, 22 Dec 2025 18:12:15 -0800 Subject: [PATCH 39/51] feat: new ImGui definitions --- .../src/enums/flags/ImGuiWindowFlags.ts | 92 +++++++++++++++++++ .../src/index.ts | 1 + .../src/types/classes/ImGui.d.ts | 18 +++- 3 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 packages/isaac-typescript-definitions-repentogon/src/enums/flags/ImGuiWindowFlags.ts diff --git a/packages/isaac-typescript-definitions-repentogon/src/enums/flags/ImGuiWindowFlags.ts b/packages/isaac-typescript-definitions-repentogon/src/enums/flags/ImGuiWindowFlags.ts new file mode 100644 index 000000000..85be12d8a --- /dev/null +++ b/packages/isaac-typescript-definitions-repentogon/src/enums/flags/ImGuiWindowFlags.ts @@ -0,0 +1,92 @@ +/** + * This is represented as an object instead of an enum due to limitations with TypeScript enums. (We + * want this type to be a child of the `BitFlag` type.) + * + * This enum is for REPENTOGON, an exe-hack which expands the modding API. + * + * @enum + * @notExported + * @rename ImGuiWindowFlag + * @see https://repentogon.com/ + */ +const ImGuiWindowFlagInternal = { + NONE: 0, + + /** Disables the title bar. */ + NO_TITLE_BAR: 1 << 0, + + NO_RESIZE: 1 << 1, + + /** Disables moving the window. */ + NO_MOVE: 1 << 2, + + /** Disable scrollbars. The window can still scroll with the mouse or programmatically. */ + NO_SCROLLBAR: 1 << 3, + + /** + * Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be + * forwarded to the parent unless `ImGuiWindowFlag.NO_SCROLLBAR` is also set. + */ + NO_SCROLL_WITH_MOUSE: 1 << 4, + + /** Disable user collapsing window by double-clicking on it. */ + NO_COLLAPSE: 1 << 5, + + /** Resize every window to its content every frame. */ + ALWAYS_AUTO_RESIZE: 1 << 6, + + /** Disable drawing background colors and outside borders. */ + NO_BACKGROUND: 1 << 7, + + /** Never load/save settings in an `.ini` file. */ + NO_SAVED_SETTINGS: 1 << 8, + + /** Disable catching mouse inputs. */ + NO_MOUSE_INPUTS: 1 << 9, + + /** Has a menu-bar. */ + MENU_BAR: 1 << 10, + + /** Allow horizontal scrollbar to appear (off by default). */ + HORIZONTAL_SCROLLBAR: 1 << 11, + + /** Disable taking focus when transitioning from hidden to visible state. */ + NO_FOCUS_ON_APPEARING: 1 << 12, + + /** + * Disable bringing window to front when taking focus (e.g. clicking on it or programmatically + * giving it focus). + */ + NO_BRING_TO_FRONT_ON_FOCUS: 1 << 13, + + /** Always show vertical scrollbar. */ + ALWAYS_VERTICAL_SCROLLBAR: 1 << 14, + + /** Always show horizontal scrollbar. */ + ALWAYS_HORIZONTAL_SCROLLBAR: 1 << 15, + + /** No gamepad/keyboard navigation within the window. */ + NO_NAV_INPUTS: 1 << 16, + + /** No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB). */ + NO_NAV_FOCUS: 1 << 17, + + /** + * Display a dot next to the title. When used in a tab/docking context, tab is selected when + * clicking the X + closure is not assumed (will wait for user to stop submitting the tab). + * Otherwise closure is assumed. + */ + UNSAVED_DOCUMENT: 1 << 18, +} as const; + +type ImGuiWindowFlagValue = BitFlag & { + readonly __imGuiWindowFlagBrand: symbol; +}; +type ImGuiWindowFlagType = { + readonly [K in keyof typeof ImGuiWindowFlagInternal]: ImGuiWindowFlagValue; +}; + +export const ImGuiWindowFlag = ImGuiWindowFlagInternal as ImGuiWindowFlagType; +export type ImGuiWindowFlag = ImGuiWindowFlagType[keyof ImGuiWindowFlagType]; + +export const ImGuiWindowFlagZero = 0 as BitFlags; diff --git a/packages/isaac-typescript-definitions-repentogon/src/index.ts b/packages/isaac-typescript-definitions-repentogon/src/index.ts index 97272d40e..09150aefe 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/index.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/index.ts @@ -27,6 +27,7 @@ export * from "./enums/flags/DebugFlag"; export * from "./enums/flags/EntityTag"; export * from "./enums/flags/GetCollectibleFlag"; export * from "./enums/flags/GibFlag"; +export * from "./enums/flags/ImGuiWindowFlags"; export * from "./enums/flags/WaterClipFlag"; export * from "./enums/flags/WeaponModifierFlag"; export * from "./enums/FollowerPriority"; diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/ImGui.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/ImGui.d.ts index 4f4e515ae..26f324f29 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/ImGui.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/ImGui.d.ts @@ -1,4 +1,5 @@ import type { Controller, Keyboard } from "isaac-typescript-definitions"; +import type { ImGuiWindowFlag } from "../../enums/flags/ImGuiWindowFlags"; import type { ImGuiCallback } from "../../enums/imgui/ImGuiCallback"; import type { ImGuiColor } from "../../enums/imgui/ImGuiColor"; import type { ImGuiElement } from "../../enums/imgui/ImGuiElement"; @@ -506,6 +507,9 @@ declare global { /** Returns whether a window element with the given id is currently visible. */ function GetVisible(elementID: string): boolean; + function GetWindowChildFlags(windowID: string): BitFlags; + function GetWindowFlags(windowID: string): BitFlags; + /** Returns whether a window element with the given id is currently pinned. */ function GetWindowPinned(windowId: string): boolean; @@ -587,7 +591,7 @@ declare global { */ function SetColor( elementID: string, - colorType: ImGuiCallback, + colorType: ImGuiColor, r: float, g: float, b: float, @@ -600,6 +604,8 @@ declare global { */ function SetHelpmarker(elementID: string, text: string): void; + function SetSize(elementID: string, width: number, height: number): void; + /** * Sets the text color of an ImGui element. * @@ -626,6 +632,16 @@ declare global { /** Sets the visibility of an ImGui element. */ function SetVisible(elementID: string, visible: boolean): void; + function SetWindowChildFlags( + windowID: string, + flags: ImGuiWindowFlag | BitFlags, + ): void; + + function SetWindowFlags( + windowID: string, + flags: ImGuiWindowFlag | BitFlags, + ): void; + /** * Sets whether an ImGui window is pinned. Pinned windows remain open even when the main ImGui * interface is not visible. From cf1697f7349ce385f661e1548c4a2bc53093b0b3 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Mon, 22 Dec 2025 18:14:32 -0800 Subject: [PATCH 40/51] fix: GetAchievementIdByName name --- .../src/types/classes/Isaac.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts index 87b193a57..a0ace9a70 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts @@ -181,7 +181,7 @@ declare global { * * Returns -1 if no achievement with the specified name was found. */ - function GetAchievementByName(name: string): Achievement; + function GetAchievementIdByName(name: string): Achievement; // GetAxisAlignedUnitVectorFromDir is not implemented in favor of Isaacscript Common's // `directionToVector` function. From d2b7ca0d37dc4856398a22cea85d7a1e5e645fe8 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Mon, 22 Dec 2025 18:50:36 -0800 Subject: [PATCH 41/51] Update Isaac.d.ts --- .../src/types/classes/Isaac.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts index a0ace9a70..395903eaa 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts @@ -432,7 +432,7 @@ declare global { function SetClipboard(contents: string): boolean; /** Sets the value of the specified completion mark for a character. */ - function SetCompletionMarks( + function SetCompletionMark( character: PlayerType, mark: CompletionMarkType, value: CompletionMarkDifficulty, From ad42b7b93f5bfdd62c70f5f9a6a7ed865d8eba49 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Mon, 22 Dec 2025 20:28:22 -0800 Subject: [PATCH 42/51] feat: final callbacks --- .../src/enums/EvaluateStatStage.ts | 11 ++ .../src/enums/ModCallbackRepentogon.ts | 159 +++++++++++++++++- .../src/types/classes/Isaac.d.ts | 2 +- .../AddCallbackParametersRepentogon.d.ts | 50 +++++- 4 files changed, 208 insertions(+), 14 deletions(-) create mode 100644 packages/isaac-typescript-definitions-repentogon/src/enums/EvaluateStatStage.ts diff --git a/packages/isaac-typescript-definitions-repentogon/src/enums/EvaluateStatStage.ts b/packages/isaac-typescript-definitions-repentogon/src/enums/EvaluateStatStage.ts new file mode 100644 index 000000000..d97aa7250 --- /dev/null +++ b/packages/isaac-typescript-definitions-repentogon/src/enums/EvaluateStatStage.ts @@ -0,0 +1,11 @@ +/** + * This enum is for REPENTOGON, an exe-hack which expands the modding API. + * + * @see https://repentogon.com/ + */ +export enum EvaluateStatStage { + TEARS_UP = 0, + FLAT_TEARS = 1, + DAMAGE_UP = 2, + FLAT_DAMAGE = 3, +} diff --git a/packages/isaac-typescript-definitions-repentogon/src/enums/ModCallbackRepentogon.ts b/packages/isaac-typescript-definitions-repentogon/src/enums/ModCallbackRepentogon.ts index 4a9dbba6d..8fadaded3 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/enums/ModCallbackRepentogon.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/enums/ModCallbackRepentogon.ts @@ -394,6 +394,59 @@ export enum ModCallbackRepentogon { */ POST_GRID_HURT_DAMAGE = 1013, + /** + * Fires before a trinket is added to the player. + * + * Return false to prevent the trinket from being added. Alternatively, return `TrinketType` to + * override the trinket added. + * + * When registering this callback with the `Mod.AddCallback` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `TrinketType` provided. + * + * ```ts + * function preAddTrinket( + * player: EntityPlayer, + * trinket: TrinketType, + * firstTime: boolean + * ): TrinketType | boolean | undefined {} + * ``` + */ + PRE_ADD_TRINKET = 1014, + + /** + * Fires before a pickup is added to the player's Bag of Crafting. + * + * Return false to prevent the pickup from being added. Alternatively, return an array of + * `BagOfCraftingPickup` to override the pickup(s) added. + * + * When registering this callback with the `Mod.AddCallback` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `PickupVariant` provided. + * + * ```ts + * function preAddToBagOfCrafting( + * player: EntityPlayer, + * pickup: EntityPickup, + * bagOfCraftingPickups: readonly BagOfCraftingPickup[] + * ): BagOfCraftingPickup[] | boolean | undefined {} + * ``` + */ + PRE_ADD_TO_BAG_OF_CRAFTING = 1015, + + /** + * Fires after a pickup is added to the player's Bag of Crafting. + * + * When registering this callback with the `Mod.AddCallback` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `PickupVariant` provided. + * + * ```ts + * function postAddToBagOfCrafting(player: EntityPlayer, pickup: EntityPickup): void {} + * ``` + */ + POST_ADD_TO_BAG_OF_CRAFTING = 1016, + /** * You cannot filter this callback. * @@ -615,27 +668,33 @@ export enum ModCallbackRepentogon { POST_ROOM_RENDER_ENTITIES = 1044, /** + * Fires before the completion mark is set. Return `false` to prevent it from being set. + * * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerType` provided. * * ```ts - * function preCompletionMarkGet( + * function preCompletionMarkSet( * completion: CompletionType, * playerType: PlayerType * ): boolean | undefined {} + * ``` */ - PRE_COMPLETION_MARK_GET = 1047, + PRE_COMPLETION_MARK_SET = 1047, /** + * Fires after the completion mark is set. + * * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `PlayerType` provided. * * ```ts - * function postCompletionMarkGet(completion: CompletionType, playerType: PlayerType): void {} + * function postCompletionMarkSet(completion: CompletionType, playerType: PlayerType): void {} + * ``` */ - POST_COMPLETION_MARK_GET = 1048, + POST_COMPLETION_MARK_SET = 1048, /** * You cannot filter this callback. @@ -1248,6 +1307,13 @@ export enum ModCallbackRepentogon { POST_BACKDROP_PRE_RENDER_WALLS = 1109, /** + * Fires when the game first calculates the chance to spawn a Planetarium by checking if the + * current floor is valid. By default, the game prevents Planetariums from spawning after Chapter + * 3 (or Chapter 4 with Telescope Lens). + * + * Return false to bypass the stage penalty and allow the Planetarium chance to be calculated as + * normal. + * * You cannot filter this callback. * * ```ts @@ -1257,6 +1323,12 @@ export enum ModCallbackRepentogon { PRE_PLANETARIUM_APPLY_STAGE_PENALTY = 1110, /** + * Fires after `ModCallbackRepentogon.PRE_PLANETARIUM_APPLY_STAGE_PENALTY` and when the chance + * penalty is applied. The penalty locks the planetarium chance to 1% (or 10% with Telescope Lens) + * if a Planetarium has been entered before. + * + * Return false to bypass the planetarium chance penalty. + * * You cannot filter this callback. * * ```ts @@ -1266,15 +1338,34 @@ export enum ModCallbackRepentogon { PRE_PLANETARIUM_APPLY_PLANETARIUM_PENALTY = 1111, /** + * Fires after `ModCallbackRepentogon.PRE_PLANETARIUM_APPLY_PLANETARIUM_PENALTY` and when the game + * applies the Treasure Room visit penalty. By default, the game applies a penalty depending on + * how many Treasure Rooms have been visited. If the amount of treasure rooms entered is greater + * than or equal to the current stage number, the chance will be locked at 1% (or 10% with + * Telescope Lens). + * + * Return an integer to override how many Treasure Rooms has been visited. Alternatively, return + * false to bypass the Treasure Room visit penalty. + * * You cannot filter this callback. * * ```ts - * function prePlanetariumApplyTreasureRoomPenalty(): boolean | undefined {} + * function prePlanetariumApplyTreasureRoomPenalty( + * treasureRoomsVisited: int, + * ): boolean | int | undefined {} * ``` */ PRE_PLANETARIUM_APPLY_TREASURE_ROOM_PENALTY = 1112, /** + * Fires after `ModCallbackRepentogon.PRE_PLANETARIUM_APPLY_TREASURE_ROOM_PENALTY` and when the + * game modifies the Planetarium chance from items such as Crystal Ball and Magic 8 Ball. + * + * This callback only applies a flat chance after all penalties have been applied. To modify the + * base chance, use `ModCallbackRepentogon.PRE_PLANETARIUM_APPLY_TELESCOPE_LENS`. + * + * Return a float to modify the chance. + * * You cannot filter this callback. * * ```ts @@ -1284,6 +1375,11 @@ export enum ModCallbackRepentogon { PRE_PLANETARIUM_APPLY_ITEMS = 1113, /** + * Fires after `ModCallbackRepentogon.PRE_PLANETARIUM_APPLY_ITEMS` and when the game calculates + * the additional 9% chance from having Telescope Lens. + * + * Return a float to modify the chance. + * * You cannot filter this callback. * * ```ts @@ -1293,7 +1389,10 @@ export enum ModCallbackRepentogon { PRE_PLANETARIUM_APPLY_TELESCOPE_LENS = 1114, /** - * You cannot filter this callback. + * Fires after `ModCallbackRepentogon.PRE_PLANETARIUM_APPLY_TELESCOPE_LENS` and when the final + * planetarium chance is calculated. + * + * Return a float to modify the final chance. * * ```ts * function prePlanetariumCalculateFinal(chance: float): float | undefined {} @@ -1466,6 +1565,11 @@ export enum ModCallbackRepentogon { POST_FORCE_ADD_PILL_EFFECT = 1129, /** + * Fires when the game starts to tally up vanilla items for calculating the chance of Devil and + * Angel Deals. This is called before the stage penalty is applied. + * + * Return a float to modify the chance in this step of the calculation. + * * You cannot filter this callback. * * ```ts @@ -1475,6 +1579,11 @@ export enum ModCallbackRepentogon { PRE_DEVIL_APPLY_ITEMS = 1130, /** + * Fires after `ModCallbackRepentogon.PRE_DEVIL_APPLY_ITEMS` is called and when the game + * calculates the stage penalty if a Devil or Angel Deal has appeared on a previous floor. + * + * Return false to prevent the stage penalty from being applied. + * * You cannot filter this callback. * * ```ts @@ -1484,6 +1593,12 @@ export enum ModCallbackRepentogon { PRE_DEVIL_APPLY_STAGE_PENALTY = 1131, /** + * Fires after `ModCallbackRepentogon.PRE_DEVIL_APPLY_STAGE_PENALTY`is called and when the game + * calculates the chance from items which bypasses the stage penalty such as Goat Head and + * Eucharist. + * + * Return a float to modify the chance in this step of the calculation. + * * You cannot filter this callback. * * ```ts @@ -1493,6 +1608,11 @@ export enum ModCallbackRepentogon { PRE_DEVIL_APPLY_SPECIAL_ITEMS = 1132, /** + * Fires after `ModCallbackRepentogon.PRE_DEVIL_APPLY_SPECIAL_ITEMS`. This is the final step of + * calculating the Devil and Angel Deal chance. + * + * Return a float to modify the final chance. + * * You cannot filter this callback. * * ```ts @@ -2179,6 +2299,9 @@ export enum ModCallbackRepentogon { POST_NPC_DARK_RED_CHAMPION_REGEN = 1223, /** + * Fires when a custom cache flag is being evaluated. Return a number to set the value of the + * custom cache flag. + * * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the string provided. @@ -2194,6 +2317,9 @@ export enum ModCallbackRepentogon { EVALUATE_CUSTOM_CACHE = 1224, /** + * Fires when a familiar's multiplier is being evaluated. Return a number to override the + * familiar's multiplier. + * * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it * matches the `FamiliarVariant` provided. @@ -2208,6 +2334,25 @@ export enum ModCallbackRepentogon { */ EVALUATE_FAMILIAR_MULTIPLIER = 1225, + /** + * Fires when the player's stats are being calculated. This should not be confused with + * `ModCallback.EVALUATE_CACHE`, which fires when a `CacheFlag` is being evaluated. + * + * Unless you want to perform complicated conditions/calculations, it's strongly recommended that + * you use REPENTOGON's XML item stats features over this callback. + * + * When registering this callback with the `Mod.AddCallback` method: + * - You can provide an optional third argument that will make the callback only fire if it + * matches the `EvaluateStatStage` provided. + * + * ```ts + * function evaluateStat(player: EntityPlayer, stat: EvaluateStatStage, value: number): void {} + * ``` + * + * @see https://repentogon.com/xml/items.html + */ + EVALUATE_STAT = 1226, + /** * When registering this callback with the `Mod.AddCallback` method: * - You can provide an optional third argument that will make the callback only fire if it @@ -2761,7 +2906,7 @@ export enum ModCallbackRepentogon { * ): void {} * ``` */ - POST_BACKWARDS_ROOM_RESTOORE = 1308, + POST_BACKWARDS_ROOM_RESTORE = 1308, /** * When registering this callback with the `Mod.AddCallback` method: diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts index 395903eaa..a97ecd687 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Isaac.d.ts @@ -463,7 +463,7 @@ declare global { * The new name does not persist on save/continue. You will need to manually account for that * using Isaacscript Common's Save Data Manager. */ - function SetCurrentFlorName(name: string): void; + function SetCurrentFloorName(name: string): void; /** Sets the game's Dwm window attribute. */ function SetDwmWindowAttribute( diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/unofficial/AddCallbackParametersRepentogon.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/unofficial/AddCallbackParametersRepentogon.d.ts index 7504beeff..71bcbc0d6 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/unofficial/AddCallbackParametersRepentogon.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/unofficial/AddCallbackParametersRepentogon.d.ts @@ -36,7 +36,9 @@ import type { UseFlag, WeaponType, } from "isaac-typescript-definitions"; +import type { BagOfCraftingPickup } from "../../enums/BagOfCraftingPickup"; import type { CompletionMarkType } from "../../enums/CompletionMarkType"; +import type { EvaluateStatStage } from "../../enums/EvaluateStatStage"; import type { FollowerPriority } from "../../enums/FollowerPriority"; import type { GiantbookType } from "../../enums/GiantbookType"; import type { HealthType } from "../../enums/HealthType"; @@ -329,6 +331,32 @@ declare global { gridEntityType?: GridEntityType, ]; + // 1014 + [ModCallbackRepentogon.PRE_ADD_TRINKET]: [ + callback: ( + player: EntityPlayer, + trinketType: TrinketType, + firstTime: boolean, + ) => TrinketType | boolean | undefined, + trinketType?: TrinketType, + ]; + + // 1015 + [ModCallbackRepentogon.PRE_ADD_TO_BAG_OF_CRAFTING]: [ + callback: ( + player: EntityPlayer, + pickup: EntityPickup, + bagOfCraftingPickups: readonly BagOfCraftingPickup[], + ) => BagOfCraftingPickup[] | boolean | undefined, + pickupVariant?: PickupVariant, + ]; + + // 1016 + [ModCallbackRepentogon.POST_ADD_TO_BAG_OF_CRAFTING]: [ + callback: (player: EntityPlayer, pickup: EntityPickup) => void, + pickupVariant?: PickupVariant, + ]; + // 1020 [ModCallbackRepentogon.PRE_HUD_UPDATE]: [callback: () => void]; @@ -457,7 +485,7 @@ declare global { [ModCallbackRepentogon.POST_ROOM_RENDER_ENTITIES]: [callback: () => void]; // 1047 - [ModCallbackRepentogon.PRE_COMPLETION_MARK_GET]: [ + [ModCallbackRepentogon.PRE_COMPLETION_MARK_SET]: [ callback: ( completion: CompletionMarkType, playerType: PlayerType, @@ -466,7 +494,7 @@ declare global { ]; // 1048 - [ModCallbackRepentogon.POST_COMPLETION_MARK_GET]: [ + [ModCallbackRepentogon.POST_COMPLETION_MARK_SET]: [ callback: ( completion: CompletionMarkType, playerType: PlayerType, @@ -873,7 +901,7 @@ declare global { // 1112 [ModCallbackRepentogon.PRE_PLANETARIUM_APPLY_TREASURE_ROOM_PENALTY]: [ - callback: () => boolean | undefined, + callback: (treasureRoomsVisited: int) => boolean | int | undefined, ]; // 1113 @@ -1422,6 +1450,16 @@ declare global { familiarVariant?: FamiliarVariant, ]; + // 1226 + [ModCallbackRepentogon.EVALUATE_STAT]: [ + callback: ( + player: EntityPlayer, + stat: EvaluateStatStage, + currentValue: number, + ) => void, + stat?: EvaluateStatStage, + ]; + // 1231 [ModCallbackRepentogon.POST_PLAYER_COLLISION]: [ callback: (player: EntityPlayer, collider: Entity, low: boolean) => void, @@ -1717,7 +1755,7 @@ declare global { ]; // 1308 - [ModCallbackRepentogon.POST_BACKWARDS_ROOM_RESTOORE]: [ + [ModCallbackRepentogon.POST_BACKWARDS_ROOM_RESTORE]: [ callback: ( stage: LevelStage, roomDesc: RoomDescriptor, @@ -1805,7 +1843,7 @@ declare global { pill: PillColor, slot: PillCardSlot, ) => void, - pillColor?: PillCardSlot, + pillColor?: PillColor, ]; // 1356 @@ -1835,7 +1873,7 @@ declare global { // 1359 [ModCallbackRepentogon.POST_PLAYER_COLLECT_PILL]: [ callback: (player: EntityPlayer, pickup: EntityPickup) => void, - pillColor?: CardType, + pillColor?: PillColor, ]; // 1360 From 5838132c85e2ec952247146fa7bc70841eabb6b2 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Mon, 22 Dec 2025 22:37:28 -0800 Subject: [PATCH 43/51] fix: lint --- .../isaac-typescript-definitions-repentogon/src/index.ts | 1 + .../src/types/classes/entity/EntityBomb.d.ts | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/index.ts b/packages/isaac-typescript-definitions-repentogon/src/index.ts index 09150aefe..7e54421ef 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/index.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/index.ts @@ -18,6 +18,7 @@ export * from "./enums/DialogIcon"; export * from "./enums/DialogReturn"; export * from "./enums/DwmWindowsAttribute"; export * from "./enums/Ending"; +export * from "./enums/EvaluateStatStage"; export * from "./enums/EventCounter"; export * from "./enums/flags/AddHealthTypeFlag"; export * from "./enums/flags/AnimationRenderFlag"; diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityBomb.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityBomb.d.ts index 79ef2fb42..431dbee8b 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityBomb.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityBomb.d.ts @@ -8,13 +8,13 @@ declare global { /** Returns how many frames until the bomb explodes. */ GetExplosionCountdown: () => int; - // `GetFallingSpeed` is ommitted due to being mislabeled as `GetFallAcceleration`. + // `GetFallingSpeed` is omitted due to being mislabeled as `GetFallAcceleration`. GetFallAcceleration: () => number; GetFallSpeed: () => number; - // `GetHeight` is ommitted due to being mislabeled as `GetFallSpeed`. + // `GetHeight` is omitted due to being mislabeled as `GetFallSpeed`. /** Returns an array containing all of the entity indexes the bomb hit with its explosion. */ GetHitList: () => int[]; @@ -42,11 +42,11 @@ declare global { /** Returns whether the bomb was created through the Angelic Prism effect. */ IsPrismTouched: () => boolean; - // `SetFallingSpeed` is ommitted due to being mislabeled as `SetFallAcceleration`. + // `SetFallingSpeed` is omitted due to being mislabeled as `SetFallAcceleration`. SetFallAcceleration: (acceleration: number) => void; - // `SetHeight` is ommitted due to being mislabeled as `SetFallSpeed`. + // `SetHeight` is omitted due to being mislabeled as `SetFallSpeed`. SetFallSpeed: (speed: number) => void; /** Sets whether the bomb should load the costumes. */ From 82d56dcbdd9d44bd737dc61f2bee3668df01daa4 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Mon, 22 Dec 2025 22:43:42 -0800 Subject: [PATCH 44/51] fix: lint --- .../src/types/classes/entity/EntityTear.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityTear.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityTear.d.ts index 6e60930df..f278707d9 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityTear.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityTear.d.ts @@ -89,7 +89,7 @@ declare global { /** * Sets the sound that the tear plays when the tear is first spawned. This function must be - * called in `ModCallback.POST_TEAR_INIT`. Use this function over calling `sfxmanager.Stop` on + * called in `ModCallback.POST_TEAR_INIT`. Use this function over calling `SFXManager.Stop` on * the default tear manager sound as it's possible for the default sound to still briefly play * for a single frame. * From 245f6b2c6888bdbdf5e400ca5ca8dfe17697c990 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Mon, 22 Dec 2025 22:54:15 -0800 Subject: [PATCH 45/51] fix: lint --- .../src/types/classes/RNG.d.ts | 13 ++++++++++++- .../src/types/classes/entity/EntityDelirium.d.ts | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/RNG.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/RNG.d.ts index 9474a7cd4..23e0e8130 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/RNG.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/RNG.d.ts @@ -47,7 +47,18 @@ declare interface RNG extends IsaacAPIClass { /** "Iterates" the RNG object's seed backwards and returns the new seed. */ Previous: () => int; - RandomInt: (min: int, max: int) => int; + /** + * Repentogon's modified `RNG.RandomInt` method. + * + * Behaves the same as `RNG.RandomInt` except you can now specify a range of values. + * + * This method has been renamed to include "Ex" so it can not conflict with the vanilla type + * definitions. However, when the project compiles the method's name will change to what it's + * supposed to be. + * + * @customName RandomInt + */ + RandomIntEx: ((max: int) => int) & ((min: int, max: int) => int); /** * Returns a random vector with a length of 1. diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityDelirium.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityDelirium.d.ts index da1a571aa..a4c277667 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityDelirium.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/entity/EntityDelirium.d.ts @@ -38,7 +38,7 @@ declare global { * * @param variant Optional. Default is 0. * @param triggerCallback Optional. Whether to trigger the transformation callback. Default is - * false. + * false. */ Transform: ( entityType: EntityType, From 27745c7e375271656f83d25d45f0376a835d5c83 Mon Sep 17 00:00:00 2001 From: Zamiell <5511220+Zamiell@users.noreply.github.com> Date: Tue, 23 Dec 2025 07:39:19 -0500 Subject: [PATCH 46/51] restore --- .../isaac-typescript-definitions/src/types/classes/Game.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/isaac-typescript-definitions/src/types/classes/Game.d.ts b/packages/isaac-typescript-definitions/src/types/classes/Game.d.ts index e289cf8ca..f18c0f786 100644 --- a/packages/isaac-typescript-definitions/src/types/classes/Game.d.ts +++ b/packages/isaac-typescript-definitions/src/types/classes/Game.d.ts @@ -193,6 +193,9 @@ declare global { GetHUD: () => HUD; GetItemPool: () => ItemPool; + /** @deprecated This method is bugged and returns useless `userdata`. */ + GetLastDevilRoomStage: () => LuaUserdata; + GetLastLevelWithDamage: () => LevelStage; GetLastLevelWithoutHalfHp: () => LevelStage; GetLevel: () => Level; From 604c2faa1b59f993543529c81f8bfbabc0fca7d0 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 23 Dec 2025 10:47:18 -0800 Subject: [PATCH 47/51] docs: added IsValidTrinket note --- .../src/types/classes/item-config/ItemConfig.d.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts index ef3caa98a..6d1f27649 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts @@ -1,6 +1,7 @@ import type { CollectibleType, ItemConfigTag, + TrinketType, } from "isaac-typescript-definitions"; declare global { @@ -13,7 +14,14 @@ declare global { tags: ItemConfigTag | BitFlags, ) => ItemConfigItem[]; - // IsValidTrinket seems to be commented out for some reason in the API yet is documented as - // existing. + /** + * Returns whether the trinket is valid. + * + * @deprecated Not currently exposed to Lua (hook commented out upstream), despite being + * documented. Source: + * https://github.com/TeamREPENTOGON/REPENTOGON/blob/db50daa92ff366565c699bf09641e8c5b9b2449c/repentogon/LuaInterfaces/LuaItemConfig.cpp#L241-L246 + * Docs: https://repentogon.com/ItemConfig.html?h=ItemConfig#isvalidtrinket + */ + IsValidTrinket: (trinketType: TrinketType) => boolean; } } From 4d389711a84bddd07fb69d2ff17aa44f5294c283 Mon Sep 17 00:00:00 2001 From: James <5511220+Zamiell@users.noreply.github.com> Date: Tue, 23 Dec 2025 13:50:47 -0500 Subject: [PATCH 48/51] Revise deprecation comment in ItemConfig.d.ts Updated deprecation notice for IsValidTrinket method. --- .../src/types/classes/item-config/ItemConfig.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts index 6d1f27649..c37625772 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts @@ -18,9 +18,9 @@ declare global { * Returns whether the trinket is valid. * * @deprecated Not currently exposed to Lua (hook commented out upstream), despite being - * documented. Source: - * https://github.com/TeamREPENTOGON/REPENTOGON/blob/db50daa92ff366565c699bf09641e8c5b9b2449c/repentogon/LuaInterfaces/LuaItemConfig.cpp#L241-L246 - * Docs: https://repentogon.com/ItemConfig.html?h=ItemConfig#isvalidtrinket + * documented. + * @see https://github.com/TeamREPENTOGON/REPENTOGON/blob/db50daa92ff366565c699bf09641e8c5b9b2449c/repentogon/LuaInterfaces/LuaItemConfig.cpp#L241-L246 + * @see https://repentogon.com/ItemConfig.html?h=ItemConfig#isvalidtrinket */ IsValidTrinket: (trinketType: TrinketType) => boolean; } From 726780250c120672305c06a531ba7972f7807419 Mon Sep 17 00:00:00 2001 From: Syntax-Sculptor <143585501+Syntax-Sculptor@users.noreply.github.com> Date: Tue, 23 Dec 2025 10:51:20 -0800 Subject: [PATCH 49/51] Update Game.d.ts --- .../src/types/classes/Game.d.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Game.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Game.d.ts index d7a2404ad..ca9d362b2 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/Game.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/Game.d.ts @@ -1,5 +1,6 @@ import type { EntityType, + LevelStage, StageTransitionType, TearFlag, } from "isaac-typescript-definitions"; @@ -69,6 +70,18 @@ declare global { /** Returns the currently active `GenericPrompt` object. */ GetGenericPrompt: () => GenericPrompt; + /** + * Repentogon's modified `Game.GetLastDevilRoomStage` method that properly returns a + * `LevelStage` value instead of an unusable userdata object. + * + * This method has been renamed to include "Ex" so it can not conflict with the vanilla type + * definitions. However, when the project compiles the method's name will change to what it's + * supposed to be. + * + * @customName GetLastDevilRoomStage + */ + GetLastDevilRoomStageEx: () => LevelStage; + /** * Returns the transitioning color modifier. This is formatted as the absolute rate of change, * with all values are positive. From 5010e8b45d2db9ddb060808fdb90d72fd631c95d Mon Sep 17 00:00:00 2001 From: James <5511220+Zamiell@users.noreply.github.com> Date: Tue, 23 Dec 2025 13:53:33 -0500 Subject: [PATCH 50/51] Update deprecation notice for IsValidTrinket method --- .../src/types/classes/item-config/ItemConfig.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts index c37625772..499cc43f4 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts @@ -17,10 +17,10 @@ declare global { /** * Returns whether the trinket is valid. * - * @deprecated Not currently exposed to Lua (hook commented out upstream), despite being - * documented. * @see https://github.com/TeamREPENTOGON/REPENTOGON/blob/db50daa92ff366565c699bf09641e8c5b9b2449c/repentogon/LuaInterfaces/LuaItemConfig.cpp#L241-L246 * @see https://repentogon.com/ItemConfig.html?h=ItemConfig#isvalidtrinket + * @deprecated Not currently exposed to Lua (hook commented out upstream), despite being + * documented. */ IsValidTrinket: (trinketType: TrinketType) => boolean; } From b93775b7b1d083023b7a9b764f5c5616db6a505d Mon Sep 17 00:00:00 2001 From: Zamiell <5511220+Zamiell@users.noreply.github.com> Date: Tue, 23 Dec 2025 14:38:18 -0500 Subject: [PATCH 51/51] fix --- .../src/types/classes/item-config/ItemConfig.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts b/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts index 499cc43f4..31fece957 100644 --- a/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts +++ b/packages/isaac-typescript-definitions-repentogon/src/types/classes/item-config/ItemConfig.d.ts @@ -17,7 +17,8 @@ declare global { /** * Returns whether the trinket is valid. * - * @see https://github.com/TeamREPENTOGON/REPENTOGON/blob/db50daa92ff366565c699bf09641e8c5b9b2449c/repentogon/LuaInterfaces/LuaItemConfig.cpp#L241-L246 + * @see + * https://github.com/TeamREPENTOGON/REPENTOGON/blob/db50daa92ff366565c699bf09641e8c5b9b2449c/repentogon/LuaInterfaces/LuaItemConfig.cpp#L241-L246 * @see https://repentogon.com/ItemConfig.html?h=ItemConfig#isvalidtrinket * @deprecated Not currently exposed to Lua (hook commented out upstream), despite being * documented.