osrs-tools
Version:
A comprehensive TypeScript library for Old School RuneScape (OSRS) data and utilities, including quest data, skill requirements, and game item information
67 lines • 2.6 kB
TypeScript
import { Skill, SkillMetadata } from '../model/account/Skill';
/**
* Utility functions for working with skills and skill metadata.
* Provides helper methods for validation, categorization, and metadata lookup.
*/
/**
* Get metadata for a specific skill.
* @param skill - The skill to get metadata for
* @returns The skill's metadata or undefined if not found
*/
export declare function getSkillMetadata(skill: Skill | string): SkillMetadata | undefined;
/**
* Check if a skill is valid.
* @param skillName - The skill name to validate
* @returns true if the skill exists, false otherwise
*/
export declare function isValidSkill(skillName: string): boolean;
/**
* Get all skills in a specific category.
* @param category - The category to filter by
* @returns Array of skills in that category
*/
export declare function getSkillsByCategory(category: "combat" | "gathering" | "production" | "support"): Skill[];
/**
* Check if a skill level is valid.
* @param skill - The skill to check
* @param level - The level to validate
* @returns true if the level is between 1 and the skill's max level
*/
export declare function isValidLevel(skill: Skill | string, level: number): boolean;
/**
* Check if a skill can be boosted.
* @param skill - The skill to check
* @returns true if the skill is boostable
*/
export declare function isBoostable(skill: Skill | string): boolean;
/**
* Get the max level for a skill.
* @param skill - The skill to check
* @returns The maximum level for this skill, or 99 as default
*/
export declare function getMaxLevel(skill: Skill | string): number;
/**
* Get category for a skill.
* @param skill - The skill to check
* @returns The category of the skill or undefined if not found
*/
export declare function getSkillCategory(skill: Skill | string): "combat" | "gathering" | "production" | "support" | undefined;
/**
* Get all available skills.
* @returns Array of all skills in the game
*/
export declare function getAllSkills(): Skill[];
/**
* Get all combat-related skills.
* @returns Array of combat category skills
*/
export declare function getCombatSkills(): Skill[];
/**
* Get the total combat level from individual combat skills.
* Combat level formula: (Attack + Defence + 2*Strength + 2*Magic + 2*Ranged + Prayer) / 4 + 1
* This is a helper; actual calculation depends on account implementation.
* @param skillLevels - Object mapping skill names to levels
* @returns Calculated combat level
*/
export declare function calculateCombatLevel(skillLevels: Record<string, number>): number;
//# sourceMappingURL=skillUtils.d.ts.map