Enable paired Ecaz and Moritani Discovery preview
Verify and publish checkpoint container / container (push) Successful in 10m37s
Verify and publish checkpoint container / container (push) Successful in 10m37s
This commit is contained in:
1 parent
2ad7f127ec
commit
9ca68c9ff8
11 files changed
+212
-11
No files matched your search
@@ -13,15 +13,22 @@ function lobby(roster: FactionId[], expansions: string[], advanced = true): Game
|
||||
return game;
|
||||
}
|
||||
|
||||
void test('Discovery requires the selected native family and does not admit paired or mixed E3', () => {
|
||||
void test('Discovery requires the selected native family and does not admit unsupported mixed E3', () => {
|
||||
const unsupported = [
|
||||
lobby(['ixians', 'guild'], []),
|
||||
lobby(['richese', 'guild'], ['ix']),
|
||||
lobby(['ecaz', 'moritani', 'guild'], ['ecaz']),
|
||||
lobby(['ecaz', 'ixians', 'guild'], ['ecaz', 'ix']),
|
||||
lobby(['moritani', 'harkonnen', 'guild'], ['ecaz']),
|
||||
];
|
||||
for (const game of unsupported) assert.throws(() => initializeDiscoveryGameForAudit(game), RuleError);
|
||||
for (const advanced of [false, true]) {
|
||||
const paired = initializeDiscoveryGameForAudit(lobby(['ecaz', 'moritani', 'guild'], ['ecaz'], advanced));
|
||||
assert.equal(paired.discoveries?.tokens.length, 8);
|
||||
assert.equal(paired.status, 'setup');
|
||||
assert.deepEqual(paired.players.map(player => player.faction), ['ecaz', 'moritani', 'guild']);
|
||||
assert.equal(paired.nexusCards, undefined);
|
||||
assert.equal(paired.ecazTreachery, undefined);
|
||||
}
|
||||
// The Advanced Moritani/Harkonnen restriction is not a new Basic restriction.
|
||||
const basic = initializeDiscoveryGameForAudit(lobby(['moritani', 'harkonnen', 'guild'], ['ecaz'], false));
|
||||
assert.equal(basic.moritaniAssassinatePreview, undefined);
|
||||
@@ -41,6 +48,27 @@ void test('Discovery Tech requires three seats and untouched physical tokens', (
|
||||
assert.equal(initialized.discoveryEnabled, true);
|
||||
});
|
||||
|
||||
void test('paired E3 Discovery keeps the original optional-module seat and rules limits', () => {
|
||||
const factions: FactionId[] = ['ecaz', 'moritani', 'guild', 'atreides', 'emperor', 'beneGesserit'];
|
||||
for (const advanced of [false, true]) for (const count of [2, 3, 6]) {
|
||||
const game = lobby(factions.slice(0, count), ['ecaz'], advanced);
|
||||
if (count >= 3) game.techTokens = createTechTokens();
|
||||
if (advanced) game.strongholdCards = createStrongholdCards();
|
||||
const started = initializeDiscoveryGameForAudit(game);
|
||||
assert.equal(started.discoveries?.tokens.length, 8);
|
||||
assert.equal(!!started.techTokens, count >= 3);
|
||||
assert.equal(!!started.strongholdCards, advanced);
|
||||
}
|
||||
const twoWithTech = lobby(factions.slice(0, 2), ['ecaz']);
|
||||
twoWithTech.techTokens = createTechTokens();
|
||||
assert.throws(() => initializeDiscoveryGameForAudit(twoWithTech), RuleError);
|
||||
const basicStrongholds = lobby(factions.slice(0, 3), ['ecaz'], false);
|
||||
basicStrongholds.strongholdCards = createStrongholdCards();
|
||||
assert.throws(() => initializeDiscoveryGameForAudit(basicStrongholds), RuleError);
|
||||
assert.throws(() => initializeDiscoveryGameForAudit(lobby(['ecaz','moritani','harkonnen'], ['ecaz'], true)), RuleError);
|
||||
assert.ok(initializeDiscoveryGameForAudit(lobby(['ecaz','moritani','harkonnen'], ['ecaz'], false)).discoveries);
|
||||
});
|
||||
|
||||
void test('Discovery cannot redeal started components or silently remove another module', () => {
|
||||
const initial = lobby(['ixians', 'tleilaxu', 'guild'], ['ix']);
|
||||
const started = initializeDiscoveryGameForAudit(initial);
|
||||
|
||||
Reference in new issue
Block a user