From 03ce71484de0e90dcd33b9da117b1fa2aff25a42 Mon Sep 17 00:00:00 2001 From: DayV <69717452+DayV-git@users.noreply.github.com> Date: Tue, 10 Dec 2024 01:50:13 +0000 Subject: [PATCH] Warped creature fixes (#6251) --- src/lib/minions/data/killableMonsters/low.ts | 7 +++++-- src/lib/slayer/slayerUnlocks.ts | 1 + src/lib/slayer/slayerUtil.ts | 3 ++- src/lib/slayer/tasks/chaeldarTasks.ts | 5 ++++- src/lib/slayer/tasks/duradelTasks.ts | 5 ++++- src/lib/slayer/tasks/konarTasks.ts | 5 ++++- src/lib/slayer/tasks/nieveTasks.ts | 5 ++++- src/lib/slayer/types.ts | 2 ++ src/mahoji/lib/abstracted_commands/autoSlayCommand.ts | 6 ++++++ 9 files changed, 32 insertions(+), 7 deletions(-) diff --git a/src/lib/minions/data/killableMonsters/low.ts b/src/lib/minions/data/killableMonsters/low.ts index 402aa44eac..3d0bbd7ccb 100644 --- a/src/lib/minions/data/killableMonsters/low.ts +++ b/src/lib/minions/data/killableMonsters/low.ts @@ -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, @@ -291,7 +293,8 @@ const killableMonsters: KillableMonster[] = [ healAmountNeeded: 200, attackStyleToUse: GearStat.AttackCrush, attackStylesUsed: [GearStat.AttackCrush], - requiredQuests: [QuestID.ThePathOfGlouphrie] + requiredQuests: [QuestID.ThePathOfGlouphrie], + canCannon: true } ]; diff --git a/src/lib/slayer/slayerUnlocks.ts b/src/lib/slayer/slayerUnlocks.ts index 28b498d1b0..3c95691d79 100644 --- a/src/lib/slayer/slayerUnlocks.ts +++ b/src/lib/slayer/slayerUnlocks.ts @@ -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'] } ]; diff --git a/src/lib/slayer/slayerUtil.ts b/src/lib/slayer/slayerUtil.ts index cca7732e42..f7a167e2cd 100644 --- a/src/lib/slayer/slayerUtil.ts +++ b/src/lib/slayer/slayerUtil.ts @@ -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 ?? []; @@ -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; } diff --git a/src/lib/slayer/tasks/chaeldarTasks.ts b/src/lib/slayer/tasks/chaeldarTasks.ts index 424735a9c5..5a1201ded2 100644 --- a/src/lib/slayer/tasks/chaeldarTasks.ts +++ b/src/lib/slayer/tasks/chaeldarTasks.ts @@ -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'; @@ -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 ]; diff --git a/src/lib/slayer/tasks/duradelTasks.ts b/src/lib/slayer/tasks/duradelTasks.ts index d045f48c83..551338a694 100644 --- a/src/lib/slayer/tasks/duradelTasks.ts +++ b/src/lib/slayer/tasks/duradelTasks.ts @@ -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'; @@ -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 ]; diff --git a/src/lib/slayer/tasks/konarTasks.ts b/src/lib/slayer/tasks/konarTasks.ts index de3293b4a4..f55069b9d9 100644 --- a/src/lib/slayer/tasks/konarTasks.ts +++ b/src/lib/slayer/tasks/konarTasks.ts @@ -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'; @@ -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 ]; diff --git a/src/lib/slayer/tasks/nieveTasks.ts b/src/lib/slayer/tasks/nieveTasks.ts index 309b57a404..4598090333 100644 --- a/src/lib/slayer/tasks/nieveTasks.ts +++ b/src/lib/slayer/tasks/nieveTasks.ts @@ -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'; @@ -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 ]; diff --git a/src/lib/slayer/types.ts b/src/lib/slayer/types.ts index 3100eca1a3..53ab6b705a 100644 --- a/src/lib/slayer/types.ts +++ b/src/lib/slayer/types.ts @@ -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 { @@ -17,6 +18,7 @@ export interface AssignableSlayerTask { extendedAmount?: [number, number]; extendedUnlockId?: number; wilderness?: boolean; + requiredQuests?: QuestID[]; } export interface SlayerMaster { diff --git a/src/mahoji/lib/abstracted_commands/autoSlayCommand.ts b/src/mahoji/lib/abstracted_commands/autoSlayCommand.ts index b5d7d864f2..0a8df344f1 100644 --- a/src/mahoji/lib/abstracted_commands/autoSlayCommand.ts +++ b/src/mahoji/lib/abstracted_commands/autoSlayCommand.ts @@ -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' } ];