Prototype Tleilaxu special Karama Truthtrance
Verify and publish checkpoint container / container (push) Successful in 11m6s
Verify and publish checkpoint container / container (push) Successful in 11m6s
This commit is contained in:
1 parent
5b8d510470
commit
cfccfe5acb
15 files changed
+391
-20
No files matched your search
@@ -63,7 +63,8 @@ const power = (claim: BattlePowerClaim = { kind: 'voice', use: true }): Expressi
|
||||
const windowSource = (effect: WindowCardEffect) => effect === 'karamaShipment'
|
||||
? JSON.stringify(['karamaShipment', 1, 'recipient', 'original']) : effect === 'karamaHarkonnenSpecial'
|
||||
? JSON.stringify(['karamaHarkonnenSpecial', 1, 'respondent']) : effect === 'karamaEmperorSpecial'
|
||||
? JSON.stringify(['karamaEmperorSpecial', 1, 'respondent']) : effect === 'karamaAtreidesSpecial'
|
||||
? JSON.stringify(['karamaEmperorSpecial', 1, 'respondent']) : effect === 'karamaTleilaxuSpecial'
|
||||
? JSON.stringify(['karamaTleilaxuSpecial', 1, 'respondent']) : effect === 'karamaAtreidesSpecial'
|
||||
? JSON.stringify(['karamaAtreidesSpecial', 1, 'respondent', 'battle:1', 'carthag']) : effect === 'karamaFremenSpecial'
|
||||
? JSON.stringify(['karamaFremenSpecial', 1, 'respondent']) : effect === 'karamaAuction' ? 'ordinary-auction:1:1' :
|
||||
effect === 'amal' ? 'phase-opening:1:2' : effect === 'thumper' ? 'first-spice-reveal:1' :
|
||||
@@ -1937,6 +1938,41 @@ void test('Emperor special No and source binding retain exact responder, turn an
|
||||
});
|
||||
|
||||
|
||||
void test('Tleilaxu special Karama window records only the original owner and phase after the answer', () => {
|
||||
const source = windowSource('karamaTleilaxuSpecial');
|
||||
const question = windowed(group('and', windowCard('karamaTleilaxuSpecial'), pay()));
|
||||
const signed = { kind: 'windowCardPlay', effect: 'karamaTleilaxuSpecial', source, answer: true };
|
||||
assert.deepEqual(branches(question), [[signed, signedPay()]]);
|
||||
const otherOwner = recordTurnActionWindowCardPlay([question], 'other', 1, 'karamaTleilaxuSpecial', source);
|
||||
assert.equal(otherOwner[0], question);
|
||||
const actual = recordTurnActionWindowCardPlay([question], 'respondent', 1, 'karamaTleilaxuSpecial', source);
|
||||
assert.deepEqual(branches(actual[0]), [[signedPay()]]);
|
||||
assert.equal(recordTurnActionPayment(actual, 'respondent', 1, payment())[0].fulfilled, true);
|
||||
assert.equal(question.windowCards!.karamaTleilaxuSpecial!.played, false);
|
||||
validateTurnActionPromises(actual, seats);
|
||||
const closed = closeTurnActionWindowCardPlay([question], 'respondent', 1, 'karamaTleilaxuSpecial', source);
|
||||
assert.equal(closed[0].windowCards!.karamaTleilaxuSpecial!.closed, true);
|
||||
assert.deepEqual(branches(closed[0]), []);
|
||||
});
|
||||
|
||||
void test('Tleilaxu special No and source binding retain exact responder, turn and old receipts', () => {
|
||||
const source = windowSource('karamaTleilaxuSpecial');
|
||||
const negative = windowed(windowCard('karamaTleilaxuSpecial'), false);
|
||||
assert.throws(() => recordTurnActionWindowCardPlay([negative], 'respondent', 1, 'karamaTleilaxuSpecial', source), TurnActionError);
|
||||
const passed = closeTurnActionWindowCardPlay([negative], 'respondent', 1, 'karamaTleilaxuSpecial', source);
|
||||
assert.equal(passed[0].fulfilled, true);
|
||||
for (const bad of ['', 'storm:1', JSON.stringify(['karamaTleilaxuSpecial', 0, 'respondent']),
|
||||
JSON.stringify(['karamaTleilaxuSpecial', 1, '']), JSON.stringify(['karamaTleilaxuSpecial', 1, 'respondent', 'extra'])])
|
||||
assert.throws(() => parseTurnActionLeaf({ kind: 'windowCardPlay', effect: 'karamaTleilaxuSpecial', source: bad }), TurnActionError);
|
||||
for (const bad of [JSON.stringify(['karamaTleilaxuSpecial', 2, 'respondent']),
|
||||
JSON.stringify(['karamaTleilaxuSpecial', 1, 'other'])])
|
||||
assert.throws(() => turnActionValue(windowed(windowCard('karamaTleilaxuSpecial', bad))), TurnActionError);
|
||||
const old = windowed(windowCard('karamaAuction'));
|
||||
assert.deepEqual(JSON.parse(JSON.stringify(old)), old);
|
||||
assert.doesNotThrow(() => validateTurnActionPromises([old], seats));
|
||||
});
|
||||
|
||||
|
||||
void test('Fremen special Karama window records only the original owner and phase after the answer', () => {
|
||||
const source = windowSource('karamaFremenSpecial');
|
||||
const question = windowed(group('and', windowCard('karamaFremenSpecial'), pay()));
|
||||
|
||||
Reference in new issue
Block a user