    let FamiliarX=[];
    let FamiliarY=[];
    let FamiliarShotAngle=[];
    let FamiliarAngle=[];
    let Atom = NULL;

task TShot{
	let delay=18;
	let secount=0;
	let bShotPrev = false;
        let left = 1;    // ショットボタンを離した後でも出る残りの回数

        loop {
            if(! bShot) {

                if(bShotPrev) {
                    left = 0;
                }
                if(left == 0) {
                    while(! bShot) { yield; }
                } else {
                    //left--;
                }
            } 
		
	if(bShot && !bSlow && !OnBomb){
		delay=18;
		ascent(n in 0..10){
			Danmaq(GetPlayerX+6, GetPlayerY-24, 2+(n/2), 270, 6, 1, 2, 1);}
	}

	if(bShot && (bSlow || OnBomb)){
		delay=24;
		Danmaq(GetPlayerX+6, GetPlayerY-24, 6, 270, 6, 3, 2, 1);
	}
		if(!OnMissed && !OnEvent && !OnBomb){
                	if(!bSlow || !FireFlag) {
				}           
			}
              
            bShotPrev = bShot;

            loop(delay){yield;}
        }
    }

task TSubShot{
	let delay=30;
	let burst = 0;
	let secount=0;

        loop {
            while(! bShot || !FireFlag) { yield; }
            
		if(!OnMissed && !OnEvent && !OnBomb){
                	if(bSlow) {
				secount++;		
				}       

		if(bSlow){
			if(secount>=100){
				secount=0;
				}
			if(nukeType == 0){
				delay = 3;
				prominence(GetPlayerX+6, GetPlayerY-24, 6, 270, 3, 1, 2, 1, 1,rand(1,3)*5);
				prominence(GetPlayerX+6, GetPlayerY-24, 6, 270, 3, 1, 2, 1, -1,rand(1,3)*5);
			}
			if(nukeType == 2){
				delay = 20;
				let angle = atan2(GetEnemyY-(GetPlayerY-24), GetEnemyX-(GetPlayerX-6));
					Atomic(GetPlayerX-6, GetPlayerY-24,6,angle,1,3,1);
			}
			if(nukeType == 1){
				delay = 1;
					let damage = 1.2;
				ascent(n in 0..10){
				    if((secount+(n*5))==70){
				let angle = atan2(GetEnemyY-GetPlayerY, GetEnemyX-GetPlayerX);
					Revolution(GetPlayerX,GetPlayerY,-90,0.5,3,32,15,3,1, 2);
				    }
				}
			secount++;
			}
		}
			}
            loop(delay){yield;}
        }
    }

task Danmaq(let x,let y,let speed,let angle,let damage,let penetlate,let stype, let lv){
	let objShot= Obj_Create(OBJ_SHOT);
	let Alpha = 50;
	if(lv > 2){Alpha/=lv;lv=2;}
	Obj_SetX(objShot, x);
	Obj_SetY(objShot, y);
	Obj_SetAlpha(objShot,Alpha); 
        	ObjShot_SetGraphic(objShot, stype);
	ObjShot_SetDamage(objShot, damage);    
	ObjShot_SetPenetration(objShot, penetlate);
	Obj_SetAngle(objShot, angle);
	Obj_SetSpeed(objShot,speed);
	while( !Obj_BeDeleted(objShot)){
		if(Alpha<255){
			Alpha += (5-lv);
			Obj_SetAlpha(objShot,Alpha);
		}
		yield;
		}
	Obj_Delete(objShot);
	}
task prominence(let x,let y,let speed,let angle,let damage,let penetlate,let stype, let lv, let dir, let wide){
	let objShot= Obj_Create(OBJ_SHOT);
	let Alpha = 100;
	let area = 0;
	if(lv > 2){Alpha/=lv;lv=2;}
	Obj_SetX(objShot, x);
	Obj_SetY(objShot, y);
	Obj_SetAlpha(objShot,Alpha); 
        	ObjShot_SetGraphic(objShot, stype);
	ObjShot_SetDamage(objShot, damage);    
	ObjShot_SetPenetration(objShot, penetlate);
	Obj_SetAngle(objShot, angle);
	Obj_SetSpeed(objShot,speed);
	while( !Obj_BeDeleted(objShot)){
		area += wide;
		if(Alpha<255){
			Alpha += (5-lv);
			Obj_SetAlpha(objShot,Alpha);
		}
		Obj_SetX(objShot, x+sin(area)*dir*(area/5));
		yield;
		}
	Obj_Delete(objShot);
	}
