Handle advisor conversion after worm rides
Verify and publish checkpoint container / container (push) Canceled after 0s
Verify and publish checkpoint container / container (push) Canceled after 0s
This commit is contained in:
1 parent
ad0abfef98
commit
c608d6fea6
15 files changed
+507
-14
No files matched your search
@@ -5,6 +5,7 @@ import {
|
||||
createGame,
|
||||
joinGame,
|
||||
newPlayer,
|
||||
initializeBaseGameForAudit,
|
||||
initializeHomeworldGameForAudit,
|
||||
normalizeAutomaticGame,
|
||||
viewGame,
|
||||
@@ -15,7 +16,7 @@ import { botActions } from '../game/bots';
|
||||
import { DIFFICULTIES } from '../game/bot-profiles';
|
||||
import { homeworldGameIntegrity } from '../game/homeworld-game';
|
||||
|
||||
function setup(reserves = 11, advanced = true, withKarama = true) {
|
||||
function setup(reserves = 11, advanced = true, withKarama = true, withHomeworlds = true) {
|
||||
let g = createGame(
|
||||
'SPIRITUALHOMEWORLD',
|
||||
newPlayer('atreides', 'Atreides', 'atreides'),
|
||||
@@ -23,10 +24,11 @@ function setup(reserves = 11, advanced = true, withKarama = true) {
|
||||
[],
|
||||
);
|
||||
joinGame(g, newPlayer('beneGesserit', 'Bene Gesserit', 'beneGesserit'));
|
||||
g = applyAction(g, g.host, { type: 'homeworlds', enabled: true });
|
||||
if (withHomeworlds)
|
||||
g = applyAction(g, g.host, { type: 'homeworlds', enabled: true });
|
||||
for (const player of g.players)
|
||||
g = applyAction(g, player.id, { type: 'ready' });
|
||||
g = initializeHomeworldGameForAudit(g);
|
||||
g = withHomeworlds ? initializeHomeworldGameForAudit(g) : initializeBaseGameForAudit(g);
|
||||
for (let i = 0; g.status === 'setup' && i < 30; i++) {
|
||||
let moved = false;
|
||||
for (const player of g.players) {
|
||||
@@ -219,11 +221,7 @@ void test('advisor group size rejects malformed requests before cards, reserves
|
||||
});
|
||||
|
||||
void test('absent Homeworld module preserves ordinary one-force accompaniment and rejects two', () => {
|
||||
const g = setup(11).g;
|
||||
// This parity fixture deliberately removes the whole optional module,
|
||||
// including its setup evidence; it does not represent a legal live action.
|
||||
g.homeworlds = null;
|
||||
delete g.homeworldOccupationHistory;
|
||||
const g = setup(11, true, true, false).g;
|
||||
const offered = ship(g);
|
||||
reject(offered, 'beneGesserit', {
|
||||
type: 'decision',
|
||||
|
||||
Reference in new issue
Block a user