import type { ZoneDef } from '../../core/types'; import type { KitZoneContext } from '../kit/context'; /** * Zona de pruebas y escaparate del kit de mundo. Abrir con ?zone=test * x -20..14: césped de pruebas del héroe (y=0) con todos los props de jardín. * Después: escalones, laguna con cascada, y un tramo por estilo de terreno hasta x=140. */ export const testZone: ZoneDef = { id: 'test', name: 'Zona de pruebas', emoji: '🧪', bounds: { minX: -20, maxX: 140, minY: -6, maxY: 22 }, spawns: { default: { x: 0, y: 1 }, right: { x: 40, y: 1 } }, env: 'city-day', build(z) { const k = z as KitZoneContext; z.backdrop('hills'); // ── césped inicial (lo usan otros agentes para probar al héroe) ── z.ground(-20, 14, 0); z.block(-19.5, 4, 1, 8, { style: 'castle' }); z.prop('house', -14.5, 0, { z: -3 }); z.prop('tree', -9.5, 0); z.prop('pine', -6.8, 0, { z: -3.4 }); z.prop('palm', -4.2, 0, { z: -2.6 }); z.prop('bush', -1.8, 0, { berries: true }); z.prop('rock', 2.4, 0, { z: -1.6 }); z.prop('lamp', 5, 0); z.prop('fence', 8, 0, { width: 3 }); z.prop('bench', 11, 0, { z: -2 }); z.prop('sign', 12.8, 0, { text: '¡Hola!' }); z.prop('mushroom', -11.6, 0, { z: -1 }); z.prop('crate', 6.8, 0, { z: -1.8, scale: 0.8 }); z.prop('barrel', -16.8, 0, { z: -1.2 }); k.scatter('flower', -18, 13, 0, 9, { z: -0.7, zJitter: 0.8 }); k.scatter('grassTuft', -18, 13, 0, 12, { z: 0.9, zJitter: 0.4 }); z.prop('cloud', -6, 9, { z: -7, scale: 1.4 }); z.prop('cloud', 9, 10.5, { z: -9, scale: 1.8 }); z.decor('🌼', -3, 0, { scale: 0.7, z: -0.8, sway: true }); z.decor('⭐', 8, 6.2, { scale: 0.8, z: 0, glow: true }); z.platform(4, 3, 3); z.platform(8, 5.5, 3); z.platform(-12, 5, 2.5, { style: 'grass' }); // ── escalones y laguna ── z.ground(14, 20, 1.5); z.ground(20, 26, 3); z.water(26, 36, -0.4, 3); z.ground(26, 36, -3.4, { style: 'sand' }); k.waterfall(25.9, 3, -0.4, { width: 1.3 }); z.platform(31, 2, 3, { move: { dx: 6, period: 4 } }); z.prop('lilypad', 28.5, -0.42, { flower: true }); z.prop('lilypad', 33.5, -0.42, { z: -1.5 }); z.prop('reeds', 35.4, -0.4, { z: -2.5 }); z.prop('reeds', 26.8, -0.4, { z: -3.5 }); z.prop('tree', 17, 1.5, { z: -3, fruit: true }); // ── tramos por estilo ── z.ground(36, 44, 0, { style: 'sand' }); z.prop('palm', 39, 0, { z: -2.5, lean: -0.5 }); z.prop('rock', 42, 0, { z: -1.4, color: 0xe8c48a, moss: false }); z.ground(44, 52, 0, { style: 'stone' }); z.platform(44, 4, 3, { move: { dy: 5, period: 3 } }); z.block(50, 1, 2, 2, { style: 'stone' }); z.ground(52, 60, 0, { style: 'city' }); z.prop('building', 55, 0, { floors: 5, color: 0x6ec3f4 }); z.prop('lamp', 58.5, 0, { lit: true }); z.prop('bench', 53.5, 0); z.ground(60, 68, 0, { style: 'cave' }); z.prop('crystal', 62, 0, { z: -1.5 }); z.prop('crystal', 66.5, 0, { z: -2.5, color: 0x5fe0ff, scale: 1.3 }); z.prop('stalagmite', 64, 0, { z: -3 }); z.prop('mushroom', 67, 0, { color: 0xa455f0, z: -0.8, scale: 0.7 }); z.area('soft', 64.5, -0.6, 2, 1.2); z.platform(64, 3.2, 3, { style: 'cave' }); z.ground(68, 76, 0, { style: 'wood' }); z.platform(72, 3, 2.5, { style: 'metal', move: { dx: 3, period: 3.5 } }); z.prop('crate', 74.5, 0, { solid: true }); z.ground(76, 84, 0.8, { style: 'ice' }); z.prop('pine', 80, 0.8, { snow: true, z: -2.6 }); z.platform(80, 4, 2.5, { style: 'ice' }); z.ground(84, 92, 0, { style: 'castle' }); z.prop('torch', 86, 0, { z: -0.9 }); z.prop('torch', 90.5, 0, { z: -0.9 }); z.exit(88.3, 1.2, 1.4, 2.4, 'test', 'default', { door: true, emoji: '🏰' }); z.water(92, 98, -0.6, 2.5, { lava: true }); z.ground(92, 98, -3.1, { style: 'lava' }); z.prop('bridge', 95, 0, { width: 6, solid: true }); z.ground(98, 106, 0, { style: 'lava' }); z.area('hazard', 103, 0.3, 2, 0.6, { visual: 'spikes', damage: 1 }); z.ground(106, 114, 0, { style: 'cloud' }); z.platform(110, 3.5, 3, { style: 'cloud' }); z.ground(114, 122, 0, { style: 'snow' }); z.platform(118, 3.5, 2.6, { style: 'stone' }); z.ground(122, 140, 0, { style: 'metal' }); z.prop('sign', 126, 0, { emoji: '🏁' }); z.block(139.5, 4, 1, 8, { style: 'castle' }); z.exit(136, 1.2, 2, 2.4, 'test', 'default', { arrow: 'right' }); }, };