From d360520964737cb260a006b4850b2132f62ccf08 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 18 Nov 2026 22:08:52 +0000 Subject: [PATCH] Clarify bank lots and amounts and place harbor alongside bank --- viewer/scripts/offshore-smoke.mjs | 16 ++++-- viewer/src/components/Game.vue | 25 +++++++--- viewer/src/components/OffshoreBank.vue | 65 +++++++++++++++---------- viewer/src/localization/da.json | 5 +- viewer/src/localization/de.json | 5 +- viewer/src/localization/el.json | 5 +- viewer/src/localization/en.json | 5 +- viewer/src/localization/fa.json | 5 +- viewer/src/localization/fr.json | 5 +- viewer/src/localization/hi.json | 5 +- viewer/src/localization/it.json | 5 +- viewer/src/localization/ko.json | 5 +- viewer/src/localization/nl.json | 5 +- viewer/src/localization/pl.json | 5 +- viewer/src/localization/pt-BR.json | 5 +- viewer/src/localization/ro.json | 5 +- viewer/src/localization/ru.json | 5 +- viewer/src/localization/vi.json | 5 +- viewer/src/localization/zh-CN.json | 5 +- viewer/src/localization/zh-TW.json | 5 +- viewer/tests/unit/offshore-bank.spec.ts | 42 +++++++++++++++- 21 files changed, 178 insertions(+), 55 deletions(-) diff --git a/viewer/scripts/offshore-smoke.mjs b/viewer/scripts/offshore-smoke.mjs index 5f66b80..b4ea0f0 100644 --- a/viewer/scripts/offshore-smoke.mjs +++ b/viewer/scripts/offshore-smoke.mjs @@ -73,7 +73,16 @@ try { await page.waitForSelector('.offshore-bank .offshore-lot', { state: 'attached' }); assert.equal(await page.locator('.offshore-bank .offshore-lot').count(), 6); assert.equal(await page.locator('text=OPTIONAL EXPANSION').count(), 0); + const lotBounds = await page.locator('.offshore-lot[data-type="containers"][data-lot="2"]').boundingBox(); + const pierBounds = await page.locator('.bank-piers').boundingBox(); + assert.ok(pierBounds.x >= lotBounds.x + lotBounds.width, 'harbor is beside the bank lots'); + assert.ok(pierBounds.x - lotBounds.x - lotBounds.width < 12, 'harbor joins the bank, not a distant area'); + assert.equal(await page.getByText('BANK HARBOR', { exact: true }).count(), 0); await page.locator('.offshore-lot[data-type="containers"][data-lot="2"]').click(); + assert.equal( + (await page.locator('.bank-bid-guidance').textContent()).trim(), + 'Bid cash to win these containers.' + ); const calculator = page.locator('[data-tutorial="bank-bid"]'); await calculator.focus(); await calculator.press('9'); @@ -89,10 +98,9 @@ try { assert.equal(bid.at(-1).data.lot, 2); for (const action of bid) state = engine.move(state, action, player); await push(); - assert.match( - await page.locator('.offshore-lot[data-type="containers"][data-lot="2"]').locator('..').textContent(), - /\$2/ - ); + assert.match(await page.locator('.bank-bid-amount').textContent(), /^2/); + assert.equal(await page.locator('.bank-bid-amount').getAttribute('font-size'), '16'); + assert.ok(!(await page.locator('.bank-bid-amount').textContent()).includes('$')); // A fresh turn fixture: calling the bank twice in one turn is illegal. state = engine.setup(3, { offshoreIsland: true }, 'offshore-browser'); diff --git a/viewer/src/components/Game.vue b/viewer/src/components/Game.vue index 3d0cf11..a57e636 100644 --- a/viewer/src/components/Game.vue +++ b/viewer/src/components/Game.vue @@ -205,9 +205,10 @@ - - - {{ bankDraft.type === 'cash' ? 'Offer cargo' : 'Offer cash' }} · Lot {{ bankDraft.lot + 1 }} + + + {{ bankDraft.type === 'cash' ? 'Offer cargo' : 'Offer cash' }} · Lot + {{ ['I', 'II', 'III'][bankDraft.lot] }} + + + {{ + bankDraft.type === 'cash' + ? 'Bid containers to win this cash.' + : 'Bid cash to win these containers.' + }} - OFFSHORE BANK + OFFSHORE BANK + + Lot order: payments start at I, then cycle through II and III, skipping active auctions. + + {{ + label + }} +