Meta Description" name="description" />
<!DOCTYPE html><html><head><title>βοΈAkaza RPG Mobile</title><meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"><style>*{margin:0;padding:0;overflow:hidden;touch-action:none}body{background:linear-gradient(#2c1810,#1a0f07);font-family:Arial Black;color:#ffd700}canvas{display:block;width:100%;height:100vh}.ui{position:fixed;top:10px;left:10px;z-index:100;background:rgba(0,0,0,0.9);padding:12px;border:3px solid #ffd700;border-radius:10px;font-size:14px}.mute-btn{position:fixed;top:10px;right:10px;width:50px;height:50px;background:rgba(0,0,0,0.8);border:2px solid #ffd700;border-radius:50%;color:#ffd700;font-size:20px;z-index:100}#joystick{position:fixed;bottom:30px;left:30px;width:100px;height:100px;background:rgba(0,0,0,0.5);border-radius:50%;border:3px solid #ffd700;display:flex;align-items:center;justify-content:center}#stick{width:40px;height:40px;background:#ffd700;border-radius:50%;transition:all .1s}#attack{position:fixed;bottom:30px;right:30px;width:70px;height:70px;background:linear-gradient(45deg,#ff4757,#c44569);border-radius:50%;border:4px solid #ffd700;font-size:24px;display:flex;align-items:center;justify-content:center}</style></head><body><div class="ui"><div>Floor:<span id="floor">1</span></div><div>HP:<span id="hp">100</span> L:<span id="level">1</span></div><div>K:<span id="kills">0</span></div></div><button class="mute-btn" id="mute">π</button><div id="joystick"><div id="stick"></div></div><div id="attack">βοΈ</div><canvas id="c"></canvas><script>const c=document.getElementById('c'),ctx=c.getContext('2d'),mute=document.getElementById('mute');function r(){c.width=window.innerWidth;c.height=window.innerHeight}r();window.addEventListener('resize',r);let s={x:0,z:0,r:0,hp:100,l:1,a:25,f:1,k:0,e:[],p:[],joy:0};function g(){s.e=[];for(let i=0;i<(s.f<10?4:s.f<15?6:8);i++)s.e.push({x:(Math.random()-.5)*1000,z:(Math.random()-.5)*1000,hp:25+s.f*3,mhp:25+s.f*3,t:s.f%5?'boss':['g','s','o'][Math.random()*3|0]})}function proj(x,z){const d=x-s.x,z2=z-s.z,dist=Math.hypot(d,z2),a=Math.atan2(z2,d)-s.r;if(a<-Math.PI||a>Math.PI||dist>400)return null;const ca=Math.cos(a),sa=Math.sin(a);return{x:c.width/2+ca*dist*.4,y:c.height/2-sa*dist*.4,s:Math.max(.2,200/dist),d:dist}}function da(){ctx.save();ctx.translate(c.width/2,c.height/2);ctx.rotate(s.r);ctx.shadowColor='#ffd700';ctx.shadowBlur=20;ctx.strokeStyle='#ffd700';ctx.lineWidth=6;ctx.lineCap='round';ctx.beginPath();ctx.moveTo(-12,-50);ctx.lineTo(-12,-100);ctx.stroke();ctx.shadowBlur=0;ctx.fillStyle='#8B4513';ctx.fillRect(-20,-25,40,50);ctx.fillStyle='#DAA520';ctx.fillRect(-18,-23,36,20);ctx.fillStyle='#654321';ctx.fillRect(-30,-20,12,35);ctx.fillRect(18,-20,12,35);ctx.fillStyle='#8B4513';ctx.fillRect(-12,20,12,30);ctx.fillRect(0,20,12,30);ctx.fillStyle='#C0C0C0';ctx.beginPath();ctx.arc(0,-45,18,0,Math.PI*2);ctx.fill();ctx.fillStyle='#696969';ctx.beginPath();ctx.moveTo(-12,-60);ctx.lineTo(-8,-75);ctx.lineTo(-2,-65);ctx.fill();ctx.moveTo(12,-60);ctx.lineTo(8,-75);ctx.lineTo(2,-65);ctx.fill();ctx.shadowColor='#ff0000';ctx.shadowBlur=15;ctx.fillStyle='#ff0000';ctx.beginPath();ctx.arc(-6,-48,4,0,Math.PI*2);ctx.arc(6,-48,4,0,Math.PI*2);ctx.fill();ctx.restore()}function de(){s.e.forEach(en=>{const pr=proj(en.x,en.z);if(!pr)return;ctx.save();ctx.translate(pr.x,pr.y);ctx.scale(pr.s,pr.s);ctx.fillStyle='rgba(0,0,0,0.8)';ctx.fillRect(-25,-45,50,6);ctx.fillStyle=en.hp>en.mhp*.5?'#00ff00':'#ff0000';ctx.fillRect(-25,-45,en.hp/en.mhp*50,6);switch(en.t){case'goblin':ctx.fillStyle='#228B22';ctx.fillRect(-15,-30,30,45);ctx.fillStyle='#FFFF00';ctx.beginPath();ctx.arc(-8,-35,4,0,Math.PI*2);ctx.arc(8,-35,4,0,Math.PI*2);ctx.fill();break;case'skeleton':ctx.strokeStyle='#F5F5DC';ctx.lineWidth=6;ctx.beginPath();ctx.arc(0,-35,12,0,Math.PI*2);ctx.stroke();ctx.fillStyle='#000';ctx.beginPath();ctx.arc(-5,-38,2,0,Math.PI*2);ctx.arc(5,-38,2,0,Math.PI*2);ctx.fill();break;case'orc':ctx.fillStyle='#006400';ctx.fillRect(-22,-35,44,55);ctx.fillStyle='#FFF';ctx.fillRect(-8,-20,16,4);break;case'boss':ctx.fillStyle='#8B0000';ctx.beginPath();ctx.ellipse(0,0,35,28,0,0,Math.PI*2);ctx.fill();ctx.fillStyle='#FFFF00';ctx.beginPath();ctx.arc(-12,-8,7,0,Math.PI*2);ctx.arc(12,-8,7,0,Math.PI*2);ctx.fill()}ctx.restore()})}let m=0;function up(){s.hp-=s.e.filter(e=>Math.hypot(s.x-e.x,s.z-e.z)<60).length*.1;s.l=Math.floor(s.k/8)+1;s.a=25+s.l*4;m++;document.getElementById('floor').textContent=s.f;document.getElementById('hp').textContent=Math.max(0,s.hp|0);document.getElementById('level').textContent=s.l;document.getElementById('kills').textContent=s.k}function l(){ctx.fillStyle='rgba(74,44,15,0.9)';ctx.fillRect(0,0,c.width,c.height);da();de();up();requestAnimationFrame(l)}const j=document.getElementById('joystick'),st=document.getElementById('stick'),at=document.getElementById('attack');let ja=0;j.addEventListener('touchstart',e=>{e.preventDefault();ja=1});at.addEventListener('touchstart',e=>{e.preventDefault();s.e.forEach((en,i)=>{const d=Math.hypot(s.x-en.x,s.z-en.z);if(d<100){en.hp-=s.a;if(en.hp<=0){s.k++;s.e.splice(i,1);if(s.e.length===0){s.f++;g()}}}})});j.addEventListener('touchmove',e=>{if(!ja)return;e.preventDefault();const r=j.getBoundingClientRect(),dx=e.touches[0].clientX-(r.left+50),dy=e.touches[0].clientY-(r.top+50),d=Math.min(30,Math.hypot(dx,dy)),a=Math.atan2(dy,dx);st.style.transform=`translate(${Math.cos(a)*d}px,${Math.sin(a)*d}px)`;s.r=a;s.x+=Math.cos(a)*.8;s.z+=Math.sin(a)*.8});j.addEventListener('touchend',()=>{ja=0;st.style.transform='translate(0,0)'});mute.addEventListener('click',()=>{mute.textContent=mute.textContent==='π'?'π':'π'});g();l();</script></body></html>1
1
6KB
6KB
125.0ms
208.0ms
125.0ms