Enable Semuta in public Richese Skills games
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
1972622c11
commit
b2b9a024bd
9 files changed
+285
-3
No files matched your search
@@ -4,6 +4,7 @@ import {
|
||||
viewGame, type Action, type Game, type Player,
|
||||
} from '../game/engine';
|
||||
import { TERRITORIES } from '../game/board';
|
||||
import { botGroundMoveAllowed, groundMoveRouteDistance } from '../game/bot-mobility';
|
||||
import { LEADER_SKILL_CARDS, type LeaderSkillId } from '../game/leader-skill-cards';
|
||||
import { validateLeaderSkills } from '../game/leader-skills';
|
||||
import { SEMUTA_DRUG_ID } from '../game/semuta-drug';
|
||||
@@ -145,6 +146,8 @@ function takeCard(game: Game, actor: string, identity: string): string {
|
||||
/** Genuine setup and original phase controls reach Movement. Only the conserved
|
||||
* board/hand position is staged: native forces return to their own reserves,
|
||||
* then five original counters per combatant and canonical cards change slots.
|
||||
* Advanced also stages one conserved Atreides reserve counter at Polar Sink;
|
||||
* its actual adjacent movement earns the immediate Hajr opportunity.
|
||||
* Wallets, printed leaders, skill training, turn, phase and module custody stay real. */
|
||||
export function createSemutaSkillsMentatFixture(advanced = false, tech = false, strongholds = false): SemutaSkillsMentatFixture {
|
||||
let game = initializeSemutaSkillsGame(advanced, tech, strongholds);
|
||||
@@ -180,6 +183,28 @@ export function createSemutaSkillsMentatFixture(advanced = false, tech = false,
|
||||
}
|
||||
const semuta = takeCard(game, 'r', SEMUTA_DRUG_ID), hajr = takeCard(game, 'a', 'hajr');
|
||||
const weapon = takeCard(game, 'e', 'Crysknife'), fallback = takeCard(game, 'e', 'Snooper');
|
||||
if (advanced) {
|
||||
const atreides = semutaSkillsPlayer(game, 'a');
|
||||
assert.ok(atreides.reserves > 0);
|
||||
atreides.reserves--;
|
||||
atreides.forces['polar_sink:0'] = 1;
|
||||
const own = viewGame(game, 'a'), seat = own.players.find(p => p.id === 'a')!;
|
||||
const from = 'polar_sink:0';
|
||||
const destination = TERRITORIES.filter(place => place.type === 'sand' &&
|
||||
!game.players.some(p => Object.keys(p.forces).some(key => key.startsWith(`${place.id}:`))) &&
|
||||
!Object.keys(game.spice).some(key => key.startsWith(`${place.id}:`) && game.spice[key] > 0))
|
||||
.flatMap(place => place.sectors.map(sector => ({territory: place.id, sector})))
|
||||
.find(place => groundMoveRouteDistance(own, seat, from, `${place.territory}:${place.sector}`) === 1 &&
|
||||
botGroundMoveAllowed(own, seat, from, `${place.territory}:${place.sector}`, 0));
|
||||
assert.ok(destination, 'The original staged force needs a clear adjacent movement.');
|
||||
game = applyAction(game, 'a', {type:'move', from, ...destination, amount:1, elite:0});
|
||||
for (let n=0; (game.phaseOpening || game.response || game.decision) && n<100; n++) {
|
||||
const next = nextRicheseSkillsTechNativeStep(game);
|
||||
game = applyAction(game, next.actor, next.action);
|
||||
}
|
||||
assert.equal(semutaSkillsPlayer(game, 'a').hajrWindow?.turn, game.turn);
|
||||
assert.equal(semutaSkillsPlayer(game, 'a').hajrWindow?.move, semutaSkillsPlayer(game, 'a').moved);
|
||||
}
|
||||
assertAdvancedNativeCustody(game);
|
||||
assert.deepEqual(semutaSkillsInventory(game), cards);
|
||||
for (const player of game.players) {
|
||||
|
||||
Reference in new issue
Block a user