Compose World Skills cards with selected ordinary decks
This commit is contained in:
1 parent
b9330d489e
commit
01985af36b
36 files changed
+1201
-283
No files matched your search
@@ -7,6 +7,7 @@ import { nativeShipmentSources } from '../game/homeworld-options';
|
||||
import { homeworldShipmentChoice } from '../game/homeworld-shipment-options';
|
||||
import { forceRevivalQuote } from '../game/revival';
|
||||
import { RECRUITS_CARD_ID } from '../game/recruits';
|
||||
import type { IndependentCardModulesOptions } from './fixture-independent-card-modules';
|
||||
import { createIndependentCardModulesFixture } from './fixture-independent-card-modules';
|
||||
import { nextHarassHomeworldStep } from './fixture-harass-homeworld';
|
||||
import { takeHarassCard } from './fixture-harass-withdraw';
|
||||
@@ -90,13 +91,17 @@ export function createNativeWorldRecruitsFixture(options: {
|
||||
imperialCasualties?: boolean;
|
||||
tech?: boolean;
|
||||
strongholds?: boolean;
|
||||
/** Default off; preferred cards are genuine original offers, not assignments. */
|
||||
skills?: boolean;
|
||||
training?: IndependentCardModulesOptions['training'];
|
||||
} = {}): NativeWorldRecruitsFixture {
|
||||
const native = options.faction ?? 'ixians';
|
||||
const advanced = options.advanced ?? false;
|
||||
const tech = options.tech ?? false, strongholds = options.strongholds ?? false;
|
||||
assert.ok(!strongholds || advanced, 'Original Stronghold Cards require Advanced');
|
||||
const setup = createIndependentCardModulesFixture({ advanced,
|
||||
homeworlds: true, tech, strongholds, factions: ['emperor', native, 'guild'],
|
||||
homeworlds: true, tech, strongholds, skills: options.skills, training: options.training,
|
||||
factions: ['emperor', native, 'guild'],
|
||||
expansions: native === 'ixians' || native === 'tleilaxu' ? ['ix'] : ['choam'] });
|
||||
let game = setup.game;
|
||||
const afterSetup = structuredClone(game), steps = [...setup.steps];
|
||||
@@ -109,7 +114,8 @@ export function createNativeWorldRecruitsFixture(options: {
|
||||
assert.ok(Object.values(game.strongholdCards.owners).every(owner => owner === null),
|
||||
'Only original end-Mentat may earn Stronghold Cards');
|
||||
}
|
||||
for (const [name, value] of [['Nexus Cards', game.nexusCards], ['Leader Skills', game.leaderSkills],
|
||||
assert.equal(!!game.leaderSkills, options.skills ?? false);
|
||||
for (const [name, value] of [['Nexus Cards', game.nexusCards],
|
||||
['Discovery', game.discoveryEnabled]] as const)
|
||||
assert.equal(value, undefined, `${name} must stay outside a native World Recruits programme`);
|
||||
const visitor = 'emperor', owner = visitor;
|
||||
@@ -121,6 +127,8 @@ export function createNativeWorldRecruitsFixture(options: {
|
||||
const staging = ['Return original setup hands to the unopened Treachery deck; no weapon or defense is used.'];
|
||||
if (tech || strongholds)
|
||||
staging.push('Select requested unused original Tech/Advanced Strongholds before readiness; native first Storm assigns tokens and actual end-Mentat earns cards. No owner or income receipt is assigned.');
|
||||
if (options.skills)
|
||||
staging.push('Select the original all14 Skills lottery before initialization and assign actual offered cards; no live Skill or World state is replaced.');
|
||||
for (const player of game.players) { game.deck.push(...player.hand); player.hand = []; }
|
||||
for (let i = 0; i < (game.advanced ? 4 : 2); i++) {
|
||||
const at = game.spiceDeck.findIndex((card, index) => index >= i && 'territory' in card && !card.discovery);
|
||||
|
||||
Reference in new issue
Block a user