<!-- SOLID-PLAYTIME · part 162 -->
 he;return l.position.set(n,i,0),t.add(l),this.mesh(l,new es(a,s,5,9),r,0,-s*0.5,0),o[e]=l,l}buildHero(){let t=new Pe({color:15115554,emissive:10178560,emissiveIntensity:0.86,roughness:0.28,metalness:0.48}),e=new Pe({color:16765803,emissive:12085512,emissiveIntensity:0.72,roughness:0.22,metalness:0.42});this.heroRig.hips=new he,this.heroRig.hips.position.y=2.25,this.hero.add(this.heroRig.hips),this.mesh(this.heroRig.hips,new dn(0.72,14,10),t,0,0,0).scale.set(1.18,0.72,0.72),this.heroRig.spine=new he,this.heroRig.spine.position.y=0.58,this.heroRig.hips.add(this.heroRig.spine);let i=this.mesh(this.heroRig.spine,new es(0.72,1.25,6,12),e,0,0.62,0);i.scale.x=1.2,this.heroRig.head=new he,this.heroRig.head.position.y=2.05,this.heroRig.spine.add(this.heroRig.head),this.mesh(this.heroRig.head,new dn(0.52,16,12),e,0,0,0);let s=this.mesh(this.heroRig.head,new cn(0.54,0.035,6,28),this.glow(65535,0.82),0,0,0);s.rotation.x=Math.PI/2;let a=this.mesh(this.heroRig.spine,new cn(0.73,0.045,6,32),this.glow(16711935,0.72),0,0.92,0.03);a.rotation.x=Math.PI/2;let r=this.limb(this.heroRig.spine,"leftArm",-0.92,1.42,1.18,0.24,t,this.heroRig),o=this.limb(this.heroRig.spine,"rightArm",0.92,1.42,1.18,0.24,t,this.heroRig);this.limb(r,"leftForearm",0,-1.2,1.05,0.2,e,this.heroRig);let l=this.limb(o,"rightForearm",0,-1.2,1.05,0.2,e,this.heroRig),c=this.limb(this.heroRig.hips,"leftLeg",-0.43,-0.3,1.42,0.3,t,this.heroRig),u=this.limb(this.heroRig.hips,"rightLeg",0.43,-0.3,1.42,0.3,t,this.heroRig);this.limb(c,"leftShin",0,-1.42,1.24,0.24,e,this.heroRig),this.limb(u,"rightShin",0,-1.42,1.24,0.24,e,this.heroRig),this.cape=this.mesh(this.heroRig.spine,new qn(1.55,2.6,1,4),new Pn({color:11889170,transparent:!0,opacity:0.28,side:hn,blending:Ye,depthWrite:!1}),0,0.1,0.52),this.cape.rotation.x=0.12,this.sword=this.mesh(l,new $e(0.11,0.11,2.25),this.mat(16775126,16765514,0.1),0,-1.2,0.35),this.sword.rotation.x=0.65;let f=this.mesh(this.hero,new dn(2.05,16,12),this.glow(16765514,0.1),0,2.35,0);f.scale.y=1.45;let h=this.mesh(this.hero,new dn(2.7,12,9),this.glow(16762155,0.035),0,2.2,0);h.scale.set(0.9,1.45,0.72),this.hero.traverse((p)=>{if(p instanceof At&&p!==f&&p!==h)p.castShadow=!0})}buildFigure(t,e=1){let n=new he,i={},s=this.mat(328714,t,0.35),a=this.mat(t,t,0.2);return i.hips=new he,i.hips.position.y=2.2,n.add(i.hips),this.mesh(i.hips,new dn(0.65,10,8),s,0,0,0),i.spine=new he,i.spine.position.y=0.6,i.hips.add(i.spine),this.mesh(i.spine,new es(0.65,1.35,5,9),s,0,0.6,0),this.mesh(i.spine,new Zo(0.48,1),a,0,2,0),this.limb(i.spine,"leftArm",-0.82,1.3,1.15,0.21,s,i),this.limb(i.spine,"rightArm",0.82,1.3,1.15,0.21,s,i),this.limb(i.hips,"leftLeg",-0.38,-0.2,1.45,0.25,s,i),this.limb(i.hips,"rightLeg",0.38,-0.2,1.45,0.25,s,i),n.userData.rig=i,n.scale.setScalar(e),n.traverse((r)=>{if(r instanceof At)r.castShadow=!0}),n}buildCastle(){let t=new he,e=this.ground(0,0),n=this.mat(4799015),i=this.mat(15183158,7028485);this.mesh(t,new fn(18,24,11,12),this.mat(3227692),0,e+3,0),this.mesh(t,new $e(14,12,12),n,0,e+12,0),[-1,1].forEach((s)=>[-1,1].forEach((a)=>{this.mesh(t,new fn(3.2,4,18,7),n,s*8,e+15,a*6),this.mesh(t,new Ln(4.5,7,7),i,s*8,e+27,a*6)})),this.mesh(t,new $e(3,8,0.7),i,0,e+9,6.2),this.mesh(t,new Zo(2.3,1),this.mat(16769162,16751897),0,e+27,0),t.name="castle",this.world.add(t)}buildFarShore(){let t=new he,e=this.ground(0,210);for(let i=-2;i<=2;i+=1){let s=this.mesh(t,new fn(0.28,0.35,2.6,6),this.mat(3875857),i*4.2,e+1.3,0);this.mesh(s,new ns(0.55),this.glow(i%2?65535:16765514,0.9),0,1.5,0)}let n=this.buildFigure(6746111,0.84);n.position.set(7,e,-2),n.name="shoreKeeper",t.add(n),t.position.z=210,this.world.add(t)}buildPalace(t){let e=le[t];if(!e)return;let n=new he,i=this.ground(e.x,e.z),s=this.mat(t===3?2312028:t===4?3478063:t===5?5913352:1513499),a=this.mat(e.color,e.color);if(n.position.set(e.x,i,e.z),t===0)for(let o=-1;o<=1;o+=1)this.mesh(n,new Ln(3.2,18+Math.abs(o)*5,5),s,o*7,9,0);else if(t===1){this.mesh(n,new fn(18,21,1.2,24),this.mat(203308,13647),0,0.2,0);for(let o=-1;o<=1;o+=1)this.mesh(n,new fn(3,5,18,6),s,o*8,8,0)}else if(t===2)for(let o=-2;o<=2;o+=1)this.mesh(n,new Ln(2.2,18+Math.abs(o)*6,4),s,o*5,9+Math.abs(o)*3,0);else if(t===3)for(let o=-2;o<=2;o+=1){let l=this.mesh(n,new Ln(2.6,17+Math.abs(o)*5,5),a,o*5,8+Math.abs(o)*2,0);l.rotation.z=o*0.12}else if(t===4)for(let o=0;o<5;o+=1){let l=this.mesh(n,new dn(4+o*0.45,8,6),s,Math.sin(o*1.26)*7,7+Math.cos(o*1.26)*3,Math.cos(o*1.26)*7);l.scale.y=1.7}else if(t===5)for(let o=-2;o<=2;o+=1)this.mesh(n,new Ln(3,15-Math.abs(o)*2,4),a,o*4.2,7,0);else{this.mesh(n,new fn(6,10,28,6),s,0,14,0);for(let o=0;o<5;o+=1)this.mesh(n,new Ln(2.5,18,4),s,Math.sin(o*1.25)*10,9,Math.cos(o*1.25)*10);this.mesh(n,new ns(3.4),a,0,31,0)}let r=this.mesh(n,new cn(9,0.18,8,48),this.glow(e.color,0.8),0,1.5,0);r.rotation.x=Math.PI/2,this.palaceGroups.push(n),this.world.add(n)}buildSecrets(){let t=new $e(3.8,0.35,3.8),e=this.mat(6551039,1469061);le.forEach((i)=>{let s=new Ki(t,e,6),a=new ie,r=n