UNPKG

isaacscript-common

Version:

Helper functions and features for IsaacScript mods.

55 lines 2.54 kB
import { PlayerType, SeedEffect } from "isaac-typescript-definitions"; /** Alias for the `anySeedEffectEnabled` function. */ export declare function anyEasterEggEnabled(exceptions?: readonly SeedEffect[]): boolean; /** * Helper function to see if any seed effects (i.e. Easter Eggs) are enabled for the current run. * * @param exceptions Optional. An array of seed effects to ignore. */ export declare function anySeedEffectEnabled(exceptions?: readonly SeedEffect[]): boolean; /** * Helper function to get the seed effects (i.e. Easter Eggs) that are enabled for the current run. */ export declare function getSeedEffects(): readonly SeedEffect[]; /** * Helper function to check whether the player is playing on a set seed (i.e. that they entered in a * specific seed by pressing tab on the character selection screen). When the player resets the game * on a set seed, the game will not switch to a different seed. * * Under the hood, this checks if the current challenge is `Challenge.NULL` and the * `Seeds.IsCustomRun` method. */ export declare function onSetSeed(): boolean; /** * Helper function to check whether the player is on a Victory Lap (i.e. they answered "yes" to the * popup that happens after defeating The Lamb). */ export declare function onVictoryLap(): boolean; /** * Helper function to restart the run using the console command of "restart". If the player is * playing a seeded run, then it will restart the game to the beginning of the seed. Otherwise, it * will put the player on a run with an entirely new seed. * * You can optionally specify a `PlayerType` to restart the game as that character. */ export declare function restart(character?: PlayerType): void; /** * Helper function to restart the run on a particular starting seed. * * Under the hood, this function executes the `seed` console command. * * @param startSeedOrStartSeedString Either the numerical start seed (e.g. 268365970) or the start * seed string (e.g. "AAJ2 8V9C"). */ export declare function setRunSeed(startSeedOrStartSeedString: Seed | string): void; /** * Helper function to change the run status to that of an unseeded run with a new random seed. * * This is useful to revert the behavior where playing on a set seed and restarting the game will * not take you to a new seed. * * Under the hood, this function calls the `Seeds.Reset` method and the * `Seeds.Restart(Challenge.NULL)` method. */ export declare function setUnseeded(): void; //# sourceMappingURL=run.d.ts.map