diff --git a/js/enemies.js b/js/enemies.js index 1d6e814..3652c71 100644 --- a/js/enemies.js +++ b/js/enemies.js @@ -218,7 +218,7 @@ function startBoss(){ G.boss={idx,x:W/2,y:-60,ty:64,hp:b.hp*hpM,maxhp:b.hp*hpM,r:(b.rr?b.rr[0]:b.r),ry:(b.ryy?b.ryy[0]:undefined),t:0,phase:0,transT:0, col:b.col,name:b.name,sub:b.sub,fireM:BAL.fireMul(n)*(G.diff===1?BAL.hard.fire:1),dead:false, mainT:100,minorT:9999,minorSet:[],rerollT:340,ax:W/2,ay:64,mt:0,landed:false}; - if(b.main==="piano")G.boss.mainT=36; // 激光钢琴:缩短开局空窗 + if(b.main==="piano")G.boss.mainT=24; // 激光钢琴:缩短开局空窗 G.bossN++;SFX.warn();MUS.start(true); banner("WARNING — "+b.name,"#ff5566",150); } @@ -249,13 +249,13 @@ function updateBoss(){ if(G.time%9===0){const a5=Math.atan2(aimPt().y-b.y,aimPt().x-b.x);ebul(b.x,b.y,a5,2.7,"orbR",13);} // 冲撞途中瞄准弹 if(ds.t<=0||b.y>H+26||b.y<-46||b.x<-26||b.x>W+26){ds.ph="back";ds.t=160;}} else{b.x+=(b.ax-b.x)*0.045;b.y+=(b.ay-b.y)*0.045;ds.t--; - if(ds.t<=0||(Math.abs(b.x-b.ax)<5&&Math.abs(b.y-b.ay)<5)){b.dashSt=null;b.mainT=Math.round(70/b.fireM);}} + if(ds.t<=0||(Math.abs(b.x-b.ax)<5&&Math.abs(b.y-b.ay)<5)){b.dashSt=null;b.mainT=Math.round(105/b.fireM);}} // 冲撞间隔+50% updateFunnels();return; } // —— 常规移动 —— if(def.static){b.x+=(W/2-b.x)*0.05;b.y+=(52-b.y)*0.02;} - else if(b.idx===3){b.x=W/2+Math.sin(b.mt*0.021)*62;b.y=b.ty+Math.sin(b.mt*0.013)*15;} // 暗黑突击:小体型高机动 - else b.x=W/2+Math.sin(b.mt*0.008)*(def.wide?44:70); // 宽体Boss减小游走幅度,防止巨翼出屏 + else if(b.idx===3){b.x=W/2+Math.sin(b.mt*0.034)*62;b.y=b.ty+Math.sin(b.mt*0.021)*18;} // 暗黑突击:小体型高机动(空闲大幅提速) + else{b.x=W/2+Math.sin(b.mt*0.013)*(def.wide?44:70);b.y=b.ty+Math.sin(b.mt*0.011)*(def.wide?8:12);} // 通用游走提速+上下浮动(钢琴站桩除外) b.mt++; const fm=b.fireM*(1+0.22*b.phase); if(b.fnT>0)b.fnT--;if(b.plT>0)b.plT--;if(b.eyeT>0)b.eyeT--;if(b.hornT>0)b.hornT--;if(b.laserT>0)b.laserT--; // 帧级技能计时器 @@ -270,6 +270,7 @@ function updateBoss(){ b.minorSet=[];for(let i=0;i0)b.minorT--; // 暗黑突击:空闲攻击频率翻倍 if(b.minorT<=0&&!lck)for(const mk of b.minorSet)bossMinor(b,mk,fm); updateFunnels(); } @@ -298,7 +299,7 @@ function bossMain(b,def,fm){ case "assault": // 暗黑突击:启动冲撞(锚点记当前位置,冲撞归来后正弦从此继续) b.dashSt={ph:"tele",t:52};b.ax=b.x;b.ay=b.y;b.mainT=9999;break; case "piano": { // 激光钢琴:21键,四种模式轮换——顺扫(逼走位)/反扫/乱序/齐射 - if(!b.keys)b.keys={n:21,seq:[],i:0,t:8,hot:-1,hotT:0,hotList:null,mode:3}; + if(!b.keys)b.keys={n:21,seq:[],i:0,t:2,hot:-1,hotT:0,hotList:null,mode:3}; const ks=b.keys,n=ks.n; if(ks.hotT>0){ks.hotT--; if(ks.hotT===0){const list=ks.hotList||[ks.hot]; @@ -313,13 +314,13 @@ function bossMain(b,def,fm){ else if(ks.mode===1){ks.seq=[];for(let i=n-1;i>=0;i--)ks.seq.push(i);} else if(ks.mode===2){ks.seq=shuffled(n);} else{ks.seq=[];for(let i=0;i<6+ph*2;i++)ks.seq.push(-1);} // -1=齐射标记 - ks.i=0;ks.t=Math.round((ph?24:40)/fm); + ks.i=0;ks.t=Math.round((ph?8:14)/fm); // 光速进入下一种模式 }else{const cur=ks.seq[ks.i++]; - if(cur===-1){const pool=shuffled(n);ks.hotList=pool.slice(0,4+ph*2);ks.hotT=9;ks.t=Math.round((ph?22:34)/fm);} - else{ks.hot=cur;ks.hotT=3;ks.t=Math.round((ph?2:3)/fm);} // 扫射模式:快速连发 + if(cur===-1){const pool=shuffled(n);ks.hotList=pool.slice(0,4+ph*2);ks.hotT=4;ks.t=Math.round((ph?8:12)/fm);} + else{ks.hot=cur;ks.hotT=1;ks.t=Math.round((ph?1:1)/fm);} // 扫射模式:每tick一键(≈5倍速) } } - b.mainT=6;break;} + b.mainT=2;break;} case "hive": // 母巢核心:环弹+孵化 for(let i=0;i<10+ph*4;i++)ebul(b.x,b.y,i/(10+ph*4)*TAU+b.t*0.03,1.6+0.2*ph,"orbO"); if(b.t%240<3)for(let i=0;i<1+ph;i++)spawnEnemy(ph>=2?"kami":"mini",b.x+rnd(-30,30),b.y+8,false); diff --git a/js/render.js b/js/render.js index f27d798..ec63d0f 100644 --- a/js/render.js +++ b/js/render.js @@ -179,9 +179,9 @@ function drawBoss(){ function drawProgenitor(t,fl,tf){ // 太空原种:同一躯体连续演化(tf 0=虫蛹→1=完全体),无部件凭空出现 ctx.rotate(Math.sin(t*0.05)*0.05); const wE=Math.min(1,tf*1.2); // 展翅进度 - // —— 翅膀:折叠时收在躯体正后方偏下(被身体完全遮住),自背后向两侧展开 —— + // —— 翅膀:折叠时收在躯体后方偏上(被身体完全遮住),自背后向两侧展开 —— ctx.save(); - ctx.translate(0,10); + ctx.translate(0,-12); ctx.scale(0.05+0.95*wE,(0.55+0.45*wE)*(1+Math.sin(t*0.07)*0.04*wE)); poly([0,-20,-26,-14,-52,-4,-76,6,-58,12,-34,10,-16,16,0,20],"#c86aa8"); poly([0,-20,26,-14,52,-4,76,6,58,12,34,10,16,16,0,20],"#c86aa8"); @@ -325,6 +325,10 @@ function render(){ if(b.scale&&b.scale!==1){const sp=SPR[b.spr]; // 成长弹(花弹) ctx.save();ctx.translate(Math.round(b.x),Math.round(b.y));ctx.scale(b.scale,b.scale); ctx.drawImage(sp,-Math.round(sp.width/2),-Math.round(sp.height/2));ctx.restore();} + else if(b.spr==="dartS"||b.spr==="dartB"||b.spr==="dartP"){const sp=SPR[b.spr]; // 长条弹:按飞行方向偏转 + ctx.save();ctx.translate(Math.round(b.x),Math.round(b.y)); + ctx.rotate(Math.atan2(b.vy,b.vx)-Math.PI/2); + ctx.drawImage(sp,-Math.round(sp.width/2),-Math.round(sp.height/2));ctx.restore();} else drawSprite(SPR[b.spr],b.x,b.y);} // 玩家子弹 for(const b of G.pb){ diff --git a/js/sprites.js b/js/sprites.js index d32ce03..e319dfe 100644 --- a/js/sprites.js +++ b/js/sprites.js @@ -105,8 +105,8 @@ SPR.flowr=bake([ "....P....",".P..P..P.","..PPPPP..",".PPWWWPP.","PPPWWWPPP", ".PPWWWPP.","..PPPPP..",".P..P..P.","....P...."], {P:"#ff8fc8",W:"#ffffff"}); // 太空原种:花弹(圆形八刺,会逐渐变大) -SPR.dartS=bake(["WW","WW","CC","CC","CC","CC","CC","CC","CC","CC","CC","CC"], -{W:"#f2fbff",C:"#5ec4ff"}); // 夺权者X:蓝白细长钉(2×12) +SPR.dartS=bake(["CC","CC","CC","CC","CC","CC","CC","CC","CC","CC","WW","WW"], +{W:"#f2fbff",C:"#5ec4ff"}); // 夺权者X:蓝白细长钉(2×12,白尖朝运动方向) SPR.dartP=bake(["KPPPK",".PPP.",".PWP.","..P.."],{K:"#2a1040",P:"#b98cff",W:"#ead9ff"}); // 暗黑魔碟:紫锥弹 SPR.orbR=orb("#ffe9e9","#ff5566");SPR.orbP=orb("#f4e9ff","#b05ce8"); SPR.orbG=orb("#e9ffe9","#5cff9d");SPR.orbO=orb("#fff4d9","#ff9a3d");