Prototype Moritani Nexus Betrayal token return
This commit is contained in:
1 parent
066aeab207
commit
5c1c944a4f
10 files changed
+220
-7
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import type { Action, GameView } from './engine';
|
||||
|
||||
export function moritaniBetrayalAction(game: GameView, token: string): Action | null {
|
||||
const offer = game.nexusMoritaniBetrayal;
|
||||
if (!offer || offer.blocked || game.nexusCards?.card !== 'moritani' ||
|
||||
game.automaticContinuationPending || !offer.tokens.some(choice => choice.id === token)) return null;
|
||||
return { type: 'nexusMoritaniBetrayal', event: offer.event, token };
|
||||
}
|
||||
|
||||
export function moritaniBetrayalBotActions(game: GameView): Action[] {
|
||||
const token = game.nexusMoritaniBetrayal?.tokens[0];
|
||||
const action = token ? moritaniBetrayalAction(game, token.id) : null;
|
||||
return action ? [action] : [];
|
||||
}
|
||||
Reference in new issue
Block a user