Skip to content

Commit

Permalink
Merge branch 'master' into bso
Browse files Browse the repository at this point in the history
  • Loading branch information
gc committed Feb 27, 2024
2 parents a74912d + f940121 commit 5cdf78e
Show file tree
Hide file tree
Showing 13 changed files with 186 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"murmurhash": "^2.0.1",
"node-cron": "^3.0.3",
"node-fetch": "^2.6.7",
"oldschooljs": "^2.5.0",
"oldschooljs": "^2.5.1",
"p-queue": "^6.6.2",
"piscina": "^4.3.2",
"random-js": "^2.1.0",
Expand Down
26 changes: 26 additions & 0 deletions src/lib/combat_achievements/easy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { warmGear } from '../data/filterables';
import { SkillsEnum } from '../skilling/types';
import { Requirements } from '../structures/Requirements';
import getOSItem from '../util/getOSItem';
import resolveItems from '../util/resolveItems';
import { isCertainMonsterTrip } from './caUtils';
import { type CombatAchievement } from './combatAchievements';

Expand Down Expand Up @@ -413,5 +414,30 @@ export const easyCombatAchievements: CombatAchievement[] = [
[Monsters.Wyrm.id]: 1
}
})
},
{
id: 34,
name: 'Sit Rat',
type: 'restriction',
monster: 'Scurrius',
desc: 'Finish off Scurrius with a ratbane weapon.',
rng: {
chancePerKill: 1,
hasChance: (data, user) =>
isCertainMonsterTrip(Monsters.Scurrius.id)(data) &&
[resolveItems(['Bone mace', 'Bone staff', 'Bone shortbow'])].some(i => user.hasEquipped(i))
}
},
{
id: 35,
name: 'Scurrius Novice',
type: 'kill_count',
monster: 'Scurrius',
desc: 'Kill Scurrius once.',
requirements: new Requirements().add({
kcRequirement: {
[Monsters.Scurrius.id]: 1
}
})
}
];
34 changes: 34 additions & 0 deletions src/lib/combat_achievements/medium.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,5 +491,39 @@ export const mediumCombatAchievements: CombatAchievement[] = [
wintertodt: 10
}
})
},
{
id: 141,
name: 'Scurrius Champion',
type: 'kill_count',
monster: 'Scurrius',
desc: 'Kill Scurrius 10 times.',
requirements: new Requirements().add({
kcRequirement: {
[Monsters.Scurrius.id]: 10
}
})
},
{
id: 142,
name: 'Perfect Scurrius',
type: 'perfection',
monster: 'Scurrius',
desc: 'Kill Scurrius in a private instance without taking damage from the following attacks: Tail Swipe and Falling Bricks. Pray correctly against the following attacks: Flying Fur and Bolts of Electricity.',
rng: {
chancePerKill: 10,
hasChance: isCertainMonsterTrip(Monsters.Scurrius.id)
}
},
{
id: 143,
name: 'Efficient Pest Control',
type: 'mechanical',
monster: 'Scurrius',
desc: "Kill 6 Giant Rats within Scurrius' lair in 3 seconds.",
rng: {
chancePerKill: 10,
hasChance: isCertainMonsterTrip(Monsters.Scurrius.id)
}
}
];
6 changes: 6 additions & 0 deletions src/lib/data/Collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,12 @@ export const allCollectionLogs: ICollection = {
items: scorpiaCL,
fmtProg: kcProg(Monsters.Scorpia)
},
Scurrius: {
alias: Monsters.Scurrius.aliases,
allItems: Monsters.Scurrius.allItems,
items: resolveItems(['Scurry', "Scurrius' spine"]),
fmtProg: kcProg(Monsters.Scurrius)
},
Skotizo: {
alias: Monsters.Skotizo.aliases,
allItems: Monsters.Skotizo.allItems,
Expand Down
3 changes: 2 additions & 1 deletion src/lib/data/CollectionsExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1733,7 +1733,8 @@ export const allPetsCL = resolveItems([
'Wisp',
"Lil'viathan",
'Butch',
'Baron'
'Baron',
'Scurry'
]);
export const camdozaalCL = resolveItems([
'Barronite mace',
Expand Down
6 changes: 6 additions & 0 deletions src/lib/data/creatablesTable.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼───────────╢
║ Webweaver bow (u) │ 500,000x Coins, 1x Craw's bow (u), 1x Fangs of venenatis │ 1x Webweaver bow (u) │ 0 ║
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼───────────╢
║ Bone mace │ 1x Rune mace, 1x Scurrius' spine │ 1x Bone mace │ 0 ║
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼───────────╢
║ Bone shortbow │ 1x Yew shortbow, 1x Scurrius' spine │ 1x Bone shortbow │ 0 ║
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼───────────╢
║ Bone staff │ 1,000x Chaos rune, 1x Battlestaff, 1x Scurrius' spine │ 1x Bone staff │ 0 ║
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼───────────╢
║ Revert tanzanite fang │ 1x Tanzanite fang │ 20,000x Zulrah's scales │ 0 ║
╟─────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼───────────╢
║ Revert toxic blowpipe (empty) │ 1x Toxic blowpipe (empty) │ 20,000x Zulrah's scales │ 0 ║
Expand Down
24 changes: 24 additions & 0 deletions src/lib/data/createables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2364,6 +2364,30 @@ const Createables: Createable[] = [
'Webweaver bow (u) ': 1
})
},
{
name: 'Bone mace',
inputItems: new Bank().add('Rune mace').add("Scurrius' spine"),
outputItems: new Bank().add('Bone mace'),
requiredSkills: {
smithing: 35
}
},
{
name: 'Bone shortbow',
inputItems: new Bank().add('Yew shortbow').add("Scurrius' spine"),
outputItems: new Bank().add('Bone shortbow'),
requiredSkills: {
fletching: 35
}
},
{
name: 'Bone staff',
inputItems: new Bank().add('Battlestaff').add('Chaos rune', 1000).add("Scurrius' spine"),
outputItems: new Bank().add('Bone staff'),
requiredSkills: {
crafting: 35
}
},
...Reverteables,
...crystalTools,
...ornamentKits,
Expand Down
13 changes: 13 additions & 0 deletions src/lib/minions/data/killableMonsters/bosses/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,19 @@ const killableBosses: KillableMonster[] = [
messages.push('You got a Charged ice for killing the Phantom Muspah in under 3 minutes!');
},
healAmountNeeded: 150
},
{
id: Monsters.Scurrius.id,
name: Monsters.Scurrius.name,
aliases: Monsters.Scurrius.aliases,
timeToFinish: Time.Minute * 2,
table: Monsters.Scurrius,
notifyDrops: resolveItems(['Scurry']),
qpRequired: 0,
levelRequirements: {
prayer: 43
},
defaultAttackStyles: [SkillsEnum.Attack]
}
];

