#e
#Title[1]
#Text[P]
#ScriptVersion[2]
#Player[FREE]


script_enemy_main {
	let imgBoss     = "script\፬_\img\dot_chen.png";
	let cx=GetCenterX();
	#include_function ".\lib\lib_anime_ChenRan.txt"
	#include_function ".\prg\function_all.txt"
    let yf        = GetClipMinY + 64;
    let cx=GetCenterX();
    @Initialize {
		SetX(GetClipMaxX - 80);
        SetY(GetClipMinY + 120);
        SetLife(100000);
        LoadGraphic(imgBoss);
        SetTexture(imgBoss);
        InitializeAction();
        SetDamageRateEx(300, 0 ,300, 0);
        Move;
		TMain;
	}
	@MainLoop {
        SetCollisionA(GetX, GetY, 32);
        SetCollisionB(GetX, GetY, 16);

        yield;
    }
    @DrawLoop {
       DrawBoss( imgBoss );
    }

    @Finalize {
       

    }
    task TMain {
        yield;
        con2;
        TN;
       }
task Move {
	loop{
	SetMovePosition02(GetX, GetY+10, 60);
	wait(60);
	SetMovePosition02(GetX, GetY-10, 60);
	wait(60);
}
}
sub con2 {
        let wConc = 60;
        Concentration01(wConc);
        wait(wConc);
    }
task TN{
	loop{
	let tha = 70;
	let thb = 160;
	let thc = 250;
	let thd = 340;
	SetAction( ACT_SHOT_A, 360 );
	loop(40){
		CreateShot01(GetX, GetY, 1.5, tha, BLUE01 ,0);
		CreateShot01(GetX, GetY, 1.5, thb, BLUE01 ,0);
		CreateShot01(GetX, GetY, 1.5, thc, BLUE01 ,0);
		CreateShot01(GetX, GetY, 1.5, thd, BLUE01 ,0);
		wait(9);
		tha -= 9;
		thb -= 9;
		thc -= 9;
		thd -= 9;
}
wait(60);
}
}
 
               function wait(w) {
        loop(w) { yield; }
    }
   }