Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove RevenantsCommand file and activity #5435

Merged
merged 3 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,6 @@ enum activity_type_enum {
BigChompyBirdHunting
DarkAltar
Trekking
Revenants
PestControl
VolcanicMine
KourendFavour
Expand Down
2 changes: 0 additions & 2 deletions src/lib/Task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
import { offeringTask } from '../tasks/minions/PrayerActivity/offeringActivity';
import { scatteringTask } from '../tasks/minions/PrayerActivity/scatteringActivity';
import { questingTask } from '../tasks/minions/questingActivity';
import { revenantsTask } from '../tasks/minions/revenantsActivity';
import { runecraftTask } from '../tasks/minions/runecraftActivity';
import { sawmillTask } from '../tasks/minions/sawmillActivity';
import { shootingStarTask } from '../tasks/minions/shootingStarsActivity';
Expand Down Expand Up @@ -150,7 +149,6 @@
motherlodeMiningTask,
runecraftTask,
sawmillTask,
revenantsTask,
woodcuttingTask,
wealthChargeTask,
tokkulShopTask,
Expand Down Expand Up @@ -183,7 +181,7 @@
];

export async function syncActivityCache() {
const tasks = await prisma.activity.findMany({ where: { completed: false } });

Check warning on line 184 in src/lib/Task.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'tasks' is already declared in the upper scope on line 94 column 14. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'tasks' is already declared in the upper scope on line 94 column 14.","line":184,"column":8,"nodeType":"Identifier","messageId":"noShadow","endLine":184,"endColumn":13}

minionActivityCache.clear();
for (const task of tasks) {
Expand All @@ -200,7 +198,7 @@
}

const task = tasks.find(i => i.type === activity.type)!;
if (!task) {

Check warning on line 201 in src/lib/Task.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 Unexpected object value in conditional. The condition is always true. Raw Output: {"ruleId":"@typescript-eslint/strict-boolean-expressions","severity":1,"message":"Unexpected object value in conditional. The condition is always true.","line":201,"column":7,"nodeType":"Identifier","messageId":"conditionErrorObject","endLine":201,"endColumn":11}
throw new Error('Missing task');
}

Expand Down
122 changes: 89 additions & 33 deletions src/lib/minions/data/killableMonsters/revs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Time } from 'e';
import { Monsters } from 'oldschooljs';
import { Bank, Monsters } from 'oldschooljs';

import { KillableMonster } from '../../types';

