Scrubbing centers in many POPs, with real backhaul (#117)
S.scrubAt/S.scrubTier become S.scrubs, one center per city, each with its own size and monthly fee; old saves carry theirs over in sanitize(). An attack goes to the nearest working center with a backbone path, and spills to the next when it is full. A remote center's flood (plus a share of the victim's own traffic) is reserved along the backbone path after the L2 circuits, like a circuit: it fills those links, the round trip is shown in the NOC, and what the links cannot carry is not scrubbed and lands on the city. Local centers behave as before. DDoS protection customers lose mood while their attack detours 30+ ms, with the reason in their row; a new requirement asks for a center on the customer's continent. The Infra tab names the nearest center and its distance, and How to play explains it.
This commit is contained in:
parent
9d6ad94035
commit
086502b782
6 changed files with 146 additions and 49 deletions
|
|
@ -6,6 +6,7 @@ All notable changes to this project are documented here. The project follows
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
- You can now run a scrubbing center in every POP, not just one (#117). An attack goes to the nearest working center and spills to the next when it is full. A center in another city means the flood rides your backbone there and back: it fills your links, adds latency, and whatever your links cannot carry is not scrubbed. DDoS protection customers mind when their attacks are hauled across an ocean, some new customers ask for a center on their own continent, and the NOC shows where each attack is being cleaned.
|
||||
- A new Road to Tier 1 card in Goals shows what still stands between you and Tier 1 (#111, #121, #12). It counts the transit ports left to cancel, names the Tier 1s you still need a PNI with and what they want from you first, and shows how much of the internet you would still reach without transit. The Networks tab can list just the networks you reach only through transit, biggest first, each with why it is not peering with you yet and where to meet it: the cities for a PNI and the exchanges it sits on, your POPs first, then the nearest. Who your transit carries, in the NOC, names the nearest city when a network is not in yours and takes you straight to it.
|
||||
- Your own subsea cables now come in three designs, from the budget route to one as fast as the fastest cable on the map, and two upgrades carry faster channels further (#65). Each design shows its latency, price and build time before you order: optimized costs three times as much and low latency seven times, and both take months longer. Premium terminals and optical engineering light longer routes at higher speeds, so a cable as long as New York to Sydney can now carry traffic, and the order screen tells you which upgrade a route needs. Calling off a cable while it is being laid refunds what you actually paid for it.
|
||||
- Only Spätzle-IX can now be won with peering alone (#114). The goal is now 45% reach and 300 Gbps served, and the scenario card shows your reach as well as your traffic.
|
||||
|
|
|
|||
|
|
@ -930,7 +930,6 @@
|
|||
"Reaching your network: {g}":"Ce qui atteint ton réseau : {g}",
|
||||
"On-demand scrubbing diverting, live in {n}d":"Scrubbing à la demande en cours de redirection, actif dans {n} j",
|
||||
"{tier} scrubbing in {city} is cleaning it":"Le scrubbing {tier} à {city} le nettoie",
|
||||
"{tier} scrubbing is over capacity: {g} leaks past":"Le scrubbing {tier} est saturé : {g} passent quand même",
|
||||
"{net} is scrubbing it upstream (clean-pipe)":"{net} le nettoie en amont (clean-pipe)",
|
||||
"Contained on your sacrificial {net} PNI":"Contenu sur ton PNI sacrificiel {net}",
|
||||
"IX blackhole on ✓":"Blackhole IX actif ✓",
|
||||
|
|
@ -1523,7 +1522,6 @@
|
|||
"Upgrade to {tier} <small>{cost}</small>":"Passer à {tier} <small>{cost}</small>",
|
||||
"Really shut it down?":"Vraiment l’arrêter ?",
|
||||
"Shut down":"Arrêter",
|
||||
"You already run one in {city}.":"Tu en as déjà un à {city}.",
|
||||
"Cleans DDoS attacks for your whole network, up to its clean-bandwidth capacity, and unlocks DDoS protection contracts for businesses.":"Nettoie les attaques DDoS pour tout ton réseau, dans la limite de sa capacité de bande passante propre, et débloque les contrats de protection DDoS pour les entreprises.",
|
||||
"Build {tier} <small>{cost} + {mo}/mo</small>":"Construire {tier} <small>{cost} + {mo}/mois</small>",
|
||||
"Interconnection fabrics (NNI)":"Fabrics d’interconnexion (NNI)",
|
||||
|
|
@ -2613,4 +2611,13 @@
|
|||
"Reach without transit":"Couverture sans transit",
|
||||
"All {n} out of reach":"Les {n} hors couverture",
|
||||
"Where?":"Où ?",
|
||||
"Attack hauled to scrubbing in {city}":"Attaque acheminée vers le scrubbing de {city}",
|
||||
"Wants a scrubbing center on its own continent, so attacks are not hauled across an ocean":"Veut un centre de scrubbing sur son continent, pour que les attaques ne traversent pas un océan",
|
||||
"Your backbone can only haul {g} of it to {city}: the rest is not scrubbed":"Ton backbone ne peut en acheminer que {g} jusqu’à {city} : le reste n’est pas nettoyé",
|
||||
"{tier} scrubbing in {city} is cleaning it, hauled over your backbone (+{ms} ms)":"Le scrubbing {tier} à {city} le nettoie, acheminé par ton backbone (+{ms} ms)",
|
||||
"Your scrubbing centers are full: {g} leaks past":"Tes centres de scrubbing sont pleins : {g} passent quand même",
|
||||
"Attacks go to your nearest scrubbing center. From here that is {city}, {km} km away: the flood rides your backbone there and back, which adds latency, and whatever your links cannot carry is not scrubbed. A center here cleans attacks on the spot.":"Les attaques vont vers ton centre de scrubbing le plus proche. D’ici, c’est {city}, à {km} km : le flot traverse ton backbone aller et retour, ce qui ajoute de la latence, et ce que tes liens ne peuvent pas porter n’est pas nettoyé. Un centre ici nettoie les attaques sur place.",
|
||||
"attacks on {city} are hauled to {to} for scrubbing: +{ms} ms":"les attaques sur {city} sont acheminées vers {to} pour le scrubbing : +{ms} ms",
|
||||
"Scrubbing centers":"Centres de scrubbing",
|
||||
"Build one in as many POPs as you like. An attack goes to the nearest working center, and what it cannot take spills to the next. A far center means the flood rides your backbone there and the victim’s traffic comes back the long way: it fills your links, adds latency, and whatever the links cannot carry is not scrubbed. Customers who buy DDoS protection notice when their attacks cross an ocean.":"Construis-en dans autant de POP que tu veux. Une attaque va vers le centre en service le plus proche, et ce qu’il ne peut pas absorber passe au suivant. Un centre lointain veut dire que le flot traverse ton backbone jusque-là et que le trafic de la victime revient par le chemin long : ça remplit tes liens, ça ajoute de la latence, et ce que les liens ne peuvent pas porter n’est pas nettoyé. Les clients qui achètent une protection DDoS le remarquent quand leurs attaques traversent un océan.",
|
||||
};
|
||||
|
|
|
|||
|
|
@ -929,7 +929,6 @@
|
|||
"Reaching your network: {g}":"Arriva alla tua rete: {g}",
|
||||
"On-demand scrubbing diverting, live in {n}d":"Scrubbing on-demand in deviazione, attivo tra {n}g",
|
||||
"{tier} scrubbing in {city} is cleaning it":"Lo scrubbing {tier} a {city} lo sta pulendo",
|
||||
"{tier} scrubbing is over capacity: {g} leaks past":"Lo scrubbing {tier} è oltre capacità: {g} passano comunque",
|
||||
"{net} is scrubbing it upstream (clean-pipe)":"{net} lo sta ripulendo a monte (clean-pipe)",
|
||||
"Contained on your sacrificial {net} PNI":"Contenuto sulla tua PNI sacrificale {net}",
|
||||
"IX blackhole on ✓":"Blackhole IX attivo ✓",
|
||||
|
|
@ -1522,7 +1521,6 @@
|
|||
"Upgrade to {tier} <small>{cost}</small>":"Aggiorna a {tier} <small>{cost}</small>",
|
||||
"Really shut it down?":"Spegnerlo davvero?",
|
||||
"Shut down":"Spegni",
|
||||
"You already run one in {city}.":"Ne hai già uno a {city}.",
|
||||
"Cleans DDoS attacks for your whole network, up to its clean-bandwidth capacity, and unlocks DDoS protection contracts for businesses.":"Ripulisce gli attacchi DDoS per tutta la tua rete, fino alla sua capacità di banda pulita, e sblocca i contratti di protezione DDoS per le aziende.",
|
||||
"Build {tier} <small>{cost} + {mo}/mo</small>":"Costruisci {tier} <small>{cost} + {mo}/mese</small>",
|
||||
"Interconnection fabrics (NNI)":"Fabric di interconnessione (NNI)",
|
||||
|
|
@ -2613,4 +2611,13 @@
|
|||
"Reach without transit":"Copertura senza transit",
|
||||
"All {n} out of reach":"Tutte le {n} fuori copertura",
|
||||
"Where?":"Dove?",
|
||||
"Attack hauled to scrubbing in {city}":"Attacco portato allo scrubbing di {city}",
|
||||
"Wants a scrubbing center on its own continent, so attacks are not hauled across an ocean":"Vuole un centro di scrubbing nel suo continente, così gli attacchi non attraversano un oceano",
|
||||
"Your backbone can only haul {g} of it to {city}: the rest is not scrubbed":"Il tuo backbone riesce a portarne solo {g} a {city}: il resto non viene pulito",
|
||||
"{tier} scrubbing in {city} is cleaning it, hauled over your backbone (+{ms} ms)":"Lo scrubbing {tier} a {city} lo sta pulendo, portato lì sul tuo backbone (+{ms} ms)",
|
||||
"Your scrubbing centers are full: {g} leaks past":"I tuoi centri di scrubbing sono pieni: {g} passano lo stesso",
|
||||
"Attacks go to your nearest scrubbing center. From here that is {city}, {km} km away: the flood rides your backbone there and back, which adds latency, and whatever your links cannot carry is not scrubbed. A center here cleans attacks on the spot.":"Gli attacchi vanno al tuo centro di scrubbing più vicino. Da qui è {city}, a {km} km: il flusso viaggia sul tuo backbone fin lì e ritorno, il che aggiunge latenza, e quello che i tuoi link non riescono a portare non viene pulito. Un centro qui pulisce gli attacchi sul posto.",
|
||||
"attacks on {city} are hauled to {to} for scrubbing: +{ms} ms":"gli attacchi su {city} vengono portati a {to} per lo scrubbing: +{ms} ms",
|
||||
"Scrubbing centers":"Centri di scrubbing",
|
||||
"Build one in as many POPs as you like. An attack goes to the nearest working center, and what it cannot take spills to the next. A far center means the flood rides your backbone there and the victim’s traffic comes back the long way: it fills your links, adds latency, and whatever the links cannot carry is not scrubbed. Customers who buy DDoS protection notice when their attacks cross an ocean.":"Costruiscine uno in tutti i POP che vuoi. Un attacco va al centro funzionante più vicino, e quello che non riesce a gestire passa al successivo. Un centro lontano vuol dire che il flusso viaggia sul tuo backbone fin lì e il traffico della vittima torna per la strada lunga: riempie i tuoi link, aggiunge latenza, e quello che i link non riescono a portare non viene pulito. I clienti che comprano protezione DDoS se ne accorgono quando i loro attacchi attraversano un oceano.",
|
||||
};
|
||||
|
|
|
|||
|
|
@ -929,7 +929,6 @@
|
|||
"Reaching your network: {g}":"Chegando na sua rede: {g}",
|
||||
"On-demand scrubbing diverting, live in {n}d":"Scrubbing on-demand desviando, ativo em {n}d",
|
||||
"{tier} scrubbing in {city} is cleaning it":"O scrubbing {tier} em {city} está limpando",
|
||||
"{tier} scrubbing is over capacity: {g} leaks past":"Scrubbing {tier} acima da capacidade: {g} vaza",
|
||||
"{net} is scrubbing it upstream (clean-pipe)":"{net} está limpando upstream (clean-pipe)",
|
||||
"Contained on your sacrificial {net} PNI":"Contido no seu PNI sacrificial com {net}",
|
||||
"IX blackhole on ✓":"Blackhole IX ativo ✓",
|
||||
|
|
@ -1521,7 +1520,6 @@
|
|||
"Upgrade to {tier} <small>{cost}</small>":"Upgrade para {tier} <small>{cost}</small>",
|
||||
"Really shut it down?":"Desligar mesmo?",
|
||||
"Shut down":"Desligar",
|
||||
"You already run one in {city}.":"Você já tem um em {city}.",
|
||||
"Cleans DDoS attacks for your whole network, up to its clean-bandwidth capacity, and unlocks DDoS protection contracts for businesses.":"Limpa ataques DDoS de toda a sua rede, até a capacidade de banda limpa, e libera contratos de proteção DDoS para empresas.",
|
||||
"Build {tier} <small>{cost} + {mo}/mo</small>":"Construir {tier} <small>{cost} + {mo}/mês</small>",
|
||||
"Interconnection fabrics (NNI)":"Fabrics de interconexão (NNI)",
|
||||
|
|
@ -2613,4 +2611,13 @@
|
|||
"Reach without transit":"Alcance sem transit",
|
||||
"All {n} out of reach":"Todas as {n} fora de alcance",
|
||||
"Where?":"Onde?",
|
||||
"Attack hauled to scrubbing in {city}":"Ataque levado ao scrubbing em {city}",
|
||||
"Wants a scrubbing center on its own continent, so attacks are not hauled across an ocean":"Quer um centro de scrubbing no próprio continente, para que os ataques não atravessem um oceano",
|
||||
"Your backbone can only haul {g} of it to {city}: the rest is not scrubbed":"Seu backbone só consegue levar {g} até {city}: o resto não é limpo",
|
||||
"{tier} scrubbing in {city} is cleaning it, hauled over your backbone (+{ms} ms)":"O scrubbing {tier} em {city} está limpando, levado pelo seu backbone (+{ms} ms)",
|
||||
"Your scrubbing centers are full: {g} leaks past":"Seus centros de scrubbing estão cheios: {g} passam direto",
|
||||
"Attacks go to your nearest scrubbing center. From here that is {city}, {km} km away: the flood rides your backbone there and back, which adds latency, and whatever your links cannot carry is not scrubbed. A center here cleans attacks on the spot.":"Os ataques vão para o seu centro de scrubbing mais próximo. Daqui é {city}, a {km} km: a enxurrada viaja pelo seu backbone até lá e volta, o que aumenta a latência, e o que seus links não conseguem levar não é limpo. Um centro aqui limpa os ataques na hora.",
|
||||
"attacks on {city} are hauled to {to} for scrubbing: +{ms} ms":"os ataques em {city} são levados a {to} para scrubbing: +{ms} ms",
|
||||
"Scrubbing centers":"Centros de scrubbing",
|
||||
"Build one in as many POPs as you like. An attack goes to the nearest working center, and what it cannot take spills to the next. A far center means the flood rides your backbone there and the victim’s traffic comes back the long way: it fills your links, adds latency, and whatever the links cannot carry is not scrubbed. Customers who buy DDoS protection notice when their attacks cross an ocean.":"Construa um em quantos POPs quiser. Um ataque vai para o centro ativo mais próximo, e o que ele não aguenta transborda para o seguinte. Um centro distante significa que a enxurrada viaja pelo seu backbone até lá e o tráfego da vítima volta pelo caminho longo: enche seus links, aumenta a latência, e o que os links não conseguem levar não é limpo. Clientes que compram proteção DDoS percebem quando os ataques deles atravessam um oceano.",
|
||||
};
|
||||
|
|
|
|||
100
site/index.html
100
site/index.html
File diff suppressed because one or more lines are too long
|
|
@ -192,7 +192,7 @@ test('Flowspec is a router-model capability, and each tool answers a flood', ()
|
|||
const http = ev("RG[0].fs=2;S.ev.ddos.vec='http';compute();const s=R.served;RG[0].fs=0;s");
|
||||
assert.ok(Math.abs(http - none) < 1, 'Flowspec is useless against HTTP');
|
||||
// Scrubbing cleans any vector, regardless of router. A 1T center swallows this 300 Gbps flood whole.
|
||||
ev("S.ev.ddos.vec='dns';S.scrubAt='fra';S.scrubTier=1;S.scrubMode='always';compute()");
|
||||
ev("S.ev.ddos.vec='dns';S.scrubs=[{city:'fra',tier:1}];S.scrubMode='always';compute()");
|
||||
assert.ok(ev('R.served') > none, 'scrubbing recovers real traffic');
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
|
@ -229,8 +229,8 @@ test('scrubbing tiers: capacity caps what a center can clean, and on-demand lags
|
|||
ev("ACT.start({});S.cash=1e8;ACT.launchBB({city:'fra'});S.pops.fra.bb.d=200;ACT.buyTransit({city:'fra',net:'cog',tier:1});S.ev.ddos={city:'fra',vec:'dns',gbps:300,until:S.day+3,entry:{k:'t',lab:'x'},bh:false,start:S.day};compute()");
|
||||
const none = ev('R.served');
|
||||
// A 100G center cannot swallow a 300 Gbps flood; a 10T center can.
|
||||
const small = ev("S.scrubAt='fra';S.scrubTier=0;S.scrubMode='always';compute();R.served");
|
||||
const big = ev("S.scrubTier=2;compute();R.served");
|
||||
const small = ev("S.scrubs=[{city:'fra',tier:0}];S.scrubMode='always';compute();R.served");
|
||||
const big = ev("S.scrubs[0].tier=2;compute();R.served");
|
||||
assert.ok(big > small, 'a bigger scrubbing tier cleans more');
|
||||
assert.ok(big > none, 'the 10T center recovers the flood');
|
||||
// On-demand does nothing until it engages (SCRUB_DELAY days in).
|
||||
|
|
@ -266,7 +266,7 @@ test('SLA: a protected customer that still goes down costs an SLA credit, once',
|
|||
const { ev } = load();
|
||||
ev("ACT.start({});S.cash=1e8;ACT.launchBB({city:'fra'});S.pops.fra.bb.d=200;ACT.buyTransit({city:'fra',net:'cog',tier:1});S.nextFail=1e9;S.nextEvent=1e9");
|
||||
// A DDoS protection customer, an overwhelming flood, a 100G center that can't cope.
|
||||
ev("S.scrubAt='fra';S.scrubTier=0;S.biz.push({id:'b1',city:'fra',type:'scrub',bw:5,rate:900,mood:80,since:0,reqs:[]});S.ev.ddos={city:'fra',vec:'dns',gbps:6000,until:S.day+5,entry:{k:'t',lab:'x'},bh:false,start:S.day}");
|
||||
ev("S.scrubs=[{city:'fra',tier:0}];S.biz.push({id:'b1',city:'fra',type:'scrub',bw:5,rate:900,mood:80,since:0,reqs:[]});S.ev.ddos={city:'fra',vec:'dns',gbps:6000,until:S.day+5,entry:{k:'t',lab:'x'},bh:false,start:S.day}");
|
||||
ev("dayTick()");
|
||||
assert.equal(ev('S.stats.sla'), 1, 'one SLA breach recorded');
|
||||
assert.ok(ev('S.biz[0].mood') < 70, 'the SLA breach dented their mood');
|
||||
|
|
@ -281,7 +281,7 @@ test('DDoS goal and badges unlock from the right state', () => {
|
|||
const okg = id => ev(`GOALS.find(g=>g.id==='${id}').ok()`);
|
||||
const okb = id => ev(`BADGES.find(b=>b.id==='${id}').ok()`);
|
||||
assert.equal(okg('scrub'), false, 'the DDoS goal starts incomplete');
|
||||
ev("S.scrubAt='fra';S.scrubTier=0");
|
||||
ev("S.scrubs=[{city:'fra',tier:0}]");
|
||||
assert.equal(okg('scrub'), true, 'a scrubbing center completes the goal');
|
||||
assert.equal(okb('toaster'), false);
|
||||
ev("S.stats.ddosHeld=1"); assert.equal(okb('toaster'), true, 'weathering a DDoS earns Toaster Wrangler');
|
||||
|
|
@ -354,3 +354,54 @@ test('loans: good terms need good credit, big loans want revenue, and the weird
|
|||
assert.match(t, /numerologist/);
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
||||
test('#117 several scrubbing centers: nearest first, spill to the next, and far ones haul the flood over the backbone', () => {
|
||||
const { ev, errors, dom } = load();
|
||||
// an old save with one center carries it over
|
||||
ev("ACT.start({});S.cash=1e9;S.lvl=6;S.nextFail=1e9;S.nextEvent=1e9");
|
||||
ev("const o=JSON.parse(JSON.stringify(S));o.scrubAt='fra';o.scrubTier=1;delete o.scrubs;migrate(o);window.__o=o");
|
||||
assert.deepEqual(JSON.parse(ev("JSON.stringify(window.__o.scrubs)")), [{ city: 'fra', tier: 1 }]);
|
||||
assert.equal(ev("'scrubAt' in window.__o||'scrubTier' in window.__o"), false);
|
||||
// New York and London over one transatlantic wave
|
||||
ev("for(const c of ['nyc','lon']){ACT.buildPop({city:c});}for(const c of ['fra','nyc','lon'])S.pops[c].rgen=3;ACT.launchBB({city:'nyc'});S.pops.nyc.bb.d=150");
|
||||
ev("ACT.buyTransit({city:'nyc',net:'cog',tier:2});ACT.buyTransit({city:'lon',net:'cog',tier:3});UI.via='grace';UI.route='same';openLinkModal('nyc','lon');ACT.buildLink({tier:3});closeModal()");
|
||||
const tl = "S.links.find(l=>[l.a,l.b].includes('nyc')).id";
|
||||
const atk = g => ev(`S.ev.ddos={city:'nyc',vec:'http',gbps:${g},until:S.day+3,entry:{k:'t',lab:'x'},bh:false,start:S.day-5};compute()`);
|
||||
// build in two cities, one each; the bill adds up
|
||||
ev("ACT.buildScrub({city:'fra',tier:1});ACT.buildScrub({city:'lon',tier:1});ACT.buildScrub({city:'lon',tier:2})");
|
||||
assert.deepEqual(JSON.parse(ev("JSON.stringify(S.scrubs.map(x=>x.city+':'+x.tier))")), ['fra:1', 'lon:1'], 'one center per city');
|
||||
assert.equal(ev('scrubMo()'), 2 * ev('SCRUB_TIERS[1].mo'));
|
||||
// Frankfurt has no backbone path from New York, so the flood goes to London, across the Atlantic
|
||||
atk(0); const quiet = ev(`R.load[${tl}]||0`);
|
||||
atk(600);
|
||||
assert.deepEqual(JSON.parse(ev("JSON.stringify(R.haul.map(q=>q.to))")), ['lon']);
|
||||
assert.ok(ev('R.haul[0].h') > 590, 'all of it fits on the 800G wave');
|
||||
assert.ok(ev('R.haul[0].ms') > 30 && ev('R.haul[0].ms') < 120, `a transatlantic detour (${ev('R.haul[0].ms').toFixed(0)} ms)`);
|
||||
assert.ok(ev(`R.load[${tl}]`) > quiet + 500, 'the flood fills the transatlantic link');
|
||||
assert.match(ev('ddosPanel()'), /hauled over your backbone/);
|
||||
// a protected customer in New York minds the detour
|
||||
ev("S.biz.push({id:'bs',city:'nyc',type:'scrub',bw:5,rate:900,mood:80,since:0,reqs:['scrubnear']})");
|
||||
assert.match(ev("bizWhy(S.biz.find(b=>b.id==='bs')).join(' ')"), /hauled to London/);
|
||||
assert.equal(ev("REQS.scrubnear.ok(S.biz.find(b=>b.id==='bs'))"), false, 'no center in the Americas yet');
|
||||
// a center in New York cleans it on the spot: nothing crosses the ocean
|
||||
ev("ACT.buildScrub({city:'nyc',tier:0})");atk(600);
|
||||
assert.equal(ev("R.haul.filter(q=>q.to==='lon').length"), 1, '100G local, the rest spills to London');
|
||||
assert.equal(ev("R.haul.some(q=>q.to==='nyc')"), false);
|
||||
assert.ok(ev("REQS.scrubnear.ok(S.biz.find(b=>b.id==='bs'))"));
|
||||
ev("S.scrubs.find(x=>x.city==='nyc').tier=1");atk(600);
|
||||
assert.equal(ev('R.haul.length'), 0, 'a 1T center at home takes it all');
|
||||
assert.ok(ev(`R.load[${tl}]||0`) < quiet + 50);
|
||||
// over a thin link only part of it can be hauled; the rest is not scrubbed
|
||||
ev("ACT.rmScrub({city:'nyc'});ACT.rmScrub({city:'nyc'})");
|
||||
assert.equal(ev("S.scrubs.some(x=>x.city==='nyc')"), false, 'shut down after confirming');
|
||||
ev(`S.links.find(l=>l.id===${tl}).tier=1`);atk(600);
|
||||
assert.ok(ev('R.haul[0].h') < 120 && ev('R.haul[0].h') > 0, `the 100G wave caps the haul (${ev('R.haul[0].h').toFixed(0)})`);
|
||||
assert.match(ev('ddosPanel()'), /can only haul/);
|
||||
// the Infra tab says where attacks go from here
|
||||
ev("ACT.selCity&&ACT.selCity({id:'nyc'});UI.sel={type:'city',id:'nyc'};UI.tab='infra';renderPanel()");
|
||||
assert.match(dom.window.document.getElementById('panelBody').textContent, /nearest scrubbing center\. From here that is London/);
|
||||
// closing a POP closes its center
|
||||
ev("ACT.decomOpen({});ACT.decomToggle({city:'lon'});ACT.decomGo()");
|
||||
assert.equal(ev("S.scrubs.some(x=>x.city==='lon')"), false);
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue