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