Expand All @@ -8,132 +8,188 @@ export const revenantMonsters: KillableMonster[] = [
id: Monsters.RevenantCyclops.id,
name: Monsters.RevenantCyclops.name,
aliases: Monsters.RevenantCyclops.aliases,
timeToFinish: Time.Second * 50,
timeToFinish: Time.Second * 82,
table: Monsters.RevenantCyclops,
wildy: true,
difficultyRating: 9,
qpRequired: 0,
pkActivityRating: 6,
pkBaseDeathChance: 5
pkActivityRating: 9,
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }]
},
canBePked: true
},
{
id: Monsters.RevenantDarkBeast.id,
name: Monsters.RevenantDarkBeast.name,
aliases: Monsters.RevenantDarkBeast.aliases,
timeToFinish: Time.Second * 70,
timeToFinish: Time.Second * 114,
table: Monsters.RevenantDarkBeast,
wildy: true,
difficultyRating: 9,
qpRequired: 0,
pkActivityRating: 9,
pkBaseDeathChance: 4
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }]
},
canBePked: true
},
{
id: Monsters.RevenantDemon.id,
name: Monsters.RevenantDemon.name,
aliases: Monsters.RevenantDemon.aliases,
timeToFinish: Time.Second * 50,
timeToFinish: Time.Second * 82,
table: Monsters.RevenantDemon,
wildy: true,
difficultyRating: 9,
qpRequired: 0,
pkActivityRating: 6,
pkBaseDeathChance: 5
pkActivityRating: 9,
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }]
},
canBePked: true
},
{
id: Monsters.RevenantDragon.id,
name: Monsters.RevenantDragon.name,
aliases: Monsters.RevenantDragon.aliases,
timeToFinish: Time.Second * 90,
timeToFinish: Time.Second * 147,
table: Monsters.RevenantDragon,
wildy: true,
difficultyRating: 9,
qpRequired: 0,
pkActivityRating: 8,
pkBaseDeathChance: 7
pkActivityRating: 9,
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }]
},
canBePked: true
},
{
id: Monsters.RevenantGoblin.id,
name: Monsters.RevenantGoblin.name,
aliases: Monsters.RevenantGoblin.aliases,
timeToFinish: Time.Second * 25,
timeToFinish: Time.Second * 41,
table: Monsters.RevenantGoblin,
wildy: true,
difficultyRating: 9,
qpRequired: 0,
pkActivityRating: 5,
pkBaseDeathChance: 5
pkActivityRating: 8,
pkBaseDeathChance: 8,
canBePked: true
},
{
id: Monsters.RevenantHellhound.id,
name: Monsters.RevenantHellhound.name,
aliases: Monsters.RevenantHellhound.aliases,
timeToFinish: Time.Second * 55,
timeToFinish: Time.Second * 90,
table: Monsters.RevenantHellhound,
wildy: true,
difficultyRating: 9,
qpRequired: 0,
pkActivityRating: 6,
pkBaseDeathChance: 5
pkActivityRating: 9,
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }]
},
canBePked: true
},
{
id: Monsters.RevenantHobgoblin.id,
name: Monsters.RevenantHobgoblin.name,
aliases: Monsters.RevenantHobgoblin.aliases,
timeToFinish: Time.Second * 45,
timeToFinish: Time.Second * 74,
table: Monsters.RevenantHobgoblin,
wildy: true,
difficultyRating: 9,
qpRequired: 0,
pkActivityRating: 5,
pkBaseDeathChance: 5
pkActivityRating: 9,
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }]
},
canBePked: true
},
{
id: Monsters.RevenantImp.id,
name: Monsters.RevenantImp.name,
aliases: Monsters.RevenantImp.aliases,
timeToFinish: Time.Second * 20,
timeToFinish: Time.Second * 33,
table: Monsters.RevenantImp,
wildy: true,
difficultyRating: 9,
qpRequired: 0,
pkActivityRating: 4,
pkBaseDeathChance: 3
pkActivityRating: 8,
pkBaseDeathChance: 8,
canBePked: true
},
{
id: Monsters.RevenantKnight.id,
name: Monsters.RevenantKnight.name,
aliases: Monsters.RevenantKnight.aliases,
timeToFinish: Time.Second * 75,
timeToFinish: Time.Second * 123,
table: Monsters.RevenantKnight,
wildy: true,
difficultyRating: 9,
qpRequired: 0,
pkActivityRating: 8,
pkBaseDeathChance: 6
pkActivityRating: 9,
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }]
},
canBePked: true
},
{
id: Monsters.RevenantOrk.id,
name: Monsters.RevenantOrk.name,
aliases: Monsters.RevenantOrk.aliases,
timeToFinish: Time.Second * 65,
timeToFinish: Time.Second * 106,
table: Monsters.RevenantOrk,
wildy: true,
difficultyRating: 9,
qpRequired: 0,
pkActivityRating: 7,
pkBaseDeathChance: 6
pkActivityRating: 9,
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }]
},
canBePked: true
},
{
id: Monsters.RevenantPyrefiend.id,
name: Monsters.RevenantPyrefiend.name,
aliases: Monsters.RevenantPyrefiend.aliases,
timeToFinish: Time.Second * 40,
timeToFinish: Time.Second * 65,
table: Monsters.RevenantPyrefiend,
wildy: true,
difficultyRating: 9,
qpRequired: 0,
pkActivityRating: 7,
pkBaseDeathChance: 5
pkActivityRating: 9,
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }]
},
canBePked: true
}
];
11 changes: 0 additions & 11 deletions src/lib/types/minions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,6 @@ export interface MonsterActivityTaskOptions extends ActivityTaskOptions {
hasWildySupplies?: boolean;
}

