18 lines
879 B
TypeScript
18 lines
879 B
TypeScript
import type { Action, GameView } from './engine';
|
|
|
|
/** All profiles obey the same seat-private legality, including promised cards
|
|
* and committed budgets. Held-card hints cannot override the projected offer. */
|
|
export function botNexusRicheseBetrayalActions(game: GameView): Action[] {
|
|
const reaction = game.richeseBetrayalReaction;
|
|
if (game.status !== 'playing' || !reaction?.event ||
|
|
!reaction.canPass || reaction.hasPassed) return [];
|
|
const own = game.players.find((player) => player.id === game.me);
|
|
if (!(own?.bot ?? own?.autopilot)) return [];
|
|
const blind = reaction.source === 'normal' || reaction.source === 'karama';
|
|
return [{
|
|
// Minimal policies keep the card instead of guessing a concealed ordinary lot.
|
|
type: !blind && reaction.canUse && !reaction.blocked ? 'richeseBetrayalUse' : 'richeseBetrayalPass',
|
|
event: reaction.event,
|
|
}];
|
|
}
|