/// import { ACTION_POWER, ActionConstant } from "./constants"; /** * Compute the energy cost of a creep body * @param body Array of bodyparts {@link Creep.body} * @returns Energy cost of this body */ export declare function getBodyCost(body: readonly (BodyPartDefinition | BodyPartConstant)[]): number; /** * Count the number of bodyparts of a given type * @param body Array of bodyparts {@link Creep.body} * @param type Expected type * @param active Count only active bodyparts * @returns Number of bodyparts */ export declare function getBodyparts(body: readonly BodyPartDefinition[], type: BodyPartConstant, active?: boolean): number; /** * Count the number of active bodyparts of a given type * @param body Array of bodyparts {@link Creep.body} * @param type Expected type * @returns Number of active bodyparts */ export declare const getActiveBodyparts: (body: readonly BodyPartDefinition[], type: BodyPartConstant) => number; /** * Compute the number of bodyparts of a given action taking boosts into account * @param body Array of bodyparts {@link Creep.body} * @param action Expected boosts to use * @param active Count only active bodyparts * @returns An equivalent number of unboosted bodyparts */ export declare function getBodypartsBoostEquivalent(body: readonly BodyPartDefinition[], action: ActionConstant, active?: boolean): number; /** * Compute the number of active bodyparts of a given action taking boosts into account * @param body Array of bodyparts {@link Creep.body} * @param action Expected boosts to use * @returns An equivalent number of active unboosted bodyparts */ export declare const getActiveBodypartsBoostEquivalent: (body: readonly BodyPartDefinition[], action: ActionConstant) => number; /** * Gets the move efficiency of a creep based on it's number of move parts and boost relative to it's size. * @param creep target creep or powerCreep * @param usedCapacity override the amount of capacity the creep is using * @returns the amount of terrain fatigue the creep can handle */ export declare function getMoveEfficiency(creep: AnyCreep, usedCapacity?: number): number; /** * Compute the power of active bodyparts for a given action * @param body Array of bodyparts {@link Creep.body} * @param action expected action * @returns power for the given action */ export declare function getBodypartsPower(body: readonly BodyPartDefinition[], action: keyof typeof ACTION_POWER): number;