osrs-tools 2.11.0 → 2.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/runescape/model/slayer/core/SlayerMaster.d.ts +6 -1
- package/dist/runescape/model/slayer/core/SlayerMaster.js +10 -1
- package/dist/runescape/model/slayer/core/types.d.ts +2 -0
- package/dist/runescape/model/slayer/masters/Chaeldar.js +1 -0
- package/dist/runescape/model/slayer/masters/Duradel.js +1 -0
- package/dist/runescape/model/slayer/masters/KonarQuoMaten.js +1 -0
- package/dist/runescape/model/slayer/masters/Krystilia.js +1 -0
- package/dist/runescape/model/slayer/masters/Mazchna.js +1 -0
- package/dist/runescape/model/slayer/masters/Mortimer.js +2 -0
- package/dist/runescape/model/slayer/masters/Nieve.js +1 -0
- package/dist/runescape/model/slayer/masters/Spria.js +1 -0
- package/dist/runescape/model/slayer/masters/Turael.js +1 -0
- package/dist/runescape/model/slayer/masters/Vannaka.js +1 -0
- package/package.json +1 -1
|
@@ -15,11 +15,12 @@ declare class SlayerMaster {
|
|
|
15
15
|
minimumCombatLevel: number;
|
|
16
16
|
tasks: Task[];
|
|
17
17
|
wikiUrl: string;
|
|
18
|
+
imageUrl: string;
|
|
18
19
|
taskPoints: Record<number, number>;
|
|
19
20
|
eliteDiaryTaskPoints?: Record<number, number>;
|
|
20
21
|
blockedTasks: Set<string>;
|
|
21
22
|
constructor(options: SlayerMasterConfig);
|
|
22
|
-
constructor(name: string, tasks: Task[], location: string, levelRequirement: number, url: string, taskPoints: Record<number, number>, eliteDiaryTaskPoints?: Record<number, number
|
|
23
|
+
constructor(name: string, tasks: Task[], location: string, levelRequirement: number, url: string, taskPoints: Record<number, number>, eliteDiaryTaskPoints?: Record<number, number>, imageUrl?: string);
|
|
23
24
|
/**
|
|
24
25
|
* Calculate the total weight of all tasks assigned to this Slayer Master.
|
|
25
26
|
* @returns {number} The total weight of all tasks assigned to this Slayer Master.
|
|
@@ -43,6 +44,10 @@ declare class SlayerMaster {
|
|
|
43
44
|
* Get the wiki URL of the Slayer Master
|
|
44
45
|
*/
|
|
45
46
|
getWikiUrl(): string;
|
|
47
|
+
/**
|
|
48
|
+
* Get the URL of the Slayer Master's portrait image
|
|
49
|
+
*/
|
|
50
|
+
getImageUrl(): string;
|
|
46
51
|
/**
|
|
47
52
|
* Get a random task based on the weighting system of the tasks.
|
|
48
53
|
* Tasks with higher weights have a higher chance of being selected.
|
|
@@ -13,11 +13,12 @@ class SlayerMaster {
|
|
|
13
13
|
minimumCombatLevel = 0; // Level requirement to access this Slayer Master (optional, can be set later if needed)
|
|
14
14
|
tasks; // Array of tasks assigned to this Slayer Master. This holds the actual tasks that players can be assigned to kill.
|
|
15
15
|
wikiUrl = ''; // URL for the Slayer Master (optional, can be set later if needed)
|
|
16
|
+
imageUrl = ''; // URL of the Slayer Master's portrait image, sourced from the OSRS Wiki (optional, can be set later if needed)
|
|
16
17
|
taskPoints; // Mapping of task intervals to points
|
|
17
18
|
eliteDiaryTaskPoints; // Mapping of task intervals to points
|
|
18
19
|
blockedTasks = new Set(); // Names (lowercased) of tasks this master will not assign
|
|
19
20
|
// Constructor implementation
|
|
20
|
-
constructor(nameOrOptions, tasks, location, levelRequirement, url, taskPoints, eliteDiaryTaskPoints) {
|
|
21
|
+
constructor(nameOrOptions, tasks, location, levelRequirement, url, taskPoints, eliteDiaryTaskPoints, imageUrl) {
|
|
21
22
|
// Handle options object pattern (modern API)
|
|
22
23
|
if (typeof nameOrOptions === 'object' && !Array.isArray(nameOrOptions)) {
|
|
23
24
|
const options = nameOrOptions;
|
|
@@ -26,6 +27,7 @@ class SlayerMaster {
|
|
|
26
27
|
this.location = options.location || '';
|
|
27
28
|
this.minimumCombatLevel = options.minimumCombatLevel || 0;
|
|
28
29
|
this.wikiUrl = options.wikiUrl || '';
|
|
30
|
+
this.imageUrl = options.imageUrl || '';
|
|
29
31
|
this.taskPoints = options.pointsTable || {};
|
|
30
32
|
this.eliteDiaryTaskPoints = options.eliteDiaryTaskPoints;
|
|
31
33
|
}
|
|
@@ -36,6 +38,7 @@ class SlayerMaster {
|
|
|
36
38
|
this.location = location || '';
|
|
37
39
|
this.minimumCombatLevel = levelRequirement || 0;
|
|
38
40
|
this.wikiUrl = url || '';
|
|
41
|
+
this.imageUrl = imageUrl || '';
|
|
39
42
|
this.taskPoints = taskPoints || {};
|
|
40
43
|
this.eliteDiaryTaskPoints = eliteDiaryTaskPoints;
|
|
41
44
|
}
|
|
@@ -83,6 +86,12 @@ class SlayerMaster {
|
|
|
83
86
|
getWikiUrl() {
|
|
84
87
|
return this.wikiUrl;
|
|
85
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Get the URL of the Slayer Master's portrait image
|
|
91
|
+
*/
|
|
92
|
+
getImageUrl() {
|
|
93
|
+
return this.imageUrl;
|
|
94
|
+
}
|
|
86
95
|
/**
|
|
87
96
|
* Get a random task based on the weighting system of the tasks.
|
|
88
97
|
* Tasks with higher weights have a higher chance of being selected.
|
|
@@ -101,6 +101,8 @@ export interface SlayerMasterConfig {
|
|
|
101
101
|
name: string;
|
|
102
102
|
location: string;
|
|
103
103
|
wikiUrl: string;
|
|
104
|
+
/** URL of the master's portrait image, sourced from the OSRS Wiki. */
|
|
105
|
+
imageUrl?: string;
|
|
104
106
|
minimumCombatLevel: number;
|
|
105
107
|
tasks: any[];
|
|
106
108
|
pointsTable: Record<number, number>;
|
|
@@ -22,6 +22,8 @@ import { registerMaster } from './registry';
|
|
|
22
22
|
export const Mortimer = new MortimerSlayerMaster({
|
|
23
23
|
blockSlotCost: 120,
|
|
24
24
|
blockSlots: 2,
|
|
25
|
+
// Mortimer had not been released at time of writing; this is concept art (by Mod Jerv), not an in-game portrait.
|
|
26
|
+
imageUrl: 'https://oldschool.runescape.wiki/w/Special:FilePath/Wyrmscraig%20-%20Activities%20%26%20Lock%20In%20Poll%20(5).png',
|
|
25
27
|
location: 'Wyrmscraig',
|
|
26
28
|
minimumCombatLevel: 0,
|
|
27
29
|
name: 'Mortimer',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "osrs-tools",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.1",
|
|
4
4
|
"description": "A comprehensive TypeScript library for Old School RuneScape (OSRS) data and utilities, including quest data, skill requirements, and general game information",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": false,
|