Support Advanced native Homeworld return
Verify and publish checkpoint container / container (push) Successful in 11m10s
Verify and publish checkpoint container / container (push) Successful in 11m10s
This commit is contained in:
1 parent
1cf90f1328
commit
89569e92a1
14 files changed
+429
-39
No files matched your search
@@ -248,14 +248,34 @@ void test('Advanced Emperor may combine its two native origins and retains preci
|
||||
);
|
||||
});
|
||||
|
||||
void test('own and mutual ally destinations are rejected, including either Emperor world', () => {
|
||||
void test('Advanced may return an actual foreign garrison to either native Emperor World at the normal rate', () => {
|
||||
const { context, custody } = fixture();
|
||||
for (const destination of ['homeworld:emperor', 'homeworld:emperor:salusa'])
|
||||
rejected(context, custody, {
|
||||
...invasion,
|
||||
destination,
|
||||
sources: { 'homeworld:atreides': { normal: 1, elite: 0 } },
|
||||
for (const destination of ['homeworld:emperor', 'homeworld:emperor:salusa']) {
|
||||
const before = structuredClone({ context, custody });
|
||||
const result = quote(context, custody, {
|
||||
player: 'e', destination,
|
||||
sources: { 'homeworld:atreides': { normal: 4, elite: 1 } },
|
||||
});
|
||||
assert.equal(result.amount, 5);
|
||||
assert.equal(result.cost, 5);
|
||||
assert.equal(result.players[0].reserves, 20);
|
||||
assert.equal(result.players[0].eliteReserves, 5);
|
||||
assert.equal(result.state.visitors['homeworld:atreides'], undefined);
|
||||
const next = { ...context, players: result.players.map(p => ({ ...p, ally: null })) };
|
||||
assert.deepEqual(totals(next, result.state), totals(context, custody));
|
||||
assert.deepEqual({ context, custody }, before);
|
||||
}
|
||||
});
|
||||
|
||||
void test('Basic preserves the native return restriction and all modes reject a mutual ally destination', () => {
|
||||
const { context, custody } = fixture();
|
||||
const basic = { ...context, advanced: false };
|
||||
const basicCustody = { ...custody, salusa: null };
|
||||
rejected(basic, basicCustody, {
|
||||
...invasion,
|
||||
destination: 'homeworld:emperor',
|
||||
sources: { 'homeworld:atreides': { normal: 1, elite: 0 } },
|
||||
});
|
||||
context.players[0].ally = 'a';
|
||||
context.players[1].ally = 'e';
|
||||
rejected(context, custody, {
|
||||
|
||||
Reference in new issue
Block a user