Skip to content

Commit

Permalink
Remove max quantity from skotizo (and everywhere else) (#6192)
Browse files Browse the repository at this point in the history
  • Loading branch information
DayV-git authored Nov 21, 2024
1 parent 81a873c commit c90cd41
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 37 deletions.
3 changes: 1 addition & 2 deletions src/lib/minions/data/killableMonsters/chaeldarMonsters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,7 @@ export const chaeldarMonsters: KillableMonster[] = [
itemCost: { itemCost: new Bank().add('Dark totem', 1), qtyPerKill: 1 },
healAmountNeeded: 20 * 15,
attackStyleToUse: GearStat.AttackSlash,
attackStylesUsed: [GearStat.AttackSlash, GearStat.AttackMagic],
maxQuantity: 1
attackStylesUsed: [GearStat.AttackSlash, GearStat.AttackMagic]
},
{
id: Monsters.TzHaarKet.id,
Expand Down
1 change: 0 additions & 1 deletion src/lib/minions/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ export interface KillableMonster {
deathProps?: Omit<Parameters<typeof calculateSimpleMonsterDeathChance>['0'], 'currentKC'>;
diaryRequirement?: [DiaryID, DiaryTierName];
wildySlayerCave?: boolean;
maxQuantity?: number;
}
/*
* Monsters will have an array of Consumables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { PlayerOwnedHouse } from '@prisma/client';
import { clamp, increaseNumByPercent, reduceNumByPercent } from 'e';
import { increaseNumByPercent, reduceNumByPercent } from 'e';
import { Monsters } from 'oldschooljs';
import { mergeDeep } from 'remeda';
import z from 'zod';
Expand Down Expand Up @@ -166,10 +166,6 @@ export function newMinionKillCommand(args: MinionKillOptions) {
})
: null;

if (monster.maxQuantity) {
args.inputQuantity = clamp(args.inputQuantity ?? 1, 1, monster.maxQuantity);
}

const ephemeralPostTripEffects: PostBoostEffect[] = [];
const speedDurationResult = speedCalculations({
...args,
Expand Down
29 changes: 0 additions & 29 deletions tests/integration/pvm/pvm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,35 +260,6 @@ describe('PVM', async () => {
expect(user.bank.amount('Dark totem')).toBe(99);
});

describe('should default to 1 skotizo kill', async () => {
const user = await client.mockUser({
bank: new Bank().add('Dark totem', 5),
rangeLevel: 99,
QP: 300,
maxed: true,
meleeGear: resolveItems(["Verac's flail", "Black d'hide body", "Black d'hide chaps"])
});
let lastKc = await user.getKC(EMonster.SKOTIZO);
for (const quantity of [undefined, 1, 2, 5]) {
it(`should default to 1 skotizo kill with input of ${quantity}`, async () => {
await user.update({ bank: new Bank().add('Dark totem', 5).toJSON() });
expect(user.bank.amount('Dark totem')).toBe(5);
const result = await user.kill(EMonster.SKOTIZO, { quantity });
expect(result.activityResult!.q).toEqual(1);
expect(result.activityResult?.userID).toEqual(user.id);
expect(result.activityResult?.mi).toEqual(EMonster.SKOTIZO);
expect(result.commandResult).toContain('is now killing 1x Skotizo');
await user.sync();
expect(
result.newKC,
`LastKC=${lastKc} NewKC=${result.newKC} RawNEWKC=${await user.getKC(EMonster.SKOTIZO)}`
).toEqual(lastKc + 1);
expect(user.bank.amount('Dark totem')).toBe(4);
lastKc = result.newKC;
});
}
});

describe(
'should fail to kill skotizo with no totems',
async () => {
Expand Down

0 comments on commit c90cd41

Please sign in to comment.