test(seed): follow the retuned trade-good drop chances

Commit 9391645 lowered the three common guaranteed trade goods from a certain
drop to 60% and left the rare Charred Raider Insignia at 100%, but the seed
test kept asserting 1.0000 for all four and has been failing since.

Asserts the real per-item value instead of one shared constant, so the next
retune fails on the number that actually changed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Bastian Wagner
2026-08-23 09:08:31 +02:00
parent 2c96163a03
commit c25397b544

View File

@@ -589,20 +589,28 @@ describe('seedVisibleVerticalSlice', () => {
expect(lootTableRepository.rows).toHaveLength(4);
expect(lootEntryRepository.rows).toHaveLength(12);
// Every Burned Road enemy guarantees exactly one trade good (spec §5).
const guaranteedTradeGoods: Array<[string, string]> = [
[ASH_RAT_LOOT_TABLE_ID, ITEM_IDS['ash-pelt']],
[WILD_ROAD_DOG_LOOT_TABLE_ID, ITEM_IDS['tough-hide']],
[ROAD_BANDIT_LOOT_TABLE_ID, ITEM_IDS['bandit-insignia']],
[CHARRED_LOOTER_LOOT_TABLE_ID, ITEM_IDS['charred-raider-insignia']],
// Every Burned Road enemy carries exactly one trade good as its first
// entry (spec §5). The three common ones were retuned from a guaranteed
// drop to 60%; the rare Charred Raider Insignia stayed certain, because a
// 2%-weight encounter that then withholds its reward is just a lost trip.
const tradeGoodDropChances: Array<[string, string, string]> = [
[ASH_RAT_LOOT_TABLE_ID, ITEM_IDS['ash-pelt'], '0.6000'],
[WILD_ROAD_DOG_LOOT_TABLE_ID, ITEM_IDS['tough-hide'], '0.6000'],
[ROAD_BANDIT_LOOT_TABLE_ID, ITEM_IDS['bandit-insignia'], '0.6000'],
[
CHARRED_LOOTER_LOOT_TABLE_ID,
ITEM_IDS['charred-raider-insignia'],
'1.0000',
],
];
for (const [lootTableId, itemDefinitionId] of guaranteedTradeGoods) {
for (const [lootTableId, itemDefinitionId, dropChance] of
tradeGoodDropChances) {
expect(lootEntryRepository.rows).toEqual(
expect.arrayContaining([
expect.objectContaining({
lootTableId,
itemDefinitionId,
dropChance: '1.0000',
dropChance,
minQuantity: 1,
maxQuantity: 1,
enabled: true,