diff --git a/js/combat.js b/js/combat.js index c751a29..e05f36d 100644 --- a/js/combat.js +++ b/js/combat.js @@ -180,7 +180,7 @@ function updateBullets(){ for(const e of G.enemies)if(!e.dead&&dist2(z.x,z.y,e.x,e.y)<(z.r+e.r)*(z.r+e.r))hurtEnemy(e,z.dps*0.1,false); if(G.boss&&bossHit(z.x,z.y,z.r))hurtBoss(z.dps*0.1);} } - G.zones=G.zones.filter(z=>z.life>0); + G.zones=G.zones.filter(z=>z.life>0&&z.yz.life>0); for(const n of G.novas){n.life--;n.r+=(n.maxr-n.r)*0.18;} diff --git a/js/enemies.js b/js/enemies.js index a408f92..4a0380c 100644 --- a/js/enemies.js +++ b/js/enemies.js @@ -293,12 +293,13 @@ function updateBoss(){ if(b.plT===90){b.warpChg=0;bossBeam(b.x,b.y+6,b.x,H+8,b.phase>=1?24:20,"#5cff9d",10,80,30,{b,ox:0,oy:6,followX2:true,sweep:1,amp:b.phase>=1?70:50});} } } - if(b.idx===10&&b.tent){const tn=b.tent; // 泰伦:触手扫击(预警→伸长横扫身前一带) - if(tn.warn>0){tn.warn--; - if(tn.warn<=0){tn.act=22; + if(b.idx===10&&b.tent){const tn=b.tent; // 泰伦:触手扫击(预警→横扫扇形,扫至中段判定) + if(tn.warn>0){tn.warn--;if(tn.warn<=0){tn.act=30;tn.hitDone=false;}} + else if(tn.act>0){tn.act--; + if(!tn.hitDone&&tn.act<=15){tn.hitDone=true; const p=G.p; - if(p.dead<=0&&Math.abs(p.x-(b.x+tn.side*30))<34&&p.y>b.y+10&&p.y0){tn.act--;if(tn.act<=0)b.tent=null;} + if(p.dead<=0&&Math.abs(p.x-(b.x+tn.side*30))<34&&p.y>b.y+10&&p.y0; // 巨宽核心激光期间压制其他攻击 // —— 主攻击 —— @@ -375,7 +376,8 @@ function bossMain(b,def,fm){ b.mainT=Math.round((ph>=1?38:46)/fm);break;} case "hivespawn": { // 泰伦母舰:从体内向两侧排出虫群(无弹幕);P2虫群血量变厚;P3嘴吐骨钉扇 b.wvC=(b.wvC||0)+1; - const big=b.wvC%4===0,n1=big?5+ph*2:2+ph; + const big=b.wvC%4===0,n1=big?7+ph*2:3+ph; + if(b.wvC%2===0)for(let k=-2;k<=2;k++)ebul(b.x,b.y+26,Math.PI/2+k*0.22,0.95,"orbG",10); // 间歇喷孢子(慢速散弹,威胁不大) for(let i=0;i0){ // 触手:2长+4小(P2从裂口伸出,P3加粗;扫击侧伸长) - const tent=(x0,y0,len,wd,phs,tipW)=>{const sw2=Math.sin(t*0.06+phs)*3.5; + const tent=(x0,y0,len,wd,phs,tipW,swF,swS)=>{const sw2=Math.sin(t*0.06+phs)*3.5; + const bx=swF!=null?(swF*2-1)*30*(swS||1):0; // 扫击:尖端横扫偏转 for(let i2=0;i2<4;i2++){const f=i2/4; - circ(x0+sw2*f*f*2.2,y0+len*f,wd*(1-f*0.45)*(1+op3*0.3),i2%2?"#5a3a5a":"#7a4a6a");} - const fx2=x0+sw2*2.2,fy=y0+len; + circ(x0+sw2*f*f*2.2+bx*f*f,y0+len*f,wd*(1-f*0.45)*(1+op3*0.3),i2%2?"#5a3a5a":"#7a4a6a");} + const fx2=x0+sw2*2.2+bx,fy=y0+len; poly([fx2-2*tipW,fy-2,fx2+2*tipW,fy-2,fx2,fy+6],"#e8dcc0");}; - for(const sd of[-1,1]){const ext=b.tent&&b.tent.act>0&&b.tent.side===sd?2.1:1; - tent(sd*9*op2,24,(26+op3*8)*ext*op2,3.2,sd*1.7,1);} - for(const sd of[-1,1]){tent(sd*15*op2,16,12*op2,1.8,sd*2.9+1,0.6);tent(sd*4*op2,32,14*op2,1.6,sd*4.1+2,0.6);} + for(const sd of[-1,1]){const swp=b.tent&&b.tent.act>0&&b.tent.side===sd?1-b.tent.act/30:null; // 扫击侧:横扫扇形动画 + tent(sd*9*op2,24,(26+op3*8)*(swp!=null?1.8:1)*op2,3.2,sd*1.7,1,swp,sd);} + for(const sd of[-1,1]){tent(sd*15*op2,16,12*op2,1.8,sd*2.9+1,0.6,null,0);tent(sd*4*op2,32,14*op2,1.6,sd*4.1+2,0.6,null,0);} } if(op3>0){const mw=9*op3; // 环齿嘴(P3展开,利齿缓慢旋动) circ(0,30,mw,"#4a1a1a");circ(0,30,mw*0.55,"#2a0d0d"); @@ -474,12 +475,9 @@ function render(){ } // 区域效果 / 新星环 / 水雷(按类型差异化) for(const z of G.zones){ - if(z.kind==="gas"){ // 酸雾:错落雾团(无圆界)+孢子微粒 - ctx.globalAlpha=0.2;ctx.fillStyle="#7dff8a"; - for(let i=0;i<5;i++){const a=i*TAU/5+z.life*0.012; - ctx.beginPath();ctx.arc(z.x+Math.cos(a)*z.r*0.42,z.y+Math.sin(a*1.7)*z.r*0.35,z.r*0.55,0,TAU);ctx.fill();} - ctx.globalAlpha=1; - if(G.time%7===0)G.parts.push({x:z.x+rnd(-1,1)*z.r*0.7,y:z.y+rnd(-1,1)*z.r*0.7,vx:0,vy:0.25,life:14,col:"#a8ff5c",sz:1}); + if(z.kind==="gas"){ // 酸雾:纯粒子雾团(无圆形区域),飘过留下渐散酸雾轨迹 + if(G.time%2===0)G.parts.push({x:z.x+rnd(-1,1)*z.r*0.6,y:z.y+rnd(-1,1)*z.r*0.5,vx:rnd(-0.15,0.15),vy:rnd(0.1,0.4),life:rndi(26,40),col:pick(["#7dff8a","#a8ff5c","#4a8a3a"]),sz:rndi(2,4)}); + if(G.time%5===0)G.parts.push({x:z.x+rnd(-1,1)*z.r*0.85,y:z.y+rnd(-1,1)*z.r*0.7,vx:rnd(-0.3,0.3),vy:rnd(-0.1,0.3),life:rndi(14,22),col:"#e8ffd0",sz:1}); continue; } if(z.kind==="plasma"){ // 电浆区:去除圆形区域,只保留内部窜动的电弧