// === BUILD PLAN ===
// Style: arctic industrial excavation facility — Valorant "Icebox" recreation
// Footprint: 176 x 166 playable. X = west->east (A site LEFT, B site RIGHT).
// Z = north->south (Defender Spawn TOP/north, Attacker Spawn BOTTOM/south).
// Height: ground pad Y=6, walk Y=7, boundary wall 16 tall, crane later to Y~36
//
// TOP VIEW (1 char = 8 blocks; col c -> X=6+8c, row r -> Z=2+8r)
// #######################
// #....AAAA..DDDD..KKKK.# D=Defender Spawn K=B Kitchen
// #...AAAAAA.DDDD..KKKK.# A=A site complex
// #..RRAAAAA.LLbb..KKKH.# R=A Rafters L=link b=Boiler H=B Hall
// #..RRAAAAAnn=TTT==SSSH# n=A Nest =T= Tube over mid S=B Site
// #..PPAAAAA..MMMM.oSSSH# P=A Pipes M=Mid o=B Orange
// #..PP.gggg..MMMM..SSSb# g=A Generator b=B Back
// #...mmmm....MMcM..yyy.# m=A Main c=crane y=B Yellow
// #..BBB......MBMM..GGG.# B=A Belt MB=Mid Blue G=B Garage
// #..BBB......MMpM...gg.# p=Mid Pallet g=B Green
// #..BBB......MMMM...gg.#
// #...BBB.....MMMM...gg.#
// #.....XXXXXXXXXXXXXX..# X=spawn approach lanes
// #......TTTTTTTTTTTT...# T=Attacker Spawn
// #######################
//
// MATERIALS PLAN:
// ground : snow_block(68)+white_concrete(18)+packed_ice(14) over packed_ice/stone - WHY: arctic shelf
// paving : light_gray_concrete(52)+gray_concrete(24)+stone+andesite - WHY: man-made pads read against snow
// buildings: light_gray_concrete(44)+gray_concrete(22)+smooth_stone(20)+iron(7) - WHY: cold industrial metal
// boundary : deepslate_tiles+polished_deepslate, snow-capped - WHY: dark frame contains the white field
// wood : spruce_planks + stripped_spruce_log (rafters, pallets, crates)
// accents : orange/yellow/blue/lime concrete containers (phase 3)
// PHASES: 1 planta+estructura | 2 alturas (rafters/nest/tube/boiler/crane) | 3 contenedores
// | 4 props+ziplines | 5 nieve, luces, desgaste
// NOTE: keep block budget lean — no map-wide air fills, ground only 3 layers deep.
// === END PLAN ===
var W = 7; // walk level
var PADY = 6; // ground surface top block
// ---------- PALETTES ----------
var MSNOW = palette([{block:"snow_block",weight:68},{block:"white_concrete",weight:18},{block:"packed_ice",weight:14}]);
var MPAVE = palette([{block:"light_gray_concrete",weight:52},{block:"gray_concrete",weight:24},{block:"stone",weight:14},{block:"andesite",weight:10}]);
var MWALL = palette([{block:"light_gray_concrete",weight:44},{block:"gray_concrete",weight:22},{block:"smooth_stone",weight:20},{block:"iron_block",weight:7},{block:"white_concrete",weight:7}]);
var MDARK = palette([{block:"deepslate_tiles",weight:45},{block:"stone",weight:25},{block:"polished_deepslate",weight:20},{block:"gray_concrete",weight:10}]);
var MICE = palette([{block:"packed_ice",weight:62},{block:"blue_ice",weight:24},{block:"ice",weight:14}]);
// ---------- LOCAL HELPERS ----------
function pave(x0,z0,x1,z1,pat){ fill(x0,PADY,z0,x1,PADY,z1,pat); }
function wall(x0,z0,x1,z1,hgt,pat){ fill(x0,W,z0,x1,W+hgt-1,z1,pat); }
function door(x0,z0,x1,z1){ fill(x0,W,z0,x1,W+4,z1,"air"); }
function shell(x0,z0,x1,z1,hgt,t,pat){
fill(x0,W,z0,x1,W+hgt-1,z0+t-1,pat);
fill(x0,W,z1-t+1,x1,W+hgt-1,z1,pat);
fill(x0,W,z0,x0+t-1,W+hgt-1,z1,pat);
fill(x1-t+1,W,z0,x1,W+hgt-1,z1,pat);
}
// ================= GROUND (cheap, 3 layers) =================
fill(0,4,0,189,5,175, MICE);
fill(0,PADY,0,189,PADY,175, MSNOW);
checkpoint("GROUND");
// ================= BOUNDARY =================
shell(6,2,184,172, 16, 3, MDARK);
fill(6,W+16,2,184,W+16,4,"snow_block");
fill(6,W+16,170,184,W+16,172,"snow_block");
fill(6,W+16,2,8,W+16,172,"snow_block");
fill(182,W+16,2,184,W+16,172,"snow_block");
checkpoint("BOUNDARY");
// ================= PAVED ZONES =================
pave(24,38,58,70, MPAVE); // A site
pave(16,56,28,76, MPAVE); // A pipes
pave(30,66,48,84, MPAVE); // A main
pave(16,78,32,122, MPAVE); // A belt
pave(80,10,118,30, MPAVE); // defender spawn
pave(72,44,122,118, MPAVE); // mid
pave(128,46,158,76, MPAVE); // B site
pave(142,86,164,102, MPAVE); // B garage
pave(146,16,176,40, MPAVE); // B kitchen
pave(158,44,178,76, MPAVE); // B hall / back
pave(158,98,178,130, MPAVE); // B green
pave(60,134,126,164, MPAVE); // attacker spawn
pave(84,116,114,134, MPAVE); // mid -> spawn
pave(30,120,80,138, MPAVE); // spawn -> belt
pave(126,120,164,138, MPAVE); // spawn -> green
checkpoint("PADS");
// ================= A SITE COMPLEX =================
wall(14,30,58,33,13,MWALL); // A north wall (behind Screens)
wall(14,30,17,60,13,MWALL); // A west wall
wall(62,26,65,40,13,MWALL); // A/Mid divider north (Nest gap after)
wall(62,54,65,82,13,MWALL); // A/Mid divider south
wall(50,60,62,72,6,MWALL); // A Generator block
wall(16,56,28,60,4,MDARK); // A Pipes plinth
wall(30,64,33,86,11,MWALL); // A Main west wall
wall(45,68,48,86,11,MWALL); // A Main east wall
wall(13,78,16,124,11,MWALL); // A Belt west wall
wall(32,86,35,124,11,MWALL); // A Belt east wall
wall(58,20,78,23,11,MWALL); // A link north
wall(58,32,78,35,11,MWALL); // A link south
checkpoint("A_STRUCT");
// ================= DEFENDER SPAWN =================
shell(76,6,122,34, 13, 3, MWALL);
door(74,24,80,32); // west -> A link
door(96,31,110,37); // south -> Mid / Boiler
door(119,14,125,28); // east -> B Kitchen
checkpoint("DEF_SPAWN");
// ================= MID =================
wall(96,44,118,62,8,MDARK); // Boiler platform mass
wall(120,40,123,58,13,MWALL); // Mid/B divider north
wall(120,72,123,110,13,MWALL); // Mid/B divider south (B Orange gap between)
wall(70,108,82,111,11,MWALL); // mid south funnel W
wall(114,106,122,109,11,MWALL); // mid south funnel E
checkpoint("MID_STRUCT");
// ================= B SITE COMPLEX =================
shell(142,12,180,44, 12, 3, MWALL); // B Kitchen building
door(140,26,146,36); // kitchen -> B site
door(152,42,166,48); // kitchen -> B hall
wall(156,46,159,74,12,MWALL); // B hall west wall
wall(160,74,180,77,12,MWALL); // B back south wall
wall(124,42,156,45,12,MWALL); // B site north edge
shell(138,82,168,106, 11, 3, MWALL); // B Garage
door(136,88,142,98); // garage -> B site side
door(150,103,164,109); // garage -> B green
wall(155,98,158,132,11,MWALL); // B green west wall
wall(178,96,181,132,11,MWALL); // B green east wall
checkpoint("B_STRUCT");
// ================= ATTACKER SPAWN =================
shell(56,130,130,168, 13, 3, MWALL);
door(54,138,60,150); // west -> A Belt
door(90,128,108,134); // north -> Mid
door(126,138,132,150); // east -> B Green
checkpoint("ATK_SPAWN");
// ================= SNOW/ICE VARIATION =================
noisyReplace(6,PADY,2,184,PADY,172,"snow_block", MICE, 0.12, 21);
checkpoint("DONE_PHASE1");
// ================= FASE 2: ALTURAS Y VERTICALIDAD =================
var MWOOD = palette([{block:"spruce_planks",weight:58},{block:"stripped_spruce_log",weight:26},{block:"oak_planks",weight:16}]);
var MYEL = palette([{block:"yellow_concrete",weight:62},{block:"yellow_terracotta",weight:24},{block:"honeycomb_block",weight:14}]);
var MMETAL = palette([{block:"iron_block",weight:38},{block:"light_gray_concrete",weight:36},{block:"smooth_stone",weight:26}]);
function deck(x0,z0,x1,z1,y,pat){ fill(x0,y,z0,x1,y,z1,pat); }
function posts(x0,z0,x1,z1,y0,y1,step,blk){
for(var px=x0;px<=x1;px+=step){ for(var pz=z0;pz<=z1;pz+=step){ fill(px,y0,pz,px,y1,pz,blk); } }
}
function rail(x0,z0,x1,z1,y,blk){
fill(x0,y,z0,x1,y,z0,blk); fill(x0,y,z1,x1,y,z1,blk);
fill(x0,y,z0,x0,y,z1,blk); fill(x1,y,z0,x1,y,z1,blk);
}
// ---- A RAFTERS (plataforma de madera elevada sobre A) ----
posts(19,35,35,51,W,14,5,"stripped_spruce_log");
deck(18,34,36,52,15,MWOOD);
rail(18,34,36,52,16,"spruce_fence");
fill(20,16,42,20,16,44,"air");
staircase(46,44,W,16,"west");
checkpoint("A_RAFTERS");
// ---- A SCREENS (lonas amarillas colgadas) ----
fill(30,12,36,50,12,36,"iron_block");
fill(30,13,36,50,17,36,MYEL);
checkpoint("A_SCREENS");
// ---- A NEST (caja elevada al este de A) + TIROLINA ----
posts(53,41,63,53,W,12,5,"iron_block");
deck(52,40,64,54,13,MMETAL);
rail(52,40,64,54,14,"iron_bars");
fill(53,14,46,53,14,48,"air");
staircase(72,47,W,14,"west");
for(var zx=30;zx<=52;zx++){ ps(zx,16,47,"chain[axis=x]"); }
fill(30,15,47,30,16,47,"iron_block");
fill(53,15,47,53,16,47,"iron_block");
checkpoint("A_NEST_ZIP");
// ---- A PIPES (plataforma + tuberia) ----
deck(16,56,28,76,11,MMETAL);
rail(16,56,28,76,12,"iron_bars");
fill(18,14,58,18,14,74,"quartz_pillar");
fill(22,15,58,22,15,74,"quartz_pillar");
fill(26,14,58,26,14,74,"quartz_pillar");
staircase(34,66,W,12,"west");
checkpoint("A_PIPES");
// ---- A GENERATOR (caja + barandilla) ----
deck(50,60,62,72,13,MMETAL);
rail(50,60,62,72,14,"iron_bars");
checkpoint("A_GEN");
// ---- MID BOILER (calderas sobre la masa Y7-14) ----
rail(96,44,118,62,15,"iron_bars");
makeCylinder(104,15,52,MMETAL,5,9,true);
makeCylinder(112,15,58,MMETAL,3,7,true);
fill(104,24,52,104,26,52,"iron_bars");
staircase(94,52,W,15,"east");
checkpoint("MID_BOILER");
// ---- TUBO AMARILLO sobre mid hacia B Kitchen ----
var TZ = 56, TY = 21, TR = 4;
fill(98,TY-TR,TZ-TR,152,TY+TR,TZ+TR,"air");
for(var tx=98;tx<=152;tx++){
for(var dy=-TR;dy<=TR;dy++){
for(var dz=-TR;dz<=TR;dz++){
var dd = Math.sqrt(dy*dy+dz*dz);
if(dd>TR-1.15 && dd<=TR+0.35){ pb(tx,TY+dy,TZ+dz,"yellow_concrete"); }
}
}
}
fill(98,TY-3,TZ-3,152,TY-3,TZ+3,MMETAL);
fill(98,TY-4,TZ-4,98,TY+2,TZ+4,"air");
fill(152,TY-4,TZ-4,152,TY+2,TZ+4,"air");
posts(106,55,142,57,W,TY-4,12,"iron_block");
staircase(96,56,15,TY-2,"east");
checkpoint("TUBE");
// ---- GRUA AMARILLA sobre mid ----
fill(86,W,86,90,32,90,MYEL);
fill(70,31,88,118,31,89,MYEL);
fill(70,32,88,118,32,89,"iron_bars");
fill(114,29,87,120,33,90,MYEL);
for(var cy=W;cy<=30;cy++){ ps(110,cy,88,"chain[axis=y]"); }
fill(108,W,86,112,W+2,90,MMETAL);
checkpoint("CRANE");
// ---- CUBIERTAS ----
fill(76,20,6,122,20,34,MMETAL); // Defender Spawn
fill(142,19,12,180,19,44,MMETAL); // B Kitchen
fill(138,18,82,168,18,106,MMETAL); // B Garage
fill(56,20,130,130,20,168,MMETAL); // Attacker Spawn
checkpoint("ROOFS");
// ---- desgaste del tubo y metal ----
noisyReplace(98,TY-TR,TZ-TR,152,TY+TR,TZ+TR,"yellow_concrete","yellow_terracotta",0.22,33);
checkpoint("DONE_PHASE2");
// ================= FASE 3: CONTENEDORES Y COBERTURAS =================
// container(): caja corrugada con marco oscuro, puertas en un extremo y nieve encima
function container(x0,z0,x1,z1,hgt,col,doorSide){
var yb = W, yt = W+hgt-1;
fill(x0,yb,z0,x1,yt,z1,col);
// montantes de esquina
fill(x0,yb,z0,x0,yt,z0,"gray_concrete");
fill(x1,yb,z0,x1,yt,z0,"gray_concrete");
fill(x0,yb,z1,x0,yt,z1,"gray_concrete");
fill(x1,yb,z1,x1,yt,z1,"gray_concrete");
// zuncho superior: SOLO el anillo perimetral (deja ver el color de la tapa)
fill(x0,yt,z0,x1,yt,z0,"gray_concrete");
fill(x0,yt,z1,x1,yt,z1,"gray_concrete");
fill(x0,yt,z0,x0,yt,z1,"gray_concrete");
fill(x1,yt,z0,x1,yt,z1,"gray_concrete");
fill(x0,yb,z0,x1,yb,z1,"deepslate_tiles");
// puertas
if(doorSide==="z0"){ fill(x0+1,yb+1,z0,x1-1,yt-1,z0,"iron_block"); }
else { fill(x0,yb+1,z0+1,x0,yt-1,z1-1,"iron_block"); }
// nieve acumulada: capa fina y PARCIAL, no maciza
fill(x0+1,yt+1,z0+1,x1-1,yt+1,z1-1,"snow[layers=2]");
noisyReplace(x0+1,yt+1,z0+1,x1-1,yt+1,z1-1,"snow","air",0.55,x0+z0);
}
function crates(x0,z0,x1,z1,hgt){
fill(x0,W,z0,x1,W+hgt-1,z1, palette([{block:"spruce_planks",weight:45},{block:"oak_planks",weight:30},{block:"barrel[axis=y]",weight:25}]));
fill(x0,W+hgt,z0,x1,W+hgt,z1,"snow[layers=2]");
noisyReplace(x0,W+hgt,z0,x1,W+hgt,z1,"snow","air",0.5,x1+z1);
}
// ---- A SITE ----
container(30,46,44,52,6,"orange_concrete","z0");
container(26,58,34,64,5,"red_concrete","x0");
container(40,60,50,66,5,"light_blue_concrete","z0");
crates(36,72,42,78,4);
crates(20,44,25,49,3);
checkpoint("CONT_A");
// ---- MID ----
container(76,84,92,94,7,"blue_concrete","z0"); // Mid Blue
container(78,66,88,74,6,"orange_concrete","x0");
container(100,84,112,92,6,"lime_concrete","z0");
crates(96,98,106,106,3); // Mid Pallet
crates(84,102,90,108,4);
checkpoint("CONT_MID");
// ---- B SITE ----
container(138,68,152,78,8,"yellow_concrete","z0"); // B Yellow (firma)
container(126,56,136,66,6,"orange_concrete","x0"); // B Orange
container(128,36,138,44,5,"white_concrete","z0"); // base del Snowman
container(144,50,156,58,6,"lime_concrete","z0");
crates(160,60,168,70,4); // B Back
crates(146,90,158,98,4); // B Garage
checkpoint("CONT_B");
// ---- MUNECO DE NIEVE (B Snowman) ----
var SY = W+5;
makeSphere(133,SY+3,40,"snow_block",3,false);
makeSphere(133,SY+7,40,"snow_block",2,false);
pb(133,SY+9,40,"carved_pumpkin[facing=south]");
ps(130,SY+4,40,"oak_fence"); ps(136,SY+4,40,"oak_fence");
checkpoint("SNOWMAN");
// ---- SPAWNS: cajas de suministro ----
crates(66,140,74,148,4);
crates(112,140,120,148,4);
crates(86,14,94,22,4);
checkpoint("CONT_SPAWN");
// ---- TIROLINA DE B (Garage -> B Site) ----
for(var bz=60;bz<=88;bz++){ ps(150,17,bz,"chain[axis=z]"); }
fill(150,16,59,150,17,59,"iron_block");
fill(150,16,89,150,17,89,"iron_block");
checkpoint("ZIP_B");
// ================= FASE 4: DETALLE, LUZ Y ZONAS DE PLANTADO =================
function ring(x0,z0,x1,z1,y,blk){
fill(x0,y,z0,x1,y,z0,blk); fill(x0,y,z1,x1,y,z1,blk);
fill(x0,y,z0,x0,y,z1,blk); fill(x1,y,z0,x1,y,z1,blk);
}
function ceilLights(x0,z0,x1,z1,y,step){
for(var lx=x0;lx<=x1;lx+=step){ for(var lz=z0;lz<=z1;lz+=step){ pb(lx,y,lz,"sea_lantern"); } }
}
function drift(x,z,r){ makeSphere(x,W-1,z,"snow_block",r,false); }
// ---- ZONAS DE PLANTADO ----
ring(32,38,48,45,PADY,"orange_concrete");
ring(33,39,47,44,PADY,"light_gray_concrete");
ring(128,46,140,56,PADY,"orange_concrete");
ring(129,47,139,55,PADY,"light_gray_concrete");
checkpoint("PLANT_ZONES");
// ---- ILUMINACION INTERIOR ----
ceilLights(82,12,116,28,19,8); // Defender Spawn
ceilLights(148,18,174,38,18,8); // B Kitchen
ceilLights(144,88,162,100,17,8); // B Garage
ceilLights(64,138,122,162,19,10); // Attacker Spawn
for(var tl=104;tl<=146;tl+=7){ ps(tl,24,56,"lantern[hanging=true]"); } // dentro del Tubo
checkpoint("LIGHTS_IN");
// ---- FAROLAS EN PASILLOS Y EXTERIORES ----
lampPost(19,W,86,5,"iron_bars"); lampPost(19,W,106,5,"iron_bars"); // A Belt
lampPost(30,W,74,5,"iron_bars"); // A Main
lampPost(27,W,42,5,"iron_bars"); lampPost(55,W,66,5,"iron_bars"); // A Site
lampPost(75,W,50,5,"iron_bars"); lampPost(95,W,100,5,"iron_bars"); // Mid
lampPost(118,W,86,5,"iron_bars");
lampPost(131,W,70,5,"iron_bars"); lampPost(154,W,46,5,"iron_bars"); // B Site
lampPost(162,W,110,5,"iron_bars"); lampPost(162,W,126,5,"iron_bars"); // B Green
checkpoint("LAMPS");
// ---- ANDAMIOS Y TUBERIAS INDUSTRIALES ----
fill(66,W,44,66,18,44,"iron_bars"); fill(66,W,78,66,18,78,"iron_bars");
fill(66,18,44,66,18,78,"iron_block");
fill(124,W,90,124,17,90,"iron_bars"); fill(124,W,106,124,17,106,"iron_bars");
fill(124,17,90,124,17,106,"iron_block");
fill(145,15,14,145,15,42,"quartz_pillar");
fill(179,14,16,179,14,42,"quartz_pillar");
fill(58,13,136,58,13,164,"quartz_pillar");
checkpoint("SCAFFOLD");
// ---- MONTONES DE NIEVE (B Snow Pile y esquinas muertas) ----
drift(120,64,4); drift(46,36,3); drift(70,110,4); drift(140,110,3);
drift(30,116,3); drift(166,52,3); drift(96,70,3); drift(112,120,4);
checkpoint("DRIFTS");
// ---- HIELO EXPUESTO EN ZONAS ABIERTAS ----
noisyReplace(72,PADY,44,122,PADY,118,"light_gray_concrete","packed_ice",0.14,55);
noisyReplace(24,PADY,38,58,PADY,70,"light_gray_concrete","packed_ice",0.12,56);
noisyReplace(128,PADY,46,158,PADY,76,"light_gray_concrete","packed_ice",0.12,57);
checkpoint("DONE_PHASE4");
// ================= FASE 5: ACABADO =================
function snowRoof(x0,z0,x1,z1,y,seed){
fill(x0,y,z0,x1,y,z1,"snow[layers=3]");
noisyReplace(x0,y,z0,x1,y,z1,"snow","air",0.35,seed);
}
// ---- NIEVE SOBRE LAS CUBIERTAS ----
snowRoof(76,6,122,34,21,101); // Defender Spawn
snowRoof(142,12,180,44,20,102); // B Kitchen
snowRoof(138,82,168,106,19,103); // B Garage
snowRoof(56,130,130,168,21,104); // Attacker Spawn
snowRoof(18,34,36,52,17,105); // A Rafters
checkpoint("ROOF_SNOW");
// ---- COBERTURAS EXTRA ----
container(108,100,118,108,6,"red_concrete","z0"); // Mid bajo
container(74,50,84,58,5,"gray_concrete","x0"); // Mid alto
container(142,60,152,66,5,"cyan_concrete","x0"); // B Site
crates(52,54,58,60,3); // A Site
crates(164,84,172,92,4); // B Back
crates(100,64,108,72,3); // Mid
checkpoint("COVER_EXTRA");
// ---- ESCARCHA EN LA BASE DE LOS MUROS ----
noisyReplace(6,W,2,184,W+1,172,"light_gray_concrete","packed_ice",0.16,201);
noisyReplace(6,W,2,184,W+1,172,"gray_concrete","blue_ice",0.10,202);
noisyReplace(6,W,2,184,W+2,172,"smooth_stone","packed_ice",0.12,203);
checkpoint("FROST");
// ---- DESGASTE DEL PERIMETRO ----
noisyReplace(6,W+12,2,184,W+15,172,"deepslate_tiles","snow_block",0.30,204);
checkpoint("DONE_PHASE5");