import { Bounty, Class, Coinmaster, Effect, Element, Familiar, Item, Location, Monster, Phylum, Servant, Skill, Slot, Stat, Thrall } from "kolmafia"; import { BooleanProperty, DeprecatedBooleanProperty, DeprecatedFamiliarProperty, DeprecatedItemProperty, DeprecatedLocationProperty, DeprecatedMonsterProperty, DeprecatedNumericOrStringProperty, DeprecatedNumericProperty, DeprecatedPhylumProperty, DeprecatedStatProperty, DeprecatedStringProperty, FamiliarProperty, ItemProperty, LocationProperty, MonsterProperty, NumericOrStringProperty, NumericProperty, PhylumProperty, StatProperty, StringProperty } from "./propertyTypes.js"; import { KnownProperty } from "./propertyTyping.js"; export declare const getString: (property: string, default_?: string | undefined) => string; export declare const getCommaSeparated: (property: string, default_?: string[] | undefined) => string[]; export declare const getBoolean: (property: string, default_?: boolean | undefined) => boolean; export declare const getNumber: (property: string, default_?: number | undefined) => number; export declare const getBounty: (property: string, default_?: Bounty | undefined) => Bounty | null; export declare const getClass: (property: string, default_?: Class | undefined) => Class | null; export declare const getCoinmaster: (property: string, default_?: Coinmaster | undefined) => Coinmaster | null; export declare const getEffect: (property: string, default_?: Effect | undefined) => Effect | null; export declare const getElement: (property: string, default_?: Element | undefined) => Element | null; export declare const getFamiliar: (property: string, default_?: Familiar | undefined) => Familiar | null; export declare const getItem: (property: string, default_?: Item | undefined) => Item | null; export declare const getLocation: (property: string, default_?: Location | undefined) => Location | null; export declare const getMonster: (property: string, default_?: Monster | undefined) => Monster | null; export declare const getPhylum: (property: string, default_?: Phylum | undefined) => Phylum | null; export declare const getServant: (property: string, default_?: Servant | undefined) => Servant | null; export declare const getSkill: (property: string, default_?: Skill | undefined) => Skill | null; export declare const getSlot: (property: string, default_?: Slot | undefined) => Slot | null; export declare const getStat: (property: string, default_?: Stat | undefined) => Stat | null; export declare const getThrall: (property: string, default_?: Thrall | undefined) => Thrall | null; /** @deprecated This property is deprecated */ export declare function get(property: DeprecatedBooleanProperty): boolean; export declare function get(property: BooleanProperty): boolean; export declare function get(property: BooleanProperty, _default: boolean): boolean; /** @deprecated This property is deprecated */ export declare function get(property: DeprecatedNumericProperty): boolean; export declare function get(property: NumericProperty): number; export declare function get(property: NumericProperty, _default: number): number; /** @deprecated This property is deprecated */ export declare function get(property: DeprecatedNumericOrStringProperty): boolean; export declare function get(property: NumericOrStringProperty): number | string; export declare function get(property: NumericOrStringProperty, _default: number | string): number | string; /** @deprecated This property is deprecated */ export declare function get(property: DeprecatedStringProperty): boolean; export declare function get(property: StringProperty): string; export declare function get(property: StringProperty, _default: string): string; /** @deprecated This property is deprecated */ export declare function get(property: DeprecatedLocationProperty): boolean; export declare function get(property: LocationProperty): Location | null; export declare function get(property: LocationProperty, _default: Location): Location; /** @deprecated This property is deprecated */ export declare function get(property: DeprecatedMonsterProperty): boolean; export declare function get(property: MonsterProperty): Monster | null; export declare function get(property: MonsterProperty, _default: Monster): Monster; /** @deprecated This property is deprecated */ export declare function get(property: DeprecatedFamiliarProperty): boolean; export declare function get(property: FamiliarProperty): Familiar | null; export declare function get(property: FamiliarProperty, _default: Familiar): Familiar; /** @deprecated This property is deprecated */ export declare function get(property: DeprecatedStatProperty): boolean; export declare function get(property: StatProperty): Stat | null; export declare function get(property: StatProperty, _default: Stat): Stat; /** @deprecated This property is deprecated */ export declare function get(property: DeprecatedPhylumProperty): boolean; export declare function get(property: PhylumProperty): Phylum | null; export declare function get(property: PhylumProperty, _default: Phylum): Phylum; /** @deprecated This property is deprecated */ export declare function get(property: DeprecatedItemProperty): boolean; export declare function get(property: ItemProperty): Item | null; export declare function get(property: ItemProperty, _default: Item): Item; export declare function get(property: string, _default: Location): Location; export declare function get(property: string, _default: Monster): Monster; export declare function get(property: string, _default: Familiar): Familiar; export declare function get(property: string, _default: Phylum): Phylum; export declare function get(property: string, _default: Item): Item; export declare function get(property: string, _default: boolean): boolean; export declare function get(property: string, _default: number): number; export declare function get(property: string, _default?: string): string; /** @deprecated This property is deprecated */ export declare function set(property: DeprecatedBooleanProperty, value: boolean): boolean; export declare function set(property: BooleanProperty, value: boolean): boolean; /** @deprecated This property is deprecated */ export declare function set(property: DeprecatedNumericProperty, value: number): number; export declare function set(property: NumericProperty, value: number): number; /** @deprecated This property is deprecated */ export declare function set(property: DeprecatedNumericOrStringProperty, value: T): T; export declare function set(property: NumericOrStringProperty, value: T): T; /** @deprecated This property is deprecated */ export declare function set(property: DeprecatedStringProperty, value: string): string; export declare function set(property: StringProperty, value: string): string; /** @deprecated This property is deprecated */ export declare function set(property: DeprecatedLocationProperty, value: Location): Location; export declare function set(property: LocationProperty, value: Location): Location; /** @deprecated This property is deprecated */ export declare function set(property: DeprecatedMonsterProperty, value: Monster): Monster; export declare function set(property: MonsterProperty, value: Monster): Monster; /** @deprecated This property is deprecated */ export declare function set(property: DeprecatedFamiliarProperty, value: Familiar): Familiar; export declare function set(property: FamiliarProperty, value: Familiar): Familiar; /** @deprecated This property is deprecated */ export declare function set(property: DeprecatedStatProperty, value: Stat): Stat; export declare function set(property: StatProperty, value: Stat): Stat; /** @deprecated This property is deprecated */ export declare function set(property: DeprecatedPhylumProperty, value: Phylum): Phylum; export declare function set(property: PhylumProperty, value: Phylum): Phylum; export declare function set(property: string, value: D): D; /** * Increment a property * * @param property Numeric property to increment * @param delta Number by which to increment * @param max Maximum value to set * @returns New value */ export declare function increment(property: NumericProperty, delta?: number, max?: number): number; /** * Decrement a property * * @param property Numeric property to decrement * @param delta Number by which to decrement * @param min Maximum value to set * @returns New value */ export declare function decrement(property: NumericProperty, delta?: number, min?: number): number; export type Properties = Partial<{ [P in KnownProperty]: unknown; }> & { [x in string]: unknown; }; /** * Sets the value of a set of mafia properties * * @param properties Set of properties */ export declare function setProperties(properties: Properties): void; /** * Carries out a callback during which a set of properties will be set as supplied * * @param properties Properties to set during callback * @param callback Callback to execute with set properties * @returns Return value of the supplied callback */ export declare function withProperties(properties: Properties, callback: () => T): T; /** * Carries out a callback during which a property will be set as supplied * * @param property Property to set during callback * @param value Value to set property during callback * @param callback Callback to execute with set properties * @returns Return value of the supplied callback */ export declare function withProperty

