From 4ea33f42d9348b75ce15f66ae297972fdf134b61 Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Thu, 6 Aug 2026 15:01:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=A2=E7=90=B4Boss=E5=A4=A7=E7=82=AE?= =?UTF-8?q?=E5=A1=94=EF=BC=9A=E8=93=84=E5=8A=9B/=E6=B6=88=E9=80=80?= =?UTF-8?q?=E6=8B=86=E5=88=86=E4=B8=BA=E7=8B=AC=E7=AB=8B=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=8C=E6=B6=88=E9=80=80=E6=9C=9F=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=9C=86=E7=8E=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - pedLasL(0-60)专门管蓄力,pedLasLCd(300→0)专门管消退倒计时 - 蓄力满60发射激光,发射后pedLasL清0,pedLasLCd置300开始5秒消退 - 消退期间每帧-1,不检测玩家,不显示蓄力圆环 - 消退结束后pedLasLCd=0,才重新允许检测玩家是否在炮塔下方 --- star-raid/js/boss_art.js | 4 ++-- star-raid/js/enemies.js | 38 ++++++++++++++++---------------------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/star-raid/js/boss_art.js b/star-raid/js/boss_art.js index b3ae790..7751b4f 100644 --- a/star-raid/js/boss_art.js +++ b/star-raid/js/boss_art.js @@ -45,9 +45,9 @@ function drawPiano(b,t,fl,split){ circ(px2,2,5.5,"#5a1a1a");circ(px2-1.5,0,2.5,"#8a2a2a"); px(px2-1.5,4,3,8,"#1b2434"); px(px2-1,10,2,3,"#ff3355"); - // 大激光蓄力/消退圆环:蓄力期(1-60)逐渐变大,消退期(61-360)保持最大,最后回0消失 + // 大激光蓄力圆环:仅在蓄力阶段(1-59)显示,消退期不显示 const raw=sd<0?(b.pedLasL||0):(b.pedLasR||0); - if(raw>0){const a=Math.min(raw/60,1); + if(raw>0&&raw<60){const a=raw/60; ctx.globalAlpha=0.3+0.55*a;ctx.strokeStyle="#ff3355";ctx.lineWidth=1.5; ctx.beginPath();ctx.arc(px2,14,2+3.5*a,0,TAU);ctx.stroke(); ctx.globalAlpha=0.22*a;ctx.fillStyle="#ff3355"; diff --git a/star-raid/js/enemies.js b/star-raid/js/enemies.js index 15352a3..4d05471 100644 --- a/star-raid/js/enemies.js +++ b/star-raid/js/enemies.js @@ -350,32 +350,26 @@ function updateBoss(){ } } const lck=(b.laserT||0)>0; // 巨宽核心激光期间压制其他攻击 - // 钢琴:大炮塔惩罚激光——三态:蓄力(1-60)→发射→消退(61-360)→空闲(0) + // 钢琴:大炮塔惩罚激光——蓄力与消退分离:蓄力pedLasL(0-60) + 消退pedLasLCd(300→0) if(b.idx===4&&!lck){ const off0=b.phase>=1?16:0,p=G.p; const leftX=b.x-(112+off0),rightX=b.x+(112+off0); - // 左炮 - const l=b.pedLasL||0; - if(l===0&&p.dead<=0&&Math.abs(p.x-leftX)<14){ - b.pedLasL=1; - }else if(l>0&&l<60){ - if(p.dead<=0&&Math.abs(p.x-leftX)<14)b.pedLasL=l+1; - else b.pedLasL=Math.max(0,l-1); - if(b.pedLasL>=60){bossBeam(leftX,b.y+10,leftX,H+8,14,"#ff3355",10,40,99999,{b,ox:-(112+off0),oy:10,followX2:true});b.pedLasL=360;SFX.warn();} - }else if(l>=60){ - b.pedLasL=l-1; - } + // 左炮:消退倒计时优先 + if((b.pedLasLCd||0)>0){b.pedLasLCd=b.pedLasLCd-1;} + else{const l=b.pedLasL||0; + if(l===0&&p.dead<=0&&Math.abs(p.x-leftX)<14){b.pedLasL=1;} + else if(l>0&&l<60){ + if(p.dead<=0&&Math.abs(p.x-leftX)<14)b.pedLasL=l+1; + else b.pedLasL=Math.max(0,l-1); + if(b.pedLasL>=60){bossBeam(leftX,b.y+10,leftX,H+8,14,"#ff3355",10,40,99999,{b,ox:-(112+off0),oy:10,followX2:true});b.pedLasL=0;b.pedLasLCd=300;SFX.warn();}}} // 右炮 - const r=b.pedLasR||0; - if(r===0&&p.dead<=0&&Math.abs(p.x-rightX)<14){ - b.pedLasR=1; - }else if(r>0&&r<60){ - if(p.dead<=0&&Math.abs(p.x-rightX)<14)b.pedLasR=r+1; - else b.pedLasR=Math.max(0,r-1); - if(b.pedLasR>=60){bossBeam(rightX,b.y+10,rightX,H+8,14,"#ff3355",10,40,99999,{b,ox:(112+off0),oy:10,followX2:true});b.pedLasR=360;SFX.warn();} - }else if(r>=60){ - b.pedLasR=r-1; - } + if((b.pedLasRCd||0)>0){b.pedLasRCd=b.pedLasRCd-1;} + else{const r=b.pedLasR||0; + if(r===0&&p.dead<=0&&Math.abs(p.x-rightX)<14){b.pedLasR=1;} + else if(r>0&&r<60){ + if(p.dead<=0&&Math.abs(p.x-rightX)<14)b.pedLasR=r+1; + else b.pedLasR=Math.max(0,r-1); + if(b.pedLasR>=60){bossBeam(rightX,b.y+10,rightX,H+8,14,"#ff3355",10,40,99999,{b,ox:(112+off0),oy:10,followX2:true});b.pedLasR=0;b.pedLasRCd=300;SFX.warn();}}} } // —— 主攻击 —— b.mainT--;