Connect printed flight and poison plays to Truthtrance
This commit is contained in:
1 parent
b02839ce2a
commit
6a0fba860d
17 files changed
+963
-41
No files matched your search
@@ -94,6 +94,26 @@ void test('Semuta future-use questions require completed physical exchange witho
|
||||
}
|
||||
});
|
||||
|
||||
void test('Ornithopter and Residual Poison questions name actual native play and the proper deadline without chosen details', () => {
|
||||
const game = fixture();
|
||||
for (const effect of ['ornithopter', 'residualPoison'] as const) {
|
||||
const action = { kind: 'cardPlay' as const, effect };
|
||||
const question: TruthQuestion = { kind: 'turnActions', target: 'e', turn: 2,
|
||||
mixed: { kind: 'or', terms: [{ kind: 'fact', fact: { kind: 'spice', compare: 'gte', value: 0 } },
|
||||
{ kind: 'action', action }] } };
|
||||
assert.doesNotThrow(() => validateTruthQuestionReceipt(game, 'a', question));
|
||||
const text = truthQuestionText(question, id => id, id => id);
|
||||
assert.match(text, effect === 'ornithopter' ? /play Ornithopter into a native flight after this answer before your Shipment and Movement turn ends/ :
|
||||
/play Residual Poison in its printed role after this answer this turn/);
|
||||
assert.doesNotMatch(text, /twoGroups|private-leader|killed|Semuta|Ghola/);
|
||||
for (const extra of [{ mode: 'twoGroups' }, { group: 2 }, { victim: 'private-leader' }, { outcome: 'killed' }]) {
|
||||
const invalid = { ...question, mixed: { kind: 'or', terms: [{ kind: 'fact', fact: { kind: 'spice', compare: 'gte', value: 0 } },
|
||||
{ kind: 'action', action: { ...action, ...extra } }] } } as TruthQuestion;
|
||||
assert.throws(() => validateTruthQuestionReceipt(game, 'a', invalid));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function fixture() {
|
||||
const g = createGame('TRUTH22', newPlayer('a', 'Atreides', 'atreides'));
|
||||
g.players.push(
|
||||
|
||||
Reference in new issue
Block a user