<!-- SOLID-PLAYTIME · part 173 -->
yLevel+=1,this.renderer.setPixelRatio(Math.max(0.78,this.basePixelRatio-this.qualityLevel*0.14)),this.qualityLevel>=2)this.stormBolts.forEach((i,s)=>{i.visible=s%2===0});if(this.qualityLevel>=3)this.distantLayers.forEach((i,s)=>{if(s>4)i.visible=!1});this.resize(),this.mount.closest(".game-shell")?.setAttribute("data-render-quality",String(this.qualityLevel))}}update(t){let e=Math.hypot(this.moveX,this.moveY),n=e>0.05;if(n){let Y=this.moveY/Math.max(1,e),yt=this.moveX/Math.max(1,e),Ht=this.run?27:15,vt=(Math.sin(this.yaw)*Y+Math.cos(this.yaw)*yt)*Ht*t,ye=(Math.cos(this.yaw)*Y-Math.sin(this.yaw)*yt)*-Ht*t,D=Math.max(-430,Math.min(430,this.x+vt)),ce=Math.max(-430,Math.min(430,this.z+ye));if(this.canOccupy(D,this.z))this.x=D;if(this.canOccupy(this.x,ce))this.z=ce;this.baseYaw=Math.atan2(vt,ye)}if(!n&&this.grounded&&!this.flying&&this.attackClock===0)this.patrolT+=t;else this.patrolT=0;let i=this.patrolT>4?1:0;this.patrolBlend+=(i-this.patrolBlend)*(1-Math.exp(-2.2*t));let s=this.patrolBlend,a=Math.sin(this.t*0.45)*0.3*s,r=Math.sin(this.t*0.31+1.2)*0.55*s,o=Math.cos(this.t*0.27+0.4)*0.55*s;if(this.hero.rotation.y=this.baseYaw+a,this.heroFibers){let Y=this.heroFibers.material,yt=this.warT>0?2.1:1;if(this.heroFibers.rotation.z=Math.sin(this.t*(n?8.4:2.2)*yt)*(n?0.045:0.016),this.heroFibers.rotation.x=Math.sin(this.t*3.1*yt)*0.018,Y instanceof Sn)Y.opacity=n?0.72:0.54+Math.sin(this.t*2.7)*0.08;if(this.heroCoreMaterial)this.heroCoreMaterial.opacity=n?0.22:0.14+Math.sin(this.t*2.1)*0.04}let l=this.ground(this.x,this.z);if(this.flying){let Y=l+8+this.flightLift;this.vy+=((Y-this.y)*7.2-this.vy*4.6)*t,this.y+=this.vy*t,this.grounded=!1}else{if(this.vy-=(this.softLanding?12:22)*t,this.softLanding)this.vy=Math.max(this.vy,-7);if(this.y+=this.vy*t,this.y<=l)this.y=l,this.vy=0,this.grounded=!0,this.softLanding=!1}this.attackClock=Math.max(0,this.attackClock-t),this.warT=Math.max(0,this.warT-t);let c=0.38,u=0.42,f;if(this.attackClock>u)f=1-(this.attackClock-u)/c;else if(this.attackClock>0||this.warT>0.8)f=1;else f=0;let h=f>this.drawE?3.5:1.8,p=f-this.drawE;this.drawE+=Math.sign(p)*Math.min(Math.abs(p),h*t);let v=Math.max(0,Math.min(1,this.drawE));if(this.attackClock>0&&this.attackClock<=u)this.followT=0.35;else this.followT=Math.max(0,this.followT-t);let y=qf(v/0.4),U=qf((v-0.4)/0.6),d=qf((v-0.35)/0.65),g=this.SHEATH_POS.x+this.SHEATH_DIR.x*1.6*y,m=this.SHEATH_POS.y+this.SHEATH_DIR.y*1.6*y,x=this.SHEATH_POS.z+this.SHEATH_DIR.z*1.6*y,S=g+(this.DRAW_P1.x-g)*U,A=m+(this.DRAW_P1.y-m)*U,T=x+(this.DRAW_P1.z-x)*U,w=this.SHEATH_ROT.x+(this.SWING_RX-this.SHEATH_ROT.x)*d,b=this.SHEATH_ROT.z+(this.SWING_RZ0-this.SHEATH_ROT.z)*d,M=w,R=b;if(this.bladePivot.position.set(S+(this.COMBAT_POS.x-S)*U,A+(this.COMBAT_POS.y-A)*U,T+(this.COMBAT_POS.z-T)*U),this.attackClock>0&&this.attackClock<=u){let Y=Math.min(1,(u-this.attackClock)/u),yt=Math.sin(Y*Math.PI);if(w=this.SWING_RX,b=this.SWING_RZ0+(this.SWING_RZ1-this.SWING_RZ0)*Y,this.bladePivot.position.copy(this.COMBAT_POS),this.slashArc&&this.slashMaterial)this.slashArc.visible=!0,this.slashMaterial.opacity=yt*0.92,this.slashArc.scale.setScalar(0.76+Y*0.46),this.slashArc.rotation.z=1.67-Y*2.4;if(this.attackLight)this.attackLight.intensity=yt*36}else{if(this.slashArc)this.slashArc.visible=!1;if(this.slashMaterial)this.slashMaterial.opacity=0;if(this.attackLight)this.attackLight.intensity=this.warT>0?7+Math.sin(this.t*9)*2.5:0}if(this.followT>0&&this.attackClock<=0){let Y=qf(this.followT/0.35);w=M+(this.SWING_RX-M)*Y,b=R+(this.SWING_RZ1-R)*Y}this.bladePivot.rotation.set(w,0,b);let O=0;if(this.pokeHopT>0)this.pokeHopT=Math.max(0,this.pokeHopT-t),O=Math.sin((1-this.pokeHopT/0.45)*Math.PI)*0.55;let V=this.flying?Math.sin(this.t*3.2)*0.12:n?Math.abs(Math.sin(this.t*(this.run?11:7)))*0.11:0;if(this.hero.position.set(this.x+r,this.y+V+O,this.z+o),this.t-this.lastTrackTime>3)this.trackTargetYaw=0,this.trackTargetPitch=0;let k=1-Math.exp(-8*t);this.trackYaw+=(this.trackTargetYaw-this.trackYaw)*k,this.trackPitch+=(this.trackTargetPitch-this.trackPitch)*k,this.headGroup.rotation.y=this.trackYaw+s*Math.sin(this.t*0.6)*0.16,this.headGroup.rotation.x=this.trackPitch;let et=12*(window.KtZoom||1),Z=this.y+2.3,at=Math.cos(this.cameraPitch)*et,W=this.x-Math.sin(this.yaw)*at,ht=this.z+Math.cos(this.yaw)*at,mt=Math.max(this.ground(W,ht)+0.45,Z+Math.sin(this.cameraPitch)*et),q=new C(W,mt,ht);window.camLinked!==false&&(this.camera.position.lerp(q,1-Math.exp(-7.5*t)),this.camera.lookAt(this.x,Z,this.z));let dt=new Nt(this.x,this.z),Ft=dt.distanceTo(tg),Et=dt.distanceTo(eg),X=dt.distanceTo(Jc),ot=null;if(Et<11)ot="return";else if(Ft<11)ot="onward";else if(X<12)ot="entrance";if(ot!==this.triggered){if(this.triggered=ot,ot==="return")this.onEvent({type:"message",text:"THE RETURN MOUTH LEADS TO THE SHIP'S DECK"});if(ot==="onward")this.onEvent({type:"message",text:"THE ONWARD MOUTH IS READY — STEP INTO THE MISSION"})}if(YM()-this.lastStatus>180){this.lastStatus=YM();let Y=Ft>310?"A LON