CODE:
void boss_shot_bulletT207(){
int i,j,t=boss_shot.cnt%420;
double r,angle;
double dx,dy;
if(boss_shot.cnt==0){
boss.hp_max=16020;
boss.hp=boss.hp_max;
}
if(t==0){
jin_on(boss.x,boss.y,0,0,0,0,1);
jin_on(ch.x,ch.y,0,0,0,0,2);
input_phy_pos(FMX/2+rang(FMX/2-32.0),FMY/2+rang(FMY/2-32.0),180);
}
if(t<180){
for(i=0;i<JIN_MAX;i++){
if(boss_shot.jin[i].flag==1 && boss_shot.jin[i].state==1){
r=30.0;
angle=rang(PI2);
boss_bullet_on(1,1,4,1,boss_shot.jin[i].x+r*cos(angle),boss_shot.jin[i].y+r*sin(angle),1,0,0,0,0,0,0,1);
}
}
}
for(i=0;i<JIN_MAX;i++){
if(boss_shot.jin[i].flag==1){
switch(boss_shot.jin[i].state){
case 1:
if(boss_shot.jin[i].cnt==360){
boss_shot.jin[i].flag=0;
break;
}
for(j=0;j<BOSS_BULLET_MAX;j++){
dx=boss_shot.bullet[j].x-boss_shot.jin[i].x;
dy=boss_shot.bullet[j].y-boss_shot.jin[i].y;
r=dx*dx+dy*dy+0.0001;
angle=atan2(dy,dx);
boss_shot.bullet[j].vx+=50.0/r*cos(angle);
boss_shot.bullet[j].vy+=50.0/r*sin(angle);
}
break;
case 2:
if(boss_shot.jin[i].cnt==360){
boss_shot.jin[i].flag=0;
break;
}
for(j=0;j<BOSS_BULLET_MAX;j++){
dx=boss_shot.bullet[j].x-boss_shot.jin[i].x;
dy=boss_shot.bullet[j].y-boss_shot.jin[i].y;
r=dx*dx+dy*dy+0.0001;
if(r<20*20){
boss_shot.bullet[j].flag=0;
continue;
}
angle=atan2(dy,dx);
boss_shot.bullet[j].vx-=400.0/r*cos(angle);
boss_shot.bullet[j].vy-=400.0/r*sin(angle);
}
break;
}
}
}
for(i=0;i<BOSS_BULLET_MAX;i++){
if(boss_shot.bullet[i].flag==1){
boss_shot.bullet[i].x+=boss_shot.bullet[i].vx;
boss_shot.bullet[i].y+=boss_shot.bullet[i].vy;
}
else{
boss_shot.bullet[i].vx=0;
boss_shot.bullet[i].vy=0;
}
}
}
void boss_shot_bulletT208(){
int t=boss_shot.cnt%480;
int i;
if(boss_shot.cnt==0){
boss.hp_max=20300;
boss.hp=boss.hp_max;
}
if(t==0){
enter_charge_effect(boss.x,boss.y);
}
if(t==120){
for(i=0;i<128;i++){
boss_bullet_on(1,10,GetRand(6),1,boss.x,boss.y,1,bossatan2()+rang(PI/6),0,5+rang(2.0),0,0,0,1);
}
}
if(t==180){
input_phy_pos(FMX/2+rang(FMX/2-32.0),FMY-64,60);
}
if(t==240){
enter_charge_effect(boss.x,boss.y);
}
if(t==360){
for(i=0;i<128;i++){
boss_bullet_on(1,10,GetRand(6),1,boss.x,boss.y,1,bossatan2()+rang(PI/6),0,5+rang(2.0),0,0,0,1);
}
}
if(t==420){
input_phy_pos(FMX/2+rang(FMX/2-32.0),64,60);
}
}