Skip to content

Commit

Permalink
Warped creature fixes (#6251)
Browse files Browse the repository at this point in the history
  • Loading branch information
DayV-git authored Dec 10, 2024
1 parent 948b7fe commit 03ce714
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 7 deletions.
7 changes: 5 additions & 2 deletions src/lib/minions/data/killableMonsters/low.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ const killableMonsters: KillableMonster[] = [
healAmountNeeded: 200,
attackStyleToUse: GearStat.AttackCrush,
attackStylesUsed: [GearStat.AttackCrush],
requiredQuests: [QuestID.ThePathOfGlouphrie]
requiredQuests: [QuestID.ThePathOfGlouphrie],
customMonsterHP: 150,
canCannon: true
},
{
id: Monsters.WarpedTortoise.id,
Expand All @@ -291,7 +293,8 @@ const killableMonsters: KillableMonster[] = [
healAmountNeeded: 200,
attackStyleToUse: GearStat.AttackCrush,
attackStylesUsed: [GearStat.AttackCrush],
requiredQuests: [QuestID.ThePathOfGlouphrie]
requiredQuests: [QuestID.ThePathOfGlouphrie],
canCannon: true
}
];

Expand Down
1 change: 1 addition & 0 deletions src/lib/slayer/slayerUnlocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ export const SlayerRewardsShop: SlayerTaskUnlocks[] = [
name: 'Warped Reality',
desc: 'Konar, Duradel, Nieve, and Chaeldar will be able to assign warped creatures as your task.',
slayerPointCost: 60,
canBeRemoved: true,
aliases: ['warped reality']
}
];
3 changes: 2 additions & 1 deletion src/lib/slayer/slayerUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ function userCanUseTask(user: MUser, task: AssignableSlayerTask, master: SlayerM
if (myLastTask === task.monster.id) return false;
if (task.combatLevel && task.combatLevel > user.combatLevel) return false;
if (task.questPoints && task.questPoints > user.QP) return false;
if (task.requiredQuests?.find(quest => !user.user.finished_quest_ids.includes(quest))) return false;
if (task.slayerLevel && task.slayerLevel > user.skillLevel(SkillsEnum.Slayer)) return false;
if (task.levelRequirements && !user.hasSkillReqs(task.levelRequirements)) return false;
const myBlockList = user.user.slayer_blocked_ids ?? [];
Expand Down Expand Up @@ -175,7 +176,7 @@ function userCanUseTask(user: MUser, task: AssignableSlayerTask, master: SlayerM
)
return false;

if (stringMatches(lmon, 'warped tortoise') && !myUnlocks.includes(SlayerTaskUnlocksEnum.WarpedReality))
if (stringMatches(lmon, 'warped terrorbird') && !myUnlocks.includes(SlayerTaskUnlocksEnum.WarpedReality))
return false;
return true;
}
Expand Down
5 changes: 4 additions & 1 deletion src/lib/slayer/tasks/chaeldarTasks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Monsters } from 'oldschooljs';

import { QuestID } from '../../minions/data/quests';
import { SlayerTaskUnlocksEnum } from '../slayerUnlocks';
import type { AssignableSlayerTask } from '../types';
import { bossTasks } from './bossTasks';
Expand Down Expand Up @@ -402,7 +403,9 @@ export const chaeldarTasks: AssignableSlayerTask[] = [
amount: [70, 130],
weight: 6,
monsters: [Monsters.WarpedTerrorbird.id, Monsters.WarpedTortoise.id],
unlocked: false
unlocked: false,
slayerLevel: 56,
requiredQuests: [QuestID.ThePathOfGlouphrie]
},
...bossTasks
];
5 changes: 4 additions & 1 deletion src/lib/slayer/tasks/duradelTasks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Monsters } from 'oldschooljs';

import killableMonsters from '../../minions/data/killableMonsters';
import { QuestID } from '../../minions/data/quests';
import { SlayerTaskUnlocksEnum } from '../slayerUnlocks';
import type { AssignableSlayerTask } from '../types';
import { bossTasks } from './bossTasks';
Expand Down Expand Up @@ -477,7 +478,9 @@ export const duradelTasks: AssignableSlayerTask[] = [
amount: [130, 200],
weight: 8,
monsters: [Monsters.WarpedTerrorbird.id, Monsters.WarpedTortoise.id],
unlocked: false
unlocked: false,
slayerLevel: 56,
requiredQuests: [QuestID.ThePathOfGlouphrie]
},
...bossTasks
];
5 changes: 4 additions & 1 deletion src/lib/slayer/tasks/konarTasks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Monsters } from 'oldschooljs';

import killableMonsters from '../../minions/data/killableMonsters';
import { QuestID } from '../../minions/data/quests';
import { SlayerTaskUnlocksEnum } from '../slayerUnlocks';
import type { AssignableSlayerTask } from '../types';
import { bossTasks } from './bossTasks';
Expand Down Expand Up @@ -446,7 +447,9 @@ export const konarTasks: AssignableSlayerTask[] = [
amount: [110, 170],
weight: 4,
monsters: [Monsters.WarpedTerrorbird.id, Monsters.WarpedTortoise.id],
unlocked: false
unlocked: false,
slayerLevel: 56,
requiredQuests: [QuestID.ThePathOfGlouphrie]
},
...bossTasks
];
5 changes: 4 additions & 1 deletion src/lib/slayer/tasks/nieveTasks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Monsters } from 'oldschooljs';

import killableMonsters from '../../minions/data/killableMonsters';
import { QuestID } from '../../minions/data/quests';
import { SlayerTaskUnlocksEnum } from '../slayerUnlocks';
import type { AssignableSlayerTask } from '../types';
import { bossTasks } from './bossTasks';
Expand Down Expand Up @@ -496,7 +497,9 @@ export const nieveTasks: AssignableSlayerTask[] = [
amount: [120, 185],
weight: 6,
monsters: [Monsters.WarpedTerrorbird.id, Monsters.WarpedTortoise.id],
unlocked: false
unlocked: false,
slayerLevel: 56,
requiredQuests: [QuestID.ThePathOfGlouphrie]
},
...bossTasks
];
2 changes: 2 additions & 0 deletions src/lib/slayer/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Item, Monster, MonsterSlayerMaster } from 'oldschooljs';

import type { QuestID } from '../minions/data/quests';
import type { LevelRequirements } from '../skilling/types';

export interface AssignableSlayerTask {
Expand All @@ -17,6 +18,7 @@ export interface AssignableSlayerTask {
extendedAmount?: [number, number];
extendedUnlockId?: number;
wilderness?: boolean;
requiredQuests?: QuestID[];
}

export interface SlayerMaster {
Expand Down
6 changes: 6 additions & 0 deletions src/mahoji/lib/abstracted_commands/autoSlayCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ const AutoSlayMaxEfficiencyTable: AutoslayLink[] = [
efficientName: Monsters.RevenantDemon.name,
efficientMonster: Monsters.RevenantDemon.id,
efficientMethod: 'none'
},
{
monsterID: Monsters.WarpedTerrorbird.id,
efficientName: Monsters.WarpedTerrorbird.name,
efficientMonster: Monsters.WarpedTerrorbird.id,
efficientMethod: 'cannon'
}
];

Expand Down

0 comments on commit 03ce714

Please sign in to comment.