'use client'; import type {Action, GameView} from '@/game/engine'; /** A public, balance-independent opportunity for the Emperor's ally gift. */ export function EmperorGuildRatePriority({game, act, busy}: { game: Pick; act: (action:Action) => void; busy: boolean; }) { const priority = game.emperorGuildRatePriority; if (!priority) return null; const event = priority.event; const recipient = game.players.find(player => player.id === priority.recipient)?.name ?? 'their ally'; const canContinue = () => !busy && game.emperorGuildRatePriority === priority && priority.canContinue && priority.event === event && typeof event === 'string' && event.length > 0; return

Emperor alliance opportunity

Before the Guild rate response continues, the Emperor may share spice with {recipient}.

{priority.canContinue ? :

Waiting for the Emperor to continue.

}
; }