function ExclInit{
}

function ExclLoop{
	ExclShot;
}

let fire_focus = 0;
function ExclShot{
	if(FireRate%3==0 && GetPlayerState==STATE_NORMAL && !Respawning){
		SE_Play(se_shot,25,PosToPan(GetPlayerX,50));
	}
	ascent(f in 0..4){
		let m = f/3;
		MainFire(-8+16*m,-6+12*m,64/4);
	}
	
}

function MainFire(x,dir,dmg){
	if(IsPermitPlayerShot==true && GetPlayerState==STATE_NORMAL && !Respawning){
		if(FireRate%3==0){
			CreateBasicShot(GetPlayerX+x,GetPlayerY,dir,dmg);
		}
	}
}

task CreateBasicShot(x,y,dir,dmg){
	if(!IsPermitPlayerShot){return;}
	let obj = CreatePlayerShot(x,y,24,270+dir,dmg,1);
	while(!Obj_IsDeleted(obj) && !Obj_IsEnemyIntersected(obj)){
		yield;
	}
	if(!Obj_IsDeleted(obj)){
		BulletHitEff(ObjMove_GetX(obj),ObjMove_GetY(obj),ObjMove_GetSpeed(obj)/4,ObjMove_GetAngle(obj),0,0,0,img_pl_seija_shot,BLEND_ADD_ARGB,[[20,0,0,16,48]],[1,1],[1,1],128,-128,[255,255,255],[-128,-128,0],ObjMove_GetAngle(obj)+90,0);
		Obj_Delete(obj);
	}
}