Puzzles: the chaos monkey acts out the N-1 star in every puzzle
When a build earns a new star the monkey snips each trench and cable in turn on the map, and cities that lose traffic say how much; then the stars show. It can be let loose again or skipped. Puzzle texts talk about the chaos monkey instead of a backhoe.
This commit is contained in:
parent
cbb7ca8772
commit
9fc38fa4f4
13 changed files with 134 additions and 40 deletions
|
|
@ -315,18 +315,18 @@ test('results card: stars, the next puzzle, a retry, a share line and stars left
|
|||
ev("localStorage.removeItem('sot-puzzles');pzBegin(pzDef('eurotrip'))");
|
||||
build(ev, REF.eurotrip.one);
|
||||
assert.ok(ev("$('modal').hidden||!document.querySelector('#modalCard .pzres')"), 'two stars: no results card, play goes on');
|
||||
assert.match(ev("document.getElementById('toasts').textContent"), /One backhoe away/, 'a cheer with the next step instead');
|
||||
assert.match(ev("document.getElementById('toasts').textContent"), /One chaos monkey away/, 'a cheer with the next step instead');
|
||||
assert.ok(ev("!!document.querySelector('[data-act=pzFinish]')"), 'and a Finish button on the card');
|
||||
ev("document.querySelector('[data-act=pzFinish]').click()");
|
||||
let card = ev("document.getElementById('modalCard').textContent");
|
||||
assert.match(card, /Your stars so far/);
|
||||
assert.equal(evalP(ev).stars, 2, 'delivered, and the budget star is on the house');
|
||||
assert.match(card, /One backhoe away/);
|
||||
assert.match(card, /One chaos monkey away/);
|
||||
assert.match(card, /13 ⭐ left in this pack/);
|
||||
assert.ok(ev("!!document.querySelector('#modalCard [data-act=pzRetry]')"));
|
||||
build(ev, [['ams', 'lon', 'concerto', 1], ['ams', 'fra', 'land', 1]]);
|
||||
card = ev("document.getElementById('modalCard').textContent");
|
||||
assert.match(card, /A backhoe walks into your network/);
|
||||
assert.match(card, /A chaos monkey walks into your network/);
|
||||
assert.equal(ev("document.querySelectorAll('#modalCard .pzbig.on').length"), 3);
|
||||
assert.ok(ev("document.querySelector('#modalCard .btns.cta').classList.contains('pzdone')"));
|
||||
assert.match(ev("document.querySelector('#modalCard .pznext').textContent"), /Next puzzle →/);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue