Chaos monkey: a visitor that snips tubes in On-call and BGP at 3 a.m.

Now and then a chaos monkey moves in for 120 to 240 days and snips a tube every
couple of weeks, weak spots first, instead of the usual random outages. Outlast
it without a customer noticing for a bonus and the Monkey-proof badge, or throw
it a banana. Drawn on the map in shades; gameplay rule F4 with its test.
This commit is contained in:
Frederic Jung 2026-10-30 10:54:25 +01:00
parent 90d4073d17
commit f4486ee955
No known key found for this signature in database
21 changed files with 347 additions and 4 deletions

View file

@ -26,6 +26,7 @@ function endPtr(e){
ptrs.delete(e.pointerId);const d=UI.drag;if(!d)return;
if(d.mode==='pinch'){if(ptrs.size===0){UI.drag=null;UI.snap=null;cv.classList.remove('linking');}return;}
if(d.mode==='link'){if(UI.snap&&UI.snap.id!==d.from){if(pzOn())pzLinkModal(d.from,UI.snap.id);else openLinkModal(d.from,UI.snap.id);sfx('click');}}
else if(!d.moved&&S&&mkOn()&&mkHit(e.clientX,e.clientY)){sfx('click');toast(tr('chaos_monkey.tap'),'',[{l:tr('chaos_monkey.banana',{cost:fmt$(mkBananaCost())}),act:'mkBanana',args:{}}]);}
else if(!d.moved&&S){const h=pickCity(e.clientX,e.clientY);
if(h){selectCity(h.id);renderLeft();sfx('click');}
else{const l=hitLink(e.clientX,e.clientY);if(l){selectLink(l);sfx('click');}else{UI.sel=null;renderPanel();renderLeft();}}}