Boss调整v2:钢琴归中等;突击冲撞4-10秒(三阶段4-8);残影改为同轮廓机体红影(按距离采样);钢琴顺/反扫速度+60%,乱序前摇对齐齐射9帧
This commit is contained in:
parent
0261f44faa
commit
c7576c2eb5
@ -293,4 +293,21 @@ function drawAssault(t,fl,swp,ph,mp){ // 暗黑突击(swp=翼展角;炮管/
|
|||||||
if(ph>=1){poly([-52,-14,-24,-3,-22,-1,-50,-11],"#ffdfe5");poly([52,-14,24,-3,22,-1,50,-11],"#ffdfe5");}
|
if(ph>=1){poly([-52,-14,-24,-3,-22,-1,-50,-11],"#ffdfe5");poly([52,-14,24,-3,22,-1,50,-11],"#ffdfe5");}
|
||||||
if(ph>=2){px(-4,-16,8,12,fl||"#ff3355");px(-2,-14,4,8,"#ffdfe5");}
|
if(ph>=2){px(-4,-16,8,12,fl||"#ff3355");px(-2,-14,4,8,"#ffdfe5");}
|
||||||
}
|
}
|
||||||
|
function drawAssaultGhost(swp,ph){ // 暗黑突击冲撞红色残影:与机体同轮廓同线条(纯红系,供dashTrail叠画)
|
||||||
|
const sw=swp*Math.PI/180;
|
||||||
|
for(const sd of[-1,1]){
|
||||||
|
const tx=sd*(8+52*Math.sin(sw)),ty=14-52*Math.cos(sw);
|
||||||
|
poly([sd*4,6,tx,ty,tx-sd*9,ty+11,sd*4,20],"#ff3344"); // 主翼
|
||||||
|
poly([tx-sd*2,ty-6,tx+sd*3,ty-14,tx+sd*7,ty-3],"#ff3344");} // 翼尖
|
||||||
|
poly([0,38,-5,6,-3,-26,3,-26,5,6],"#ff3344"); // 机身
|
||||||
|
px(-2,8,4,8,"#ff8899"); // 中脊亮线
|
||||||
|
const guns=[[16,4],[-16,4],[30,-4],[-30,-4],[42,-10],[-42,-10]];
|
||||||
|
const gn=ph>=2?6:ph>=1?4:2;
|
||||||
|
for(let i=0;i<gn;i++)px(guns[i][0]-1.5,guns[i][1],3,8,"#ff8899"); // 炮管
|
||||||
|
const eng=[[7,-26],[-7,-26],[0,-30],[14,-22]];
|
||||||
|
const en=ph>=2?4:ph>=1?3:2;
|
||||||
|
for(let i=0;i<en;i++)px(eng[i][0]-1.5,eng[i][1]-10,3,7,"#ff8899"); // 推进器
|
||||||
|
if(ph>=1){poly([-52,-14,-24,-3,-22,-1,-50,-11],"#ff3344");poly([52,-14,24,-3,22,-1,50,-11],"#ff3344");} // 翼展线条
|
||||||
|
if(ph>=2)px(-4,-16,8,12,"#ff8899"); // 中核亮块
|
||||||
|
}
|
||||||
/* ---- Boss光束与浮游炮渲染 ---- */
|
/* ---- Boss光束与浮游炮渲染 ---- */
|
||||||
|
|||||||
@ -194,7 +194,7 @@ const BOSSES=[
|
|||||||
{name:"太空原种",sub:"SPACE SPAWN",hp:1350,col:"#ff8fc8",r:20,rr:[20,34],ryy:[26,18],wide:1,main:"spawn",minors:["wiggle","spikeSnipe","sporeArc","tentBeam","mawSnipe","wingRain"],phases:2,tier:1},
|
{name:"太空原种",sub:"SPACE SPAWN",hp:1350,col:"#ff8fc8",r:20,rr:[20,34],ryy:[26,18],wide:1,main:"spawn",minors:["wiggle","spikeSnipe","sporeArc","tentBeam","mawSnipe","wingRain"],phases:2,tier:1},
|
||||||
{name:"歼灭者",sub:"ANNIHILATOR",hp:1700,col:"#b05ce8",r:22,main:"annihilate",minors:["aimSpread","spawnMine"],phases:3,tier:0},
|
{name:"歼灭者",sub:"ANNIHILATOR",hp:1700,col:"#b05ce8",r:22,main:"annihilate",minors:["aimSpread","spawnMine"],phases:3,tier:0},
|
||||||
{name:"暗黑突击",sub:"DARK ASSAULT",hp:2100,col:"#ff3355",r:9,rr:[9,10,11],ryy:[5,6,7],main:"assault",minors:["rain","aimSpread"],phases:3,tier:2},
|
{name:"暗黑突击",sub:"DARK ASSAULT",hp:2100,col:"#ff3355",r:9,rr:[9,10,11],ryy:[5,6,7],main:"assault",minors:["rain","aimSpread"],phases:3,tier:2},
|
||||||
{name:"激光钢琴",sub:"LASER PIANO",hp:5000,col:"#43e8ff",r:26,rr:[100,100],ryy:[30,30],main:"piano",minors:["topRain","pedal"],phases:2,static:1,tier:2},
|
{name:"激光钢琴",sub:"LASER PIANO",hp:5000,col:"#43e8ff",r:26,rr:[100,100],ryy:[30,30],main:"piano",minors:["topRain","pedal"],phases:2,static:1,tier:1},
|
||||||
{name:"母巢核心",sub:"HIVE CORE",hp:2800,col:"#ff9a3d",r:22,main:"hive",minors:["spawnMini","aimSpread","ring"],phases:3,tier:0},
|
{name:"母巢核心",sub:"HIVE CORE",hp:2800,col:"#ff9a3d",r:22,main:"hive",minors:["spawnMini","aimSpread","ring"],phases:3,tier:0},
|
||||||
{name:"夺权者X",sub:"USURPER X",hp:3700,col:"#e8f4ff",r:24,rr:[58,26],ryy:[34,40],wide:1,main:"usurper",minors:["deckVolley","pillar","aimSpread"],phases:2,tier:2},
|
{name:"夺权者X",sub:"USURPER X",hp:3700,col:"#e8f4ff",r:24,rr:[58,26],ryy:[34,40],wide:1,main:"usurper",minors:["deckVolley","pillar","aimSpread"],phases:2,tier:2},
|
||||||
{name:"暗黑魔碟",sub:"DARK SAUCER",hp:4500,col:"#8a5cff",r:24,rr:[30,32,34],main:"saucer",minors:["coneFan","crossEye","dartSpiral"],phases:3,tier:3}, // 间歇期无圆圈弹幕(去ringBig,P3主攻击仍两层)
|
{name:"暗黑魔碟",sub:"DARK SAUCER",hp:4500,col:"#8a5cff",r:24,rr:[30,32,34],main:"saucer",minors:["coneFan","crossEye","dartSpiral"],phases:3,tier:3}, // 间歇期无圆圈弹幕(去ringBig,P3主攻击仍两层)
|
||||||
@ -266,7 +266,7 @@ function startBoss(){
|
|||||||
col:b.col,name:b.name,sub:b.sub,fireM:BAL.fireMul(n)*(G.diff===1?BAL.hard.fire:1),dead:false,
|
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};
|
mainT:100,minorT:9999,minorSet:[],rerollT:340,ax:W/2,ay:64,mt:0,landed:false};
|
||||||
if(b.main==="piano")G.boss.mainT=24; // 激光钢琴:缩短开局空窗
|
if(b.main==="piano")G.boss.mainT=24; // 激光钢琴:缩短开局空窗
|
||||||
else if(b.main==="assault")G.boss.mainT=rndi(240,900); // 暗黑突击:首次冲撞4~15秒随机
|
else if(b.main==="assault")G.boss.mainT=rndi(240,600); // 暗黑突击:首次冲撞4~10秒随机
|
||||||
G.bossN++;SFX.warn();MUS.start(true);
|
G.bossN++;SFX.warn();MUS.start(true);
|
||||||
banner("WARNING — "+b.name,"#ff5566",150);
|
banner("WARNING — "+b.name,"#ff5566",150);
|
||||||
}
|
}
|
||||||
@ -294,13 +294,14 @@ function updateBoss(){
|
|||||||
if(ds.t<=0){const ap3=aimPt(),a=Math.atan2(ap3.y-b.y,ap3.x-b.x);
|
if(ds.t<=0){const ap3=aimPt(),a=Math.atan2(ap3.y-b.y,ap3.x-b.x);
|
||||||
ds.ph="go";ds.t=85;ds.vx=Math.cos(a)*(b.phase>=2?10.8:7.2);ds.vy=Math.sin(a)*(b.phase>=2?10.8:7.2);SFX.warn();}} // 三阶段冲撞速度150%
|
ds.ph="go";ds.t=85;ds.vx=Math.cos(a)*(b.phase>=2?10.8:7.2);ds.vy=Math.sin(a)*(b.phase>=2?10.8:7.2);SFX.warn();}} // 三阶段冲撞速度150%
|
||||||
else if(ds.ph==="go"){b.x+=ds.vx;b.y+=ds.vy;ds.t--;
|
else if(ds.ph==="go"){b.x+=ds.vx;b.y+=ds.vy;ds.t--;
|
||||||
if(b.phase>=1){b.dashTrail=b.dashTrail||[];b.dashTrail.push({x:b.x,y:b.y});if(b.dashTrail.length>7)b.dashTrail.shift();} // 二三阶段:冲锋红色残影
|
if(b.phase>=1){const lt=b.dashTrail&&b.dashTrail.length?b.dashTrail[b.dashTrail.length-1]:null; // 二三阶段:冲锋红残影(按距离采样防重叠)
|
||||||
|
if(!lt||dist2(b.x,b.y,lt.x,lt.y)>144){b.dashTrail=b.dashTrail||[];b.dashTrail.push({x:b.x,y:b.y});if(b.dashTrail.length>8)b.dashTrail.shift();}}
|
||||||
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(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=b.phase>=2?90:160;}}
|
if(ds.t<=0||b.y>H+26||b.y<-46||b.x<-26||b.x>W+26){ds.ph="back";ds.t=b.phase>=2?90:160;}}
|
||||||
else{b.dashTrail=null;
|
else{b.dashTrail=null;
|
||||||
const k2=b.phase>=2?0.12:0.045; // 三阶段回位更快=惯性更小
|
const k2=b.phase>=2?0.12:0.045; // 三阶段回位更快=惯性更小
|
||||||
b.x+=(b.ax-b.x)*k2;b.y+=(b.ay-b.y)*k2;ds.t--;
|
b.x+=(b.ax-b.x)*k2;b.y+=(b.ay-b.y)*k2;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=rndi(240,900);}} // 冲撞间隔4~15秒随机
|
if(ds.t<=0||(Math.abs(b.x-b.ax)<5&&Math.abs(b.y-b.ay)<5)){b.dashSt=null;b.mainT=b.phase>=2?rndi(240,480):rndi(240,600);}} // 冲撞间隔4~10秒,三阶段4~8秒
|
||||||
updateFunnels();return;
|
updateFunnels();return;
|
||||||
}
|
}
|
||||||
// —— 常规移动 ——
|
// —— 常规移动 ——
|
||||||
@ -409,8 +410,9 @@ function bossMain(b,def,fm){
|
|||||||
ks.i=0;ks.t=Math.round((ph?14:22)/fm);
|
ks.i=0;ks.t=Math.round((ph?14:22)/fm);
|
||||||
}else{const cur=ks.seq[ks.i++];
|
}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.hotT0=9;ks.t=Math.round((ph?21:30)/fm);} // 齐射:慢50%
|
if(cur===-1){const pool=shuffled(n);ks.hotList=pool.slice(0,4+ph*2);ks.hotT=9;ks.hotT0=9;ks.t=Math.round((ph?21:30)/fm);} // 齐射:慢50%
|
||||||
else if(ks.mode<=1||ks.mode===4){ks.hot=cur;ks.hotT=1;ks.hotT0=1;ks.t=Math.round((ph?2:3)/fm);} // 顺/反扫/滑奏:前摇快50%
|
else if(ks.mode<=1){ks.hot=cur;ks.hotT=1;ks.hotT0=1;ks.t=Math.round((ph?2:3)/(1.6*fm));} // 顺扫/反扫:速度+60%(键间隔缩至原62.5%)
|
||||||
else{if(ph>=1){ks.hotList=[cur,ks.i<ks.seq.length?ks.seq[ks.i++]:cur];ks.hot=-1;}else{ks.hot=cur;}ks.hotT=3;ks.hotT0=3;ks.t=Math.round((ph?3:5)/fm);} // 乱序:P2一次点2键(和音)
|
else if(ks.mode===4){ks.hot=cur;ks.hotT=1;ks.hotT0=1;ks.t=Math.round((ph?2:3)/fm);} // 滑奏:原速
|
||||||
|
else{if(ph>=1){ks.hotList=[cur,ks.i<ks.seq.length?ks.seq[ks.i++]:cur];ks.hot=-1;}else{ks.hot=cur;}ks.hotT=9;ks.hotT0=9;ks.t=Math.round((ph?3:5)/fm);} // 乱序:P2一次点2键(和音);前摇与齐射一致(9帧)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
b.mainT=4;break;}
|
b.mainT=4;break;}
|
||||||
|
|||||||
@ -36,12 +36,15 @@ function poly(pts,col){ctx.fillStyle=col;ctx.beginPath();ctx.moveTo(pts[0],pts[1
|
|||||||
function circ(x,y,r,col){ctx.fillStyle=col;ctx.beginPath();ctx.arc(x,y,r,0,TAU);ctx.fill();}
|
function circ(x,y,r,col){ctx.fillStyle=col;ctx.beginPath();ctx.arc(x,y,r,0,TAU);ctx.fill();}
|
||||||
function drawBoss(){
|
function drawBoss(){
|
||||||
const b=G.boss;if(!b)return;
|
const b=G.boss;if(!b)return;
|
||||||
// 暗黑突击冲撞红色残影(二三阶段冲刺时记录位置,旧→新淡出;先画在机体下方)
|
// 暗黑突击冲撞红色残影(二三阶段冲刺时记录位置,旧→新淡出;与机体同轮廓同线条)
|
||||||
if(b.idx===3&&b.dashTrail&&b.dashTrail.length){
|
if(b.idx===3&&b.dashTrail&&b.dashTrail.length){
|
||||||
|
const SW=[15,45,70],swp=SW[Math.min(b.phase,2)];
|
||||||
for(let i=0;i<b.dashTrail.length;i++){const tp=b.dashTrail[i];
|
for(let i=0;i<b.dashTrail.length;i++){const tp=b.dashTrail[i];
|
||||||
|
ctx.save();ctx.translate(Math.round(tp.x),Math.round(tp.y));ctx.scale(0.34,0.34);
|
||||||
ctx.globalAlpha=(i+1)/b.dashTrail.length*0.3;
|
ctx.globalAlpha=(i+1)/b.dashTrail.length*0.3;
|
||||||
poly([tp.x,tp.y-9,tp.x+5,tp.y+1,tp.x-5,tp.y+1],"#ff3344");}
|
drawAssaultGhost(swp,Math.min(b.phase,2));
|
||||||
ctx.globalAlpha=1;}
|
ctx.restore();ctx.globalAlpha=1;}
|
||||||
|
}
|
||||||
// 变形动画:五个新Boss播专属变身(mp=进度);其余通用收缩展开 + 白光衰减
|
// 变形动画:五个新Boss播专属变身(mp=进度);其余通用收缩展开 + 白光衰减
|
||||||
let ph2=b.phase,sc=1,ox=0,oy=0,flashA=0,mp=null;
|
let ph2=b.phase,sc=1,ox=0,oy=0,flashA=0,mp=null;
|
||||||
if(b.transT>0){const prog=1-b.transT/70;
|
if(b.transT>0){const prog=1-b.transT/70;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user