script_enemy_main
{
	#include_function ".\Bullet_function.txt"
	#include_function ".\Enemy function.txt"

	@Initialize{
	SetX(GetX);
	SetY(GetY);
	SetLife(600);
	SetScore(2000);
	SetDamageRate(100,33);
	LoadGraphic(imgzako);
	SetTexture(imgzako);
	SetGraphicRect(256,0,320,64);
	Shot(GetArgument);
	Move();
	}

	@MainLoop{
	SetCollisionA(GetX,GetY,24);
	ChackBonus;
	yield;
	}

	@DrawLoop{
	DrawGraphic(GetX,GetY);
	}

	@Finalize{
	if(BeVanished() == false){
	MasicPointAddNormal(2.5);
	MagicPowerAdd(true);
	loop(4 + scorebonus){
	let x = GetX + rand(-16,16);
	let y = GetY + rand(-16,16);
	CreateItem(ITEM_SCORE,x,y);
	}
	}
	}

	task Shot(level){
	let i = 0;
	loop(40){yield;}
	loop(2){
	loop(4 + level * 4){
	KunojiShot(GetX,GetY,0.01,1,i,ORANGE12,10);
	i += 360 / (4 + level * 4);}
	loop(50){yield;}
	}
	}

	task Move(){
	SetMovePosition02(GetX,120,30);
	loop(150){yield;}
	SetMovePosition02(GetX,496,200);
	loop(220){yield;}
	VanishEnemy;
	}

}