export interface RevenantOptions extends ActivityTaskOptions {
type: 'Revenants';
monsterID: number;
quantity: number;
died: boolean;
fakeDuration: number;
usingPrayerPots: boolean;
skulled: boolean;
style: 'melee' | 'range' | 'mage';
}
export interface ClueActivityTaskOptions extends ActivityTaskOptions {
type: 'ClueCompletion';

Expand Down Expand Up @@ -574,7 +564,6 @@ export type ActivityTaskData =
| MiningActivityTaskOptions
| MotherlodeMiningActivityTaskOptions
| PlunderActivityTaskOptions
| RevenantOptions
| SmithingActivityTaskOptions
| SmeltingActivityTaskOptions
| TiaraRunecraftActivityTaskOptions
Expand Down
9 changes: 0 additions & 9 deletions src/lib/util/minionStatus.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { toTitleCase } from '@oldschoolgg/toolkit';
import { increaseNumByPercent, reduceNumByPercent } from 'e';
import { Monsters } from 'oldschooljs';
import { SkillsEnum } from 'oldschooljs/dist/constants';

import { collectables } from '../../mahoji/lib/abstracted_commands/collectCommand';
Expand Down Expand Up @@ -64,7 +63,6 @@
PickpocketActivityTaskOptions,
PlunderActivityTaskOptions,
RaidsOptions,
RevenantOptions,
RunecraftActivityTaskOptions,
SawmillActivityTaskOptions,
ScatteringActivityTaskOptions,
Expand Down Expand Up @@ -129,7 +127,7 @@
case 'Agility': {
const data = currentTask as AgilityActivityTaskOptions;

const course = Agility.Courses.find(course => course.name === data.courseID);

Check warning on line 130 in src/lib/util/minionStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'course' is already declared in the upper scope on line 130 column 10. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'course' is already declared in the upper scope on line 130 column 10.","line":130,"column":40,"nodeType":"Identifier","messageId":"noShadow","endLine":130,"endColumn":46}

return `${name} is currently running ${data.quantity}x ${course!.name} laps. ${formattedDuration} Your ${
Emoji.Agility
Expand All @@ -139,7 +137,7 @@
case 'Cooking': {
const data = currentTask as CookingActivityTaskOptions;

const cookable = Cooking.Cookables.find(cookable => cookable.id === data.cookableID);

Check warning on line 140 in src/lib/util/minionStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'cookable' is already declared in the upper scope on line 140 column 10. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'cookable' is already declared in the upper scope on line 140 column 10.","line":140,"column":44,"nodeType":"Identifier","messageId":"noShadow","endLine":140,"endColumn":52}

return `${name} is currently cooking ${data.quantity}x ${cookable!.name}. ${formattedDuration} Your ${
Emoji.Cooking
Expand All @@ -149,7 +147,7 @@
case 'Fishing': {
const data = currentTask as FishingActivityTaskOptions;

const fish = Fishing.Fishes.find(fish => fish.id === data.fishID);

Check warning on line 150 in src/lib/util/minionStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'fish' is already declared in the upper scope on line 150 column 10. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'fish' is already declared in the upper scope on line 150 column 10.","line":150,"column":37,"nodeType":"Identifier","messageId":"noShadow","endLine":150,"endColumn":41}

return `${name} is currently fishing ${data.quantity}x ${fish!.name}. ${formattedDuration} Your ${
Emoji.Fishing
Expand All @@ -159,7 +157,7 @@
case 'Mining': {
const data = currentTask as MiningActivityTaskOptions;

const ore = Mining.Ores.find(ore => ore.id === data.oreID);

Check warning on line 160 in src/lib/util/minionStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'ore' is already declared in the upper scope on line 160 column 10. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'ore' is already declared in the upper scope on line 160 column 10.","line":160,"column":33,"nodeType":"Identifier","messageId":"noShadow","endLine":160,"endColumn":36}

return `${name} is currently mining ${ore!.name}. ${
data.fakeDurationMax === data.fakeDurationMin
Expand Down Expand Up @@ -189,7 +187,7 @@
case 'Smelting': {
const data = currentTask as SmeltingActivityTaskOptions;

const bar = Smithing.Bars.find(bar => bar.id === data.barID);

Check warning on line 190 in src/lib/util/minionStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'bar' is already declared in the upper scope on line 190 column 10. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'bar' is already declared in the upper scope on line 190 column 10.","line":190,"column":35,"nodeType":"Identifier","messageId":"noShadow","endLine":190,"endColumn":38}

return `${name} is currently smelting ${data.quantity}x ${bar!.name}. ${formattedDuration} Your ${
Emoji.Smithing
Expand All @@ -209,7 +207,7 @@
case 'Offering': {
const data = currentTask as OfferingActivityTaskOptions;

const bones = Prayer.Bones.find(bones => bones.inputId === data.boneID);

Check warning on line 210 in src/lib/util/minionStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'bones' is already declared in the upper scope on line 210 column 10. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'bones' is already declared in the upper scope on line 210 column 10.","line":210,"column":36,"nodeType":"Identifier","messageId":"noShadow","endLine":210,"endColumn":41}

return `${name} is currently offering ${data.quantity}x ${bones!.name}. ${formattedDuration} Your ${
Emoji.Prayer
Expand All @@ -219,7 +217,7 @@
case 'Burying': {
const data = currentTask as BuryingActivityTaskOptions;

const bones = Prayer.Bones.find(bones => bones.inputId === data.boneID);

Check warning on line 220 in src/lib/util/minionStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'bones' is already declared in the upper scope on line 220 column 10. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'bones' is already declared in the upper scope on line 220 column 10.","line":220,"column":36,"nodeType":"Identifier","messageId":"noShadow","endLine":220,"endColumn":41}

return `${name} is currently burying ${data.quantity}x ${bones!.name}. ${formattedDuration} Your ${
Emoji.Prayer
Expand All @@ -229,7 +227,7 @@
case 'Scattering': {
const data = currentTask as ScatteringActivityTaskOptions;

const ashes = Prayer.Ashes.find(ashes => ashes.inputId === data.ashID);

Check warning on line 230 in src/lib/util/minionStatus.ts

View workflow job for this annotation

GitHub Actions / ESLint

[eslint] reported by reviewdog 🐶 'ashes' is already declared in the upper scope on line 230 column 10. Raw Output: {"ruleId":"no-shadow","severity":1,"message":"'ashes' is already declared in the upper scope on line 230 column 10.","line":230,"column":36,"nodeType":"Identifier","messageId":"noShadow","endLine":230,"endColumn":41}

return `${name} is currently scattering ${data.quantity}x ${ashes!.name}. ${formattedDuration} Your ${
Emoji.Prayer
Expand Down Expand Up @@ -545,13 +543,6 @@
case 'Trekking': {
return `${name} is currently Temple Trekking. ${formattedDuration}`;
}
case 'Revenants': {
const data = currentTask as RevenantOptions;
const durationRemaining = data.finishDate - data.duration + data.fakeDuration - Date.now();
return `${data.skulled ? `${Emoji.OSRSSkull} ` : ''} ${name} is currently killing ${data.quantity}x ${
Monsters.get(data.monsterID)!.name
} in the wilderness. If they don't die, the trip should take ${formatDuration(durationRemaining)}.`;
}
case 'PestControl': {
const data = currentTask as MinigameActivityTaskOptionsWithNoChanges;
return `${name} is currently doing ${data.quantity} games of Pest Control. ${formattedDuration}`;
Expand Down
7 changes: 0 additions & 7 deletions src/lib/util/repeatStoredTrip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ import {
PickpocketActivityTaskOptions,
PuroPuroActivityTaskOptions,
RaidsOptions,
RevenantOptions,
RunecraftActivityTaskOptions,
SawmillActivityTaskOptions,
ScatteringActivityTaskOptions,
Expand Down Expand Up @@ -451,12 +450,6 @@ export const tripHandlers = {
}
})
},
[activity_type_enum.Revenants]: {
commandName: 'k',
args: (data: RevenantOptions) => ({
name: autocompleteMonsters.find(i => i.id === data.monsterID)?.name ?? data.monsterID.toString()
})
},
[activity_type_enum.RoguesDenMaze]: {
commandName: 'minigames',
args: () => ({
Expand Down
Loading
Loading