Merge v2 into architect: the chaos monkey in every puzzle, and in normal games

Starting a run or a puzzle now sends a monkey left over from an Architect review away.
This commit is contained in:
Frederic Jung 2026-10-30 12:33:33 +01:00
commit dc4c0f07d5
No known key found for this signature in database
28 changed files with 446 additions and 68 deletions

View file

@ -3,6 +3,9 @@
function pzWaveWhy(a,b,tier,r){if(r&&subWaveWhy(tier,r.km,r.sub))return tr('common.too_far_for_this_cable');if(!S.ar&&!waveOk(a,b,tier))return tr('puzzles.needs_what',{what:waveNeed(tier)});return '';}
const pzPortsFree=c=>!S.pops[c]||portsUsed(c)+1<=portsMax(c)+1e-9;
Object.assign(ACT,{
// The chaos monkey acts out the N-1 check, or is told to get on with it.
pzMonkey:()=>{if(pzOn()&&pzEval().goal)pzMonkey();},
pzMkSkip:()=>{if(pzOn())pzMkSkip();},
// The puzzle list. The ruleset's title-screen door calls this.
puzzleMenu:()=>{if(S&&UI.started&&!pzOn())UI.nm=S.name;pzMenu();},
pzStart:({id})=>{const d=pzDef(id);if(!d||!pzPackOpen(d.pack))return;pzBegin(d);},