diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1a3466c..a099b36 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ All notable changes to this project are documented here. The project follows
## [2.0.0] — 2026-10-29
+- Every puzzle now has the chaos monkey: when your build earns a new star, it runs round the map snipping each trench and cable in turn, and the cities that lose traffic say how much. Let it loose again whenever you like, or skip straight to the stars.
- A chaos monkey now and then moves into your network in On-call and BGP at 3 a.m., and snips a tube every couple of weeks for 120 to 240 days, tubes with no backup path first. Its snips replace the usual random outages while it is here; get through the visit without a customer noticing for a resilience bonus and a new badge, or throw it a banana to send it home early. The "Met the Backhoe" badge is now "Met the Chaos Monkey", earned on its first visit; badges you already have stay yours.
- The peering inbox is gone: your peering policy now answers every peering request for you. Open accepts everyone, Selective accepts small networks on the exchange and newcomers with an up-to-date PeeringDB and quietly declines the rest, and Closed declines them all; once a week the NOC log sums it up, like "Peering desk: 7 new sessions at DE-KICKS and HAMS-IX, 3 declined (Selective)". Max-prefix alerts, the button that raised every limit at once, max-prefix outages at exchanges, your peering reputation and the Large Peering Model are gone too. The policy picker sits in the Networks tab, saved games keep their policy, and a game that hired the AI simply stops paying for it.
- Scenario tuning: every handmade scenario now asks for what its story is about, with shorter clocks where it was won in a tenth of the time. Mind the Gap, Cape to Cairo and Order and Progress count cities and IX.brrr ports only when your network joins them up; Fibre to the Basement also wants 500 Gbps served; in Anchors Away nobody sells transit in Tallinn and ships really do drag their anchors over the Baltic links, while the Great Firewall's losses no longer break your 99.5% streak; in the Cogentle Spat, Goggle wants a lot more of your traffic before it peers; Flood Season's terabit floods count when your scrubbing or Flowspec took them; Stepping Stones and Mid-Atlantic Accent start with 5M, enough to light the whole 1.6T chain. Gangnam Style Peering is now really about sender pays: Seoul transit carries a fee on every Gbps, the three incumbents only peer over a paid PNI, and Korean users notice every millisecond, so you win by hauling cheap Tokyo transit while keeping Seoul fast and in profit.
diff --git a/site/i18n/de.js b/site/i18n/de.js
index 1e5b775..0e537da 100644
--- a/site/i18n/de.js
+++ b/site/i18n/de.js
@@ -2884,8 +2884,8 @@
"progress.under_attack_now":"Gerade unter Beschuss",
"progress.your_score_peak_traffic":"Dein Ergebnis: Spitzen-Traffic",
"progress.your_traffic_to_and_from_asia":"Dein Traffic von und nach Asien",
-"puzzles.a_backhoe_walks_into_your_network":"Kommt ein Bagger in dein Netz. Nichts passiert.",
"puzzles.a_bigger_boat":"Wir brauchen ein größeres Boot",
+"puzzles.a_chaos_monkey_walks_into_your_network":"Kommt ein Chaos-Affe in dein Netz. Nichts passiert.",
"puzzles.a_cut_on_where_drops_g":"Ein Schnitt bei {where} kostet {g}",
"puzzles.a_different_route":"Eine andere Route",
"puzzles.a_diverse_route":"Eine diverse Route (+40%)",
@@ -2909,11 +2909,12 @@
"puzzles.carry_list":"Zu transportieren: {list}.",
"puzzles.carrying":"Transportiert",
"puzzles.carrying_on_this_pair":"Transportiert (alle {n} Links dieses Paars)",
+"puzzles.city_loses_g":"{city} −{g}",
"puzzles.content_lives_in_list":"Die Inhalte liegen in {list}: Privatkunden ziehen vom nächsten.",
"puzzles.copied_paste_it_anywhere":"Kopiert! Füg es irgendwo ein: {t}",
"puzzles.de_kicks_sales_has_your_number":"Der DE-KICKS-Vertrieb hat deine Nummer. Verbinde Deutschland ohne Frankfurt.",
"puzzles.delivered":"Geliefert",
-"puzzles.diverse_route_40_survives_a_backhoe":"Getrennte Trasse (+40 %, übersteht einen Bagger)",
+"puzzles.diverse_route_40_survives_the_monkey":"Getrennte Trasse (+40 %, übersteht den Chaos-Affen)",
"puzzles.down_under_up_and_running":"Down Under, up and running",
"puzzles.drag_from_a_pink_pop_to":"Zieh von einem pinken POP zu einer anderen Stadt, um eine Wave zu mieten",
"puzzles.drag_from_this_pop_onto_another":"Zieh von diesem POP auf eine andere Puzzle-Stadt oder wähl eine hier.",
@@ -2940,15 +2941,17 @@
"puzzles.hub_cap":"Radkappe",
"puzzles.includes_a_new_pop_in_city":"Mit neuem POP in {city} ({price} für ein Jahr).",
"puzzles.installed":"verbaut",
-"puzzles.it_works_finance_and_the_backhoe":"Läuft! Die Buchhaltung und der Bagger hätten da noch Fragen.",
+"puzzles.it_works_finance_and_the_monkey":"Läuft! Die Buchhaltung und der Chaos-Affe hätten da noch Fragen.",
"puzzles.keep_building":"Weiterbauen",
"puzzles.kiwi_fruit_salad":"Kiwi-Obstsalat",
"puzzles.latency":"Latenz",
"puzzles.latency_caps":"Latenzgrenzen",
"puzzles.lease_a_wave_to":"Wave mieten nach",
+"puzzles.let_the_chaos_monkey_loose":"🐒 Lass den Chaos-Affen los",
"puzzles.loading_this_week_s_puzzle":"Lade das Puzzle dieser Woche…",
"puzzles.london_wants_half_a_terabit_your":"London will ein halbes Terabit, und deine Router sind von eBuy.",
"puzzles.model_facts":"{cap} · {ports} Ports · Waves bis {wave}",
+"puzzles.monkey_snip":"🐒 Schnipp!",
"puzzles.more_puzzles":"Mehr Puzzles",
"puzzles.n_1_club":"N-1-Club",
"puzzles.n_1_deliver_everything_first":"N-1: erst alles liefern",
@@ -2978,7 +2981,7 @@
"puzzles.not_through_frankfurt":"Nicht über Frankfurt",
"puzzles.off_limits":"Tabu",
"puzzles.on_the_house":"Aufs Haus",
-"puzzles.one_backhoe_away_from_a_very":"Ein Bagger trennt dich von einer sehr langen Nacht. Ein zweiter Weg gibt ⭐⭐⭐.",
+"puzzles.one_monkey_away_from_a_very":"Ein Chaos-Affe trennt dich von einer sehr langen Nacht. Ein zweiter Weg gibt ⭐⭐⭐.",
"puzzles.one_ring_through_every_pop":"Ein Ring durch jeden POP",
"puzzles.one_very_big_island_and_a":"Eine sehr große Insel und sehr viel sehr leere Glasfaser.",
"puzzles.open_a_pop_cost":"POP eröffnen · {cost}",
@@ -3008,12 +3011,13 @@
"puzzles.same_cable_same_anchor":"Dasselbe Kabel wie ein Link, den du schon hast: Ein Anker erwischt beide.",
"puzzles.same_puzzle_for_everyone_this_week":"Diese Woche für alle dasselbe Puzzle",
"puzzles.same_trench_cheaper":"Gleicher Graben (günstiger)",
-"puzzles.same_trench_cheaper_one_backhoe_cuts":"Gleicher Graben (billiger, ein Bagger kappt beide)",
+"puzzles.same_trench_cheaper_one_snip_cuts":"Gleicher Graben (billiger, ein Schnipp kappt beide)",
"puzzles.sao_paulo_to_miami_before_the":"São Paulo nach Miami, bevor der Caipirinha warm wird.",
"puzzles.sea_to_shining_sea":"Von Küste zu Küste",
"puzzles.share_line":"Series of Tubes Puzzle {what} {stars} {spend} · seriesoftub.es",
"puzzles.six_cities_a_few_gigs_each":"Sechs Städte, je ein paar Gigabit, und ein Router mit acht Ports. Erst zählen, dann graben.",
"puzzles.size":"Größe",
+"puzzles.skip_the_monkey":"Überspringen",
"puzzles.small_networks_real_traffic":"Kleine Netze, echter Traffic",
"puzzles.spent_x":"Ausgegeben {x}",
"puzzles.spent_x_of_y":"Ausgegeben {x} / {y}",
diff --git a/site/i18n/es.js b/site/i18n/es.js
index de095d6..1eb5df5 100644
--- a/site/i18n/es.js
+++ b/site/i18n/es.js
@@ -2882,8 +2882,8 @@
"progress.under_attack_now":"Bajo ataque ahora",
"progress.your_score_peak_traffic":"Tu puntuación: tráfico pico",
"progress.your_traffic_to_and_from_asia":"Tu tráfico desde y hacia Asia",
-"puzzles.a_backhoe_walks_into_your_network":"Una retroexcavadora entra en tu red. No pasa nada.",
"puzzles.a_bigger_boat":"Necesitaremos un barco más grande",
+"puzzles.a_chaos_monkey_walks_into_your_network":"Un mono del caos entra en tu red. No pasa nada.",
"puzzles.a_cut_on_where_drops_g":"Un corte en {where} tira {g}",
"puzzles.a_different_route":"Otra ruta",
"puzzles.a_diverse_route":"Una ruta diversa (+40%)",
@@ -2907,11 +2907,12 @@
"puzzles.carry_list":"A transportar: {list}.",
"puzzles.carrying":"Transporta",
"puzzles.carrying_on_this_pair":"Transporta (los {n} enlaces de este par)",
+"puzzles.city_loses_g":"{city} −{g}",
"puzzles.content_lives_in_list":"El contenido vive en {list}: los usuarios tiran del más cercano.",
"puzzles.copied_paste_it_anywhere":"¡Copiado! Pégalo donde quieras: {t}",
"puzzles.de_kicks_sales_has_your_number":"Ventas de DE-KICKS tiene tu número. Conecta Alemania sin pasar por Fráncfort.",
"puzzles.delivered":"Entregado",
-"puzzles.diverse_route_40_survives_a_backhoe":"Ruta diversa (+40 %, sobrevive a una retroexcavadora)",
+"puzzles.diverse_route_40_survives_the_monkey":"Ruta diversa (+40 %, sobrevive al mono del caos)",
"puzzles.down_under_up_and_running":"Down Under, en marcha",
"puzzles.drag_from_a_pink_pop_to":"Arrastra desde un POP rosa a otra ciudad para alquilar una onda",
"puzzles.drag_from_this_pop_onto_another":"Arrastra desde este POP a otra ciudad del puzle, o elige una aquí.",
@@ -2938,15 +2939,17 @@
"puzzles.hub_cap":"Tapacubos",
"puzzles.includes_a_new_pop_in_city":"Incluye un POP nuevo en {city} ({price} por un año).",
"puzzles.installed":"instalado",
-"puzzles.it_works_finance_and_the_backhoe":"¡Funciona! Finanzas y la retroexcavadora quieren hablar contigo.",
+"puzzles.it_works_finance_and_the_monkey":"¡Funciona! Finanzas y el mono del caos quieren hablar contigo.",
"puzzles.keep_building":"Seguir construyendo",
"puzzles.kiwi_fruit_salad":"Macedonia de kiwi",
"puzzles.latency":"Latencia",
"puzzles.latency_caps":"límites de latencia",
"puzzles.lease_a_wave_to":"Alquilar una onda hasta",
+"puzzles.let_the_chaos_monkey_loose":"🐒 Suelta al mono del caos",
"puzzles.loading_this_week_s_puzzle":"Cargando el puzle de esta semana…",
"puzzles.london_wants_half_a_terabit_your":"Londres quiere medio terabit, y tus routers salieron de eBuy.",
"puzzles.model_facts":"{cap} · {ports} puertos · waves hasta {wave}",
+"puzzles.monkey_snip":"🐒 ¡Zas!",
"puzzles.more_puzzles":"Más puzles",
"puzzles.n_1_club":"Club N-1",
"puzzles.n_1_deliver_everything_first":"N-1: primero entrégalo todo",
@@ -2976,7 +2979,7 @@
"puzzles.not_through_frankfurt":"Sin pasar por Fráncfort",
"puzzles.off_limits":"Prohibida",
"puzzles.on_the_house":"Invita la casa",
-"puzzles.one_backhoe_away_from_a_very":"A una retroexcavadora de una noche muy larga. Añade un segundo camino para ⭐⭐⭐.",
+"puzzles.one_monkey_away_from_a_very":"A un mono del caos de una noche muy larga. Añade una segunda ruta para ⭐⭐⭐.",
"puzzles.one_ring_through_every_pop":"Un anillo por todos los POP",
"puzzles.one_very_big_island_and_a":"Una isla enorme y muchísima fibra vacía.",
"puzzles.open_a_pop_cost":"Abrir un POP · {cost}",
@@ -3006,12 +3009,13 @@
"puzzles.same_cable_same_anchor":"Mismo cable que un enlace que ya tienes: un ancla se lleva los dos.",
"puzzles.same_puzzle_for_everyone_this_week":"El mismo puzle para todos esta semana",
"puzzles.same_trench_cheaper":"Misma zanja (más barato)",
-"puzzles.same_trench_cheaper_one_backhoe_cuts":"Misma zanja (más barata, una retroexcavadora corta las dos)",
+"puzzles.same_trench_cheaper_one_snip_cuts":"Misma zanja (más barata, un corte se lleva las dos)",
"puzzles.sao_paulo_to_miami_before_the":"De São Paulo a Miami antes de que se caliente la caipiriña.",
"puzzles.sea_to_shining_sea":"De costa a costa",
"puzzles.share_line":"Series of Tubes puzle {what} {stars} {spend} · seriesoftub.es",
"puzzles.six_cities_a_few_gigs_each":"Seis ciudades, pocos gigas cada una, y un router con ocho puertos. Cuenta antes de cavar.",
"puzzles.size":"Tamaño",
+"puzzles.skip_the_monkey":"Saltar",
"puzzles.small_networks_real_traffic":"Redes pequeñas, tráfico de verdad",
"puzzles.spent_x":"Gastado {x}",
"puzzles.spent_x_of_y":"Gastado {x} / {y}",
diff --git a/site/i18n/fr.js b/site/i18n/fr.js
index 19870ef..dda0146 100644
--- a/site/i18n/fr.js
+++ b/site/i18n/fr.js
@@ -2882,8 +2882,8 @@
"progress.under_attack_now":"Sous attaque",
"progress.your_score_peak_traffic":"Ton score : pic de trafic",
"progress.your_traffic_to_and_from_asia":"Ton trafic vers et depuis l’Asie",
-"puzzles.a_backhoe_walks_into_your_network":"C’est une pelleteuse qui entre dans ton réseau. Il ne se passe rien.",
"puzzles.a_bigger_boat":"Il nous faut un plus gros bateau",
+"puzzles.a_chaos_monkey_walks_into_your_network":"C’est un singe du chaos qui entre dans ton réseau. Il ne se passe rien.",
"puzzles.a_cut_on_where_drops_g":"Une coupure sur {where} fait tomber {g}",
"puzzles.a_different_route":"Une autre route",
"puzzles.a_diverse_route":"Une route diverse (+40 %)",
@@ -2907,11 +2907,12 @@
"puzzles.carry_list":"À transporter : {list}.",
"puzzles.carrying":"Transporte",
"puzzles.carrying_on_this_pair":"Transporte (les {n} liens de cette paire)",
+"puzzles.city_loses_g":"{city} −{g}",
"puzzles.content_lives_in_list":"Le contenu vit à {list} : les internautes tirent du plus proche.",
"puzzles.copied_paste_it_anywhere":"Copié ! Colle-le où tu veux : {t}",
"puzzles.de_kicks_sales_has_your_number":"Les commerciaux de DE-KICKS ont ton numéro. Relie l’Allemagne sans passer par Francfort.",
"puzzles.delivered":"Livré",
-"puzzles.diverse_route_40_survives_a_backhoe":"Route diverse (+40 %, survit à une pelleteuse)",
+"puzzles.diverse_route_40_survives_the_monkey":"Route diverse (+40 %, survit au singe du chaos)",
"puzzles.down_under_up_and_running":"Down Under, ça tourne",
"puzzles.drag_from_a_pink_pop_to":"Glisse depuis un POP rose vers une autre ville pour louer une longueur d’onde",
"puzzles.drag_from_this_pop_onto_another":"Glisse depuis ce POP vers une autre ville du puzzle, ou choisis-en une ici.",
@@ -2938,15 +2939,17 @@
"puzzles.hub_cap":"Enjoliveur",
"puzzles.includes_a_new_pop_in_city":"Inclut un nouveau POP à {city} ({price} pour un an).",
"puzzles.installed":"installé",
-"puzzles.it_works_finance_and_the_backhoe":"Ça marche ! La compta et la pelleteuse aimeraient te dire un mot.",
+"puzzles.it_works_finance_and_the_monkey":"Ça marche ! La compta et le singe du chaos aimeraient te dire un mot.",
"puzzles.keep_building":"Continuer à construire",
"puzzles.kiwi_fruit_salad":"Salade de kiwis",
"puzzles.latency":"Latence",
"puzzles.latency_caps":"plafonds de latence",
"puzzles.lease_a_wave_to":"Louer une longueur d’onde vers",
+"puzzles.let_the_chaos_monkey_loose":"🐒 Lâche le singe du chaos",
"puzzles.loading_this_week_s_puzzle":"Chargement du puzzle de la semaine…",
"puzzles.london_wants_half_a_terabit_your":"Londres veut un demi-térabit, et tes routeurs viennent d'eBuy.",
"puzzles.model_facts":"{cap} · {ports} ports · waves jusqu'à {wave}",
+"puzzles.monkey_snip":"🐒 Clac !",
"puzzles.more_puzzles":"Plus de puzzles",
"puzzles.n_1_club":"Club N-1",
"puzzles.n_1_deliver_everything_first":"N-1 : livre tout d'abord",
@@ -2976,7 +2979,7 @@
"puzzles.not_through_frankfurt":"Pas par Francfort",
"puzzles.off_limits":"Interdite",
"puzzles.on_the_house":"Offert par la maison",
-"puzzles.one_backhoe_away_from_a_very":"À une pelleteuse d’une très longue nuit. Ajoute un deuxième chemin pour ⭐⭐⭐.",
+"puzzles.one_monkey_away_from_a_very":"À un singe du chaos d’une très longue nuit. Ajoute un deuxième chemin pour ⭐⭐⭐.",
"puzzles.one_ring_through_every_pop":"Un anneau qui passe par chaque POP",
"puzzles.one_very_big_island_and_a":"Une très grande île, et beaucoup de fibre très vide.",
"puzzles.open_a_pop_cost":"Ouvrir un POP · {cost}",
@@ -3006,12 +3009,13 @@
"puzzles.same_cable_same_anchor":"Même câble qu'un lien que tu as : une ancre emporte les deux.",
"puzzles.same_puzzle_for_everyone_this_week":"Le même puzzle pour tout le monde cette semaine",
"puzzles.same_trench_cheaper":"Même tranchée (moins cher)",
-"puzzles.same_trench_cheaper_one_backhoe_cuts":"Même tranchée (moins cher, une pelleteuse coupe les deux)",
+"puzzles.same_trench_cheaper_one_snip_cuts":"Même tranchée (moins cher, une coupure tranche les deux)",
"puzzles.sao_paulo_to_miami_before_the":"São Paulo–Miami avant que la caïpirinha ne tiédisse.",
"puzzles.sea_to_shining_sea":"D’une côte à l’autre",
"puzzles.share_line":"Series of Tubes puzzle {what} {stars} {spend} · seriesoftub.es",
"puzzles.six_cities_a_few_gigs_each":"Six villes, quelques gigas chacune, et un routeur à huit ports. Compte avant de creuser.",
"puzzles.size":"Taille",
+"puzzles.skip_the_monkey":"Passer",
"puzzles.small_networks_real_traffic":"Petits réseaux, vrai trafic",
"puzzles.spent_x":"Dépensé {x}",
"puzzles.spent_x_of_y":"Dépensé {x} / {y}",
diff --git a/site/i18n/it.js b/site/i18n/it.js
index b0565fd..0b4eb9c 100644
--- a/site/i18n/it.js
+++ b/site/i18n/it.js
@@ -2882,8 +2882,8 @@
"progress.under_attack_now":"Sotto attacco ora",
"progress.your_score_peak_traffic":"Il tuo punteggio: picco di traffico",
"progress.your_traffic_to_and_from_asia":"Il tuo traffico da e per l’Asia",
-"puzzles.a_backhoe_walks_into_your_network":"Una ruspa entra nella tua rete. Non succede niente.",
"puzzles.a_bigger_boat":"Ci serve una barca più grande",
+"puzzles.a_chaos_monkey_walks_into_your_network":"Una scimmia del caos entra nella tua rete. Non succede niente.",
"puzzles.a_cut_on_where_drops_g":"Un taglio su {where} perde {g}",
"puzzles.a_different_route":"Un altro percorso",
"puzzles.a_diverse_route":"Un percorso diverso (+40%)",
@@ -2907,11 +2907,12 @@
"puzzles.carry_list":"Da trasportare: {list}.",
"puzzles.carrying":"Trasporta",
"puzzles.carrying_on_this_pair":"Trasporta (tutti i {n} link di questa coppia)",
+"puzzles.city_loses_g":"{city} −{g}",
"puzzles.content_lives_in_list":"I contenuti vivono a {list}: gli utenti pescano dal più vicino.",
"puzzles.copied_paste_it_anywhere":"Copiato! Incollalo dove vuoi: {t}",
"puzzles.de_kicks_sales_has_your_number":"Il commerciale di DE-KICKS ha il tuo numero. Collega la Germania senza passare da Francoforte.",
"puzzles.delivered":"Consegnato",
-"puzzles.diverse_route_40_survives_a_backhoe":"Percorso diverso (+40%, sopravvive a una ruspa)",
+"puzzles.diverse_route_40_survives_the_monkey":"Percorso diverso (+40%, resiste alla scimmia del caos)",
"puzzles.down_under_up_and_running":"Down Under, operativi",
"puzzles.drag_from_a_pink_pop_to":"Trascina da un POP rosa a un’altra città per noleggiare una wave",
"puzzles.drag_from_this_pop_onto_another":"Trascina da questo POP su un’altra città del puzzle, o scegline una qui.",
@@ -2938,15 +2939,17 @@
"puzzles.hub_cap":"Coprimozzo",
"puzzles.includes_a_new_pop_in_city":"Include un nuovo POP a {city} ({price} per un anno).",
"puzzles.installed":"installato",
-"puzzles.it_works_finance_and_the_backhoe":"Funziona! L’amministrazione e la ruspa vorrebbero parlarti.",
+"puzzles.it_works_finance_and_the_monkey":"Funziona! L’amministrazione e la scimmia del caos vorrebbero parlarti.",
"puzzles.keep_building":"Continua a costruire",
"puzzles.kiwi_fruit_salad":"Macedonia di kiwi",
"puzzles.latency":"Latenza",
"puzzles.latency_caps":"limiti di latenza",
"puzzles.lease_a_wave_to":"Noleggia una wave verso",
+"puzzles.let_the_chaos_monkey_loose":"🐒 Libera la scimmia del caos",
"puzzles.loading_this_week_s_puzzle":"Carico il puzzle della settimana…",
"puzzles.london_wants_half_a_terabit_your":"Londra vuole mezzo terabit, e i tuoi router vengono da eBuy.",
"puzzles.model_facts":"{cap} · {ports} porte · wave fino a {wave}",
+"puzzles.monkey_snip":"🐒 Zac!",
"puzzles.more_puzzles":"Altri puzzle",
"puzzles.n_1_club":"Club N-1",
"puzzles.n_1_deliver_everything_first":"N-1: prima consegna tutto",
@@ -2976,7 +2979,7 @@
"puzzles.not_through_frankfurt":"Non da Francoforte",
"puzzles.off_limits":"Vietata",
"puzzles.on_the_house":"Offre la casa",
-"puzzles.one_backhoe_away_from_a_very":"A una ruspa da una nottata lunghissima. Aggiungi un secondo percorso per ⭐⭐⭐.",
+"puzzles.one_monkey_away_from_a_very":"A una scimmia del caos da una notte lunghissima. Aggiungi un secondo percorso per ⭐⭐⭐.",
"puzzles.one_ring_through_every_pop":"Un anello che passa per ogni POP",
"puzzles.one_very_big_island_and_a":"Un’isola enorme e tantissima fibra vuota.",
"puzzles.open_a_pop_cost":"Apri un POP · {cost}",
@@ -3006,12 +3009,13 @@
"puzzles.same_cable_same_anchor":"Stesso cavo di un link che hai già: un'ancora li prende tutti e due.",
"puzzles.same_puzzle_for_everyone_this_week":"Lo stesso puzzle per tutti questa settimana",
"puzzles.same_trench_cheaper":"Stessa trincea (costa meno)",
-"puzzles.same_trench_cheaper_one_backhoe_cuts":"Stesso scavo (più economico, una ruspa li taglia tutti e due)",
+"puzzles.same_trench_cheaper_one_snip_cuts":"Stessa trincea (più economica, un taglio le prende entrambe)",
"puzzles.sao_paulo_to_miami_before_the":"Da São Paulo a Miami prima che la caipirinha si scaldi.",
"puzzles.sea_to_shining_sea":"Da costa a costa",
"puzzles.share_line":"Series of Tubes puzzle {what} {stars} {spend} · seriesoftub.es",
"puzzles.six_cities_a_few_gigs_each":"Sei città, pochi giga ciascuna, e un router con otto porte. Conta prima di scavare.",
"puzzles.size":"Taglia",
+"puzzles.skip_the_monkey":"Salta",
"puzzles.small_networks_real_traffic":"Reti piccole, traffico vero",
"puzzles.spent_x":"Speso {x}",
"puzzles.spent_x_of_y":"Speso {x} / {y}",
diff --git a/site/i18n/pt.js b/site/i18n/pt.js
index 69b353d..94a0f4d 100644
--- a/site/i18n/pt.js
+++ b/site/i18n/pt.js
@@ -2882,8 +2882,8 @@
"progress.under_attack_now":"Sob ataque agora",
"progress.your_score_peak_traffic":"Sua pontuação: pico de tráfego",
"progress.your_traffic_to_and_from_asia":"Seu tráfego de e para a Ásia",
-"puzzles.a_backhoe_walks_into_your_network":"Uma retroescavadeira entra na sua rede. Nada acontece.",
"puzzles.a_bigger_boat":"Vamos precisar de um barco maior",
+"puzzles.a_chaos_monkey_walks_into_your_network":"Um macaco do caos entra na sua rede. Nada acontece.",
"puzzles.a_cut_on_where_drops_g":"Um corte em {where} derruba {g}",
"puzzles.a_different_route":"Outra rota",
"puzzles.a_diverse_route":"Uma rota diversa (+40%)",
@@ -2907,11 +2907,12 @@
"puzzles.carry_list":"Transporte: {list}.",
"puzzles.carrying":"Transportando",
"puzzles.carrying_on_this_pair":"Transportando (todos os {n} links deste par)",
+"puzzles.city_loses_g":"{city} −{g}",
"puzzles.content_lives_in_list":"O conteúdo mora em {list}: os usuários puxam do mais próximo.",
"puzzles.copied_paste_it_anywhere":"Copiado! Cole onde quiser: {t}",
"puzzles.de_kicks_sales_has_your_number":"O comercial da DE-KICKS tem seu número. Conecte a Alemanha sem passar por Frankfurt.",
"puzzles.delivered":"Entregue",
-"puzzles.diverse_route_40_survives_a_backhoe":"Rota diversa (+40%, sobrevive a uma retroescavadeira)",
+"puzzles.diverse_route_40_survives_the_monkey":"Rota diversa (+40%, aguenta o macaco do caos)",
"puzzles.down_under_up_and_running":"Down Under, no ar",
"puzzles.drag_from_a_pink_pop_to":"Arraste de um POP rosa até outra cidade para alugar uma wave",
"puzzles.drag_from_this_pop_onto_another":"Arraste deste POP até outra cidade do puzzle, ou escolha uma aqui.",
@@ -2938,15 +2939,17 @@
"puzzles.hub_cap":"Calota",
"puzzles.includes_a_new_pop_in_city":"Inclui um POP novo em {city} ({price} por um ano).",
"puzzles.installed":"instalado",
-"puzzles.it_works_finance_and_the_backhoe":"Funciona! O financeiro e a retroescavadeira querem uma palavrinha.",
+"puzzles.it_works_finance_and_the_monkey":"Funciona! O financeiro e o macaco do caos querem dar uma palavrinha.",
"puzzles.keep_building":"Continuar construindo",
"puzzles.kiwi_fruit_salad":"Salada de kiwi",
"puzzles.latency":"Latência",
"puzzles.latency_caps":"limites de latência",
"puzzles.lease_a_wave_to":"Alugar uma wave até",
+"puzzles.let_the_chaos_monkey_loose":"🐒 Solte o macaco do caos",
"puzzles.loading_this_week_s_puzzle":"Carregando o puzzle da semana…",
"puzzles.london_wants_half_a_terabit_your":"Londres quer meio terabit, e seus routers vieram do eBuy.",
"puzzles.model_facts":"{cap} · {ports} portas · waves até {wave}",
+"puzzles.monkey_snip":"🐒 Zás!",
"puzzles.more_puzzles":"Mais puzzles",
"puzzles.n_1_club":"Clube N-1",
"puzzles.n_1_deliver_everything_first":"N-1: entregue tudo primeiro",
@@ -2976,7 +2979,7 @@
"puzzles.not_through_frankfurt":"Sem passar por Frankfurt",
"puzzles.off_limits":"Proibida",
"puzzles.on_the_house":"Por conta da casa",
-"puzzles.one_backhoe_away_from_a_very":"A uma retroescavadeira de uma noite muito longa. Adicione um segundo caminho para ⭐⭐⭐.",
+"puzzles.one_monkey_away_from_a_very":"A um macaco do caos de uma noite muito longa. Adicione uma segunda rota para ⭐⭐⭐.",
"puzzles.one_ring_through_every_pop":"Um anel passando por todos os POPs",
"puzzles.one_very_big_island_and_a":"Uma ilha enorme e muita fibra vazia.",
"puzzles.open_a_pop_cost":"Abrir um POP · {cost}",
@@ -3006,12 +3009,13 @@
"puzzles.same_cable_same_anchor":"Mesmo cabo de um link que você já tem: uma âncora leva os dois.",
"puzzles.same_puzzle_for_everyone_this_week":"O mesmo puzzle para todo mundo nesta semana",
"puzzles.same_trench_cheaper":"Mesma vala (mais barato)",
-"puzzles.same_trench_cheaper_one_backhoe_cuts":"Mesma vala (mais barata, uma retroescavadeira corta as duas)",
+"puzzles.same_trench_cheaper_one_snip_cuts":"Mesma vala (mais barata, um corte pega as duas)",
"puzzles.sao_paulo_to_miami_before_the":"De São Paulo a Miami antes que a caipirinha esquente.",
"puzzles.sea_to_shining_sea":"De costa a costa",
"puzzles.share_line":"Series of Tubes puzzle {what} {stars} {spend} · seriesoftub.es",
"puzzles.six_cities_a_few_gigs_each":"Seis cidades, poucos gigas cada, e um router com oito portas. Conte antes de cavar.",
"puzzles.size":"Tamanho",
+"puzzles.skip_the_monkey":"Pular",
"puzzles.small_networks_real_traffic":"Redes pequenas, tráfego de verdade",
"puzzles.spent_x":"Gasto {x}",
"puzzles.spent_x_of_y":"Gasto {x} / {y}",
diff --git a/src/game/60-features/92-puzzles.js b/src/game/60-features/92-puzzles.js
index c840b9f..4b9500e 100644
--- a/src/game/60-features/92-puzzles.js
+++ b/src/game/60-features/92-puzzles.js
@@ -81,7 +81,7 @@ const pzSig=()=>JSON.stringify([S.pops,S.links,S.pairMet||null,S.biz.map(b=>b.ro
/* ⭐ every flow delivered in full (circuits within their latency cap), and the twists; ⭐⭐ the year's spend within
budget; ⭐⭐⭐ N-1 under load: whichever single trench or cable is cut, every priority flow still gets all of its traffic
(best-effort flows may drop). The cut is routed by compute() like the real thing. */
-function pzEval(){const sig=pzSig(),c0=UI.pzEv;if(c0&&c0.sig===sig)return c0.e;
+function pzEval(){const sig=pzSig(),c0=UI.pzEv;if(c0&&(c0.sig===sig||UI.pzMk))return c0.e;// mid-scene the monkey's cuts are not the build
const P=S.pz,hot=UI.hotMap;compute();const R0=R,got=pzGot(),spend=pzSpend(),peak={},pk=()=>{for(const c in R.nodeLoad)peak[c]=Math.max(peak[c]||0,R.nodeLoad[c]);};pk();
const flows=P.dem.map((f,i)=>({f,i,g:got[i].g,ms:got[i].ms,full:pzFull(f,got[i]),fast:pzFast(f,got[i])}));
const tw=[];if(P.noSub)tw.push({k:'sub',ok:!S.links.some(l=>l.sub)});
@@ -118,7 +118,7 @@ const pzToastsClear=()=>{$('toasts').textContent='';};
// The running game gets its usual save first and is kept in memory, set aside: save() keeps writing it to its slot
// (leaving the page mid-puzzle), and leaving the puzzle picks it up again.
function pzFlush(){save(true);UI.pzKeep=S;}
-function pzBegin(def){if(!def)return;
+function pzBegin(def){if(!def)return;pzMkStop();mkStop();
const go=()=>{const cs=pzCities(def);newGame(pzName(def),cs[0]);S.pops={};S.mode='puzzle';S.rules=makeRules('puzzle');S.nextFail=S.nextEvent=1e9;S.tut=null;
S.pz={id:def.id,key:def.key||null,cities:cs,src:(def.src||[]).slice(),dem:def.dem.map(f=>({t:f.t,a:f.a,b:f.t==='l2'?f.b:null,g:f.g,ms:f.ms||0,be:!!f.be})),
via:(def.via||[]).slice(),avoid:(def.avoid||[]).slice(),budget:def.budget||0,noSub:!!def.noSub,ring:!!def.ring,wn:def.wn||null,wj:def.wj||null,theme:def.theme||null,rev:def.rev||1};
@@ -130,7 +130,7 @@ function pzBegin(def){if(!def)return;
if(pzOn()){go();return;}
const live=!!(S&&UI.started&&!S.lost);UI.pzFrom=live?'game':'title';
if(live)pzFlush();go();}
-function pzLeave(){const from=UI.pzFrom;pzToastsClear();document.body.classList.remove('pz');UI.sel=null;UI.pzHist=null;UI.pzFrom=null;UI.pzEv=null;closeModal();$('panel').hidden=true;$('pzBox').hidden=true;S=null;R=emptyR();UI.started=false;
+function pzLeave(){pzMkStop();mkStop();const from=UI.pzFrom;pzToastsClear();document.body.classList.remove('pz');UI.sel=null;UI.pzHist=null;UI.pzFrom=null;UI.pzEv=null;closeModal();$('panel').hidden=true;$('pzBox').hidden=true;S=null;R=emptyR();UI.started=false;
if(from==='game'){const sv=UI.pzKeep||loadSave();UI.pzKeep=null;
if(sv){try{S=migrate(sv);compute();UI.started=true;UI.speed=[0,0.5,1,2,4,8].includes(S.uiSpeed)?S.uiSpeed:1;if(S.cam&&isFinite(S.cam.x))Object.assign(cam,S.cam);renderAll();return;}catch(e){console.error('[tubes] loading the network failed',e);S=null;UI.started=false;}}
// It cannot be loaded back: marked damaged (kept, so it can be exported), and the player is told.
@@ -142,14 +142,14 @@ function pzCam(){const cs=[...S.pz.cities,...S.pz.via].map(c=>CITY[c]),x0=cs[0].
const ph=isPhone(),side=ph&&CW>CH,pl=side?-Math.min(360,CW*0.52):ph?0:330,pb=ph&&!side?Math.min(230,CH*0.4):0,aw=Math.max(120,CW-Math.abs(pl)-90),ah=Math.max(120,CH-pb-150);
cam.z=clamp(Math.min(aw/Math.max(40,b-a),ah/Math.max(40,d-c)),0.5,4);cam.x=(a+b)/2-pl/2/cam.z;cam.y=(c+d)/2+(pb/2-30)/cam.z;wrapCam();}
// ---------- building ----------
-function pzSnap(){const h=UI.pzHist||(UI.pzHist=[]);h.push(JSON.stringify({p:S.pops,l:S.links,m:S.pairMet||{},r:S.biz.map(b=>b.route)}));if(h.length>60)h.shift();}
+function pzSnap(){pzMkStop();const h=UI.pzHist||(UI.pzHist=[]);h.push(JSON.stringify({p:S.pops,l:S.links,m:S.pairMet||{},r:S.biz.map(b=>b.route)}));if(h.length>60)h.shift();}
function pzAfter(){if(UI.sel&&((UI.sel.type==='link'&&!S.links.some(l=>l.id===UI.sel.id))||(UI.sel.type==='city'&&!pzKind(UI.sel.id))))UI.sel=null;
compute();renderAll();pzCheck();}
// Stars count the moment they are earned.
// Every solved state is recorded, so a cheaper build at the same stars counts too.
// A new star below three is a cheer and a nudge, and play goes on; the results card opens at three stars, or when the
// player says they are done (the card's Finish button).
-function pzCheck(){const e=pzEval();if(e.stars)pzRecord(e);if(e.stars<=(UI.pzTop||0))return e;const prev=UI.pzTop||0;UI.pzTop=e.stars;if(e.stars>=3)pzResults(e,prev);else{pzCheer(e,prev);renderAll();}return e;}
+function pzCheck(){const e=pzEval();if(e.stars)pzRecord(e);if(e.stars<=(UI.pzTop||0))return e;const prev=UI.pzTop||0;UI.pzTop=e.stars;const show=()=>{if(e.stars>=3)pzResults(e,prev);else{pzCheer(e,prev);renderAll();}};if(pzMkCan())pzMonkey(show);else show();return e;}
// The best spend belongs to the best star count: more stars start it again, the same stars keep the lower spend.
function pzRecord(e){const p=pzLoad(),P=S.pz,bag=P.id==='weekly'?p.wk:p.s,k=P.id==='weekly'?P.key:P.id,r=(P.id==='weekly'?pzWkRec(p,P):bag[k])||{st:0,sp:null};
if(e.starsanimOn()&&!UI.mapHid&&performance.now()-(UI.drawnAt||-1e9)<2000;
+function pzMonkey(then){pzMkStop();const units=[...new Set(S.links.map(pzUnit))];if(!units.length){if(then)then();return;}
+ const c=S.pz.src[0]||S.pz.cities[0];UI.pzMk={units,i:-1,t:0,then,bad:0};if(CITY[c])mkStart(c);sfx('alert');pzMkStep();}
+// Off to the next one: the tube it last snipped is whole again, the next one stays whole until it gets there.
+function pzMkStep(){const m=UI.pzMk;if(!m||!pzOn())return;for(const l of S.links)l.cut=0;m.i++;if(m.i>=m.units.length){pzMkDone();return;}
+ const u=m.units[m.i];compute();renderAll();mkRun(S.links.find(l=>pzUnit(l)===u),PZ_RUN/MK_RUN);m.t=setTimeout(pzMkHit,PZ_RUN);}
+function pzMkHit(){const m=UI.pzMk;if(!m||!pzOn())return;const ls=S.links.filter(l=>pzUnit(l)===m.units[m.i]),l0=ls[0];for(const l of ls)l.cut=1;compute();
+ const g=pzGot(),lost=[];S.pz.dem.forEach((f,i)=>{if(!f.be&&!pzFull(f,g[i]))lost.push({c:f.t==='l2'?f.b:f.a,g:Math.max(0,f.g-g[i].g)});});
+ floater((CITY[l0.a].x+CITY[l0.a].x+wrapDx(CITY[l0.a].x,CITY[l0.b].x))/2,(CITY[l0.a].y+CITY[l0.b].y)/2-26,tr('puzzles.monkey_snip'),'#FF8A3D');
+ for(const x of lost)floater(CITY[x.c].x,CITY[x.c].y-34,tr('puzzles.city_loses_g',{city:CITY[x.c].name,g:fmtG(x.g)}),'#FF4D5E');
+ if(UI.mk)UI.mk.bad=lost.length>0;if(lost.length)m.bad++;sfx(lost.length?'err':'click');renderAll();m.t=setTimeout(pzMkStep,lost.length?PZ_HOLD*2:PZ_HOLD);}
+// The end: a cheer if nothing broke, a tantrum if something did, then whatever was waiting (the stars).
+function pzMkDone(bad){const m=UI.pzMk;if(!m)return;clearTimeout(m.t);UI.pzMk=null;for(const l of S.links)l.cut=0;compute();
+ mkEnd(!(bad!=null?bad:m.bad),true);renderAll();if(m.then)m.then();}
+// Skip: straight to the end; the verdict is already known.
+function pzMkSkip(){if(UI.pzMk)pzMkDone(pzEval().n1?0:1);}
+// Gone without a word: the build changed under it, or the puzzle closed.
+function pzMkStop(){const m=UI.pzMk;if(!m)return;clearTimeout(m.t);UI.pzMk=null;for(const l of S.links)l.cut=0;mkStop();}
diff --git a/src/game/90-actions/95-puzzles.js b/src/game/90-actions/95-puzzles.js
index add3575..902e5cc 100644
--- a/src/game/90-actions/95-puzzles.js
+++ b/src/game/90-actions/95-puzzles.js
@@ -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(!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);},
diff --git a/src/game/95-modals/95-puzzles.js b/src/game/95-modals/95-puzzles.js
index e0311fd..37ac637 100644
--- a/src/game/95-modals/95-puzzles.js
+++ b/src/game/95-modals/95-puzzles.js
@@ -29,6 +29,7 @@ function pzRender(){const el=$('pzBox');if(!pzOn()){el.hidden=true;return;}el.hi
const w=e.worst;
h+=!e.goal?`
`;
if(h!==UI._pzh){UI._pzh=h;morph(el,h);}}
// Trenches on a pair get numbers, cables their names, so parallel links say where they run.
@@ -91,13 +92,13 @@ function pzLinkModal(a,b,keep){const kb=pzKind(b);
h+=`
`;
openModal(h);}
// ---------- results ----------
-function pzLine(e){return e.stars>=3?tr('puzzles.a_backhoe_walks_into_your_network'):!e.n1&&!e.cheap?tr('puzzles.it_works_finance_and_the_backhoe'):!e.n1?tr('puzzles.one_backhoe_away_from_a_very'):tr('puzzles.rock_solid_and_gold_plated_the');}
+function pzLine(e){return e.stars>=3?tr('puzzles.a_chaos_monkey_walks_into_your_network'):!e.n1&&!e.cheap?tr('puzzles.it_works_finance_and_the_monkey'):!e.n1?tr('puzzles.one_monkey_away_from_a_very'):tr('puzzles.rock_solid_and_gold_plated_the');}
// Stars still to win in this puzzle's pack, from the progress just saved.
function pzPackLeft(P){const d=pzDef(P.id);if(!d)return null;const p=pzLoad(),xs=PZ.filter(x=>x.pack===d.pack);return xs.length*3-xs.reduce((a,x)=>a+((p.s[x.id]||{}).st|0),0);}
function pzConfetti(){if(!animOn())return '';const cols=['#FF4F9A','#FFD23F','#22C47A','#2F8CFF','#FF8A3D','#7B61FF'];let h='';
diff --git a/src/i18n/en.js b/src/i18n/en.js
index 15850a5..b1fbcda 100644
--- a/src/i18n/en.js
+++ b/src/i18n/en.js
@@ -2883,8 +2883,8 @@
"progress.under_attack_now":"Under attack now",
"progress.your_score_peak_traffic":"Your score: peak traffic",
"progress.your_traffic_to_and_from_asia":"Your traffic to and from Asia",
-"puzzles.a_backhoe_walks_into_your_network":"A backhoe walks into your network. Nothing happens.",
"puzzles.a_bigger_boat":"A Bigger Boat",
+"puzzles.a_chaos_monkey_walks_into_your_network":"A chaos monkey walks into your network. Nothing happens.",
"puzzles.a_cut_on_where_drops_g":"A cut on {where} drops {g}",
"puzzles.a_different_route":"A different route",
"puzzles.a_diverse_route":"A diverse route (+40%)",
@@ -2908,11 +2908,12 @@
"puzzles.carry_list":"Carry: {list}.",
"puzzles.carrying":"Carrying",
"puzzles.carrying_on_this_pair":"Carrying (all {n} links on this pair)",
+"puzzles.city_loses_g":"{city} −{g}",
"puzzles.content_lives_in_list":"Content lives in {list}: eyeballs pull from the nearest.",
"puzzles.copied_paste_it_anywhere":"Copied! Paste it anywhere: {t}",
"puzzles.de_kicks_sales_has_your_number":"DE-KICKS sales has your number. Connect Germany without Frankfurt.",
"puzzles.delivered":"Delivered",
-"puzzles.diverse_route_40_survives_a_backhoe":"Diverse route (+40%, survives a backhoe)",
+"puzzles.diverse_route_40_survives_the_monkey":"Diverse route (+40%, survives the chaos monkey)",
"puzzles.down_under_up_and_running":"Down Under, Up and Running",
"puzzles.drag_from_a_pink_pop_to":"Drag from a pink POP to another city to lease a wave",
"puzzles.drag_from_this_pop_onto_another":"Drag from this POP onto another puzzle city, or pick one here.",
@@ -2939,15 +2940,17 @@
"puzzles.hub_cap":"Hub Cap",
"puzzles.includes_a_new_pop_in_city":"Includes a new POP in {city} ({price} for a year).",
"puzzles.installed":"installed",
-"puzzles.it_works_finance_and_the_backhoe":"It works! Finance and the backhoe would like a word.",
+"puzzles.it_works_finance_and_the_monkey":"It works! Finance and the chaos monkey would like a word.",
"puzzles.keep_building":"Keep building",
"puzzles.kiwi_fruit_salad":"Kiwi Fruit Salad",
"puzzles.latency":"Latency",
"puzzles.latency_caps":"latency caps",
"puzzles.lease_a_wave_to":"Lease a wave to",
+"puzzles.let_the_chaos_monkey_loose":"🐒 Let the chaos monkey loose",
"puzzles.loading_this_week_s_puzzle":"Loading this week's puzzle…",
"puzzles.london_wants_half_a_terabit_your":"London wants half a terabit, and your routers came off eBuy.",
"puzzles.model_facts":"{cap} · {ports} ports · waves up to {wave}",
+"puzzles.monkey_snip":"🐒 Snip!",
"puzzles.more_puzzles":"More puzzles",
"puzzles.n_1_club":"N-1 Club",
"puzzles.n_1_deliver_everything_first":"N-1: deliver everything first",
@@ -2977,7 +2980,7 @@
"puzzles.not_through_frankfurt":"Not Through Frankfurt",
"puzzles.off_limits":"Off limits",
"puzzles.on_the_house":"On the house",
-"puzzles.one_backhoe_away_from_a_very":"One backhoe away from a very long night. Add a second path for ⭐⭐⭐.",
+"puzzles.one_monkey_away_from_a_very":"One chaos monkey away from a very long night. Add a second path for ⭐⭐⭐.",
"puzzles.one_ring_through_every_pop":"One ring through every POP",
"puzzles.one_very_big_island_and_a":"One very big island, and a lot of very empty fiber.",
"puzzles.open_a_pop_cost":"Open a POP · {cost}",
@@ -3007,12 +3010,13 @@
"puzzles.same_cable_same_anchor":"Same cable as a link you have: one anchor takes both.",
"puzzles.same_puzzle_for_everyone_this_week":"Same puzzle for everyone this week",
"puzzles.same_trench_cheaper":"Same trench (cheaper)",
-"puzzles.same_trench_cheaper_one_backhoe_cuts":"Same trench (cheaper, one backhoe cuts both)",
+"puzzles.same_trench_cheaper_one_snip_cuts":"Same trench (cheaper, one snip cuts both)",
"puzzles.sao_paulo_to_miami_before_the":"São Paulo to Miami before the caipirinha gets warm.",
"puzzles.sea_to_shining_sea":"Sea to Shining Sea",
"puzzles.share_line":"Series of Tubes puzzle {what} {stars} {spend} · seriesoftub.es",
"puzzles.six_cities_a_few_gigs_each":"Six cities, a few gigs each, and a router with eight ports. Count before you dig.",
"puzzles.size":"Size",
+"puzzles.skip_the_monkey":"Skip",
"puzzles.small_networks_real_traffic":"Small networks, real traffic",
"puzzles.spent_x":"Spent {x}",
"puzzles.spent_x_of_y":"Spent {x} / {y}",
diff --git a/tests/puzzle-monkey.test.js b/tests/puzzle-monkey.test.js
new file mode 100644
index 0000000..ccfa6e5
--- /dev/null
+++ b/tests/puzzle-monkey.test.js
@@ -0,0 +1,42 @@
+// The chaos monkey in every puzzle: it acts out the N-1 star on the map, and the stars never wait on it in tests.
+const test = require('node:test');
+const assert = require('node:assert/strict');
+const { load } = require('./harness');
+
+const lay = (ev, a, b, via, div = 1) => ev(`if(!S.pops['${a}'])ACT.pzPop({city:'${a}'});ACT.pzLinkTo({a:'${a}',b:'${b}'});ACT.pzVia({v:'${via}'});ACT.pzDiv({v:${div}});ACT.pzLink({tier:1});closeModal()`);
+const live = (ev) => ev('UI.drawnAt=performance.now()'); // as if the map were being drawn
+
+test('a new star sets the monkey loose, then the stars show; skipping goes straight to them', () => {
+ const { ev, errors } = load();
+ ev("ACT.pzStart({id:'bigboat'})");
+ live(ev);
+ lay(ev, 'fra', 'par', 'land'); lay(ev, 'fra', 'par', 'land');
+ assert.ok(ev('pzEval().goal'), 'delivered');
+ assert.ok(ev('!!UI.pzMk'), 'the monkey is reviewing the build');
+ assert.ok(ev('!!UI.mk'), 'and it is on the map');
+ assert.ok(ev("!!document.querySelector('#pzBox [data-act=pzMkSkip]')"), 'with a skip button');
+ assert.equal(ev('pzEval().goal'), true, 'its cuts never change the stars');
+ ev('ACT.pzMkSkip()');
+ assert.equal(ev('UI.pzMk'), null);
+ assert.ok(ev('S.links.every(l=>!l.cut)'), 'every tube whole again');
+ assert.match(ev("document.getElementById('toasts').textContent+document.getElementById('modalCard').textContent"), /⭐/);
+ assert.ok(ev("!!document.querySelector('#pzBox [data-act=pzMonkey]')"), 'and it can be let loose again');
+ assert.deepEqual(errors, []);
+});
+
+test('the monkey snips each trench in turn, and an edit sends it away', () => {
+ const { ev, errors } = load();
+ ev("ACT.pzStart({id:'bigboat'})");
+ lay(ev, 'fra', 'par', 'land'); lay(ev, 'fra', 'par', 'land');
+ ev("pzMonkey()");
+ assert.equal(ev('UI.pzMk.units.length'), 2);
+ assert.equal(ev('S.links.some(l=>l.cut)'), false, 'nothing cut while it runs');
+ ev('pzMkHit()');
+ assert.equal(ev('S.links.filter(l=>l.cut).length'), 1, 'one trench cut when it arrives');
+ ev('pzMkStep()');
+ assert.equal(ev('S.links.some(l=>l.cut)'), false, 'and whole again when it runs on');
+ lay(ev, 'fra', 'par', 'land');
+ assert.equal(ev('UI.pzMk'), null, 'a change to the build stops the review');
+ assert.equal(ev('UI.mk'), null);
+ assert.deepEqual(errors, []);
+});
diff --git a/tests/puzzles.test.js b/tests/puzzles.test.js
index 5dfddd8..f4a45b8 100644
--- a/tests/puzzles.test.js
+++ b/tests/puzzles.test.js
@@ -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 →/);