Connect CHOAM Nexus Betrayal random discard
This commit is contained in:
1 parent
90c5c7af25
commit
0bf61c8067
12 files changed
+709
No files matched your search
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user