isaacscript-common
Version:
Helper functions and features for IsaacScript mods.
214 lines • 11.2 kB
TypeScript
import { CollectibleType, Dimension, ItemPoolType, PickupVariant, PlayerType } from "isaac-typescript-definitions";
/**
* The combination of the following flags:
* - `DisplayFlag.VISIBLE` (1 << 0)
* - `DisplayFlag.SHADOW` (1 << 1)
* - `DisplayFlag.SHOW_ICON` (1 << 2)
*/
export declare const ALL_DISPLAY_FLAGS: BitFlags<number & {
readonly __bitFlagBrand: symbol;
} & {
readonly __displayFlagBrand: symbol;
}>;
/**
* The distance of the laser when Azazel does not have any range up items yet. For more info, see
* the documentation for the `getAzazelBrimstoneDistance` function.
*/
export declare const AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125;
/**
* The path to the png file for collectible items during Curse of the Blind, making them appear with
* a red question mark.
*/
export declare const BLIND_ITEM_PNG_PATH = "gfx/items/collectibles/questionmark.png";
/** Bombs explode when their frame count is equal to this value. */
export declare const BOMB_EXPLODE_FRAME = 45;
export declare const CHEST_PICKUP_VARIANTS: readonly [PickupVariant.CHEST, PickupVariant.BOMB_CHEST, PickupVariant.SPIKED_CHEST, PickupVariant.ETERNAL_CHEST, PickupVariant.MIMIC_CHEST, PickupVariant.OLD_CHEST, PickupVariant.WOODEN_CHEST, PickupVariant.MEGA_CHEST, PickupVariant.HAUNTED_CHEST, PickupVariant.LOCKED_CHEST, PickupVariant.RED_CHEST, PickupVariant.MOMS_CHEST];
export declare const CHEST_PICKUP_VARIANTS_SET: ReadonlySet<PickupVariant>;
/** This is the initial value of the `EntityPickup.Wait` field after a collectible is spawned. */
export declare const COLLECTIBLE_INITIAL_WAIT = 20;
export declare const DEFAULT_ITEM_POOL_TYPE = ItemPoolType.TREASURE;
/** This is also the distance that a player spawns from the door that they enter a room from. */
export declare const DISTANCE_OF_GRID_TILE = 40;
export declare const DOGMA_ROOM_GRID_INDEX = 109;
export declare const DOOR_HITBOX_RADIUS = 11;
/**
* When Eggies take fatal damage, they go into NPCState.STATE_SUICIDE and spawn 14 Swarm Spiders
* while their StateFrame ticks upwards. The 14th spider appears when the StateFrame is at this
* value.
*/
export declare const EGGY_STATE_FRAME_OF_FINAL_SPIDER = 45;
/**
* A non-existent or completely transparent PNG file for use in clearing sprites. For more
* information, see the documentation for the `clearSprite` helper function.
*/
export declare const EMPTY_PNG_PATH = "gfx/none.png";
/**
* The random items that appear when the player has TMTRAINER are generated on the fly as they are
* encountered by the player. The first TMTRAINER item takes the final possible 32 bit number. The
* second TMTRAINER item subtracts one from that, and so on.
*
* This is equal to 4294967295.
*/
export declare const FIRST_GLITCHED_COLLECTIBLE_TYPE: CollectibleType;
/**
* An array containing every flying character. This includes non-main characters such as The Soul.
*/
export declare const FLYING_CHARACTERS: readonly [PlayerType.AZAZEL, PlayerType.LOST, PlayerType.SOUL, PlayerType.LOST_B, PlayerType.JACOB_2_B, PlayerType.SOUL_B];
/** Game frames are what is returned by the `Game.GetFrameCount` method. */
export declare const GAME_FRAMES_PER_SECOND = 30;
/** Game frames are what is returned by the `Game.GetFrameCount` method. */
export declare const GAME_FRAMES_PER_MINUTE: number;
/**
* An array containing every character that is selectable from the main menu (and has achievements
* related to completing the various bosses and so on).
*/
export declare const MAIN_CHARACTERS: readonly [PlayerType.ISAAC, PlayerType.MAGDALENE, PlayerType.CAIN, PlayerType.JUDAS, PlayerType.BLUE_BABY, PlayerType.EVE, PlayerType.SAMSON, PlayerType.AZAZEL, PlayerType.LAZARUS, PlayerType.EDEN, PlayerType.LOST, PlayerType.LILITH, PlayerType.KEEPER, PlayerType.APOLLYON, PlayerType.FORGOTTEN, PlayerType.BETHANY, PlayerType.JACOB, PlayerType.ISAAC_B, PlayerType.MAGDALENE_B, PlayerType.CAIN_B, PlayerType.JUDAS_B, PlayerType.BLUE_BABY_B, PlayerType.EVE_B, PlayerType.SAMSON_B, PlayerType.AZAZEL_B, PlayerType.LAZARUS_B, PlayerType.EDEN_B, PlayerType.LOST_B, PlayerType.LILITH_B, PlayerType.KEEPER_B, PlayerType.APOLLYON_B, PlayerType.FORGOTTEN_B, PlayerType.BETHANY_B, PlayerType.JACOB_B];
/** Render frames are what is returned by the `Isaac.GetFrameCount` method. */
export declare const RENDER_FRAMES_PER_SECOND = 60;
/** Render frames are what is returned by the `Isaac.GetFrameCount` method. */
export declare const RENDER_FRAMES_PER_MINUTE: number;
export declare const GRID_INDEX_CENTER_OF_1X1_ROOM = 67;
/**
* The floor is represented by a 13x13 grid. Room indexes start at 0. The first column is
* represented by grid indexes 0, 13, 26, and so on.
*/
export declare const LEVEL_GRID_COLUMN_HEIGHT = 13;
/**
* The floor is represented by a 13x13 grid. Room indexes start at 0. The first row is represented
* by grid indexes from 0 to 12. The second row is represented by grid indexes from 13 to 25, and so
* on.
*/
export declare const LEVEL_GRID_ROW_WIDTH = 13;
/**
* All of the collectibles that grant vision on the map.
*
* Note that:
* - Spelunker Hat is included. Historically, Spelunker Hat was not considered to be mapping, but it
* was buffed in Repentance to show rooms two or more away.
* - Book of Secrets is included, which is an "active mapping" instead of passive.
* - Luna is included, even though it is not a very powerful mapping item.
* - Cracked Orb is included, even though it requires the player to be damaged in order for it to be
* activated.
*/
export declare const MAPPING_COLLECTIBLES: readonly [CollectibleType.COMPASS, CollectibleType.TREASURE_MAP, CollectibleType.SPELUNKER_HAT, CollectibleType.CRYSTAL_BALL, CollectibleType.BLUE_MAP, CollectibleType.BOOK_OF_SECRETS, CollectibleType.MIND, CollectibleType.SOL, CollectibleType.LUNA, CollectibleType.CRACKED_ORB];
/**
* The floor is represented by a 13x13 grid. Room indexes start at 0. The first row is represented
* by grid indexes from 0 to 12. The second row is represented by grid indexes from 13 to 25, and so
* on. The maximum room index possible is 168. (It is not 169 because we start at 0 instead of 1.)
*/
export declare const MAX_LEVEL_GRID_INDEX = 168;
/**
* The game has a limit on the number of currently spawned familiars and will refuse to spawn any
* more if it reaches the limit. Blue flies and blue spiders have a lower priority and will be
* deleted to make room for other familiars.
*/
export declare const MAX_NUM_FAMILIARS = 64;
/** The game can only handle up to four different players. */
export declare const MAX_NUM_INPUTS = 4;
/** With Birthright, it is possible for Magdalene to have 18 heart containers. */
export declare const MAX_PLAYER_HEART_CONTAINERS = 18;
/**
* As the player continues to move in a direction, they will accelerate. When going from one wall to
* another in a 2x2 room at 2.0 speed (the maximum that the speed stat can rise to), the amount of
* units moved per update frame will climb to around 9.797 as they hit the opposite wall. The
* constant specifies a value of 9.8 to be safe.
*/
export declare const MAX_PLAYER_SPEED_IN_UNITS = 9.8;
export declare const MAX_PLAYER_TRINKET_SLOTS: int;
/** If you set `EntityPlayer.ShotSpeed` lower than this value, it will have no effect. */
export declare const MIN_PLAYER_SHOT_SPEED_STAT = 0.6;
/** If you set `EntityPlayer.Speed` lower than this value, it will have no effect. */
export declare const MIN_PLAYER_SPEED_STAT = 0.1;
/**
* The maximum speed stat that a player can have. Any additional speed beyond this will not take
* effect.
*/
export declare const MAX_SPEED_STAT = 2;
/** This is in the center of the room. */
export declare const NEW_FLOOR_STARTING_POSITION_NORMAL_MODE: Readonly<Vector>;
/** This is near the top door. */
export declare const NEW_FLOOR_STARTING_POSITION_GREED_MODE: Readonly<Vector>;
/**
* This is next to the bottom door. Presumably, the player does not start in the center of the room
* (like they do when getting to a new stage) so that the controls graphic is more visible.
*/
export declare const NEW_RUN_PLAYER_STARTING_POSITION: Readonly<Vector>;
/** Corresponds to the maximum value for `EntityPlayer.SamsonBerserkCharge`. */
export declare const MAX_TAINTED_SAMSON_BERSERK_CHARGE = 100000;
/**
* The number of dimensions, not including `Dimension.CURRENT`. (This is derived from the
* `Dimension` enum.)
*/
export declare const NUM_DIMENSIONS: number;
/**
* An array containing every valid `Dimension`, not including `Dimension.CURRENT`. (This is derived
* from the `NUM_DIMENSIONS` constant.)
*/
export declare const DIMENSIONS: readonly Dimension[];
/**
* The pill pool for each run is comprised of one effect for each unique pill color (minus gold and
* horse pills.)
*/
export declare const NUM_PILL_COLORS_IN_POOL: number;
export declare const ONE_BY_ONE_ROOM_GRID_SIZE = 135;
/**
* An array representing every valid collectible type quality. Specifically, this is: `[0, 1, 2, 3,
* 4]`
*/
export declare const QUALITIES: readonly Quality[];
export declare const MAX_QUALITY: Quality;
export declare const SECOND_IN_MILLISECONDS = 1000;
export declare const MINUTE_IN_MILLISECONDS: number;
/** This is equivalent to the bottom-right screen position when the game is in full screen mode. */
export declare const RESOLUTION_FULL_SCREEN: Vector;
/**
* This is equivalent to the bottom-right screen position when the game is in windowed mode in a
* 1600x900 resolution.
*/
export declare const RESOLUTION_1600_900: Vector;
/**
* The starting room of the floor is always at the same grid index, which is in the middle of the
* 13x13 grid.
*/
export declare const STARTING_ROOM_GRID_INDEX = 84;
/** After taking damage, `EntityPlayer.SamsonBerserkCharge` is incremented by this amount. */
export declare const TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = 10000;
/** For `GridEntityType.TELEPORTER` (23). */
export declare const TELEPORTER_ACTIVATION_DISTANCE: number;
/** In milliseconds, as reported by the `Isaac.GetTime` method. */
export declare const TIME_GAME_OPENED: int;
/**
* This is the number of draw coordinates that each heart spans on the UI in the upper left hand
* corner.
*/
export declare const UI_HEART_WIDTH = 12;
/**
* Equal to `Vector(1, 1)`.
*
* This is a safe version of the `Vector.One` constant. (Other mods can mutate `Vector.One`, so it
* is not safe to use.)
*/
export declare const VectorOne: Readonly<Vector>;
/**
* Equal to `Vector(0, 0)`.
*
* This is a safe version of the `Vector.Zero` constant. (Other mods can mutate `Vector.Zero`, so it
* is not safe to use.)
*/
export declare const VectorZero: Readonly<Vector>;
/**
* Equal to `Color(1, 1, 1)`.
*
* This is a safe version of the `Color.Default` constant. (Other mods can mutate `Color.Default`,
* so it is not safe to use.)
*
* If you need to mutate this, make a copy first with the `copyColor` helper function.
*/
export declare const ColorDefault: Readonly<Color>;
/**
* Equal to `KColor(1, 1, 1, 1)`.
*
* If you need to mutate this, make a copy first with the `copyKColor` helper function.
*/
export declare const KColorDefault: Readonly<KColor>;
//# sourceMappingURL=constants.d.ts.map