Fix shop action costs and pass semantics.
Only buying costs gold; selling and trading (Triple) are free. Pass is now a final action, legal only at or under the pet limit: it forfeits remaining gold and ends that player's shopping for the round, with the shop closing once everyone has passed. That makes the separate cleanup phase unreachable (you sell down in-shop before passing), so it is removed. The client asks for confirmation before passing, and the bot knows buys are the only coin sink, when passing is legal, and that it must sell down before it can pass.
This commit is contained in:
@@ -102,7 +102,7 @@ export function Table({ session, onLeave }: { session: Session; onLeave: () => v
|
||||
)}
|
||||
<span className="topbar-name">{p.name}</span>
|
||||
<span className="chip">🏆 {p.trophies}</span>
|
||||
{(view.phase === 'shop' || view.phase === 'cleanup') && (
|
||||
{view.phase === 'shop' && (
|
||||
<span className="chip">🪙 {p.coins}</span>
|
||||
)}
|
||||
</div>
|
||||
@@ -119,9 +119,7 @@ export function Table({ session, onLeave }: { session: Session; onLeave: () => v
|
||||
<div className="table-body">
|
||||
<main className="table-main">
|
||||
{view.phase === 'lobby' && <Lobby view={view} />}
|
||||
{(view.phase === 'shop' || view.phase === 'cleanup') && (
|
||||
<ShopPhase view={view} you={you} send={send} />
|
||||
)}
|
||||
{view.phase === 'shop' && <ShopPhase view={view} you={you} send={send} />}
|
||||
{view.phase === 'arrange' && <ArrangePhase view={view} you={you} send={send} />}
|
||||
{view.phase === 'battle' && (
|
||||
<BattlePhase view={view} send={send} step={step} setStep={setStep} />
|
||||
@@ -138,10 +136,7 @@ export function Table({ session, onLeave }: { session: Session; onLeave: () => v
|
||||
)}
|
||||
{error && <div className="toast">{error}</div>}
|
||||
{view.debug && (
|
||||
<DebugPanel
|
||||
canGrant={view.phase === 'shop' || view.phase === 'cleanup'}
|
||||
send={send}
|
||||
/>
|
||||
<DebugPanel canGrant={view.phase === 'shop'} send={send} />
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user