diff --git a/.claude/skills/gameplay-rules/SKILL.md b/.claude/skills/gameplay-rules/SKILL.md
index 770d3ce..6e691fb 100644
--- a/.claude/skills/gameplay-rules/SKILL.md
+++ b/.claude/skills/gameplay-rules/SKILL.md
@@ -63,3 +63,4 @@ These are what the game promises, held up by `tests/gameplay-rules.test.js` (one
| F1 | A new network gets a gentle start: no outage before day 45, no event before day 40 and only good news before day 50, nothing sold out for 90 days, hardware prices hold for 180, and a new customer loses no mood for 15 days. | New players learn before they get punished. |
| F2 | On On-call, a simple build in a start city (broadband, the cheapest 100G transit, an exchange port with the route server) makes money within 3 months, in Frankfurt, New York, Singapore and Johannesburg. | Seeded today it turns a profit in month 1 or 2; a balance change that breaks this makes the start too hard. |
| F3 | A specialist path (#187) only brings a customer type in below its level when the network can already serve it, or nearly: the spotted cities have POPs, the latency is met, the fiber carries at least three quarters of the smallest order. | Capability, not luck: an offer you cannot fulfil with a reasonable build is a trap. |
+| F4 | The chaos monkey visits only On-call and BGP at 3 a.m. (never Change Freeze, Sandbox, puzzles or scenarios), not before day 180, for 120 to 240 days; while it is here its snips replace the ordinary failures, each snip heals within a week, and it goes after tubes with no other way round first. | A test of resilience you can prepare for, not a pile-on: the reward goes to networks built with a second path. |
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 90442bb..ac04ead 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,8 @@ 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.
- Customers now call when your network can already serve them, not only when your level says so (#187). A fast path between two finance cities brings trading firms, lit dark fiber brings AI interconnects, two diverse paths in one country bring sovereign clouds and broadband in a big city brings cloud gaming, each at its smallest size and with a note on what they spotted; your level still makes them bigger and more frequent.
diff --git a/site/i18n/de.js b/site/i18n/de.js
index f4418f0..9715f99 100644
--- a/site/i18n/de.js
+++ b/site/i18n/de.js
@@ -146,6 +146,7 @@
"badges.fire_the_hackback_3000tm_and_flatten":"Feuere den HackBack 3000™ ab und plätte einen Unschuldigen.",
"badges.friend_of_giants":"Freund der Riesen",
"badges.get_a_subsea_cable_bitten_by":"Lass ein Seekabel von einem Hai anknabbern.",
+"badges.get_a_visit_from_the_chaos_monkey":"Bekomme Besuch vom Chaos-Affen.",
"badges.get_bitten_by_sharks_3_times":"Werde in einem Spiel dreimal von Haien gebissen.",
"badges.get_de_peered_by_a_big":"Werde von einem großen Netz de-peert.",
"badges.go_transit_free":"Werde transitfrei.",
@@ -153,7 +154,6 @@
"badges.got_total_this_game_ever_ever":"{got}/{total} in diesem Spiel · {ever} insgesamt",
"badges.haggle_a_de_kicks_quote_down":"Handle ein DE-KICKS-Angebot herunter.",
"badges.have_a_cable_cut_by_a":"Lass ein Kabel von einem schleifenden Anker kappen.",
-"badges.have_a_fiber_cut":"Erlebe einen Faserbruch.",
"badges.have_a_second_site_in_3":"Habe in 3 Städten einen zweiten Standort.",
"badges.have_auto_te_move_100_gbps":"Lass Auto-TE auf einen Schlag 100 Gbps auf Ausweichpfade verschieben.",
"badges.have_pops_in_50_cities":"Habe POPs in 50 Städten.",
@@ -176,9 +176,11 @@
"badges.live_through_the_day_half_the":"Überlebe den Tag, an dem das halbe Internet ausfiel.",
"badges.lose_a_metro_ring_to_one":"Verliere einen Metro-Ring an einen einzigen Bagger.",
"badges.lose_fiber_to_a_llama_herd":"Verliere Glasfaser an eine Lamaherde.",
-"badges.met_the_backhoe":"Den Bagger kennengelernt",
+"badges.met_the_chaos_monkey":"Den Chaos-Affen kennengelernt",
+"badges.monkey_proof":"Affensicher",
"badges.never_paid_list_price":"Nie den Listenpreis bezahlt",
"badges.opt_out_of_3_auto_enrolled":"Kündige 3 automatisch gebuchte Zusatzleistungen.",
+"badges.outlast_a_chaos_monkey_visit":"Überstehe einen Besuch des Chaos-Affen, ohne dass ein Kunde etwas merkt",
"badges.over_the_mountains":"Über die Berge",
"badges.paid_pnis_with_all_three_korean":"Bezahlte PNIs mit allen drei koreanischen Platzhirschen.",
"badges.peer_at_an_ix_remotely":"Peere remote an einem IX.",
@@ -562,6 +564,18 @@
"capacity_deals.what_price_mo_deliver_within_n":"{what} · {price}/Monat · Lieferung innerhalb von {n} Tagen nach Unterschrift",
"capacity_deals.what_price_mo_due_date":"{what} · {price}/Monat nach Lieferung · fällig am {date}",
"capacity_deals.wholesale_waves":"Wholesale-Waves",
+"chaos_monkey.arrived":"🐒 Ein Chaos-Affe ist in dein Netz gekommen! Etwa {n} Tage lang kappt er absichtlich Leitungen, zuerst die ohne Ersatzweg. Übersteh es, ohne dass ein Kunde etwas merkt, und kassier einen Bonus.",
+"chaos_monkey.banana":"🍌 Banane werfen {cost}",
+"chaos_monkey.bribed":"🍌 Banane angenommen. Der Chaos-Affe ist mit seinem Snack abgezogen. Dein Pager hat Pause.",
+"chaos_monkey.card":"Kappt noch {n} Tage lang Leitungen. Bisher gekappt: {s}, von Kunden bemerkt: {hurt}.",
+"chaos_monkey.loose":"Chaos-Affe los",
+"chaos_monkey.rerouted":"🐒 Schnipp! Der Chaos-Affe hat {a} ⇄ {b} gekappt, und der Verkehr ging einfach außen herum. Er wirkt enttäuscht.",
+"chaos_monkey.snip_sprayed":"Der Chaos-Affe hat {a} ⇄ {b} mit etwas Klebrigem eingesprüht. Die Leitung ist down.",
+"chaos_monkey.snip_to_see":"Der Chaos-Affe hat {a} ⇄ {b} gekappt, nur um zu sehen, was passiert.",
+"chaos_monkey.snip_unplugged":"Der Chaos-Affe hat {a} ⇄ {b} ausgesteckt und grinst dich an.",
+"chaos_monkey.survived":"🐒 Du hast den Chaos-Affen überstanden! {n}-mal gekappt, und kein Kunde hat es gemerkt. Resilienz-Bonus: {cash}.",
+"chaos_monkey.tap":"🐒 Er kappt absichtlich deine Leitungen, um zu beweisen, dass du es überstehst. Eine Banane würde ihn nach Hause schicken.",
+"chaos_monkey.went_home":"🐒 Der Chaos-Affe ist nach Hause gegangen. Gekappt: {n}. Von Kunden bemerkt: {hurt}. Wo es wehtat, hätte ein zweiter Weg dich gerettet.",
"cities.270_million_people_on_17_000":"270 Millionen Menschen auf 17.000 Inseln. Mobile first und sehr hungrig nach Bandbreite.",
"cities.a_capital_high_in_the_andes":"Eine Hauptstadt hoch in den Anden, knapp südlich des Äquators, die in US-Dollar zahlt. Vulkane an jedem Horizont.",
"cities.a_capital_in_a_valley_under":"Eine Hauptstadt in einem Tal unter einem grünen Berg. Das nationale Stromnetz hatte schon ein paar berüchtigte schwarze Tage, also bring einen Generator mit.",
@@ -2979,8 +2993,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%)",
@@ -3004,11 +3018,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.",
@@ -3035,15 +3050,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",
@@ -3073,7 +3090,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}",
@@ -3103,12 +3120,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 5868996..605bade 100644
--- a/site/i18n/es.js
+++ b/site/i18n/es.js
@@ -144,6 +144,7 @@
"badges.fire_the_hackback_3000tm_and_flatten":"Dispara el HackBack 3000™ y arrasa a un inocente.",
"badges.friend_of_giants":"Amigo de gigantes",
"badges.get_a_subsea_cable_bitten_by":"Haz que un tiburón muerda un cable submarino.",
+"badges.get_a_visit_from_the_chaos_monkey":"Recibe la visita del mono del caos.",
"badges.get_bitten_by_sharks_3_times":"Que te muerdan los tiburones 3 veces en una partida.",
"badges.get_de_peered_by_a_big":"Que una red grande te quite el peering.",
"badges.go_transit_free":"Sé libre de tránsito.",
@@ -151,7 +152,6 @@
"badges.got_total_this_game_ever_ever":"{got}/{total} en esta partida · {ever} en total",
"badges.haggle_a_de_kicks_quote_down":"Regatea a la baja una oferta de DE-KICKS.",
"badges.have_a_cable_cut_by_a":"Que un ancla arrastrada corte un cable.",
-"badges.have_a_fiber_cut":"Sufre un corte de fibra.",
"badges.have_a_second_site_in_3":"Ten una segunda sede en 3 áreas metropolitanas.",
"badges.have_auto_te_move_100_gbps":"Haz que Auto-TE mueva 100 Gbps a rutas alternativas de golpe.",
"badges.have_pops_in_50_cities":"Ten POPs en 50 ciudades.",
@@ -174,9 +174,11 @@
"badges.live_through_the_day_half_the":"Sobrevive al día en que se cayó medio internet.",
"badges.lose_a_metro_ring_to_one":"Pierde un anillo metropolitano por culpa de una sola retroexcavadora.",
"badges.lose_fiber_to_a_llama_herd":"Pierde fibra por culpa de una manada de llamas.",
-"badges.met_the_backhoe":"Conoció a la retroexcavadora",
+"badges.met_the_chaos_monkey":"Conoció al mono del caos",
+"badges.monkey_proof":"A prueba de monos",
"badges.never_paid_list_price":"Nunca pagó precio de lista",
"badges.opt_out_of_3_auto_enrolled":"Rechaza 3 complementos de alta automática.",
+"badges.outlast_a_chaos_monkey_visit":"Aguanta una visita del mono del caos sin que ningún cliente lo note",
"badges.over_the_mountains":"Sobre las montañas",
"badges.paid_pnis_with_all_three_korean":"Paga PNIs a los tres operadores históricos coreanos.",
"badges.peer_at_an_ix_remotely":"Haz peering en un IX de forma remota.",
@@ -560,6 +562,18 @@
"capacity_deals.what_price_mo_deliver_within_n":"{what} · {price}/mes · entregar en {n} días desde la firma",
"capacity_deals.what_price_mo_due_date":"{what} · {price}/mes una vez entregado · vence el {date}",
"capacity_deals.wholesale_waves":"Ondas al por mayor",
+"chaos_monkey.arrived":"🐒 ¡Un mono del caos se ha colado en tu red! Durante unos {n} días corta tubos a propósito, primero los que no tienen ruta de respaldo. Aguanta sin que ningún cliente lo note y te llevas un bonus.",
+"chaos_monkey.banana":"🍌 Lanzar un plátano {cost}",
+"chaos_monkey.bribed":"🍌 Plátano aceptado. El mono del caos se fue con su merienda. Tu busca puede descansar.",
+"chaos_monkey.card":"Cortando tubos {n} días más. Cortes hasta ahora: {s}, notados por clientes: {hurt}.",
+"chaos_monkey.loose":"Mono del caos suelto",
+"chaos_monkey.rerouted":"🐒 ¡Zas! El mono del caos cortó {a} ⇄ {b} y el tráfico simplemente dio la vuelta. Parece decepcionado.",
+"chaos_monkey.snip_sprayed":"El mono del caos roció {a} ⇄ {b} con algo pegajoso. Está caído.",
+"chaos_monkey.snip_to_see":"El mono del caos cortó {a} ⇄ {b}, solo para ver qué pasaba.",
+"chaos_monkey.snip_unplugged":"El mono del caos desenchufó {a} ⇄ {b} y te sonríe.",
+"chaos_monkey.survived":"🐒 ¡Has aguantado al mono del caos! {n} cortes y ningún cliente lo notó. Bonus de resiliencia: {cash}.",
+"chaos_monkey.tap":"🐒 Corta tus tubos a propósito, para demostrar que puedes sobrevivir. Un plátano lo mandaría a casa.",
+"chaos_monkey.went_home":"🐒 El mono del caos se fue a casa. Cortes: {n}. Notados por clientes: {hurt}. Donde dolió, una segunda ruta te habría salvado.",
"cities.270_million_people_on_17_000":"270 millones de personas en 17 000 islas. Móvil primero, y con muchísima hambre de ancho de banda.",
"cities.a_capital_high_in_the_andes":"Una capital en lo alto de los Andes, justo al sur del ecuador, que paga en dólares estadounidenses. Volcanes en cada horizonte.",
"cities.a_capital_in_a_valley_under":"Una capital en un valle bajo una montaña verde. La red eléctrica nacional ha tenido días malos famosos, así que trae un generador.",
@@ -2977,8 +2991,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%)",
@@ -3002,11 +3016,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í.",
@@ -3033,15 +3048,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",
@@ -3071,7 +3088,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}",
@@ -3101,12 +3118,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 16b29fd..8ba1aeb 100644
--- a/site/i18n/fr.js
+++ b/site/i18n/fr.js
@@ -144,6 +144,7 @@
"badges.fire_the_hackback_3000tm_and_flatten":"Lance le HackBack 3000™ et écrase un innocent.",
"badges.friend_of_giants":"Ami des géants",
"badges.get_a_subsea_cable_bitten_by":"Fais mordre un câble sous-marin par un requin.",
+"badges.get_a_visit_from_the_chaos_monkey":"Reçois la visite du singe du chaos.",
"badges.get_bitten_by_sharks_3_times":"Fais-toi mordre par des requins 3 fois dans une même partie.",
"badges.get_de_peered_by_a_big":"Fais-toi couper le peering par un gros réseau.",
"badges.go_transit_free":"Deviens transit-free.",
@@ -151,7 +152,6 @@
"badges.got_total_this_game_ever_ever":"{got}/{total} dans cette partie · {ever} au total",
"badges.haggle_a_de_kicks_quote_down":"Fais baisser un devis DE-KICKS en négociant.",
"badges.have_a_cable_cut_by_a":"Fais couper un câble par une ancre qui traîne.",
-"badges.have_a_fiber_cut":"Subis une coupure de fibre.",
"badges.have_a_second_site_in_3":"Aie un second site dans 3 métropoles.",
"badges.have_auto_te_move_100_gbps":"Fais déplacer 100 Gbps d’un coup sur des chemins alternatifs par l’Auto-TE.",
"badges.have_pops_in_50_cities":"Aie des POP dans 50 villes.",
@@ -174,9 +174,11 @@
"badges.live_through_the_day_half_the":"Survis au jour où la moitié d’internet est tombée.",
"badges.lose_a_metro_ring_to_one":"Perds un anneau métropolitain à cause d’une seule pelleteuse.",
"badges.lose_fiber_to_a_llama_herd":"Perds de la fibre à cause d’un troupeau de lamas.",
-"badges.met_the_backhoe":"Rencontre du troisième godet",
+"badges.met_the_chaos_monkey":"Rencontre avec le singe du chaos",
+"badges.monkey_proof":"À l'épreuve des singes",
"badges.never_paid_list_price":"Jamais au prix catalogue",
"badges.opt_out_of_3_auto_enrolled":"Désactive 3 options souscrites d’office.",
+"badges.outlast_a_chaos_monkey_visit":"Tiens bon face à une visite du singe du chaos sans qu'aucun client ne s'en aperçoive",
"badges.over_the_mountains":"Par-delà les montagnes",
"badges.paid_pnis_with_all_three_korean":"Des PNI payants avec les trois opérateurs historiques coréens.",
"badges.peer_at_an_ix_remotely":"Fais du peering à distance sur un IX.",
@@ -560,6 +562,18 @@
"capacity_deals.what_price_mo_deliver_within_n":"{what} · {price}/mois · à livrer dans les {n} jours après la signature",
"capacity_deals.what_price_mo_due_date":"{what} · {price}/mois une fois livré · échéance {date}",
"capacity_deals.wholesale_waves":"Longueurs d'onde en gros",
+"chaos_monkey.arrived":"🐒 Un singe du chaos s'est introduit dans ton réseau ! Pendant environ {n} jours, il coupe des tubes exprès, d'abord ceux sans chemin de secours. Tiens bon sans qu'aucun client ne s'en aperçoive et touche un bonus.",
+"chaos_monkey.banana":"🍌 Lancer une banane {cost}",
+"chaos_monkey.bribed":"🍌 Banane acceptée. Le singe du chaos est reparti avec son goûter. Ton bipeur peut souffler.",
+"chaos_monkey.card":"Coupe des tubes encore {n} jours. Coupures jusqu'ici : {s}, ressenties par les clients : {hurt}.",
+"chaos_monkey.loose":"Singe du chaos en liberté",
+"chaos_monkey.rerouted":"🐒 Clac ! Le singe du chaos a coupé {a} ⇄ {b}, et le trafic a simplement fait le tour. Il a l'air déçu.",
+"chaos_monkey.snip_sprayed":"Le singe du chaos a aspergé {a} ⇄ {b} de quelque chose de collant. C'est en panne.",
+"chaos_monkey.snip_to_see":"Le singe du chaos a coupé {a} ⇄ {b}, juste pour voir ce qui se passerait.",
+"chaos_monkey.snip_unplugged":"Le singe du chaos a débranché {a} ⇄ {b} et te fait un grand sourire.",
+"chaos_monkey.survived":"🐒 Tu as tenu face au singe du chaos ! {n} coupures et aucun client n'a rien vu. Bonus de résilience : {cash}.",
+"chaos_monkey.tap":"🐒 Il coupe tes tubes exprès, pour prouver que tu peux y survivre. Une banane le renverrait chez lui.",
+"chaos_monkey.went_home":"🐒 Le singe du chaos est rentré chez lui. Coupures : {n}. Ressenties par les clients : {hurt}. Là où ça a fait mal, un deuxième chemin t'aurait sauvé.",
"cities.270_million_people_on_17_000":"270 millions d’habitants sur 17 000 îles. Mobile first, et très gourmands en bande passante.",
"cities.a_capital_high_in_the_andes":"Une capitale perchée dans les Andes, juste au sud de l’équateur, qui paie en dollars américains. Des volcans à chaque horizon.",
"cities.a_capital_in_a_valley_under":"Une capitale dans une vallée au pied d’une montagne verte. Le réseau électrique national a connu quelques jours noirs célèbres : prévois un groupe électrogène.",
@@ -2977,8 +2991,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 %)",
@@ -3002,11 +3016,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.",
@@ -3033,15 +3048,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",
@@ -3071,7 +3088,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}",
@@ -3101,12 +3118,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 221be11..69b9299 100644
--- a/site/i18n/it.js
+++ b/site/i18n/it.js
@@ -144,6 +144,7 @@
"badges.fire_the_hackback_3000tm_and_flatten":"Spara con l’HackBack 3000™ e travolgi un innocente.",
"badges.friend_of_giants":"Amico dei giganti",
"badges.get_a_subsea_cable_bitten_by":"Fatti mordere un cavo sottomarino da uno squalo.",
+"badges.get_a_visit_from_the_chaos_monkey":"Ricevi la visita della scimmia del caos.",
"badges.get_bitten_by_sharks_3_times":"Fatti mordere dagli squali 3 volte in una partita.",
"badges.get_de_peered_by_a_big":"Fatti togliere il peering da una grande rete.",
"badges.go_transit_free":"Diventa transit-free.",
@@ -151,7 +152,6 @@
"badges.got_total_this_game_ever_ever":"{got}/{total} in questa partita · {ever} in totale",
"badges.haggle_a_de_kicks_quote_down":"Tira giù un preventivo DE-KICKS trattando.",
"badges.have_a_cable_cut_by_a":"Fatti tagliare un cavo da un’ancora trascinata.",
-"badges.have_a_fiber_cut":"Subisci un taglio di fibra.",
"badges.have_a_second_site_in_3":"Apri un secondo sito in 3 città.",
"badges.have_auto_te_move_100_gbps":"Fai spostare all’Auto-TE 100 Gbps su percorsi alternativi in un colpo solo.",
"badges.have_pops_in_50_cities":"Apri POP in 50 città.",
@@ -174,9 +174,11 @@
"badges.live_through_the_day_half_the":"Sopravvivi al giorno in cui è caduta mezza internet.",
"badges.lose_a_metro_ring_to_one":"Perdi un anello metro per colpa di una sola ruspa.",
"badges.lose_fiber_to_a_llama_herd":"Perdi la fibra per colpa di un branco di lama.",
-"badges.met_the_backhoe":"Incontro con la ruspa",
+"badges.met_the_chaos_monkey":"Incontro con la scimmia del caos",
+"badges.monkey_proof":"A prova di scimmia",
"badges.never_paid_list_price":"Mai pagato il listino",
"badges.opt_out_of_3_auto_enrolled":"Disattiva 3 add-on attivati d’ufficio.",
+"badges.outlast_a_chaos_monkey_visit":"Resisti a una visita della scimmia del caos senza che nessun cliente se ne accorga",
"badges.over_the_mountains":"Oltre le montagne",
"badges.paid_pnis_with_all_three_korean":"PNI a pagamento con tutti e tre gli incumbent coreani.",
"badges.peer_at_an_ix_remotely":"Fai peering da remoto su un IX.",
@@ -560,6 +562,18 @@
"capacity_deals.what_price_mo_deliver_within_n":"{what} · {price}/mese · da consegnare entro {n} giorni dalla firma",
"capacity_deals.what_price_mo_due_date":"{what} · {price}/mese a consegna avvenuta · scadenza {date}",
"capacity_deals.wholesale_waves":"Wave all'ingrosso",
+"chaos_monkey.arrived":"🐒 Una scimmia del caos è entrata nella tua rete! Per circa {n} giorni taglia tubi apposta, prima quelli senza un percorso di riserva. Resisti senza che nessun cliente se ne accorga e avrai un bonus.",
+"chaos_monkey.banana":"🍌 Lancia una banana {cost}",
+"chaos_monkey.bribed":"🍌 Banana accettata. La scimmia del caos se n'è andata con la sua merenda. Il tuo cercapersone può riposare.",
+"chaos_monkey.card":"Taglia tubi per altri {n} giorni. Tagli finora: {s}, notati dai clienti: {hurt}.",
+"chaos_monkey.loose":"Scimmia del caos in libertà",
+"chaos_monkey.rerouted":"🐒 Zac! La scimmia del caos ha tagliato {a} ⇄ {b} e il traffico ha semplicemente girato intorno. Sembra delusa.",
+"chaos_monkey.snip_sprayed":"La scimmia del caos ha spruzzato {a} ⇄ {b} con qualcosa di appiccicoso. È giù.",
+"chaos_monkey.snip_to_see":"La scimmia del caos ha tagliato {a} ⇄ {b}, solo per vedere cosa succede.",
+"chaos_monkey.snip_unplugged":"La scimmia del caos ha staccato {a} ⇄ {b} e ti sorride.",
+"chaos_monkey.survived":"🐒 Hai resistito alla scimmia del caos! {n} tagli e nessun cliente se n'è accorto. Bonus resilienza: {cash}.",
+"chaos_monkey.tap":"🐒 Taglia i tuoi tubi apposta, per dimostrare che puoi sopravvivere. Una banana la rimanderebbe a casa.",
+"chaos_monkey.went_home":"🐒 La scimmia del caos è tornata a casa. Tagli: {n}. Notati dai clienti: {hurt}. Dove ha fatto male, un secondo percorso ti avrebbe salvato.",
"cities.270_million_people_on_17_000":"270 milioni di persone su 17.000 isole. Mobile first, e affamatissime di banda.",
"cities.a_capital_high_in_the_andes":"Una capitale in alto sulle Ande, appena a sud dell’equatore, che paga in dollari USA. Vulcani su ogni orizzonte.",
"cities.a_capital_in_a_valley_under":"Una capitale in una valle sotto una montagna verde. La rete elettrica nazionale ha avuto qualche giornata nera famosa, quindi porta un generatore.",
@@ -2977,8 +2991,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%)",
@@ -3002,11 +3016,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.",
@@ -3033,15 +3048,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",
@@ -3071,7 +3088,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}",
@@ -3101,12 +3118,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 61b222b..00c2e32 100644
--- a/site/i18n/pt.js
+++ b/site/i18n/pt.js
@@ -144,6 +144,7 @@
"badges.fire_the_hackback_3000tm_and_flatten":"Dispare o HackBack 3000™ e derrube um inocente.",
"badges.friend_of_giants":"Amigo dos gigantes",
"badges.get_a_subsea_cable_bitten_by":"Tenha um cabo submarino mordido por um tubarão.",
+"badges.get_a_visit_from_the_chaos_monkey":"Receba a visita do macaco do caos.",
"badges.get_bitten_by_sharks_3_times":"Seja mordido por tubarões 3 vezes numa partida.",
"badges.get_de_peered_by_a_big":"Leve um corte de peering de uma rede grande.",
"badges.go_transit_free":"Fique transit-free.",
@@ -151,7 +152,6 @@
"badges.got_total_this_game_ever_ever":"{got}/{total} nesta partida · {ever} no total",
"badges.haggle_a_de_kicks_quote_down":"Pechinche um orçamento da DE-KICKS.",
"badges.have_a_cable_cut_by_a":"Tenha um cabo cortado por uma âncora arrastada.",
-"badges.have_a_fiber_cut":"Sofra um corte de fibra.",
"badges.have_a_second_site_in_3":"Tenha um segundo site em 3 cidades.",
"badges.have_auto_te_move_100_gbps":"Faça o Auto-TE mover 100 Gbps para caminhos alternativos de uma vez.",
"badges.have_pops_in_50_cities":"Tenha POPs em 50 cidades.",
@@ -174,9 +174,11 @@
"badges.live_through_the_day_half_the":"Sobreviva ao dia em que metade da internet caiu.",
"badges.lose_a_metro_ring_to_one":"Perca um anel metro para uma única retroescavadeira.",
"badges.lose_fiber_to_a_llama_herd":"Perca fibra para um rebanho de lhamas.",
-"badges.met_the_backhoe":"Conheceu a retroescavadeira",
+"badges.met_the_chaos_monkey":"Conheceu o macaco do caos",
+"badges.monkey_proof":"À prova de macaco",
"badges.never_paid_list_price":"Nunca paguei preço de tabela",
"badges.opt_out_of_3_auto_enrolled":"Cancele 3 add-ons ativados sem você pedir.",
+"badges.outlast_a_chaos_monkey_visit":"Aguente uma visita do macaco do caos sem nenhum cliente perceber",
"badges.over_the_mountains":"Por cima das montanhas",
"badges.paid_pnis_with_all_three_korean":"PNIs pagos com as três incumbentes coreanas.",
"badges.peer_at_an_ix_remotely":"Faça peering remoto num IX.",
@@ -560,6 +562,18 @@
"capacity_deals.what_price_mo_deliver_within_n":"{what} · {price}/mês · entregar em até {n} dias após assinar",
"capacity_deals.what_price_mo_due_date":"{what} · {price}/mês após a entrega · prazo {date}",
"capacity_deals.wholesale_waves":"Ondas no atacado",
+"chaos_monkey.arrived":"🐒 Um macaco do caos entrou na sua rede! Durante uns {n} dias, ele corta tubos de propósito, primeiro os que não têm rota de reserva. Aguente sem nenhum cliente perceber e ganhe um bônus.",
+"chaos_monkey.banana":"🍌 Jogar uma banana {cost}",
+"chaos_monkey.bribed":"🍌 Banana aceita. O macaco do caos foi embora com o lanche. Seu pager pode descansar.",
+"chaos_monkey.card":"Cortando tubos por mais {n} dias. Cortes até agora: {s}, sentidos pelos clientes: {hurt}.",
+"chaos_monkey.loose":"Macaco do caos à solta",
+"chaos_monkey.rerouted":"🐒 Zás! O macaco do caos cortou {a} ⇄ {b} e o tráfego simplesmente deu a volta. Ele parece decepcionado.",
+"chaos_monkey.snip_sprayed":"O macaco do caos borrifou {a} ⇄ {b} com algo grudento. Está fora do ar.",
+"chaos_monkey.snip_to_see":"O macaco do caos cortou {a} ⇄ {b}, só para ver o que acontecia.",
+"chaos_monkey.snip_unplugged":"O macaco do caos desligou {a} ⇄ {b} e está sorrindo para você.",
+"chaos_monkey.survived":"🐒 Você aguentou o macaco do caos! {n} cortes e nenhum cliente percebeu. Bônus de resiliência: {cash}.",
+"chaos_monkey.tap":"🐒 Ele corta seus tubos de propósito, para provar que você aguenta. Uma banana o mandaria para casa.",
+"chaos_monkey.went_home":"🐒 O macaco do caos foi para casa. Cortes: {n}. Sentidos pelos clientes: {hurt}. Onde doeu, uma segunda rota teria salvado você.",
"cities.270_million_people_on_17_000":"270 milhões de pessoas em 17.000 ilhas. Mobile first, e com muita fome de banda.",
"cities.a_capital_high_in_the_andes":"Uma capital no alto dos Andes, logo ao sul do equador, que paga em dólar. Vulcões em todo horizonte.",
"cities.a_capital_in_a_valley_under":"Uma capital num vale ao pé de uma montanha verde. A rede elétrica nacional já teve dias ruins famosos, então leve um gerador.",
@@ -2977,8 +2991,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%)",
@@ -3002,11 +3016,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.",
@@ -3033,15 +3048,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",
@@ -3071,7 +3088,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}",
@@ -3101,12 +3118,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/80-new-game.js b/src/game/60-features/80-new-game.js
index 0bad8cd..1d9d87b 100644
--- a/src/game/60-features/80-new-game.js
+++ b/src/game/60-features/80-new-game.js
@@ -1,6 +1,6 @@
function newGame(name,home){
S={v:1,name,asn:200000+Math.floor(_rand()*15000),home,day:0,cash:START_CASH,
ltv:2,t1v:3,auV:1,ops:opsNew(),achP:{},seen:NETS.map(n=>n.id),spares:{},pops:{[home]:{day:0,bb:null,boost:0,down:0,routers:1,gen:false}},links:[],nni:[],transit:[],ixp:{},rs:{},peers:{},pni:[],caches:[],biz:[],offers:[],myIx:{},pairMet:{},
- done:{},inc:[],ev:{ddosMore:[]},ddosStarts:[],priceMul:1,nextFail:45,nextEvent:40,usedNames:[],stats:{survived:0,incidents:0,peak:0},cnLic:{state:'none'},scrubs:[],scrubMode:'always',capDeal:null,won:false,lost:false,neg:0,loans:[],loanOffers:[],loanStrikes:0,ppol:'open',pdesk:null,pdeskRep:null,hw:{},rules:makeRules('oncall'),charter:'global',chartSet:false,demo:{},seatOff:null,solWon:0};
+ done:{},inc:[],ev:{ddosMore:[]},ddosStarts:[],priceMul:1,nextFail:45,nextEvent:40,usedNames:[],stats:{survived:0,incidents:0,peak:0},cnLic:{state:'none'},scrubs:[],scrubMode:'always',capDeal:null,won:false,lost:false,neg:0,loans:[],loanOffers:[],loanStrikes:0,ppol:'open',pdesk:null,pdeskRep:null,hw:{},rules:makeRules('oncall'),charter:'global',chartSet:false,demo:{},seatOff:null,solWon:0,monkey:{next:null,on:0}};
}
diff --git a/src/game/60-features/92-puzzles.js b/src/game/60-features/92-puzzles.js
index 201d9bc..9e631e0 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(){if(S&&S.ar)arStop(true);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();if(S&&S.ar)arStop(true);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:S.ar&&CW>760&&CH>500?410: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(){if(S.ar)arStop();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),k:S.ar?S.ar.sunk:0}));if(h.length>60)h.shift();}
+function pzSnap(){pzMkStop();if(S.ar)arStop();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),k:S.ar?S.ar.sunk:0}));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;
if(S.ar)arRouters();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(){if(arOn())return null;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(){if(arOn())return null;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.starsl.a===c||l.b===c).map(l=>l.tier)),g=AR_RG().find(i=>RG[i].maxLT>=need);return g==null?0:Math.max(0,pzRtCost(g,1)-cur);}
const arSnapStr=()=>JSON.stringify({p:S.pops,l:S.links,m:S.pairMet||{},k:S.ar.sunk});
-function arBegin(run){if(!run)return;const b0=run.briefs[0];
+function arBegin(run){if(!run)return;mkStop();const b0=run.briefs[0];
pzBegin({id:'ar_'+run.id,n:run.n,src:[run.hq],dem:b0.add.map(c=>({t:'eye',a:c,g:1})),via:run.via,budget:0});
pzToastsClear();S.pz.n=run.n;S.te={on:true,day:0};S.ar={id:run.id,hq:run.hq,bi:-1,sunk:0,over:0,dem:{},rings:[],gold:[],lat:null,passed:null,start:null};UI.arAll=false;arStop(true);
S.pops[run.hq]=pzNewPop(run.hq);arApply(0);}
diff --git a/src/game/60-features/97-puzzle-monkey.js b/src/game/60-features/97-puzzle-monkey.js
new file mode 100644
index 0000000..ff43a69
--- /dev/null
+++ b/src/game/60-features/97-puzzle-monkey.js
@@ -0,0 +1,23 @@
+/* ---------- the chaos monkey in puzzles: the N-1 star, acted out ----------
+ The third star already asks whether the build survives any single cut (pzEval tries every trench and cable). When a
+ new star lands, and on request, the monkey plays that check on the map: it runs to each trench or cable, snips it,
+ and the cities that lose traffic say so. Only while the map is really being drawn: the stars never wait on it. */
+const PZ_RUN=450,PZ_HOLD=550; // ms: the run to a tube, then how long its cut shows
+const pzMkCan=()=>animOn()&&!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/80-simulation/50-sanitize.js b/src/game/80-simulation/50-sanitize.js
index 71cdda4..13652cc 100644
--- a/src/game/80-simulation/50-sanitize.js
+++ b/src/game/80-simulation/50-sanitize.js
@@ -13,6 +13,10 @@ function sanitize(s){
s.priceMul=num(s.priceMul,1);s.nextFail=num(s.nextFail,s.day+45);s.nextEvent=num(s.nextEvent,s.day+40);s.lvl=int(s.lvl,1,LEVELS.length,1);s.neg=int(s.neg,0,1e7,0);s.loanStrikes=int(s.loanStrikes,0,1e3,0);
for(const k of Object.keys(s.stats)){const v=s.stats[k];if(k==='by'||k==='f'){if(!v||typeof v!=='object')s.stats[k]={};else for(const j of Object.keys(v))v[j]=num(v[j],0);}else if(typeof v!=='boolean')s.stats[k]=num(v,0);}
for(const k of ['survived','incidents','peak'])s.stats[k]=num(s.stats[k],0);
+ // The chaos monkey (2.0): saves without one get their first visit scheduled on the next day tick.
+ {const m=s.monkey&&typeof s.monkey==='object'&&!Array.isArray(s.monkey)?s.monkey:{},on=m.on?1:0,o={next:m.next==null?null:int(m.next,0,1e7,s.day+90),on};
+ if(on){o.start=int(m.start,0,s.day,s.day);o.until=int(m.until,o.start,o.start+400,s.day+30);o.snip=int(m.snip,0,1e7,s.day+3);o.n=int(m.n,0,1e4,0);o.hurt=int(m.hurt,0,o.n,0);o.c=isCity(m.c)?m.c:isCity(s.home)?s.home:null;}
+ s.monkey=o;}
for(const c of Object.keys(s.pops)){const p=s.pops[c];if(!isCity(c)||!p||typeof p!=='object'){delete s.pops[c];continue;}p.routers=int(p.routers,1,RMAX,1);if(p.rupDay!==undefined)p.rupDay=num(p.rupDay,-1);if(p.rgen!==undefined)p.rgen=int(p.rgen,0,RG.length-1,0);p.down=num(p.down,0);if(p.bb&&typeof p.bb==='object')p.bb.d=num(p.bb.d,0);else p.bb=null;}
if(!isCity(s.home))s.home=Object.keys(s.pops)[0]||'fra';
opsSanitize(s);
diff --git a/src/game/85-incidents/40-chaos-monkey.js b/src/game/85-incidents/40-chaos-monkey.js
new file mode 100644
index 0000000..6798c37
--- /dev/null
+++ b/src/game/85-incidents/40-chaos-monkey.js
@@ -0,0 +1,53 @@
+/* ---------- the chaos monkey: a visitor that breaks things on purpose ----------
+ Like the real one (Netflix, 2011): something switches off random bits of production so you find out whether the
+ rest copes. Now and then, in On-call and BGP at 3 a.m. only, a monkey moves in for 120 to 240 days and snips a tube
+ every couple of weeks, preferring tubes with no other path round them. Its snips stand in for the usual random
+ failures while it is here, so the visit is a test, not a pile-on. Get through it without a customer noticing and
+ there is a bonus; a banana sends it home early. S.monkey: next (day of the next visit, null until the first tick),
+ on, start, until, snip (day of the next snip), n (snips), hurt (snips customers felt), c (city it last snipped by). */
+const MK_SNIPS=[N_('chaos_monkey.snip_unplugged'),N_('chaos_monkey.snip_sprayed'),N_('chaos_monkey.snip_to_see')];
+const mkSpicy=()=>rule('chaos')==='spicy';
+// Only the real game with real chaos: not Change Freeze (calm), Sandbox, puzzles or scenarios.
+function mkElig(){return !!S&&S.mode!=='sandbox'&&S.mode!=='puzzle'&&!S.scn&&!S.lost&&['normal','spicy'].includes(rule('chaos'));}
+const mkOn=()=>!!(S&&S.monkey&&S.monkey.on&&mkElig());
+const rint=(a,n)=>a+Math.floor(Math.random()*n);
+// A quarter of a month's revenue to send it home; half a month's as the bonus for outlasting it.
+const mkBananaCost=()=>Math.round(Math.min(1e6,Math.max(10000,(R.revMo||0)*0.25))/1000)*1000;
+const mkBonus=()=>Math.round(Math.min(2e6,Math.max(20000,(R.revMo||0)*0.5))/1000)*1000;
+// Is there another way between this tube's ends once its whole trench is gone? If not, it is a weak spot.
+function mkWeak(l){const trc=l.trench||l.id,adj={};
+ for(const x of S.links){if(x===l||(x.trench||x.id)===trc||linkDown(x))continue;(adj[x.a]||(adj[x.a]=[])).push(x.b);(adj[x.b]||(adj[x.b]=[])).push(x.a);}
+ const seen=new Set([l.a]),q=[l.a];while(q.length){const c=q.pop();if(c===l.b)return false;for(const n of adj[c]||[])if(!seen.has(n)){seen.add(n);q.push(n);}}return true;}
+function mkTick(d){const M=S.monkey;if(!M)return;
+ if(!mkElig()){if(M.on)mkLeave('quiet');return;}
+ // The first visit is spread by the ASN, not the dice, so a game's other luck stays exactly as it was.
+ if(M.next==null)M.next=d+(mkSpicy()?180:270)+(S.asn||0)%120;
+ if(!M.on){if(dl.kind!=='vxc'&&!linkDown(l)).length<3){M.next=d+30;return;}mkArrive(d);return;}
+ if(d>=M.until){mkLeave();return;}
+ if(d>=M.snip){mkSnip();M.snip=d+(mkSpicy()?rint(9,7):rint(14,11));}}
+function mkArrive(d){const M=S.monkey,cs=Object.keys(S.pops),len=mkSpicy()?rint(180,61):rint(120,121);
+ S.stats.mkMet=(S.stats.mkMet||0)+1;
+ Object.assign(M,{on:1,start:d,until:d+len,snip:d+3,n:0,hurt:0,c:cs.length?pick(cs):S.home});
+ toast(tr('chaos_monkey.arrived',{n:len}),'bad',[{l:tr('chaos_monkey.banana',{cost:fmt$(mkBananaCost())}),act:'mkBanana',args:{}}],{a:'tab',v:'noc'});sfx('alert');track('monkey_arrive');
+ if(typeof mkStart==='function'&&CITY[M.c])mkStart(M.c);}
+function mkSnip(){const M=S.monkey,live=S.links.filter(l=>l.kind!=='vxc'&&!linkDown(l));if(!live.length)return;
+ // Weak spots first: a sample keeps this cheap on big networks.
+ const smp=live.length>40?Array.from({length:40},()=>pick(live)):live,l=pick(smp.flatMap(x=>mkWeak(x)?[x,x,x,x,x]:[x]));
+ const dur=rint(3,4),trc=l.trench||l.id,hit=S.links.filter(x=>(x.trench||x.id)===trc),A=CITY[l.a].name,B=CITY[l.b].name,before=R.served;
+ hit.forEach(x=>x.cut=Math.max(x.cut||0,S.day+dur));M.n++;M.c=l.a;
+ addInc({type:'cut',ref:trc,until:S.day+dur,msg:tr(pick(MK_SNIPS),{a:A,b:B}),cost:Math.max(4000,Math.round(hit.reduce((a,x)=>a+x.mo,0)*0.5))},'');
+ compute();const i=S.inc[S.inc.length-1],imp=Math.max(0,before-R.served);if(i)i.impact=imp;
+ const felt=before>1&&imp>=before*0.03;if(felt)M.hurt++;else S.stats.survived++;
+ toast(felt?`🐒 ${incTitle('cut')} ${esc(i?i.msg:'')}`:tr('chaos_monkey.rerouted',{a:A,b:B}),felt?'bad':'good',[],i?incOpen(i):null);sfx(felt?'err':'alert');
+ if(typeof mkRun==='function'){if(!UI.mk&&CITY[M.c])mkStart(M.c);mkRun(l,1400,felt);}}
+// why: 'banana' (bribed), 'quiet' (the rules or the game changed under it), or nothing (its time was up).
+function mkLeave(why){const M=S.monkey,d=S.day,ok=!why&&M.n>0&&M.hurt===0;M.on=0;M.next=d+(mkSpicy()?rint(220,181):rint(360,361));
+ // The usual failures were paused for the visit; give the NOC a breather before they start again.
+ S.nextFail=Math.max(S.nextFail,d+15);
+ if(why==='banana')toast(tr('chaos_monkey.bribed'),'good');
+ else if(ok){const b=mkBonus();S.cash+=b;S.stats.mkSurv=(S.stats.mkSurv||0)+1;toast(tr('chaos_monkey.survived',{n:M.n,cash:fmt$(b)}),'goal');sfx('coin');track('monkey_survived');}
+ else if(!why)toast(tr('chaos_monkey.went_home',{n:M.n,hurt:M.hurt}),'');
+ if(typeof mkEnd==='function')mkEnd(ok,true);}
+// The NOC tab's card while it is here.
+function mkCard(){if(!mkOn())return '';const M=S.monkey,c=mkBananaCost();
+ return `
`;}
diff --git a/src/game/88-days/10-day-tick.js b/src/game/88-days/10-day-tick.js
index 59ed88c..ef8be3c 100644
--- a/src/game/88-days/10-day-tick.js
+++ b/src/game/88-days/10-day-tick.js
@@ -63,7 +63,9 @@ function dayTick(){
// failures & events
// Chaos (the rules) scales how often: calm waits about three times as long, spicy comes almost twice as often, none never.
let dirty=false;const cm=chaosMul();
- if(cm&&d>=S.nextFail){dirty=true;fireFailure();const size=S.links.length+Object.keys(S.pops).length;S.nextFail=d+Math.round((Math.max(22,50-size*1.5)+Math.floor(Math.random()*25))*(scnRule('chaos')?0.5:1)/cm);}
+ // A visiting chaos monkey does the breaking instead (its snips replace these while it is here).
+ mkTick(d);
+ if(cm&&d>=S.nextFail&&!mkOn()){dirty=true;fireFailure();const size=S.links.length+Object.keys(S.pops).length;S.nextFail=d+Math.round((Math.max(22,50-size*1.5)+Math.floor(Math.random()*25))*(scnRule('chaos')?0.5:1)/cm);}
// Anchors Away: on top of the usual failures, ships drag anchors over each Baltic seabed link (about three cuts a link-year).
if(cm&&d>45&&scnRule('anchors')){const n=S.links.filter(l=>l.kind!=='vxc'&&!linkDown(l)&&anchorProne(l)).length;if(n&&Math.random()=S.nextEvent){dirty=true;fireEvent();S.nextEvent=d+Math.round((45+Math.floor(Math.random()*45))/cm);}
diff --git a/src/game/88-days/20-badges.js b/src/game/88-days/20-badges.js
index 0492fe1..d309736 100644
--- a/src/game/88-days/20-badges.js
+++ b/src/game/88-days/20-badges.js
@@ -4,7 +4,8 @@ const RARITY={c:{n:tr('common.common'),col:'#16A866'},r:{n:tr('common.rare'),col
const st=()=>S.stats||{};
const BADGES=[
{id:'hello',i:'👋',t:tr('common.hello_neighbour'),d:tr('badges.bring_up_your_first_peering_session'),r:'c',ok:()=>R.sessions>=1},
- {id:'backhoe',i:'🚜',t:tr('badges.met_the_backhoe'),d:tr('badges.have_a_fiber_cut'),r:'c',ok:()=>(st().by||{}).cut>=1},
+ // Keeps its old id so badges already earned (in saves and the hall of fame) carry over.
+ {id:'backhoe',i:'🐒',t:tr('badges.met_the_chaos_monkey'),d:tr('badges.get_a_visit_from_the_chaos_monkey'),r:'c',ok:()=>(st().mkMet||0)>=1},
{id:'debt',i:'🏦',t:tr('badges.in_debt_we_trust'),d:tr('badges.take_out_a_loan'),r:'c',ok:()=>(st().loans||0)>=1||(S.loans||[]).length>0},
{id:'twins',i:'👯',t:tr('common.twins'),d:tr('badges.run_two_routers_in_one_pop'),r:'c',ok:()=>Object.values(S.pops).some(p=>(p.routers||1)>=2)},
{id:'shark',i:'🦈',t:tr('common.shark_week'),d:tr('badges.get_a_subsea_cable_bitten_by'),r:'r',ok:()=>(st().sharks||0)>=1},
@@ -68,6 +69,7 @@ const BADGES=[
{id:'toaster',i:'🍞',t:tr('common.toaster_wrangler'),d:tr('badges.weather_a_ddos_with_your_defences'),r:'c',ok:()=>(st().ddosHeld||0)>=1},
{id:'cleanpipe',i:'🚿',t:tr('common.clean_pipes'),d:tr('badges.turn_on_a_transit_clean_pipe'),r:'r',ok:()=>S.transit.some(t=>t.clean)},
{id:'lamb',i:'🐐',t:tr('common.sacrificial_lamb'),d:tr('badges.run_a_sacrificial_pni_choke_point'),r:'r',ok:()=>S.pni.some(p=>p.sacrif)},
+ {id:'monkey',i:'🛡️',t:tr('badges.monkey_proof'),d:tr('badges.outlast_a_chaos_monkey_visit'),r:'e',ok:()=>(st().mkSurv||0)>=1},
{id:'flood',i:'🌊',t:tr('badges.held_the_flood'),d:tr('badges.weather_a_multi_terabit_ddos'),r:'e',ok:()=>(st().ddosMonster||0)>=1},
{id:'skynot',i:'🤖',t:tr('common.skynot_smiles'),d:tr('badges.land_a_hackback_3000tm_that_actually'),r:'e',secret:true,ok:()=>(st().hackWin||0)>=1},
{id:'zero',i:'🕳️',t:tr('badges.zero_peers_given'),d:tr('badges.reach_tier_2_with_every_single'),r:'l',secret:true,ok:()=>isTier2()&&!Object.keys(S.peers).length&&!S.pni.length},
diff --git a/src/game/90-actions/60-links.js b/src/game/90-actions/60-links.js
index 7c046d0..a564a7e 100644
--- a/src/game/90-actions/60-links.js
+++ b/src/game/90-actions/60-links.js
@@ -4,6 +4,8 @@ Object.assign(ACT,{
decomToggle:({city})=>{if(!S.pops[city])return;UI.decom=UI.decom||new Set();if(UI.decom.has(city))UI.decom.delete(city);else UI.decom.add(city);decomModal();},
decomGo:()=>{const sel=[...(UI.decom||[])].filter(c=>S.pops[c]);if(!sel.length||sel.length>=Object.keys(S.pops).length)return;closeModal();UI.decom=null;UI.sel=null;decommission(sel);sfx('alert');after();},
rmLink:({id})=>{if(UI.confirm!==id){UI.confirm=id;renderPanel();return;}{const l=S.links.find(x=>x.id===id),back=cabBack(l);if(back>0){S.cash+=back;toast(tr('links.name_is_called_off_the_cable',{name:esc(l.cname||tr('common.your_cable')),price:fmt$(back)}),'good');}}S.links=S.links.filter(l=>l.id!==id);prunePairMet();UI.sel=null;UI.confirm=null;after();},
+ // The chaos monkey takes a banana and goes home early (no bonus).
+ mkBanana:()=>{if(!mkOn())return;if(!spend(mkBananaCost()))return;S.stats.bananas=(S.stats.bananas||0)+1;mkLeave('banana');track('monkey_banana');after();},
fixInc:({id})=>{const i=S.inc.find(x=>x.id===id);if(!i||!(i.cost>0))return;if(i.slow&&i.rushed)return;if(!spend(i.cost))return;
if(i.slow&&i.until>S.day+1){i.rushed=true;i.cost=0;i.until=S.day+1;const p=S.pops[i.ref];if(p)p.down=Math.min(p.down,S.day+1);toast(tr('links.power_cycled_the_router_in_city',{city:esc(CITY[i.ref].name),chip:esc(RG[(p&&p.rgen)||0].chip)}),'good');after();return;}clearInc(i);toast(tr('links.fixed_what_resolved_early',{what:incTitle(i.type)}),'good');after();},
myIxUp:({city})=>{const m=S.myIx[city];if(!m)return;const f=(m.fab|0)+1,N=MYIX_FAB[f];if(!N)return;if(N.lvl>lvl()){toast(tr('links.a_fab_fabric_unlocks_at_customer',{fab:N.n,lv:N.lvl}),'bad');sfx('err');return;}if(!spend(N.cost))return;m.fab=f;toast(tr('links.ix_now_runs_a_fab_fabric',{ix:esc(m.name),fab:N.n,max:N.max}),'good');m.next=Math.min(m.next,S.day+3);after();},
diff --git a/src/game/90-actions/95-puzzles.js b/src/game/90-actions/95-puzzles.js
index 77e71de..e1342f7 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(!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);},
diff --git a/src/game/93-ui/40-hud-and-panels.js b/src/game/93-ui/40-hud-and-panels.js
index f679918..85e538d 100644
--- a/src/game/93-ui/40-hud-and-panels.js
+++ b/src/game/93-ui/40-hud-and-panels.js
@@ -50,7 +50,7 @@ function renderLeft(){checkLayer();
}else if(UI.left==='noc'){
h+=`
`;
- h+=opsCard();
+ h+=opsCard()+mkCard();
// Incidents come first, the ones you can fix with one click at the top (#63): no scrolling past hot ports to replace an optic.
for(const i of S.inc.filter(i=>i.type!=='ddos').sort((a,b)=>(b.cost?1:0)-(a.cost?1:0)||(b.impact||0)-(a.impact||0))){h+=`
`;
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){if(S.ar)return arLinkModal(a,b,keep);const kb=pzK
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/game/96-map/60-draw.js b/src/game/96-map/60-draw.js
index 649f933..07df67a 100644
--- a/src/game/96-map/60-draw.js
+++ b/src/game/96-map/60-draw.js
@@ -92,7 +92,8 @@ function drawFrame(now){
if(pzOn()){for(const v of vis.slice().reverse())pzDrawCity(v,sc,now);}else for(const v of vis.slice().reverse())drawCity(v.C,v.sx,v.sy,sc,now,v.ly);
// Architect runs: what the tubes between two cities are (one trench, or separate paths), above the cities.
for(const [x,y,t,one] of AR_PILLS){ctx.font='800 11px "Baloo 2", sans-serif';const tw=ctx.measureText(t).width+12;ctx.fillStyle=one?'#FFE3C2':'#DDF7E7';ctx.strokeStyle=one?'#FF8A3D':'#16A866';ctx.lineWidth=2;rr(x-tw/2,y-9,tw,17,8);ctx.fill();ctx.stroke();ctx.fillStyle='#1E2640';ctx.textAlign='center';ctx.textBaseline='middle';ctx.fillText(t,x,y+1);}
- if(UI.mk)mkDraw(ks);
+ // the chaos monkey (woken here after a reload, wherever it last snipped)
+ if(UI.mk)mkDraw(ks);else if(mkOn()&&!pzOn()&&CITY[S.monkey.c])mkStart(S.monkey.c);
// floaters
for(let i=FLOATS.length-1;i>=0;i--){const f=FLOATS[i],a=(now-f.t)/1600;if(a>1){FLOATS.splice(i,1);continue;}
for(const k of ks){const [sx,sy]=toS(f.x,f.y,k);ctx.globalAlpha=1-a*a;ctx.font='800 17px "Baloo 2", sans-serif';ctx.textAlign='center';ctx.textBaseline='middle';ctx.lineWidth=4;ctx.strokeStyle='#fff';ctx.strokeText(f.text,sx,sy-a*40);ctx.fillStyle=f.col;ctx.fillText(f.text,sx,sy-a*40);ctx.globalAlpha=1;}}
diff --git a/src/game/96-map/87-chaos-monkey.js b/src/game/96-map/87-chaos-monkey.js
index 8deeec2..373f18d 100644
--- a/src/game/96-map/87-chaos-monkey.js
+++ b/src/game/96-map/87-chaos-monkey.js
@@ -1,7 +1,7 @@
-/* ---------- the chaos monkey: Architect's review, as a monkey running round the map ----------
- It hops from cut to cut, sprays chaos where it snips, and dances on the spot that breaks a mission-critical site.
- Pure decoration on the animation clock: the review's result never depends on it, and with animations off the monkey
- just sits at the cut. */
+/* ---------- the chaos monkey, on the map ----------
+ It hops from cut to cut, sprays chaos where it snips, and dances where a snip really hurt. It visits normal games
+ (85-incidents/40-chaos-monkey.js) and reviews Architect runs. Pure decoration on the animation clock: nothing
+ depends on it, and with animations off the monkey just sits at the cut. */
const MK_RUN=0.62; // share of a review step the monkey spends running to the next cut
const MK_COLS=['#FF4F9A','#FFD23F','#22C47A','#2F8CFF','#FF8A3D','#7B61FF'];
// Where a link's middle is, in world coordinates (the shorter way round the date line).
@@ -12,11 +12,12 @@ function mkRun(l,dur,bad){const m=UI.mk;if(!m)return;const [x,y]=mkMid(l);m.fx=m
m.face=wrapDx(m.fx,x)<0?-1:1;m.mood='run';m.sprayAt=animT+m.dur;m.bad=!!bad;if(!animOn()){m.x=x;m.y=y;}}
function mkSpray(m){for(let i=0;i<(m.bad?26:16);i++){const a=Math.PI*2*i/(m.bad?26:16)+((i*37)%10)/10,v=0.05+((i*53)%10)/180;
m.spray.push({x:m.tx,y:m.ty,vx:Math.cos(a)*v,vy:Math.sin(a)*v-0.06,c:m.bad?(i%3?'#FF4D5E':'#FFD23F'):MK_COLS[i%MK_COLS.length],t:animT,s:i%4===0?(m.bad?'💥':'✂️'):null});}}
-// The review is over: a cheer when everything held, a tantrum where it broke.
-function mkEnd(ok){const m=UI.mk;if(!m)return;// a pending spray (the review was skipped mid-run) would override the cheer
- m.sprayAt=null;m.mood=ok?'cheer':'dance';m.t0=animT;}
+// It is over: a cheer when everything held, a tantrum where it broke; with bye it then leaves the map.
+function mkEnd(ok,bye){const m=UI.mk;if(!m)return;// a pending spray (the review was skipped mid-run) would override the cheer
+ m.sprayAt=null;m.mood=ok?'cheer':'dance';m.t0=animT;m.bye=bye?animT:0;}
function mkStop(){UI.mk=null;}
-function mkDraw(ks){const m=UI.mk;if(!m)return;
+function mkDraw(ks){const m=UI.mk;if(!m)return;if(m.bye&&animT-m.bye>2600){mkStop();return;}
+ if(m.mood==='snip'&&animT-m.t0>1500){m.mood='stand';m.t0=animT;}
const p=Math.min(1,(animT-m.t0)/m.dur),e=p<0.5?2*p*p:1-Math.pow(-2*p+2,2)/2;
if(m.mood==='run'){m.x=m.fx+wrapDx(m.fx,m.tx)*e;m.y=m.fy+(m.ty-m.fy)*e;}
if(m.sprayAt!=null&&animT>=m.sprayAt){m.sprayAt=null;if(animOn())mkSpray(m);m.mood=m.bad?'dance':'snip';m.t0=animT;}
@@ -28,7 +29,7 @@ function mkDraw(ks){const m=UI.mk;if(!m)return;
const dt=animT-q.t,wx=q.x+q.vx*dt/cam.z,wy=q.y+(q.vy*dt+0.00012*dt*dt)/cam.z;
for(const k of ks){const [sx,sy]=toS(wx,wy,k);ctx.globalAlpha=1-a;if(q.s){ctx.font=`${Math.round(sz*0.7)}px sans-serif`;ctx.fillText(q.s,sx,sy);}else{ctx.fillStyle=q.c;ctx.beginPath();ctx.arc(sx,sy,Math.max(2,sz*0.13*(1-a*0.5)),0,Math.PI*2);ctx.fill();}}}
ctx.globalAlpha=1;ctx.font=`${sz}px sans-serif`;
- for(const k of ks){const [sx,sy]=toS(m.x,m.y,k);ctx.save();ctx.translate(sx,sy+sz*0.15);
+ for(const k of ks){const [sx,sy]=toS(m.x,m.y,k);m.sx=sx;m.sy=sy-sz*0.6;m.r=sz*0.8;ctx.save();ctx.translate(sx,sy+sz*0.15);
ctx.fillStyle='rgba(30,38,64,.18)';ctx.beginPath();ctx.ellipse(0,0,sz*0.38,sz*0.12,0,0,Math.PI*2);ctx.fill();
ctx.translate(0,-hop);const tilt=m.mood==='snip'?Math.sin((animT-m.t0)/60)*0.25:m.mood==='dance'?Math.sin((animT-m.t0)/80)*0.35:0;ctx.rotate(tilt);ctx.scale(m.face,1);
mkSprite(sz*1.25,animT-m.t0,m.mood==='run'&&p>=1?'stand':m.mood);
@@ -69,3 +70,5 @@ function mkSprite(s,t,mood){const u=s/40,O='#1E2640',B='#A0673A',T='#F4CFA0',lw=
ctx.fillStyle='#FFD23F';ctx.fillRect(-2.6*u,-5*u,5.2*u,2*u);ctx.fillStyle='#C9D1E6';ctx.beginPath();ctx.roundRect(-1.6*u,-10.5*u,3.2*u,2.6*u,0.8*u);ctx.fill();ctx.stroke();
if(wave){ctx.fillStyle='rgba(255,79,154,.45)';for(let i=0;i<4;i++){ctx.beginPath();ctx.arc((4+i*2.2)*u,(-11-i*1.4+Math.sin(t/40+i))*u,(0.9+i*0.4)*u,0,Math.PI*2);ctx.fill();}}
ctx.restore();dot(fa[0],fa[1],2.2,T);}
+// Did a tap land on the monkey? (Where it was last drawn.)
+const mkHit=(x,y)=>!!(UI.mk&&UI.mk.sx!=null&&Math.hypot(x-UI.mk.sx,y-UI.mk.sy)🐒 A chaos monkey got into your network! For about {n} days it snips tubes on purpose, the ones without a backup path first. Ride it out with no customer noticing for a bonus.",
+"chaos_monkey.banana":"🍌 Throw a banana {cost}",
+"chaos_monkey.bribed":"🍌 Banana accepted. The chaos monkey wandered off with its snack. Your pager can rest.",
+"chaos_monkey.card":"Snipping tubes for {n} more days. Snips so far: {s}, felt by customers: {hurt}.",
+"chaos_monkey.loose":"Chaos monkey on the loose",
+"chaos_monkey.rerouted":"🐒 Snip! The chaos monkey cut {a} ⇄ {b}, and traffic simply went round. It looks disappointed.",
+"chaos_monkey.snip_sprayed":"The chaos monkey sprayed {a} ⇄ {b} with something sticky. It is down.",
+"chaos_monkey.snip_to_see":"The chaos monkey cut {a} ⇄ {b}, just to see what would happen.",
+"chaos_monkey.snip_unplugged":"The chaos monkey unplugged {a} ⇄ {b} and is grinning at you.",
+"chaos_monkey.survived":"🐒 You outlasted the chaos monkey! {n} snips and no customer noticed. Resilience bonus: {cash}.",
+"chaos_monkey.tap":"🐒 It snips your tubes on purpose, to prove you can survive it. A banana would send it home.",
+"chaos_monkey.went_home":"🐒 The chaos monkey went home. Snips: {n}. Felt by customers: {hurt}. Where it hurt, a second path would have saved you.",
"cities.270_million_people_on_17_000":"270 million people on 17,000 islands. Mobile first, and very hungry for bandwidth.",
"cities.a_capital_high_in_the_andes":"A capital high in the Andes, just south of the equator, that pays in US dollars. Volcanoes on every horizon.",
"cities.a_capital_in_a_valley_under":"A capital in a valley under a green mountain. The national grid has had some famous bad days, so bring a generator.",
@@ -2978,8 +2992,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%)",
@@ -3003,11 +3017,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.",
@@ -3034,15 +3049,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",
@@ -3072,7 +3089,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}",
@@ -3102,12 +3119,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/chaos-monkey.test.js b/tests/chaos-monkey.test.js
new file mode 100644
index 0000000..4e75a9e
--- /dev/null
+++ b/tests/chaos-monkey.test.js
@@ -0,0 +1,109 @@
+const test = require('node:test');
+const assert = require('node:assert/strict');
+const { load } = require('./harness');
+
+// A small network on a fixed seed: Frankfurt, Amsterdam, London and Paris in a ring, with a spur out to Zurich.
+function net(preset) {
+ const { ev, errors, dom } = load();
+ ev(`beginGame('Monkey Testers','fra',${JSON.stringify({ mode: 'normal', preset })});if(UI.pendGame)ACT.pitchSkip()`);
+ ev("S.cash=1e9;S.lvl=4;for(const c of ['ams','lon','par','zrh'])ACT.buildPop({city:c})");
+ ev("ACT.launchBB({city:'fra'});ACT.buyTransit({city:'fra',net:'cog',tier:1})");
+ ev("for(const [a,b] of [['fra','ams'],['ams','lon'],['lon','par'],['par','fra'],['fra','zrh']]){UI.pending={a,b};ACT.buildLink({tier:1});}closeModal()");
+ ev('for(let i=0;i<60;i++)dayTick();S.inc=[];for(const l of S.links)l.cut=0;compute()');
+ return { ev, errors, dom };
+}
+const link = (ev, a, b) => `S.links.find(l=>(l.a==='${a}'&&l.b==='${b}')||(l.a==='${b}'&&l.b==='${a}'))`;
+
+test('the chaos monkey visits On-call and BGP at 3 a.m., never Change Freeze or Sandbox', () => {
+ for (const [preset, ok] of [['oncall', true], ['bgp', true], ['freeze', false]]) {
+ const { ev, errors } = net(preset);
+ assert.equal(ev('mkElig()'), ok, preset);
+ ev('S.monkey.next=S.day;dayTick()');
+ assert.equal(ev('!!S.monkey.on'), ok, preset);
+ assert.deepEqual(errors, []);
+ }
+ const { ev } = net('oncall');
+ ev("S.mode='sandbox'");
+ assert.equal(ev('mkElig()'), false);
+ ev("S.mode='normal';S.monkey.next=S.day;dayTick();S.scn={rules:{}}");
+ assert.equal(ev('mkOn()'), false, 'never in a scenario');
+});
+
+test('a visit lasts 120 to 240 days, snips every couple of weeks and pauses the usual failures', () => {
+ const { ev, errors } = net('oncall');
+ ev('S.monkey.next=S.day;dayTick()');
+ const len = ev('S.monkey.until-S.monkey.start');
+ assert.ok(len >= 120 && len <= 240, `visit of ${len} days`);
+ ev('S.nextFail=S.day');
+ const nf = ev('S.nextFail');
+ ev('for(let i=0;i<60;i++)dayTick()');
+ assert.ok(ev('S.monkey.n') >= 2, 'it snipped');
+ assert.equal(ev('S.nextFail'), nf, 'no ordinary failure fired while it was here');
+ assert.ok(ev("S.inc.some(i=>i.type==='cut')||S.stats.survived>0"));
+ // It leaves on time, and the ordinary failures wait a little before they start again.
+ ev('for(let i=0;i<200&&S.monkey.on;i++)dayTick()');
+ assert.equal(ev('S.monkey.on'), 0);
+ assert.ok(ev('S.monkey.next>S.day+200'));
+ assert.ok(ev('S.nextFail>=S.day'));
+ assert.deepEqual(errors, []);
+});
+
+test('weak spots are tubes with no other way round', () => {
+ const { ev } = net('oncall');
+ assert.equal(ev(`mkWeak(${link(ev, 'fra', 'zrh')})`), true);
+ assert.equal(ev(`mkWeak(${link(ev, 'fra', 'ams')})`), false);
+});
+
+test('outlasting it unnoticed pays a bonus and earns the badge; going home hurt pays nothing', () => {
+ const { ev, errors } = net('oncall');
+ ev('S.monkey.next=S.day;dayTick();S.monkey.n=4;S.monkey.hurt=0;S.monkey.until=S.day+1');
+ const cash = ev('S.cash'), bonus = ev('mkBonus()');
+ ev('dayTick();checkBadges()');
+ assert.equal(ev('S.monkey.on'), 0);
+ assert.equal(ev('S.stats.mkSurv'), 1);
+ assert.ok(ev('S.cash') >= cash + bonus - 1e6, 'bonus paid');
+ assert.ok(ev("S.ach.monkey!==undefined"));
+ ev('S.monkey.next=S.day;dayTick();S.monkey.n=4;S.monkey.hurt=2;S.monkey.until=S.day+1;dayTick()');
+ assert.equal(ev('S.stats.mkSurv'), 1, 'no bonus when customers felt it');
+ assert.deepEqual(errors, []);
+});
+
+test('a banana sends it home early, for a price', () => {
+ const { ev, errors, dom } = net('bgp');
+ ev("S.monkey.next=S.day;dayTick();UI.left='noc';renderLeft()");
+ assert.ok(dom.window.document.querySelector('[data-act=mkBanana]'), 'the NOC card offers a banana');
+ const cash = ev('S.cash'), cost = ev('mkBananaCost()');
+ ev('ACT.mkBanana({})');
+ assert.equal(ev('S.monkey.on'), 0);
+ assert.equal(ev('S.cash'), cash - cost);
+ assert.equal(ev('S.stats.mkSurv||0'), 0);
+ ev('S.cash=0;S.monkey.next=S.day;dayTick();ACT.mkBanana({})');
+ assert.equal(ev('S.monkey.on'), 1, 'no banana without the cash');
+ assert.deepEqual(errors, []);
+});
+
+test('saves keep the monkey; old and broken saves are repaired', () => {
+ const { ev, errors } = net('oncall');
+ ev('S.monkey.next=S.day;dayTick();const t=JSON.stringify(packSave(S));S=migrate(JSON.parse(t))');
+ assert.equal(ev('S.monkey.on'), 1);
+ assert.ok(ev('S.monkey.until>S.day'));
+ ev("const o=JSON.parse(JSON.stringify(packSave(S)));delete o.monkey;S=migrate(o)");
+ assert.deepEqual(JSON.parse(ev('JSON.stringify(S.monkey)')), { next: null, on: 0 });
+ ev("const o=JSON.parse(JSON.stringify(packSave(S)));o.monkey={on:1,until:'soon',n:-3,hurt:99,c:''};S=migrate(o)");
+ assert.equal(ev('S.monkey.n'), 0);
+ assert.equal(ev('S.monkey.hurt'), 0);
+ assert.equal(ev('S.monkey.c'), ev('S.home'));
+ assert.ok(ev('S.monkey.until>=S.monkey.start'));
+ ev('for(let i=0;i<5;i++)dayTick()');
+ assert.deepEqual(errors, []);
+});
+
+test('"Met the Chaos Monkey" comes from a visit, not from an ordinary fiber cut', () => {
+ const { ev, errors } = net('oncall');
+ ev("fireFailure('cut');checkBadges()");
+ assert.equal(ev('S.ach.backhoe===undefined'), true, 'a cut alone is not the monkey');
+ ev('S.monkey.next=S.day;dayTick();checkBadges()');
+ assert.notEqual(ev('S.ach.backhoe'), undefined);
+ assert.equal(ev("BADGES.find(b=>b.id==='backhoe').t"), 'Met the Chaos Monkey');
+ assert.deepEqual(errors, []);
+});
diff --git a/tests/gameplay-rules.test.js b/tests/gameplay-rules.test.js
index 76cf1ba..fb1603c 100644
--- a/tests/gameplay-rules.test.js
+++ b/tests/gameplay-rules.test.js
@@ -361,6 +361,27 @@ test('F3: a specialist path only brings customers you can already serve', () =>
assert.deepEqual(g.errors, []);
});
+test('F4: the chaos monkey only visits On-call and BGP at 3 a.m., late, for 120 to 240 days, instead of the ordinary failures', () => {
+ for (const preset of ['freeze', 'oncall', 'bgp']) {
+ const g = load();
+ g.ev(`beginGame('Monkey','fra',{mode:'normal',preset:'${preset}'});if(UI.pendGame)ACT.pitchSkip()`);
+ g.ev("S.cash=1e9;S.lvl=4;for(const c of ['ams','lon','par'])ACT.buildPop({city:c});for(const [a,b] of [['fra','ams'],['ams','lon'],['lon','par'],['par','fra']]){UI.pending={a,b};ACT.buildLink({tier:1});}closeModal()");
+ g.ev('for(let i=0;i<2;i++)dayTick()');
+ if (preset === 'freeze') { assert.equal(g.ev('mkElig()'), false, 'F4: never in Change Freeze'); continue; }
+ assert.ok(g.ev('S.monkey.next') >= 180, 'F4: not before day 180');
+ g.ev('S.monkey.next=S.day;dayTick();S.nextFail=S.day');
+ const len = g.ev('S.monkey.until-S.monkey.start');
+ assert.ok(len >= 120 && len <= 240, `F4: a visit of ${len} days`);
+ g.ev('for(let i=0;i<40;i++)dayTick()');
+ assert.ok(g.ev('S.nextFail') <= g.ev('S.day'), 'F4: no ordinary failure fired during the visit');
+ assert.ok(g.ev("S.inc.filter(i=>i.type==='cut').every(i=>i.until-i.start<=(rule('chaos')==='spicy'?11:7))"), 'F4: snips heal within a week (spicy stretches by half)');
+ assert.deepEqual(g.errors, []);
+ }
+ const g = load();
+ g.ev("beginGame('Monkey','fra',{mode:'normal',preset:'oncall'});if(UI.pendGame)ACT.pitchSkip();S.mode='sandbox'");
+ assert.equal(g.ev('mkElig()'), false, 'F4: never in Sandbox');
+});
+
test('no page errors while checking the rules', () => {
assert.deepEqual(errors, []);
});
diff --git a/tests/issues.test.js b/tests/issues.test.js
index 37b25dc..3ccb226 100644
--- a/tests/issues.test.js
+++ b/tests/issues.test.js
@@ -154,7 +154,7 @@ test('rare badges hook into incidents and deals', () => {
const { ev, errors } = load();
base(ev);
ev("addInc({type:'cut',ref:'x',until:S.day+1,msg:'A crocodile took a bite. A ship dragged its anchor.'});checkGoals()");
- assert.ok(ev("S.ach.croc!==undefined&&S.ach.anchor!==undefined&&S.ach.backhoe!==undefined"));
+ assert.ok(ev("S.ach.croc!==undefined&&S.ach.anchor!==undefined&&S.ach.backhoe===undefined"), "a cut alone earns no Met the Chaos Monkey");
ev("S.stats.survived=100;checkGoals()");
assert.ok(ev("S.ach.unbreak!==undefined"));
assert.equal(ev("BADGES.length>=46&&new Set(BADGES.map(b=>b.id)).size===BADGES.length"), true);
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 →/);