(property: P, value: unknown, callback: () => T): T; /** * Carries out a callback during which a set of choices will be handled as supplied * * @param choices Choices to set during callback * @param callback Callback to execute with set choices * @returns Return value of the supplied callback */ export declare function withChoices(choices: { [choice: number]: number | string; }, callback: () => T): T; /** * Carries out a callback during which a choice will be handled as supplied * * @param choice Choice to set during callback * @param value How to handle choice during callback * @param callback Callback to execute with set properties * @returns Return value of the supplied callback */ export declare function withChoice(choice: number, value: number | string, callback: () => T): T; export declare class PropertiesManager { private static EMPTY_PREFERENCE; private properties; get storedValues(): Properties; /** * Sets a collection of properties to the given values, storing the old values. * * @param propertiesToSet A Properties object, keyed by property name. */ set(propertiesToSet: Properties): void; /** * Sets a collection of choice adventure properties to the given values, storing the old values. * * @param choicesToSet An object keyed by choice adventure number. */ setChoices(choicesToSet: { [choice: number]: number | string; }): void; /** * Sets a single choice adventure property to the given value, storing the old value. * * @param choiceToSet The number of the choice adventure to set the property for. * @param value The value to assign to that choice adventure. */ setChoice(choiceToSet: number, value: number | string): void; /** * Resets the given properties to their original stored value. Does not delete entries from the manager. * * @param properties Collection of properties to reset. */ reset(...properties: KnownProperty[]): void; /** * Iterates over all stored values, setting each property back to its original stored value. Does not delete entries from the manager. */ resetAll(): void; /** * Stops storing the original values of inputted properties. * * @param properties Properties for the manager to forget. */ clear(...properties: (KnownProperty | string)[]): void; /** * Clears all properties. */ clearAll(): void; /** * Increases a numeric property to the given value if necessary. * * @param property The numeric property we want to potentially raise. * @param value The minimum value we want that property to have. * @returns Whether we needed to change the property. */ setMinimumValue(property: NumericProperty, value: number): boolean; /** * Decrease a numeric property to the given value if necessary. * * @param property The numeric property we want to potentially lower. * @param value The maximum value we want that property to have. * @returns Whether we needed to change the property. */ setMaximumValue(property: NumericProperty, value: number): boolean; /** * Creates a new PropertiesManager with identical stored values to this one. * * @returns A new PropertiesManager, with identical stored values to this one. */ clone(): PropertiesManager; /** * Clamps a numeric property, modulating it up or down to fit within a specified range * * @param property The numeric property to clamp * @param min The lower bound for what we want the property to be allowed to be. * @param max The upper bound for what we want the property to be allowed to be. * @returns Whether we ended up changing the property or not. */ clamp(property: NumericProperty, min: number, max: number): boolean; /** * Determines whether this PropertiesManager has identical stored values to another. * * @param other The PropertiesManager to compare to this one. * @returns Whether their StoredValues are identical. */ equals(other: PropertiesManager): boolean; /** * Merges a PropertiesManager onto this one, letting the input win in the event that both PropertiesManagers have a value stored. * * @param other The PropertiesManager to be merged onto this one. * @returns A new PropertiesManager with stored values from both its parents. */ merge(other: PropertiesManager): PropertiesManager; /** * Merges an arbitrary collection of PropertiesManagers, letting the rightmost PropertiesManager win in the event of verlap. * * @param mergees The PropertiesManagers to merge together. * @returns A PropertiesManager that is just an amalgam of all the constituents. */ static merge(...mergees: PropertiesManager[]): PropertiesManager; }