isaacscript-common
Version:
Helper functions and features for IsaacScript mods.
87 lines • 3.85 kB
TypeScript
import type { CollectibleType } from "isaac-typescript-definitions";
import type { PlayerStat } from "../../../enums/PlayerStat";
import type { PlayerHealth } from "../../../interfaces/PlayerHealth";
import type { PlayerStats } from "../../../interfaces/PlayerStats";
import { Feature } from "../../private/Feature";
export declare class EdenStartingStatsHealth extends Feature {
/**
* We must use the `POST_PLAYER_INIT` callback since the two random collectibles have not been
* granted yet.
*/
private readonly postPlayerInit;
private getEdenStats;
private getEdenHealth;
/**
* We must use the `POST_PLAYER_COLLECTIBLE_ADDED` callback since the collectibles are not yet
* granted in the `POST_PLAYER_INIT` callback.
*/
private readonly postPlayerCollectibleAdded;
/**
* Helper function to get the active collectible that Eden started with at the beginning of the
* run.
*
* Returns undefined if passed a player that is not Eden or if the starting collectibles are not
* yet added. (Eden's starting collectibles are added after the `POST_PLAYER_INIT` callback has
* fired.)
*
* @public
*/
getEdenStartingActiveCollectible(player: EntityPlayer): CollectibleType | undefined;
/**
* Helper function to get an array containing the active collectible and the passive collectible
* that Eden started with at the beginning of the run. The active collectible will be the first
* element and the passive collectible will be the second element.
*
* Returns an empty array if passed a player that is not Eden or if the starting collectibles are
* not yet added. (Eden's starting collectibles are added after the `POST_PLAYER_INIT` callback
* has fired.)
*
* @public
*/
getEdenStartingCollectibles(player: EntityPlayer): readonly CollectibleType[];
/**
* Helper function to get the health that Eden started with at the beginning of the run before any
* of the random collectibles were added.
*
* Returns undefined if passed a player that is not Eden.
*
* In order to use this function, you must upgrade your mod with `ISCFeature.EDEN_STARTING_STATS`.
*
* @public
*/
getEdenStartingHealth(player: EntityPlayer): Readonly<PlayerHealth> | undefined;
/**
* Helper function to get the passive collectible that Eden started with at the beginning of the
* run.
*
* Returns undefined if passed a player that is not Eden or if the starting collectibles are not
* yet added. (Eden's starting collectibles are added after the `POST_PLAYER_INIT` callback has
* fired.)
*
* @public
*/
getEdenStartingPassiveCollectible(player: EntityPlayer): CollectibleType | undefined;
/**
* Helper function to get the value of the randomized starting stat for Eden that was assigned at
* the beginning of the run before any of the random collectibles were added.
*
* Returns undefined if passed a player that is not Eden.
*
* In order to use this function, you must upgrade your mod with `ISCFeature.EDEN_STARTING_STATS`.
*
* @public
*/
getEdenStartingStat<T extends PlayerStat>(player: EntityPlayer, playerStat: T): PlayerStats[T] | undefined;
/**
* Helper function to get all of the stat values that Eden started with at the beginning of the
* run before any of the random collectibles were added.
*
* Returns undefined if passed a player that is not Eden.
*
* In order to use this function, you must upgrade your mod with `ISCFeature.EDEN_STARTING_STATS`.
*
* @public
*/
getEdenStartingStats(player: EntityPlayer): Readonly<PlayerStats> | undefined;
}
//# sourceMappingURL=EdenStartingStatsHealth.d.ts.map