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 and gc committed Dec 11, 2024
1 parent 88c8949 commit a62b470
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 @@ -599,6 +599,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']
}
];
Expand Down
3 changes: 2 additions & 1 deletion src/lib/slayer/slayerUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,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 @@ -191,7 +192,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
Expand Up @@ -2,6 +2,7 @@ import { Monsters } from 'oldschooljs';

import { KalphiteKingMonster } from '../../minions/data/killableMonsters/custom/bosses/KalphiteKing';
import { BSOMonsters } from '../../minions/data/killableMonsters/custom/customMonsters';
import { QuestID } from '../../minions/data/quests';
import { SlayerTaskUnlocksEnum } from '../slayerUnlocks';
import type { AssignableSlayerTask } from '../types';
import { bossTasks } from './bossTasks';
Expand Down Expand Up @@ -409,7 +410,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
Expand Up @@ -7,6 +7,7 @@ import { BSOMonsters } from '../../minions/data/killableMonsters/custom/customMo
import { SlayerTaskUnlocksEnum } from '../slayerUnlocks';
import type { AssignableSlayerTask } from '../types';
import { bossTasks } from './bossTasks';
import { QuestID } from '../../minions/data/quests';

export const duradelTasks: AssignableSlayerTask[] = [
{
Expand Down Expand Up @@ -484,7 +485,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
Expand Up @@ -7,6 +7,7 @@ import { BSOMonsters } from '../../minions/data/killableMonsters/custom/customMo
import { SlayerTaskUnlocksEnum } from '../slayerUnlocks';
import type { AssignableSlayerTask } from '../types';
import { bossTasks } from './bossTasks';
import { QuestID } from '../../minions/data/quests';

export const konarTasks: AssignableSlayerTask[] = [
{
Expand Down Expand Up @@ -458,7 +459,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
Expand Up @@ -8,6 +8,7 @@ import { SlayerTaskUnlocksEnum } from '../slayerUnlocks';
import type { AssignableSlayerTask } from '../types';
import { bossTasks } from './bossTasks';
import { polyporeTasks } from './polyporeTasks';
import { QuestID } from '../../minions/data/quests';

export const nieveTasks: AssignableSlayerTask[] = [
{
Expand Down Expand Up @@ -506,7 +507,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 @@ -18,6 +19,7 @@ export interface AssignableSlayerTask {
extendedUnlockId?: number;
wilderness?: boolean;
dungeoneeringLevel?: number;
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 a62b470

Please sign in to comment.