<!-- LIVE · part 85 -->
0.05;
          ball.position.z += bvz * 0.05;
          // Hit check
          var d = ball.position.distanceTo(end);
          if(d < 2 || ball.position.y < 0.3){
            clearInterval(bint);
            scene.remove(ball);
            // Damage
            if(window._lockedTarget.userData){
              window._lockedTarget.userData.hp -= 34;
              if(window._lockedTarget.userData.hp <= 0){
                scene.remove(window._lockedTarget);
                var idx = window._targets.indexOf(window._lockedTarget);
                if(idx >= 0) window._targets.splice(idx, 1);
                window._lockedTarget = null;
                window._inBattle = false;
                hideLock();
                if(window.say) window.say('Target destroyed.');
              } else {
                if(window.say) window.say('Hit!');
              }
            }
            // Explosion flash
            var exp = new THREE.Mesh(
              new THREE.SphereGeometry(2, 10, 10),
              new THREE.MeshBasicMaterial({color:0xffcc00, transparent:true, opacity:0.8})
            );
            exp.position.copy(ball.position);
            scene.add(exp);
            setTimeout(function(){ scene.remove(exp); }, 300);
          }
        }, 50);
        return;
      }catch(e){}
    }
    // No lock: use original forward fire
    if(origFire) origFire();
  };

  // Register 'target' code
  if(window.registerCode){
    window.registerCode('target', function(){ window.spawnTarget(); });
  }
})();

window.__sagaExecMark('7330');

/* ===== SKY BRIDGE — all roads raised 400 high. King's order 2026-10-06 ===== */
(function buildSkyBridge(){
  var SY = 400; /* Sky height */
  var skyMat = new THREE.MeshStandardMaterial({color: 0x8a6a1c, roughness: 0.7});
  var skyGold = new THREE.MeshStandardMaterial({color: 0xd4a017, roughness: 0.5, metalness: 0.3});
  var skyDark = new THREE.MeshStandardMaterial({color: 0x2a2a2a, roughness: 0.8});

  /* 1. City grid — gold streets */
  var cityX = 100, cityZ = -100;
  for(var i = -3; i <= 3; i++){
    var rh = new THREE.Mesh(new THREE.BoxGeometry(120, 0.5, 3), skyGold);
    rh.position.set(cityX, SY, cityZ + i * 15);
    scene.add(rh);
    var rv = new THREE.Mesh(new THREE.BoxGeometry(3, 0.5, 120), skyGold);
    rv.position.set(cityX + i * 15, SY, cityZ);
    scene.add(rv);
  }

  /* 2. District connections */
  var connections = [
    [0, 0, 8, 9], [8, 9, 25, 25], [25, 25, 100, -100],
    [0, 0, -35, -35], [-35, -35, -100, -100], [100, -100, -100, -100]
  ];
  for(var rd = 0; rd < connections.length; rd++){
    var x1 = connections[rd][0], z1 = connections[rd][1];
    var x2 = connections[rd][2], z2 = connections[rd][3];
    var len = Math.sqrt((x2-x1)*(x2-x1) + (z2-z1)*(z2-z1));
    var road = new THREE.Mesh(new THREE.BoxGeometry(4, 0.5, len), skyMat);
    road.position.set((x1+x2)/2, SY, (z1+z2)/2);
    road.rotation.y = Math.atan2(x2-x1, z2-z1);
    scene.add(road);
  }

  /* 3. Ring roads */
  function skyRing(radius, width){
    var ring = new THREE.Mesh(new THREE.RingGeometry(radius - width/2, radius + width/2, 64),
      new THREE.MeshStandardMaterial({color: 0x333333, roughness: 0.8, side: THREE.DoubleSide}));
    ring.rotation.x = -Math.PI/2;
    ring.position.y = SY;
    scene.add(ring);
    var e1 = new THREE.Mesh(new THREE.RingGeometry(radius - width/2, radius - width/2 + 1, 64),
      new THREE.MeshBasicMaterial({color: 0xd4a017, side: THREE.DoubleSide}));
    e1.rotation.x = -Math.PI/2; e1.position.y = SY + 0.3; scene.add(e1);
    var e2 = new THREE.Mesh(new THREE.RingGeometry(radius + width/2 - 1, radius + width/2, 64),
      new THREE.MeshBasicMaterial({color: 0xd4a017, side: THREE.DoubleSide}));
    e2.rotation.x = -Math.PI/2; e2.position.y = SY + 0.3; scene.add(e2);
  }
  skyRing(300, 20); skyRing(800, 24); skyRing(1500, 30);

  /* Support pillars — every 100 units along rings */
  var pillarMat = new THREE.MeshStandardMaterial({color: 0x555555, roughness: 0.9});
  [300, 800, 1500].forEach(function(r){
    for(var a = 0; a < 12; a++){
      var ang = (a / 12) * Math.PI * 2;
      var px = Math.cos(ang) * r, pz = Math.sin(ang) * r;
      var pillar = new THREE.Mesh(new THREE.BoxGeometry(8, SY, 8), pillarMat);
      pillar.position.set(px, SY/2, pz);
      scene.add(pillar);
    }
  });

  if(typeof say === 'function') say('Sky bridge raised — all roads at 400');
})();

/* ===== NĀ PALI MOUNTAINS — fluted ridges like Kaua'i. King's order 2026-10-06 ===== */
setTimeout(function makeNapaliMountains(){
  return; /* DISABLED 2026-10-06 — conflicts with unified builder */
  /* Build a fluted ridge: sharp peaks, deep water-carved valleys */
  function napaliRidge(length, height, width, seed){
    var segs = 48, hsegs = 20;
    var geo = new THREE.PlaneGeometry(length, height, segs, hsegs);
    var pos = geo.attributes.position;
    for(var i = 0; i < pos.count; i++){
      var x = pos.getX(i), y = pos.getY(i);
      var hNorm = (y + heig