Expand Down
2 changes: 1 addition & 1 deletion src/lib/slayer/slayerUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ export async function getUsersCurrentSlayerInfo(id: string) {
}

const slayerMaster = slayerMasters.find(master => master.id === currentTask.slayer_master_id);
const assignedTask = slayerMaster!.tasks.find(m => m.monster.id === currentTask.monster_id)!;
const assignedTask = slayerMaster?.tasks.find(m => m.monster.id === currentTask.monster_id);

if (!assignedTask || !slayerMaster) {
logError(
Expand Down
3 changes: 2 additions & 1 deletion src/lib/slayer/tasks/turaelTasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ export const turaelTasks: AssignableSlayerTask[] = [
Monsters.DungeonRat.id,
Monsters.CryptRat.id,
Monsters.ZombieRat.id,
Monsters.BrineRat.id
Monsters.BrineRat.id,
Monsters.Scurrius.id
],
unlocked: true
},
Expand Down
61 changes: 61 additions & 0 deletions tests/unit/snapshots/banksnapshots.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10157,6 +10157,67 @@ exports[`BSO Creatables 1`] = `
"frozen": false,
},
},
{
"cantHaveItems": undefined,
"inputItems": Bank {
"bank": {
"1432": 1,
"28798": 1,
},
"frozen": false,
},
"name": "Bone mace",
"outputItems": Bank {
"bank": {
"28792": 1,
},
"frozen": false,
},
"requiredSkills": {
"smithing": 35,
},
},
{
"cantHaveItems": undefined,
"inputItems": Bank {
"bank": {
"28798": 1,
"857": 1,
},
"frozen": false,
},
"name": "Bone shortbow",
"outputItems": Bank {
"bank": {
"28794": 1,
},
"frozen": false,
},
"requiredSkills": {
"fletching": 35,
},
},
{
"cantHaveItems": undefined,
"inputItems": Bank {
"bank": {
"1391": 1,
"28798": 1,
"562": 1000,
},
"frozen": false,
},
"name": "Bone staff",
"outputItems": Bank {
"bank": {
"28796": 1,
},
"frozen": false,
},
"requiredSkills": {
"crafting": 35,
},
},
{
"cantHaveItems": undefined,
"inputItems": Bank {
Expand Down
9 changes: 6 additions & 3 deletions tests/unit/snapshots/clsnapshots.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ exports[`BSO Collection Log Groups/Categories 1`] = `
Achievement Diary (48)
Aerial Fishing (9)
Alchemical Hydra (11)
All Pets (56)
All Pets (56)
All Pets (57)
All Pets (57)
Balthazar's Big Bonanza (26)
Barbarian Assault (11)
Barrows Chests (25)
Expand Down Expand Up @@ -42,7 +42,7 @@ Cooking (28)
Corporeal Beast (8)
Crafting (175)
Crazy archaeologist (3)
Creatables (728)
Creatables (731)
Creature Creation (7)
Creature Creation (7)
Custom Pets (42)
Expand Down Expand Up @@ -138,6 +138,7 @@ Rogues' Den (5)
Rooftop Agility (10)
Sarachnis (4)
Scorpia (3)
Scurrius (2)
Sea Kraken (3)
Shades of Mort'ton (15)
Shared Treasure Trail Rewards (49)
Expand Down Expand Up @@ -1775,6 +1776,8 @@ Scroll of proficiency
Scroll of teleportation
Scroll of the hunt
Scruffy
Scurrius' spine
Scurry
Scythe of vitur (uncharged)
Seamonkey staff (t1)
Seamonkey staff (t2)
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4032,10 +4032,10 @@ obliterator@^2.0.1:
resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816"
integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==

oldschooljs@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/oldschooljs/-/oldschooljs-2.5.0.tgz#a490a8b11f9630621ac05fde858dde51c75c0da0"
integrity sha512-zTSKe/tfFQ3BAs6bJRLrTeacOuAltYIehSJgRLqXR0NBTsSmjJjrVxJbKZXURptzWVwQTB8incT2oizzwacubQ==
oldschooljs@^2.5.1:
version "2.5.1"
resolved "https://registry.yarnpkg.com/oldschooljs/-/oldschooljs-2.5.1.tgz#d152841ad6690c66ad7f3e4e2db046c0f0b45010"
integrity sha512-MAJnQQcD3Ofq0GjLZ+ZrmeQ6VLw7p0I3bH42OZTxIHaEBX+z6UFVxDszj8wPRNKFwZxKDgLTXOAc5O7L3JR57w==
dependencies:
deepmerge "^4.3.1"
e "^0.2.32"
Expand Down

0 comments on commit 5cdf78e

Please sign in to comment.