Cloudy club
by HyperOtter35229 lines26.1 KB
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<style>
html,body{margin:0;height:100%;background:#120a1a;overflow:hidden;font-family:'Fredoka',system-ui;touch-action:none}
#game{width:100%;height:100%;position:relative}
canvas{width:100%;height:100%;display:block;background:radial-gradient(#3a2a60,#1a1020)}
#ui{position:absolute;top:0;left:0;right:0;height:44px;background:rgba(26,16,32,0.9);color:white;display:flex;align-items:center;justify-content:space-between;padding:0 12px;font-weight:800;z-index:5}
#bar{width:110px;height:10px;background:black;border-radius:5px;overflow:hidden;border:1px solid white}
#barFill{height:100%;width:100%;background:linear-gradient(90deg,#8eff8e,#2aff2a)}
#controls{position:absolute;bottom:0;left:0;right:0;height:180px;display:flex;justify-content:space-between;align-items:end;padding:10px 14px;z-index:5;pointer-events:none}
.joy{width:120px;height:120px;background:rgba(255,255,255,0.1);border:2px solid rgba(255,255,255,0.25);border-radius:50%;position:relative;pointer-events:auto}
.knob{width:56px;height:56px;background:#ff8ec4;border:3px solid black;border-radius:50%;position:absolute;left:29px;top:29px}
.btn{pointer-events:auto;border:3px solid black;border-radius:50%;font-weight:900;display:flex;align-items:center;justify-content:center;box-shadow:0 0 14px currentColor}
#shoot{width:88px;height:88px;background:#ffe67a;color:#4a3a00;margin-bottom:20px}
#super{width:76px;height:76px;background:#8e6eff;color:white;margin-bottom:90px;margin-right:8px;font-size:12px}
#super.ready{animation:glow 0.6s infinite alternate}
@keyframes glow{from{box-shadow:0 0 10px #8e6eff}to{box-shadow:0 0 24px #ff6eff}}
#menu{position:absolute;inset:0;background:linear-gradient(#7a5a8a,#3d2844);z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;color:white;gap:10px;text-align:center;padding:16px;overflow:auto}
.card{width:360px;background:#1a1020;border:3px solid black;border-radius:18px;padding:14px}
.bbtn{width:100%;padding:11px;border-radius:12px;border:3px solid black;font-weight:900;font-size:13px;cursor:pointer}
#maraBtn{background:#fffab0;color:#4a2030}
#laraBtn{background:#2a2a2a;color:#ff6ec7;border-color:#6a00ff}
#novaBtn{background:#7af0ff;color:#003366;border-color:#00aaff}
#mollyBtn{background:#ffb6d9;color:#4a0022;border-color:#ff006a}
#msg{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:rgba(0,0,0,0.85);color:white;padding:12px 20px;border-radius:14px;font-weight:900;display:none;z-index:6;border:2px solid #ff8ec4}
#debuff{position:absolute;top:50px;left:50%;transform:translateX(-50%);background:#ff2222;color:white;padding:6px 12px;border-radius:10px;font-weight:900;display:none;z-index:6}
#minimap{position:absolute;top:50px;right:10px;width:90px;height:90px;background:rgba(0,0,0,0.6);border:2px solid white;border-radius:8px;z-index:5}
#log{max-height:240px;overflow:auto;text-align:left;background:#0f0a14;border:2px solid #444;border-radius:12px;padding:10px;font-size:11px;line-height:1.35;display:none}
.logV{font-weight:900;color:#ff8ec4;margin-top:8px}
.logLi{opacity:0.9;margin-left:10px}
</style>
</head>
<body>
<div id="game">
<div id="ui"><span>☁️ CLOUDY RPG v9.4 MOLLY DELETE</span><div style="display:flex;gap:10px;align-items:center"><span id="gems">💎 0</span><span id="cubes">🟦 0</span><div id="bar"><div id="barFill"></div></div></div></div>
<canvas id="c"></canvas>
<canvas id="minimap"></canvas>
<div id="debuff"></div>
<div id="controls"><div class="joy" id="joy"><div class="knob" id="knob"></div></div><div style="display:flex;gap:10px;align-items:end"><div class="btn" id="super">SUPER</div><div class="btn" id="shoot">SHOT</div></div></div>
<div id="msg"></div>
<div id="menu">
<div style="font-size:30px;font-weight:900">Molly DELETE Update</div>
<div style="opacity:0.8;font-size:11px">Molly shoots DELETE files that slow + Super deletes ALL</div>
<div class="card">
<div style="display:grid;grid-template-columns:1fr 1fr;gap:8px">
<button class="bbtn" id="maraBtn">MARA<br><small>Fluffy Shotgun</small></button>
<button class="bbtn" id="laraBtn">LARA<br><small>Glitch Sniper</small></button>
<button class="bbtn" id="novaBtn">NOVA<br><small>Blue Dash</small></button>
<button class="bbtn" id="mollyBtn">MOLLY<br><small>DELETE President</small></button>
</div>
<button class="bbtn" style="background:#ffb6d9;margin-top:10px;color:#4a0022" id="playBtn">PLAY AS MOLLY 💖</button>
<button class="bbtn" style="background:#222;color:white;margin-top:8px;font-size:11px" id="logBtn">📜 SHOW CHANGELOG</button>
<div id="log"></div>
</div>
</div>
</div>
<script>
const CHANGELOG=[
{v:"v9.4 - MOLLY DELETE",d:"Molly shoots slow + super deletes all + 3s slow field",l:["Molly SHOT: 3 DELETE folders that slow enemies 90 frames (1.5s) + 22 dmg","Molly SUPER: JUST MOLLY deletes EVERY enemy on map + heals full","After super: 3 second pink slow field, all new spawns move 70% slower","Visual: DELETE files with pink color"]},
{v:"v9.3 - MOLLY",d:"Molly President Added",l:["MOLLY: Pink president, heart bullets","Hostile bosses: molly & nova"]},
];
const canvas=document.getElementById('c'), ctx=canvas.getContext('2d');
const mini=document.getElementById('minimap'), mctx=mini.getContext('2d');
const msg=document.getElementById('msg'), debuff=document.getElementById('debuff'), logDiv=document.getElementById('log');
let W=innerWidth, H=innerHeight; const WORLD_W=1600, WORLD_H=1600;
function resize(){ W=canvas.width=innerWidth; H=canvas.height=innerHeight; mini.width=90; mini.height=90; } resize(); addEventListener('resize',resize);
let state='menu', player, bullets=[], eBullets=[], enemies=[], chests=[], bushes=[], cubes=[], particles=[], gems=[], superCharge=0, score=0, tails=[], fireTrails=[], folders=[];
let keys={x:0,y:0}, selected='molly', hostileTimer=null, mollySlowField=0;
let map={walls:[]}, cam={x:0,y:0};
function renderLog(){ logDiv.innerHTML=CHANGELOG.map(e=>`<div class="logV">${e.v} — ${e.d}</div>`+e.l.map(li=>`<div class="logLi">• ${li}</div>`).join('')).join(''); }
renderLog();
document.getElementById('logBtn').onclick=()=>{ const show=logDiv.style.display!=='block'; logDiv.style.display=show?'block':'none'; document.getElementById('logBtn').innerText=show?'📜 HIDE CHANGELOG':'📜 SHOW CHANGELOG'; };
function showMsg(t,ms=1100){ msg.innerText=t; msg.style.display='block'; setTimeout(()=>msg.style.display='none',ms); }
function makeMap(){
map.walls=[]; bushes=[]; chests=[]; cubes=[]; gems=[]; fireTrails=[]; folders=[];
for(let i=0;i<25;i++) map.walls.push({x:Math.random()*WORLD_W,y:Math.random()*WORLD_H,w:70+Math.random()*100,h:20});
for(let i=0;i<30;i++) bushes.push({x:Math.random()*WORLD_W,y:Math.random()*WORLD_H,r:30+Math.random()*20});
for(let i=0;i<12;i++) chests.push({x:Math.random()*WORLD_W,y:Math.random()*WORLD_H,hp:100});
for(let i=0;i<15;i++) cubes.push({x:Math.random()*WORLD_W,y:Math.random()*WORLD_H});
}
function spawnEnemy(){
const t=Math.random();
let e;
if(t<0.07) e={x:Math.random()*WORLD_W,y:Math.random()*WORLD_H,vx:0,vy:0,hp:90,max:90,cd:0,type:'light',special:true,gems:12};
else if(t<0.12) e={x:Math.random()*WORLD_W,y:Math.random()*WORLD_H,vx:0,vy:0,hp:110,max:110,cd:0,type:'firewall',special:true,gems:15};
else if(t<0.16) e={x:Math.random()*WORLD_W,y:Math.random()*WORLD_H,vx:0,vy:0,hp:80,max:80,cd:0,type:'virus',special:true,gems:18};
else e={x:Math.random()*WORLD_W,y:Math.random()*WORLD_H,vx:0,vy:0,hp:50,max:50,cd:0,type:Math.random()<0.6?'chaser':'shooter',special:false,gems:3};
if(mollySlowField>0) e.slow=180;
return e;
}
function spawnHostile(){
let ang=Math.random()*Math.PI*2, dist=300; let x=player.x+Math.cos(ang)*dist, y=player.y+Math.sin(ang)*dist;
x=Math.max(100,Math.min(WORLD_W-100,x)); y=Math.max(100,Math.min(WORLD_H-100,y));
let h;
if(selected==='mara') h={x,y,vx:0,vy:0,hp:300,max:300,cd:0,superCd:180,type:'hostile_lara',special:true,gems:35};
else if(selected==='lara') h={x,y,vx:0,vy:0,hp:320,max:320,cd:0,superCd:200,type:'hostile_mara',special:true,gems:35};
else if(selected==='nova') h={x,y,vx:0,vy:0,hp:350,max:350,cd:0,superCd:160,type:'hostile_molly',special:true,gems:40};
else h={x,y,vx:0,vy:0,hp:330,max:330,cd:0,superCd:170,type:'hostile_nova',special:true,gems:40};
if(mollySlowField>0) h.slow=180;
return h;
}
function scheduleRespawn(){ if(hostileTimer) clearTimeout(hostileTimer); hostileTimer=setTimeout(()=>{ if(state!=='play') return; let h=spawnHostile(); enemies.push(h); showMsg('⚠️ BOSS RESPAWNED!',1500); },5000); }
function newPlayer(char){
player={x:WORLD_W/2,y:WORLD_H/2,vx:0,vy:0,hp:char==='molly'?130:char==='mara'?120:char==='nova'?110:100,max:char==='molly'?130:char==='mara'?120:char==='nova'?110:100,char,speed:char==='mara'?4.6:char==='nova'?4.2:char==='molly'?3.8:3.2,cd:0,power:0,inv:0,dash:0,dashDir:{x:0,y:-1},attackLock:0,superLock:0,slow:0};
superCharge=0; score=0; bullets=[]; eBullets=[]; enemies=[]; particles=[]; tails=[]; fireTrails=[]; folders=[]; mollySlowField=0; makeMap();
for(let i=0;i<8;i++) enemies.push(spawnEnemy()); enemies.push(spawnHostile());
}
const joy=document.getElementById('joy'), knob=document.getElementById('knob'); let joyAct=false, jc={x:0,y:0};
joy.addEventListener('touchstart',e=>{joyAct=true; const r=joy.getBoundingClientRect(); jc={x:r.left+r.width/2,y:r.top+r.height/2};},{passive:false});
joy.addEventListener('touchmove',e=>{if(!joyAct) return; e.preventDefault(); const t=e.touches[0]; let dx=t.clientX-jc.x, dy=t.clientY-jc.y, d=Math.hypot(dx,dy), max=46; if(d>max){dx=dx/d*max; dy=dy/d*max;} knob.style.left=29+dx+'px'; knob.style.top=29+dy+'px'; keys.x=dx/max; keys.y=dy/max; if(player && Math.hypot(keys.x,keys.y)>0.2) player.dashDir={x:keys.x,y:keys.y}; },{passive:false});
function endJoy(){ joyAct=false; knob.style.left='29px'; knob.style.top='29px'; keys.x=0; keys.y=0; }
joy.addEventListener('touchend',endJoy); addEventListener('mouseup',endJoy);
addEventListener('mousemove',e=>{if(!joyAct||e.touches) return; let dx=e.clientX-jc.x, dy=e.clientY-jc.y, d=Math.hypot(dx,dy), max=46; if(d>max){dx=dx/d*max; dy=dy/d*max;} knob.style.left=29+dx+'px'; knob.style.top=29+dy+'px'; keys.x=dx/max; keys.y=dy/max; if(player && Math.hypot(keys.x,keys.y)>0.2) player.dashDir={x:keys.x,y:keys.y};});
joy.addEventListener('mousedown',e=>{joyAct=true; const r=joy.getBoundingClientRect(); jc={x:r.left+r.width/2,y:r.top+r.height/2};});
function setSelected(c, label){ selected=c; document.getElementById('playBtn').innerText=label; }
document.getElementById('maraBtn').onclick=()=>setSelected('mara','PLAY AS MARA');
document.getElementById('laraBtn').onclick=()=>setSelected('lara','PLAY AS LARA');
document.getElementById('novaBtn').onclick=()=>setSelected('nova','PLAY AS NOVA');
document.getElementById('mollyBtn').onclick=()=>setSelected('molly','PLAY AS MOLLY 💖');
document.getElementById('playBtn').onclick=()=>{newPlayer(selected); state='play'; document.getElementById('menu').style.display='none';};
function hitWall(x,y){ for(let w of map.walls){ if(x>w.x-w.w/2 && x<w.x+w.w/2 && y>w.y-w.h/2 && y<w.y+w.h/2) return true; } return false; }
function shoot(){
if(state!=='play' || player.cd>0) return;
if(player.attackLock>0){ showMsg('ATTACK DELETED '+Math.ceil(player.attackLock/60)+'s'); return; }
if(player.char==='mara'){ player.cd=14; for(let i=-2;i<=2;i++){ const ang=(Math.atan2(keys.y||-1,keys.x||0.1))+i*0.2; bullets.push({x:player.x,y:player.y,vx:Math.cos(ang)*11,vy:Math.sin(ang)*11,life:32,dmg:18+player.power*2,char:'mara',size:11,tailT:0,wall:true}); } superCharge=Math.min(100,superCharge+8); }
else if(player.char==='nova'){ player.cd=12; for(let i=-1;i<=1;i++){ const ang=Math.atan2(keys.y||-1,keys.x||0.1)+i*0.32; bullets.push({x:player.x,y:player.y,vx:Math.cos(ang)*12,vy:Math.sin(ang)*12,life:36,dmg:20+player.power*2,char:'nova',size:11,tailT:0}); } superCharge=Math.min(100,superCharge+12); }
else if(player.char==='molly'){
player.cd=18;
for(let i=-1;i<=1;i++){
const ang=Math.atan2(keys.y||-1,keys.x||0.1)+i*0.4;
bullets.push({x:player.x,y:player.y,vx:Math.cos(ang)*9,vy:Math.sin(ang)*9,life:50,dmg:22+player.power*2,char:'molly',size:13,tailT:0,slowHit:true,deleteFile:true});
}
superCharge=Math.min(100,superCharge+14);
}
else { player.cd=22; const ang=Math.atan2(keys.y||-1,keys.x||0.1); bullets.push({x:player.x,y:player.y,vx:Math.cos(ang)*16,vy:Math.sin(ang)*16,life:60,dmg:42+player.power*4,char:'lara',size:16,tailT:0,pierce:true}); superCharge=Math.min(100,superCharge+20); }
updateSuper();
}
function doSuper(){
if(superCharge<100 || state!=='play') return;
if(player.superLock>0){ showMsg('SUPER DELETED '+Math.ceil(player.superLock/60)+'s'); return; }
superCharge=0; updateSuper();
if(player.char==='mara'){ showMsg('★ FOX BLAST! ★',1300); for(let i=0;i<20;i++){ const ang=i/20*Math.PI*2; bullets.push({x:player.x,y:player.y,vx:Math.cos(ang)*10,vy:Math.sin(ang)*10,life:24,dmg:24,char:'mara',size:12,tailT:0,wall:true}); } for(let e of enemies) if(Math.hypot(e.x-player.x,e.y-player.y)<200) e.hp-=70; }
else if(player.char==='nova'){ showMsg('🔵 BLUE DASH! Trail burns 3s!',1500); player.dash=26; player.inv=35; for(let i=0;i<10;i++) fireTrails.push({x:player.x,y:player.y,life:180,hot:true}); }
else if(player.char==='molly'){
showMsg('💖 JUST MOLLY! ALL DELETED! 3s SLOW!',1800);
player.hp=player.max;
enemies.forEach(e=>{ cubes.push({x:e.x,y:e.y}); gems.push({x:e.x,y:e.y}); for(let j=0;j<6;j++) particles.push({x:e.x,y:e.y,vx:(Math.random()-0.5)*8,vy:(Math.random()-0.5)*8,life:20,color:'#ffb6d9'}); });
enemies=[];
mollySlowField=180;
setTimeout(()=>{ if(state!=='play') return; for(let i=0;i<5;i++) enemies.push(spawnEnemy()); enemies.push(spawnHostile()); },800);
}
else { showMsg('☠️ ALL DELETED',1500); enemies.forEach(e=>{ cubes.push({x:e.x,y:e.y}); gems.push({x:e.x,y:e.y}); }); enemies=[]; setTimeout(()=>{ for(let i=0;i<3;i++) enemies.push(spawnEnemy()); enemies.push(spawnHostile()); },1200); }
}
function updateSuper(){ document.getElementById('super').classList.toggle('ready',superCharge>=100); document.getElementById('super').innerText=superCharge>=100?'SUPER\nREADY':`SUPER\n${Math.floor(superCharge)}%`; }
document.getElementById('shoot').addEventListener('touchstart',e=>{e.preventDefault(); shoot();},{passive:false}); document.getElementById('shoot').addEventListener('mousedown',shoot);
document.getElementById('super').addEventListener('touchstart',e=>{e.preventDefault(); doSuper();},{passive:false}); document.getElementById('super').addEventListener('mousedown',doSuper);
function update(){
if(state!=='play') return;
if(mollySlowField>0) mollySlowField--;
if(player.attackLock>0){ player.attackLock--; debuff.style.display='block'; debuff.innerText=`⛔ ATTACKS DELETED ${Math.ceil(player.attackLock/60)}s`; }
else if(player.superLock>0){ player.superLock--; debuff.style.display='block'; debuff.innerText=`⛔ SUPER DELETED ${Math.ceil(player.superLock/60)}s`; }
else if(mollySlowField>0){ debuff.style.display='block'; debuff.style.background='#ff6eb6'; debuff.innerText=`💖 SLOW FIELD ${Math.ceil(mollySlowField/60)}s - enemies 70% slower`; }
else { debuff.style.display='none'; debuff.style.background='#ff2222'; }
let spd=player.speed*(player.slow>0?0.5:1); if(player.slow>0) player.slow--;
if(player.dash>0){ player.dash--; player.x+=player.dashDir.x*12; player.y+=player.dashDir.y*12; fireTrails.push({x:player.x,y:player.y,life:180,hot:true}); }
else { let nx=player.x+keys.x*spd, ny=player.y+keys.y*spd; let blocked=false; for(let w of map.walls){ if(nx>w.x-w.w/2-14 && nx<w.x+w.w/2+14 && ny>w.y-w.h/2-14 && ny<w.y+w.h/2+14) blocked=true; } if(!blocked){ player.x=nx; player.y=ny; } player.x=Math.max(20,Math.min(WORLD_W-20,player.x)); player.y=Math.max(50,Math.min(WORLD_H-20,player.y)); }
cam.x=player.x-W/2; cam.y=player.y-H/2; cam.x=Math.max(0,Math.min(WORLD_W-W,cam.x)); cam.y=Math.max(0,Math.min(WORLD_H-H,cam.y));
if(player.cd>0) player.cd--; if(player.inv>0) player.inv--;
bullets.forEach(b=>{ let nx=b.x+b.vx, ny=b.y+b.vy; if(b.wall && hitWall(nx,ny)){ b.life=0; return; } b.x=nx; b.y=ny; b.life--; b.tailT++; if(b.tailT%2===0) tails.push({x:b.x-b.vx*1.5,y:b.y-b.vy*1.5,life:14,size:b.size*0.9,char:b.char}); });
bullets=bullets.filter(b=>b.life>0);
fireTrails.forEach(ft=>{ ft.life--; enemies.forEach(en=>{ if(Math.hypot(en.x-ft.x,en.y-ft.y)<26) en.hp-=0.9; }); }); fireTrails=fireTrails.filter(f=>f.life>0);
eBullets.forEach(b=>{ b.x+=b.vx; b.y+=b.vy; b.life--; if(Math.hypot(b.x-player.x,b.y-player.y)<18 && player.inv===0 && player.dash===0){ player.hp-=b.dmg; if(b.slow) player.slow=90; player.inv=20; b.life=0; } }); eBullets=eBullets.filter(b=>b.life>0);
enemies.forEach(en=>{
let slowMult = (en.slow>0 || mollySlowField>0) ? 0.3 : 1;
if(en.slow>0) en.slow--;
const dx=player.x-en.x, dy=player.y-en.y, d=Math.hypot(dx,dy);
if(en.type==='hostile_mara'){ en.superCd--; en.vx+=(dx/d*0.18)*slowMult; en.vy+=(dy/d*0.18)*slowMult; if(d<170 && en.cd<=0){ for(let i=-2;i<=2;i++){ let ang=Math.atan2(dy,dx)+i*0.28; eBullets.push({x:en.x,y:en.y,vx:Math.cos(ang)*6,vy:Math.sin(ang)*6,life:70,dmg:14}); } en.cd=55; } if(en.superCd<=0){ for(let i=0;i<20;i++){ let a=i/20*Math.PI*2; eBullets.push({x:en.x,y:en.y,vx:Math.cos(a)*4.5,vy:Math.sin(a)*4.5,life:80,dmg:10}); } en.superCd=200; } }
else if(en.type==='hostile_lara'){ en.superCd--; en.vx+=(dx/d*0.09)*slowMult; en.vy+=(dy/d*0.09)*slowMult; if(d<320 && en.cd<=0){ let ang=Math.atan2(dy,dx); eBullets.push({x:en.x,y:en.y,vx:Math.cos(ang)*7.5,vy:Math.sin(ang)*7.5,life:110,dmg:22,slow:true}); en.cd=45; } if(en.superCd<=0){ folders.push({x:en.x,y:en.y,life:420,enemy:true}); en.superCd=220; } }
else if(en.type==='hostile_molly'){ en.superCd--; en.vx+=(dx/d*0.12)*slowMult; en.vy+=(dy/d*0.12)*slowMult; if(d<200 && en.cd<=0){ for(let i=-1;i<=1;i++){ let ang=Math.atan2(dy,dx)+i*0.35; eBullets.push({x:en.x,y:en.y,vx:Math.cos(ang)*5.5,vy:Math.sin(ang)*5.5,life:90,dmg:12,slow:true}); } en.cd=60; } if(en.superCd<=0){ showMsg('💖 Molly charmed you! SLOW!',1200); player.slow=150; en.superCd=180; } }
else if(en.type==='hostile_nova'){ en.superCd--; en.vx+=(dx/d*0.22)*slowMult; en.vy+=(dy/d*0.22)*slowMult; if(en.superCd<=0){ en.vx+=en.vx*3; en.vy+=en.vy*3; fireTrails.push({x:en.x,y:en.y,life:120,hot:false}); en.superCd=90; } if(d<150 && en.cd<=0){ let ang=Math.atan2(dy,dx); eBullets.push({x:en.x,y:en.y,vx:Math.cos(ang)*8,vy:Math.sin(ang)*8,life:80,dmg:16}); en.cd=40; } }
else if(en.type==='light'){ en.vx+=(dx/d*0.06)*slowMult; } else if(en.type==='firewall'){ if(en.cd<=0){ for(let i=0;i<8;i++){ let a=i/8*Math.PI*2; eBullets.push({x:en.x,y:en.y,vx:Math.cos(a)*3,vy:Math.sin(a)*3,life:60,dmg:8}); } en.cd=110; } } else { if(en.type==='chaser') en.vx+=(dx/d*0.12)*slowMult; else if(en.type==='shooter') en.vx+=(dx/d*0.05)*slowMult; }
en.cd=Math.max(0,en.cd-1); en.vx*=0.92; en.vy*=0.92; en.x+=en.vx; en.y+=en.vy;
bullets.forEach(b=>{ if(Math.hypot(en.x-b.x,en.y-b.y)<22+b.size){ en.hp-=b.dmg; if(b.slowHit){ en.slow=90; } if(!b.pierce) b.life=0; if(en.hp<=0){ cubes.push({x:en.x,y:en.y}); gems.push({x:en.x,y:en.y}); score+=en.special?20:10; if(en.type.includes('hostile')) scheduleRespawn(); } }});
if(d<26 && player.inv===0 && player.dash===0 && !en.type.includes('light')) player.hp-=en.type.includes('hostile')?1.4:0.8;
});
enemies=enemies.filter(e=>e.hp>0); if(enemies.length<10 && Math.random()<0.06) enemies.push(spawnEnemy());
folders.forEach((f,i)=>{ f.life--; if(f.enemy){ if(Math.hypot(player.x-f.x,player.y-f.y)<26){ player.attackLock=180; player.superLock=180; superCharge=0; updateSuper(); showMsg('⛔ DELETED! NO ATTACK 3s!',1500); folders.splice(i,1); } } else { if(Math.hypot(player.x-f.x,player.y-f.y)<26){ let spec=enemies.filter(e=>e.special && !e.type.includes('hostile')); if(spec.length){ spec[0].hp=0; folders.splice(i,1); } } } });
folders=folders.filter(f=>f.life>0);
chests.forEach(ch=>{ bullets.forEach(b=>{ if(Math.hypot(ch.x-b.x,ch.y-b.y)<28){ ch.hp-=b.dmg; b.life=0; } }); if(ch.hp<=0){ cubes.push({x:ch.x,y:ch.y}); ch.hp=-999; } }); chests=chests.filter(c=>c.hp>0);
cubes.forEach((cu,i)=>{ if(Math.hypot(player.x-cu.x,player.y-cu.y)<22){ player.power++; player.max+=10; player.hp=Math.min(player.max,player.hp+25); cubes.splice(i,1); } });
if(player.hp<=0){ state='menu'; document.getElementById('menu').style.display='flex'; if(hostileTimer) clearTimeout(hostileTimer); }
document.getElementById('barFill').style.width=player.hp/player.max*100+'%'; document.getElementById('gems').innerText='💎 '+score; document.getElementById('cubes').innerText='🟦 '+player.power;
tails.forEach(t=>{ t.life--; t.size*=0.96; }); tails=tails.filter(t=>t.life>0);
particles.forEach(p=>{ p.x+=p.vx; p.y+=p.vy; p.life--; }); particles=particles.filter(p=>p.life>0);
updateSuper();
}
function draw(){
ctx.clearRect(0,0,W,H); ctx.save(); ctx.translate(-cam.x,-cam.y);
ctx.fillStyle='#1e1430'; ctx.fillRect(cam.x,cam.y,W,H);
if(mollySlowField>0){ ctx.save(); ctx.globalAlpha=0.15+Math.sin(Date.now()/150)*0.08; ctx.fillStyle='#ff6eb6'; ctx.fillRect(cam.x,cam.y,W,H); ctx.restore(); }
ctx.strokeStyle='white'; ctx.lineWidth=4; ctx.strokeRect(0,0,WORLD_W,WORLD_H);
bushes.forEach(b=>{ ctx.fillStyle='#2d5a2d'; ctx.beginPath(); ctx.arc(b.x,b.y,b.r,0,Math.PI*2); ctx.fill(); });
map.walls.forEach(w=>{ ctx.fillStyle='#4a3a5a'; ctx.fillRect(w.x-w.w/2,w.y-w.h/2,w.w,w.h); });
cubes.forEach(c=>{ ctx.fillStyle='#3aa0ff'; ctx.fillRect(c.x-8,c.y-8,16,16); });
gems.forEach(g=>{ ctx.fillStyle='#ffdf00'; ctx.beginPath(); ctx.arc(g.x,g.y,6,0,Math.PI*2); ctx.fill(); });
chests.forEach(ch=>{ ctx.fillStyle='#8a5a2a'; ctx.fillRect(ch.x-16,ch.y-14,32,28); });
fireTrails.forEach(ft=>{ ctx.save(); ctx.globalAlpha=ft.life/180*0.9; ctx.fillStyle=ft.hot?'#00d4ff':'#0066ff'; ctx.shadowBlur=12; ctx.shadowColor='#00aaff'; ctx.beginPath(); ctx.arc(ft.x,ft.y,ft.hot?14:9,0,Math.PI*2); ctx.fill(); ctx.fillStyle='white'; ctx.beginPath(); ctx.arc(ft.x,ft.y,ft.hot?5:3,0,Math.PI*2); ctx.fill(); ctx.restore(); });
folders.forEach(f=>{ ctx.save(); ctx.translate(f.x,f.y); if(f.enemy){ ctx.fillStyle='#ff2222'; ctx.fillRect(-16,-12,32,22); ctx.fillStyle='white'; ctx.font='900 9px system-ui'; ctx.fillText('DELETE',-16,0); } else { ctx.fillStyle='#ffe67a'; ctx.fillRect(-14,-10,28,18); ctx.fillStyle='black'; ctx.font='900 9px system-ui'; ctx.fillText('DELETE',-14,2); } ctx.restore(); });
tails.forEach(t=>{ ctx.save(); ctx.globalAlpha=t.life/18; if(t.char==='mara') ctx.fillStyle='#ffe9a8'; else if(t.char==='nova') ctx.fillStyle='#00aaff'; else if(t.char==='molly') ctx.fillStyle='#ffb6d9'; else ctx.fillStyle='#1a1a1a'; ctx.beginPath(); ctx.arc(t.x,t.y,t.size,0,Math.PI*2); ctx.fill(); ctx.restore(); });
bullets.forEach(b=>{ ctx.save(); ctx.translate(b.x,b.y); ctx.rotate(Math.atan2(b.vy,b.vx)); if(b.char==='mara'){ ctx.fillStyle='#fffab0'; ctx.beginPath(); ctx.arc(0,0,b.size,0,Math.PI*2); ctx.fill(); } else if(b.char==='nova'){ ctx.fillStyle='#00aaff'; ctx.beginPath(); ctx.arc(0,0,b.size,0,Math.PI*2); ctx.fill(); ctx.fillStyle='#7af0ff'; ctx.beginPath(); ctx.arc(2,0,b.size*0.6,0,Math.PI*2); ctx.fill(); } else if(b.char==='molly'){ ctx.fillStyle='#ff4d9a'; ctx.fillRect(-10,-8,20,16); ctx.fillStyle='white'; ctx.fillRect(-8,-8,8,3); ctx.fillStyle='black'; ctx.font='900 7px system-ui'; ctx.fillText('DEL',-9,2); if(b.slowHit){ ctx.fillStyle='#aa55ff'; ctx.beginPath(); ctx.arc(0,0,b.size*0.6,0,Math.PI*2); ctx.fill(); } } else { ctx.fillStyle='#1a1a1a'; ctx.beginPath(); ctx.ellipse(0,0,b.size*1.2,b.size*0.8,0,0,Math.PI*2); ctx.fill(); } ctx.restore(); });
eBullets.forEach(b=>{ ctx.fillStyle=b.slow?'#aa55ff':'#ff6666'; ctx.beginPath(); ctx.arc(b.x,b.y,b.slow?5:3,0,Math.PI*2); ctx.fill(); });
enemies.forEach(en=>{ ctx.save(); ctx.translate(en.x,en.y); if(en.slow>0 || mollySlowField>0){ ctx.strokeStyle='#ff6eb6'; ctx.lineWidth=2; ctx.beginPath(); ctx.arc(0,0,20,0,Math.PI*2); ctx.stroke(); } if(en.type==='light'){ ctx.fillStyle='#ffeb57'; ctx.beginPath(); ctx.arc(0,0,9,0,Math.PI*2); ctx.fill(); } else if(en.type==='hostile_mara'){ ctx.fillStyle='#ffb86b'; ctx.beginPath(); ctx.arc(0,0,16,0,Math.PI*2); ctx.fill(); ctx.strokeStyle='#ff0000'; ctx.lineWidth=3; ctx.stroke(); } else if(en.type==='hostile_lara'){ ctx.fillStyle='#2a2a2a'; ctx.beginPath(); ctx.arc(0,0,16,0,Math.PI*2); ctx.fill(); ctx.strokeStyle='#ff00ff'; ctx.lineWidth=3; ctx.stroke(); } else if(en.type==='hostile_molly'){ ctx.fillStyle='#ffb6d9'; ctx.beginPath(); ctx.arc(0,0,17,0,Math.PI*2); ctx.fill(); ctx.strokeStyle='#ff006a'; ctx.lineWidth=3; ctx.stroke(); } else if(en.type==='hostile_nova'){ ctx.fillStyle='#7af0ff'; ctx.beginPath(); ctx.arc(0,0,16,0,Math.PI*2); ctx.fill(); ctx.strokeStyle='#00aaff'; ctx.lineWidth=3; ctx.stroke(); } else { ctx.fillStyle=en.type==='chaser'?'#ff4444':'#ffaa00'; ctx.beginPath(); ctx.arc(0,0,12,0,Math.PI*2); ctx.fill(); } ctx.restore(); });
if(state==='play'){ ctx.save(); ctx.translate(player.x,player.y); if(player.inv%4<2){ if(player.char==='mara'){ ctx.fillStyle='#ffdfba'; ctx.beginPath(); ctx.arc(0,0,15,0,Math.PI*2); ctx.fill(); } else if(player.char==='nova'){ ctx.fillStyle='#ffeeb0'; ctx.beginPath(); ctx.arc(0,0,15,0,Math.PI*2); ctx.fill(); ctx.strokeStyle='#00aaff'; ctx.lineWidth=2; ctx.stroke(); } else if(player.char==='molly'){ ctx.fillStyle='#ff9ec4'; ctx.beginPath(); ctx.arc(0,0,16,0,Math.PI*2); ctx.fill(); ctx.fillStyle='#ff006a'; ctx.font='900 10px system-ui'; ctx.fillText('♔',-6,4); if(mollySlowField>0){ ctx.strokeStyle='#ff6eb6'; ctx.lineWidth=3; ctx.beginPath(); ctx.arc(0,0,30,0,Math.PI*2); ctx.stroke(); } } else { ctx.fillStyle='#f5d5c0'; ctx.beginPath(); ctx.arc(0,0,15,0,Math.PI*2); ctx.fill(); } } ctx.restore(); }
particles.forEach(p=>{ ctx.globalAlpha=p.life/30; ctx.fillStyle=p.color; ctx.fillRect(p.x,p.y,5,5); ctx.globalAlpha=1; });
ctx.restore();
mctx.clearRect(0,0,90,90); mctx.fillStyle='#1a1020'; mctx.fillRect(0,0,90,90); let sx=90/WORLD_W, sy=90/WORLD_H;
if(mollySlowField>0){ mctx.fillStyle='#ff6eb6'; mctx.globalAlpha=0.3; mctx.fillRect(0,0,90,90); mctx.globalAlpha=1; }
map.walls.forEach(w=>{ mctx.fillStyle='#4a3a5a'; mctx.fillRect(w.x*sx,w.y*sy,3,2); });
enemies.forEach(en=>{ mctx.fillStyle=en.type.includes('hostile')?'#ff0000':'#ff4444'; mctx.fillRect(en.x*sx,en.y*sy,3,3); });
if(player){ mctx.fillStyle='white'; mctx.fillRect(player.x*sx-1,player.y*sy-1,3,3); mctx.strokeStyle='white'; mctx.strokeRect(cam.x*sx,cam.y*sy,W*sx,H*sy); }
}
function loop(){ update(); draw(); requestAnimationFrame(loop); } loop();
</script>
</body>
</html>Game Source: Cloudy club
Creator: HyperOtter35
Libraries: none
Complexity: complex (229 lines, 26.1 KB)
The full source code is displayed above on this page.
Remix Instructions
To remix this game, copy the source code above and modify it. Add a ARCADELAB header at the top with "remix_of: clou-rpg-hyperotter35" to link back to the original. Then publish at arcadelab.ai/publish.