osrs-tools
Version:
A comprehensive TypeScript library for Old School RuneScape (OSRS) data and utilities, including quest data, skill requirements, and game item information
40 lines (39 loc) • 1.3 kB
JavaScript
export const HunterGuildMasterName = {
GILMAN: 'Gilman',
CERVUS: 'Cervus',
ORNUS: 'Ornus',
ACO: 'Aco',
TECO: 'Teco',
WOLF: 'Wolf',
};
/**
* Represents a Hunter Guild Master, who can assign rumours to players based on their
* Hunter level,
* completed quests, and the tier of the rumour.
* Each master has specific requirements for assigning rumours,
* and some may require the completion of certain quests (e.g., "At First Light")
* to unlock higher-tier rumours.
* The HunterGuildMaster class encapsulates the properties and logic related to each master,
* allowing for easy retrieval and eligibility checks when assigning rumours to players.
*/
export class HunterGuildMaster {
name;
tier;
minimumLevel;
requiresAtFirstLight;
constructor(name, tier, minimumLevel, requiresAtFirstLight = false) {
this.name = name;
this.tier = tier;
this.minimumLevel = minimumLevel;
this.requiresAtFirstLight = requiresAtFirstLight;
}
canAssignAnswers(hunterLevel, completedQuests = []) {
if (hunterLevel < this.minimumLevel) {
return false;
}
if (this.requiresAtFirstLight && !completedQuests.includes('At First Light')) {
return false;
}
return true;
}
}