Support mixed-deck Emperor gifts at Ix openings
Verify and publish checkpoint container / container (push) Successful in 10m47s
Verify and publish checkpoint container / container (push) Successful in 10m47s
This commit is contained in:
1 parent
0c64d320ea
commit
66c563be71
7 files changed
+204
-14
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import {applyAction,createGame,initializeHarkonnenNexusBetrayalGameForAudit,joinGame,newPlayer,viewGame,type Action,type Game} from '../game/engine';
|
||||
import {botActions} from '../game/bots';
|
||||
import {botSemutaActions} from '../game/bot-semuta';
|
||||
import {TERRITORIES} from '../game/board';
|
||||
|
||||
export type HarkonnenBetrayalFixtureOptions = {initial?:Game;advanced?:boolean;remote?:boolean;face?:'harkonnen'|'richese';secondFace?:'harkonnen'|'richese'|'guild';receiverCount?:1|2;seatIds?:string[]};
|
||||
@@ -24,6 +25,13 @@ export function nextHarkonnenBetrayalNativeStep(game:Game):HarkonnenBetrayalNati
|
||||
const phase=game.nexusCards.phase,actor=phase.eligible.find(id=>!phase.done.includes(id))!;
|
||||
return {actor,action:{type:'nexusCardChoice',turn:phase.turn,card:game.nexusCards.cards!.hands[actor],choice:'keep',ownRedraws:0}};
|
||||
}
|
||||
if(game.pendingTreacheryDiscard?.reaction) {
|
||||
for(const player of game.players) {
|
||||
const action=botSemutaActions(viewGame(game,player.id))[0];
|
||||
if(action) return {actor:player.id,action};
|
||||
}
|
||||
throw new Error('The original Semuta reaction has no legal acknowledgement.');
|
||||
}
|
||||
if(game.pendingTreacheryDiscard) return {actor:game.players[0].id,action:{type:'advanceBots'}};
|
||||
if(game.response) return {actor:game.players.find(p=>!game.response!.passed.includes(p.id))!.id,action:{type:'passResponse'}};
|
||||
if(game.phaseOpening) return {actor:game.players.find(p=>!game.phaseOpening!.passed.includes(p.id))!.id,action:{type:'ready'}};
|
||||
|
||||
Reference in new issue
Block a user