'use client'; import { useId, useState } from 'react'; import Image from 'next/image'; import { Dialog as DialogPrimitive } from '@base-ui/react/dialog'; import { Eye, X } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Dialog, DialogClose, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from '@/components/ui/dialog'; import type { GameView } from '@/game/engine'; import { DUKE_VIDAL_RULES } from '@/game/duke-vidal'; import { specialLeaderArt } from '@/game/special-leader-art'; /** Original Ecaz medallion; identity and strength have equivalent HTML text. */ function VidalDisc({ large = false }: { large?: boolean }) { const gradient = useId(); return ( ); } /** Uses only the shared disc identity supplied by the public projection. */ function VidalPortrait({ id, name, large = false, }: { id?: string; name: string; large?: boolean; }) { const [failedSource, setFailedSource] = useState(null); const art = specialLeaderArt(id, name); if (!art || failedSource === art.src) return ; return ( setFailedSource(art.src)} className="h-full w-full object-cover" style={{ objectPosition: art.objectPosition }} /> ); } /** Read-only shared component. Custody comes exclusively from the public projection. */ export function DukeVidal({ game }: { game: GameView }) { const duke = game.dukeVidal; if (!duke) return null; const controller = duke.controller ? game.players.find((player) => player.id === duke.controller) : undefined; const status = duke.leader.dead ? 'In the Tanks' : duke.controller ? `Controlled by ${controller?.name ?? 'another player'}` : 'Set aside'; return (

Ecaz · shared leader · strength 6

Duke Prad Vidal

{status}

No Traitor Card

} aria-label="Inspect Duke Prad Vidal" >
Shared leader inspection } >

House Ecaz

{DUKE_VIDAL_RULES.name}
Leader strength
6
Current state
{status}

One shared disc. No Traitor Card.

{DUKE_VIDAL_RULES.summary} {DUKE_VIDAL_RULES.gameplay.map((paragraph) => (

{paragraph}

))}

Current support covers Moritani acquisition, direct Ecaz Ambassador acquisition or consensual alliance, battle use and death, and Ecaz-only paid or Ghola revival to living set-aside custody. Native ordinary-disc skills may coexist with the separate Duke without assigning him a skill. Unused Ecaz custody survives the turn; unused Moritani custody expires. Duke loans, reacquisition while already controlled, shared skill assignment and exceptional capture remain unfinished. Full Ecaz and Moritani games are unavailable. Inspection does not select a battle leader.

); }