<!-- RUBY-BACKUP · part 495 -->
+' 3 '+ns); } }catch(e){}
    codeStatus('tenshu '+nn+' tiers'); return; }
  if(tl==='fountain'){
    try{ Mainframe.run('b 4 1 4'); Mainframe.run('b 2 3 2'); }catch(e){}
    codeStatus('fountain flowing'); return; }
  if(tl==='banner'){
    try{ Mainframe.run('b 1 6 2'); }catch(e){}
    codeStatus('banner raised'); return; }
  if(tl==='torch'){
    try{ Mainframe.run('b 1 3 1'); }catch(e){}
    codeStatus('torch lit'); return; }
  if(tl==='castle'){
    /* map the blocks to code - full castle at cursor */
    var ox = cursor.x, oz = cursor.z;
    try{
      // keep (center)
      cursor.x = ox; cursor.z = oz;
      Mainframe.run('b 6 8 6'); Mainframe.run('b 4 6 4');
      // 4 walls
      cursor.x = ox; cursor.z = oz-8; Mainframe.run('b 16 4 2');
      cursor.x = ox; cursor.z = oz+8; Mainframe.run('b 16 4 2');
      cursor.x = ox-8; cursor.z = oz; Mainframe.run('b 2 4 16');
      cursor.x = ox+8; cursor.z = oz; Mainframe.run('b 2 4 16');
      // 4 corner towers
      var tc = [[-8,-8],[8,-8],[-8,8],[8,8]];
      for(var ti=0; ti<4; ti++){
        cursor.x = ox+tc[ti][0]; cursor.z = oz+tc[ti][1];
        Mainframe.run('b 3 10 3');
      }
      // gatehouse (south)
      cursor.x = ox-2; cursor.z = oz+8; Mainframe.run('b 2 6 2');
      cursor.x = ox+2; cursor.z = oz+8; Mainframe.run('b 2 6 2');
      cursor.x = ox; cursor.z = oz;
    }catch(e){}
    codeStatus('castle raised'); return; }
  if(tl==='connector'){
    try{ Mainframe.run('s777'); }catch(e){}
    codeStatus('intaglio connector placed'); return; }
  if(tl==='iconnector'){
    try{ Mainframe.run('s7777'); }catch(e){}
    codeStatus('dense intaglio connector placed'); return; }
  /* EQUATION CODES - parametric building */
  if(tl==='dome'){
    var ox=cursor.x, oz=cursor.z, R=24;
    try{
      for(var a=0; a<16; a++){ var ang=a/16*2*Math.PI;
        for(var e=0; e<=5; e++){ var el=e/5*Math.PI/2;
          var rr=R*Math.cos(el), y=R*Math.sin(el);
          placeStone(ox+rr*Math.cos(ang)*0.13, oz+rr*Math.sin(ang)*0.13, 3, 'cube', true, true, Math.round(y), true);
        }
      }
    }catch(e){}
    codeStatus('dome raised'); return; }
  if(tl==='arch'){
    var ox=cursor.x, oz=cursor.z, W=20, H=16;
    try{
      for(var i=0; i<=20; i++){ var x=-W/2+i*(W/20);
        var y=H*(1-Math.pow(x/(W/2),2));
        placeStone(ox+x*0.13, oz, 3, 'cube', true, true, Math.max(0,Math.round(y)), true);
      }
    }catch(e){}
    codeStatus('arch spanned'); return; }
  if(tl==='sine'){
    var ox=cursor.x, oz=cursor.z;
    try{
      for(var i=0; i<=30; i++){ var x=i*0.8;
        var y=8*Math.sin(i*0.4);
        placeStone(ox+x*0.13, oz, 2, 'cube', true, true, Math.max(0,Math.round(y+8)), true);
      }
    }catch(e){}
    codeStatus('sine wave drawn'); return; }
  /* ARCHITECTURAL DESIGNER COLLECTION */
  if(tl.indexOf('column')===0){ var cp=tl.split(/\s+/); var ch=parseFloat(cp[1])||8;
    try{ Mainframe.run('b 3 2 3'); }catch(e){}
    var ox=cursor.x, oz=cursor.z;
    placeStone(ox, oz, Math.round(ch), 'cyl', true, true, 2, true);
    placeStone(ox, oz, 4, 'cube', true, true, 2+Math.round(ch), true);
    codeStatus('column '+ch+' high'); return; }
  if(tl==='doric'){
    var ox=cursor.x, oz=cursor.z;
    try{
      placeStone(ox, oz, 3, 'cube', true, true, 0, true);
      placeStone(ox, oz, 8, 'cyl', true, true, 3, true);
      placeStone(ox, oz, 4, 'cube', true, true, 11, true);
    }catch(e){}
    codeStatus('doric column'); return; }
  if(tl==='ionic'){
    var ox=cursor.x, oz=cursor.z;
    try{
      placeStone(ox, oz, 4, 'cube', true, true, 0, true);
      placeStone(ox, oz, 9, 'cyl', true, true, 4, true);
      placeStone(ox-1, oz, 2, 'sphere', true, true, 13, true);
      placeStone(ox+1, oz, 2, 'sphere', true, true, 13, true);
      placeStone(ox, oz, 5, 'cube', true, true, 14, true);
    }catch(e){}
    codeStatus('ionic column'); return; }
  if(tl.indexOf('arcade')===0){ var ap=tl.split(/\s+/); var an=parseInt(ap[1])||5;
    var ox=cursor.x, oz=cursor.z;
    try{
      for(var i=0; i<an; i++){
        placeStone(ox+i*4, oz, 6, 'cube', true, true, 0, true);
        if(i<an-1) placeStone(ox+i*4+2, oz, 3, 'arch', true, true, 6, true);
      }
      placeStone(ox+an*4-4, oz, 6, 'cube', true, true, 0, true);
    }catch(e){}
    codeStatus('arcade of '+an); return; }
  if(tl.indexOf('colonnade')===0){ var lp=tl.split(/\s+/); var ln=parseInt(lp[1])||5;
    var ox=cursor.x, oz=cursor.z;
    try{
      for(var i=0; i<ln; i++){
        placeStone(ox+i*5, oz, 8, 'cyl', true, true, 0, true);
        placeStone(ox+i*5, oz, 3, 'cube', true, true, 8, true);
      }
      placeStone(ox+ln*2.5-2.5, oz, 2, 'cube', true, true, 11, true);
    }catch(e){}
    codeStatus('colonnade of '+ln); return; }
  if(tl==='portico'){
    var ox=cursor.x, oz=cursor.z;
    try{
      for(var i=-1; i<=1; i++){
        placeStone(ox+i*4, oz, 8, 'cyl', true, true, 0, true);
      }
      placeStone(ox, oz, 3, 'cube', true, true, 8, true);
      placeS