Connect CHOAM Nexus Betrayal random discard

This commit is contained in:
Quintine committed 2026-09-27 21:54:55 +10:00
1 parent 90c5c7af25
commit 0bf61c8067
12 files changed
+709

No files matched your search

+2
View File
@@ -29,6 +29,7 @@ import { DiscoveryPanel, DiscoveryDiscardDecision } from './discoveries';
import { DiscoveryEntryDecision } from './discovery-entry';
import { DiscoveryStormDecision } from './discovery-storm';
import { NexusChoamTrade } from './nexus-choam-trade';
import { NexusChoamBetrayal } from './nexus-choam-betrayal';
import { NexusMoritaniBetrayal } from './nexus-moritani-betrayal';
import { buildRevision, buildRevisionLabel } from '@/lib/build-revision';
import { NexusEcazBetrayal } from './nexus-ecaz-betrayal';
@@ -1587,6 +1588,7 @@ export function GameTable({
<RihaniHistory game={g} />
<MentatHistory game={g} />
<NexusChoamTrade game={g} act={act} busy={transportBusy || (!!g.roomControl?.paused || !!g.roomControl?.closed) || !!me.autopilot} />
<NexusChoamBetrayal game={g} act={act} busy={transportBusy || !!g.roomControl?.paused || !!g.roomControl?.closed || !!me.autopilot} />
<NexusMoritaniBetrayal game={g} act={act} busy={transportBusy || !!g.roomControl?.paused || !!g.roomControl?.closed || !!me.autopilot} />
<NexusEcazBetrayal game={g} act={act} busy={transportBusy || !!g.roomControl?.paused || !!g.roomControl?.closed || !!me.autopilot} />
<NexusTleilaxu game={g} act={act} busy={transportBusy || (!!g.roomControl?.paused || !!g.roomControl?.closed) || !!me.autopilot} />
+41
View File
@@ -0,0 +1,41 @@
'use client';
import type { Action, GameView } from '@/game/engine';
import { nexusChoamBetrayalAction } from '@/game/nexus-choam-betrayal-options';
import { Button } from '@/components/ui/button';
export function NexusChoamBetrayal({
game,
act,
busy,
}: {
game: GameView;
act: (action: Action) => void;
busy: boolean;
}) {
const offer = game.nexusChoamBetrayal;
if (!offer || game.nexusCards?.card !== 'choam') return null;
const action = nexusChoamBetrayalAction(game);
const disabled = busy || !action;
return (
<section className="min-w-0 space-y-3" aria-label="CHOAM Nexus Betrayal">
<h3 className="font-serif text-xl">CHOAM Betrayal</h3>
<p className="text-base leading-7">
Spend your CHOAM Nexus card to make {offer.target.name} discard one
uniformly random held Treachery card.{' '}
{offer.target.handSize !== null &&
`CHOAM holds ${offer.target.handSize} ${offer.target.handSize === 1 ? 'card' : 'cards'} during Bidding. `}
You do not choose or see the card before the ordinary discard reveal.
CHOAM receives no spice.
</p>
{offer.blocked && <p className="notice">{offer.blocked}</p>}
<Button
className="game-action min-h-11 whitespace-normal"
disabled={disabled}
onClick={() => { if (!disabled && action) act(action); }}
>
Spend CHOAM Nexus for random discard
</Button>
</section>
);
}