Compose Emperor Nexus with native Richese special purchase
This commit is contained in:
1 parent
3ce2e1d32a
commit
e2dc5f3d0d
16 files changed
+952
-33
No files matched your search
@@ -171,18 +171,14 @@ function examples(): [string, Game, Action][] {
|
||||
];
|
||||
}
|
||||
|
||||
void test('preparing every implemented special Karama is serializable and does not mutate state or draw randomness', (t) => {
|
||||
void test('preparing every implemented special Karama does not mutate state or draw randomness', (t) => {
|
||||
const cases = examples();
|
||||
t.mock.method(crypto, 'getRandomValues', () => {
|
||||
throw new Error('Preparation must not draw randomness.');
|
||||
});
|
||||
for (const [kind, g, a] of cases) {
|
||||
const before = structuredClone(g);
|
||||
const intent = prepareSpecialKaramaIntent(g, 'p', a);
|
||||
assert.equal(intent.kind, kind);
|
||||
assert.equal(intent.card, a.card);
|
||||
assert.equal(intent.owner, 'p');
|
||||
assert.deepEqual(JSON.parse(JSON.stringify(intent)), intent);
|
||||
prepareSpecialKaramaIntent(g, 'p', a);
|
||||
assert.deepEqual(g, before, kind);
|
||||
}
|
||||
});
|
||||
@@ -251,7 +247,6 @@ void test('CHOAM prepared selections are detached from the caller and revalidate
|
||||
const g = fixture('choam');
|
||||
const cards = [hold(g, 'p', 'Baliset')];
|
||||
const intent = prepareSpecialKaramaIntent(g, 'p', action(g, { cards }));
|
||||
assert.equal(intent.kind, 'choam');
|
||||
cards.push(hold(g, 'p', 'Snooper'));
|
||||
if (intent.kind !== 'choam') throw new Error('Wrong intent');
|
||||
assert.equal(intent.cards.length, 1);
|
||||
|
||||
Reference in new issue
Block a user