step 10.14: done

This commit is contained in:
bepis
2026-10-23 05:54:46 +11:00
parent 32fb0eee9a
commit 2a79c4ea43
7 changed files with 263 additions and 71 deletions
+4 -4
View File
@@ -320,8 +320,8 @@ describe('shop', () => {
assert.equal(res.status, 200);
assert.equal(body.ok, true);
// Uncommon material sell: floor(4 * level / min_level) = floor(4 * 5 / 5) = 4
assert.equal(body.data.character.gold, 104); // 100 + 4
// Uncommon material sell: 4 * min_level = 4 * 5 = 20
assert.equal(body.data.character.gold, 120); // 100 + 20
});
it('sells uncommon material using rarity default', async () => {
@@ -339,8 +339,8 @@ describe('shop', () => {
assert.equal(res.status, 200);
assert.equal(body.ok, true);
// Uncommon material sell: floor(4 * 10 / 10) = 4
assert.equal(body.data.character.gold, 104); // 100 + 4
// Uncommon material sell: 4 * min_level = 4 * 10 = 40
assert.equal(body.data.character.gold, 140); // 100 + 40
});
it('rejects selling a non-material item', async () => {