Skip to content

Commit

Permalink
Update prices & tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nwjgit committed Feb 21, 2024
1 parent 8255e8e commit 559e047
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 69 deletions.
10 changes: 5 additions & 5 deletions src/lib/data/buyables/buyables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ const questBuyables: Buyable[] = [
name: 'Berserker helm',
gpCost: 780_000,
qpRequired: 60,
ironmanPrice: 78_000
ironmanPrice: 98_000
},
{
name: 'Archer helm',
Expand Down Expand Up @@ -795,7 +795,7 @@ const Buyables: Buyable[] = [
{
name: 'Bucket',
gpCost: 30,
ironmanPrice: 5
ironmanPrice: 10
},
{
name: 'Cup of hot water',
Expand Down Expand Up @@ -891,7 +891,7 @@ const Buyables: Buyable[] = [
{
name: 'Steel pickaxe',
gpCost: 2000,
ironmanPrice: 500
ironmanPrice: 600
},
{
name: 'Mithril pickaxe',
Expand Down Expand Up @@ -961,7 +961,7 @@ const Buyables: Buyable[] = [
{
name: 'Adamant halberd',
gpCost: 100_000,
ironmanPrice: 9600,
ironmanPrice: 50_000,
qpRequired: 150,
skillsNeeded: soteSkillRequirements
},
Expand Down Expand Up @@ -1116,7 +1116,7 @@ for (const cape of allTeamCapes) {
Buyables.push({
name: cape.name,
outputItems: new Bank().add(cape.id),
gpCost: 5000
gpCost: 15_000
});
}

Expand Down
12 changes: 6 additions & 6 deletions tests/integration/commands/sacrifice.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ describe('Sacrifice Command', async () => {
expect(result).toEqual(
`${Emoji.Incinerator} **Your Sacrifice Stats** ${Emoji.Incinerator}\n\n` +
`**Current Minion Icon:** ${Emoji.Minion}\n` +
'**Sacrificed Value:** 1,635 GP\n' +
'**Sacrificed Value:** 1,922 GP\n' +
'**Unique Items Sacrificed:** 2 items'
);
});

test('No items provided', async () => {
const result = await user.runCommand(sacrificeCommand, { items: 'aaaa' });
expect(result).toEqual('No items were provided.\nYour current sacrificed value is: 1,635 (1.64k)');
expect(result).toEqual('No items were provided.\nYour current sacrificed value is: 1,922 (1.92k)');
});

test('Successful', async () => {
await user.addItemsToBank({ items: new Bank().add('Trout').add('Coal', 10) });
const result = await user.runCommand(sacrificeCommand, { items: '1 trout, 10 coal' });
expect(result).toEqual(
'You sacrificed 10x Coal, 1x Trout, with a value of 1,635gp (1.64k). Your total amount sacrificed is now: 3,270. '
'You sacrificed 10x Coal, 1x Trout, with a value of 1,922gp (1.92k). Your total amount sacrificed is now: 3,844. '
);
const stats = await user.fetchStats({ sacrificed_bank: true });
expect(user.bank.equals(new Bank())).toBe(true);
expect(new Bank(stats.sacrificed_bank as ItemBank).equals(new Bank().add('Coal', 20).add('Trout', 2))).toBe(
true
);
expect(user.user.sacrificedValue).toEqual(BigInt(3270));
expect(user.user.sacrificedValue).toEqual(BigInt(3844));
const clientSettings = await mahojiClientSettingsFetch({ economyStats_sacrificedBank: true });
expect(
new Bank(clientSettings.economyStats_sacrificedBank as ItemBank).equals(
Expand All @@ -49,15 +49,15 @@ describe('Sacrifice Command', async () => {
await user.addItemsToBank({ items: new Bank().add('Trout').add('Cake') });
const res = await user.runCommand(sacrificeCommand, { items: '1 trout, 1 cake' });
expect(res).toEqual(
'You sacrificed 1x Trout, 1x Cake, with a value of 206gp (206). Your total amount sacrificed is now: 3,476. '
'You sacrificed 1x Trout, 1x Cake, with a value of 169gp (169). Your total amount sacrificed is now: 4,013. '
);
await user.sync();
expect(user.bank.equals(new Bank())).toBe(true);
const stats2 = await user.fetchStats({ sacrificed_bank: true });
expect(
new Bank(stats2.sacrificed_bank as ItemBank).equals(new Bank().add('Coal', 20).add('Trout', 3).add('Cake'))
).toBe(true);
expect(user.user.sacrificedValue).toEqual(BigInt(3476));
expect(user.user.sacrificedValue).toEqual(BigInt(4013));

const clientSettings2 = await mahojiClientSettingsFetch({ economyStats_sacrificedBank: true });
expect(
Expand Down
Loading

0 comments on commit 559e047

Please sign in to comment.