From e70cd4817275cbc39c8a197274e9f8fedd948afe Mon Sep 17 00:00:00 2001 From: Quintine <15965533+Quintine@users.noreply.github.com> Date: Sun, 18 Oct 2026 03:21:44 +1100 Subject: [PATCH] feat: support provisional paid Black Market retention --- components/richese-auctions.tsx | 93 ++++---- docs/BUREAUCRAT_PAYMENTS.md | 13 ++ docs/CURRENT_STATUS.md | 21 ++ docs/IMPLEMENTATION_STATUS.md | 28 +++ docs/LEADER_SKILLS_RUNTIME.md | 15 ++ docs/NEXUS_EMPEROR_RULES.md | 11 +- docs/RICHESE_AUCTION_RULES.md | 70 +++++- docs/RULE_DECISIONS.md | 28 ++- game/auction-continuation-quote.ts | 5 +- game/engine.ts | 51 +++-- game/reference.ts | 22 +- game/richese-settlement.ts | 16 +- tests/fixture-bureaucrat-richese-funding.ts | 6 +- ...fixture-richese-self-purchase-full-hand.ts | 105 +++++++++ tests/fixture-richese-self-purchase.ts | 98 ++++++++ tests/nexus-emperor-seller-purchase.test.ts | 1 - tests/richese-auction-bots.test.ts | 15 -- tests/richese-engine.test.ts | 9 +- tests/richese-self-purchase-rounds.test.ts | 216 ++++++++++++++++++ tests/richese-self-purchase-silent.test.ts | 165 +++++++++++++ tests/richese-settlement-preflight.test.ts | 25 -- 21 files changed, 862 insertions(+), 151 deletions(-) create mode 100644 tests/fixture-richese-self-purchase-full-hand.ts create mode 100644 tests/fixture-richese-self-purchase.ts create mode 100644 tests/richese-self-purchase-rounds.test.ts create mode 100644 tests/richese-self-purchase-silent.test.ts diff --git a/components/richese-auctions.tsx b/components/richese-auctions.tsx index 1250517c..289c9537 100644 --- a/components/richese-auctions.tsx +++ b/components/richese-auctions.tsx @@ -310,8 +310,6 @@ export function RicheseAuctionLot({ game, act, busy }: Props) { ...part, }); const ownPayment = amount - allyPayment; - const sellerBlocked = - auction.source === 'blackMarket' && auction.owner === me; const allowedTurn = !auction.outcome && auction.eligible.includes(me) && @@ -324,8 +322,7 @@ export function RicheseAuctionLot({ game, act, busy }: Props) { allyPayment >= 0 && allyPayment <= auction.allyAvailable && ownPayment >= 0 && - ownPayment <= auction.ownAvailable && - (!sellerBlocked || amount === 0); + ownPayment <= auction.ownAvailable; const name = (player: string | null) => game.players.find((p) => p.id === player)?.name ?? 'Player'; const send = (bid: number | null, ally: number) => { @@ -367,6 +364,14 @@ export function RicheseAuctionLot({ game, act, busy }: Props) {

{name(auction.owner)} is selling. Karama cannot acquire this card.

+ {auction.source === 'blackMarket' && ( +

+ Provisional paid self-purchase: if the seller wins a positive bid, they + retain this same card and pay the Emperor, or the Bank if absent. It + counts as one sale and needs no additional hand space. An unbid card + stays free and unsold. +

+ )} {auction.claim && (

Seller’s public claim: {auction.claim}

)} @@ -404,59 +409,49 @@ export function RicheseAuctionLot({ game, act, busy }: Props) { Available funding: {auction.ownAvailable} own spice and{' '} {auction.allyAvailable} pledged spice.

- {sellerBlocked && ( -

- Positive Black Market bids by the seller are not supported.{' '} - {silent ? 'Submit zero to continue.' : 'Pass to continue.'} -

- )} - {!sellerBlocked && ( + + update({ amount: event.target.value })} + /> + {auction.allyAvailable > 0 && ( <> - + update({ amount: event.target.value })} + onChange={(event) => update({ ally: event.target.value })} /> - {auction.allyAvailable > 0 && ( - <> - - update({ ally: event.target.value })} - /> - - )} -

- {canBid - ? `Payment if you win: ${ownPayment} own spice + ${allyPayment} ally spice.` - : 'Choose a valid bid and funding split within the available spice.'}{' '} - {silent - ? 'Your submitted amount stays private until all bids are in and cannot be changed.' - : 'Raise the current bid or pass.'} -

- )} +

+ {canBid + ? `Payment if you win: ${ownPayment} own spice + ${allyPayment} ally spice.` + : 'Choose a valid bid and funding split within the available spice.'}{' '} + {silent + ? 'Your submitted amount stays private until all bids are in and cannot be changed.' + : 'Raise the current bid or pass.'} +

+