task Atomic(let x,let y,let speed,let angle,let damage,let penetlate, let lv){//爆発する原子核
	if(!Obj_BeDeleted(Atom)){return;}
	Atom= Obj_Create(OBJ_SHOT);
	let Alpha = 100;
	let stype = 40;
	let life = 0;
	if(lv > 2){Alpha/=lv;lv=2;}
	Obj_SetX(Atom, x);
	Obj_SetY(Atom, y);
	Obj_SetAlpha(Atom,Alpha); 
        	ObjShot_SetGraphic(Atom, 41);
	ObjShot_SetDamage(Atom, damage);    
	ObjShot_SetPenetration(Atom, penetlate);
	Obj_SetAngle(Atom, angle);
	Obj_SetSpeed(Atom,speed);
	let x = Obj_GetX(Atom);
	let y = Obj_GetY(Atom);
	while( !Obj_BeDeleted(Atom)){
		if(life == 1){orbit(Obj_GetX(Atom),Obj_GetY(Atom),3);}
		life++;
		if(Alpha<255){
			Alpha += (5-lv);
			Obj_SetAlpha(Atom,Alpha);
		}
		angle = atan2(GetEnemyY-Obj_GetY(Atom), GetEnemyX-Obj_GetX(Atom));
		x = Obj_GetX(Atom);
		y = Obj_GetY(Atom);
		if (!(x<=GetClipMaxX+10 && x>= GetClipMinX-10&&y<=GetClipMaxY+10 && y>= GetClipMinY-10)||OnBomb){Obj_Delete(Atom);}
		yield;
		}
	detonate(x,y,3,life/5);
	Obj_Delete(Atom);
	}
task orbit(let x,let y, range) {//原子核の周りに粒子発生
		ascent(m in 0..range){
			let angle = -90 + (m * (360/range));
			let rad = 20;
			let dir = 20;
			revolver(x,y,angle, rad, dir);
		}
	}
task detonate(let x, let y, let dam, let area) {//爆発エフェクト発生
		ascent(m in 0..area+1){
			explode(x,y,rand(2,5),m*(360/area),dam,300, 50);
		}
	}
task revolver(let x, let y, let angle, let rad, let dir){//原子核の周りを回転する粒子
		let sun = Obj_Create(OBJ_SHOT);
		let dist = 0;
		let Alpha = 25;
		Obj_SetX(sun, x+cos(angle)*dist);
		Obj_SetY(sun, y+sin(angle)*dist);
		Obj_SetAlpha(sun,Alpha); 
		ObjShot_SetGraphic(sun, 40);
		ObjShot_SetDamage(sun, 3); 
		ObjShot_SetPenetration(sun, 28000);
		Obj_SetSpeed(sun,0);
		Obj_SetAngle(sun,1);
		while( !Obj_BeDeleted(Atom)){
			angle += dir;
			if(dist<rad){dist+=(rad/50);}
			if(Alpha<255){Alpha+=5;
				Obj_SetAlpha(sun,Alpha);}
			x = Obj_GetX(Atom);
			y = Obj_GetY(Atom);
			Obj_SetX(sun, x+(cos(angle)*dist));
			Obj_SetY(sun, y+(sin(angle)*dist));
			if(Obj_BeDeleted(Atom)){Obj_Delete(sun);}
			yield;
		}
		Obj_Delete(sun);
	}

task Revolution(let x,let y, let angle, let damage, let pen, let stype, let range, let speed, let dir, let lv) {//渦状に粒子を放つ
		ascent(m in 0..range){
			Sun(x,y,angle+(m * (360/range)), damage, pen, stype, speed, dir, lv);
			Sun(x,y,angle+(m * (360/range)), damage, pen, stype, speed, -dir, lv);
		}
	}

task Sun(let x, let y, let angle, let damage, let pen, let stype, let rad, let dir, let lv){//渦状に放たれる粒子
		let sun = Obj_Create(OBJ_SHOT);
		Obj_SetX(sun, x);
		Obj_SetY(sun, y);
		let Alpha = 50;
		Obj_SetAlpha(sun,255); 
		ObjShot_SetGraphic(sun, stype);
		ObjShot_SetDamage(sun, damage); 
		ObjShot_SetPenetration(sun, pen);
		Obj_SetSpeed(sun,0);
		Obj_SetAngle(sun,1);
		ascent(n in 0..300){
			if(Alpha<255){
				Alpha += (5-lv);
				Obj_SetAlpha(sun,Alpha);
			}
			angle += dir;
			Obj_SetX(sun, x+cos(angle)*n*rad);
			Obj_SetY(sun, y+sin(angle)*n*rad);
			yield;
		}
		Obj_Delete(sun);
	}
task explode(let x,let y,let speed,let angle,let damage,let penetlate, let dist){//爆発のエフェクト
	let objShot= Obj_Create(OBJ_SHOT);
	let Alpha = 255;
	let life = 0;
	let stype = 30;
	Obj_SetX(objShot, x);
	Obj_SetY(objShot, y);
	Obj_SetAlpha(objShot,Alpha); 
        	ObjShot_SetGraphic(objShot, stype);
	ObjShot_SetDamage(objShot, damage);    
	ObjShot_SetPenetration(objShot, penetlate);
	Obj_SetAngle(objShot, angle);
	Obj_SetSpeed(objShot,speed);
	while( !Obj_BeDeleted(objShot)){
		life++;
		if(life >= dist/(3*speed) && life%2 == 0){stype++;
			ObjShot_SetGraphic(objShot, stype)}
		if(stype >=38){Obj_Delete(objShot);}
		yield;
		}
	Obj_Delete(objShot);
	}