'use client'; import type { Action, GameView } from '@/game/engine'; import { truthQuestionText } from '@/game/truthtrance'; import { CHEAP_HERO_TRAITOR } from '@/game/traitors'; import { Button } from './ui/button'; /** Only the whole question, its answer and current status are projected. */ export function MixedRicheseBidPromises(props: { game: GameView; busy: boolean; send: (action: Action) => void }) { const game = props.game; const own = game.mixedRicheseBidPromises.filter(promise => promise.player === game.me); if (!own.length) return null; const leaderName = (id: string) => id === 'kwisatz' ? 'Kwisatz Haderach' : id === CHEAP_HERO_TRAITOR ? 'Cheap Hero / Heroine' : game.allLeaders.find(leader => leader.id === id)?.name ?? id; const auction = game.richeseAuction, guide = game.richeseBidPromiseGuide; const live = !!auction && own.some(promise => promise.turn === game.turn && promise.event === auction.event && !promise.fulfilled && !promise.released); const action = guide?.action, signature = action && JSON.stringify(action); const progress = action?.earlyRicheseBidPromiseId !== undefined && auction ? JSON.stringify([auction.active,auction.bid,auction.bidder,auction.acted,auction.submitted,auction.ownBid]) : null; const isCurrentGuide = () => { if (props.game !== game || !auction || game.richeseAuction !== auction || !guide || game.richeseBidPromiseGuide !== guide || !action || guide.action !== action || JSON.stringify(action) !== signature || action.type !== 'richeseBid' || action.event !== auction.event || (progress !== null && JSON.stringify([auction.active,auction.bid,auction.bidder, auction.acted,auction.submitted,auction.ownBid]) !== progress) || typeof action.richeseBidPromiseId !== 'string') return false; if (action.phaseAnyBidPromiseEvent !== undefined && (typeof action.phaseAnyBidPromiseEvent !== 'string' || action.phaseAnyBidLotEvent !== auction.event || !game.phaseAnyBidPromises.some(promise => promise.event === action.phaseAnyBidPromiseEvent && promise.player === game.me && promise.turn === game.turn && !promise.fulfilled && !promise.released))) return false; if (action.earlyRicheseBidPromiseId !== undefined && (typeof action.earlyRicheseBidPromiseId !== 'string' || !game.ownEarlyRicheseBidPromises.some(promise => promise.id === action.earlyRicheseBidPromiseId && promise.player === game.me && promise.turn === game.turn && !promise.boundEvent && !promise.fulfilled && !promise.released))) return false; return game.mixedRicheseBidPromises.some(promise => promise.player === game.me && promise.id === action.richeseBidPromiseId && promise.turn === game.turn && promise.event === auction.event && !promise.fulfilled && !promise.released); }; const canGuide = () => !props.busy && isCurrentGuide(); return

Your mixed Richese bid promises

Current facts are evaluated when you answer; they do not require you to keep cards, spice or forces afterward. AND requires every condition; OR requires at least one. No negates the whole expression. The original bidding, funding and payment rules still apply. Silent bids remain private until the native reveal.

{live && !guide &&

Your remaining bid opportunity may still be ahead; the answer stays visible while the lot continues.

} {live && isCurrentGuide() && }
; }