script_enemy_main {
	let fairyImage = GetCurrentScriptDirectory~"fairy.png";
	let foeImage = GetCurrentScriptDirectory~"foe.png";
	@Initialize {
		if(GetPlayerType==USER_PLAYER) { RaiseError("Why are you using this player","Error"); }
		SetLife(30);
		SetDamageRate(150, 50);
		SetTimer(35);
	}
	let frame = rand(0,20);
	let frame2 = 0;
	@MainLoop {
		SetCollisionA(GetX, GetY, 30);
		SetCollisionB(GetX, GetY, 20);
		frame++;
		if(GetArgument[1] > 0) { frame2++; }
		if(frame >= 20) {
			let a = GetAngleToPlayer;
			loop(7) {
				ascent(i in 0..4) { CreateShot01(GetX, GetY, 3+i, a, RED01+GetArgument[0], 10); }
				a+=360/7;
			}
			frame = 0;
		}
		if(frame2 == 60) {
			SetSpeed(15);
			SetAngle(GetAngleToPlayer);
		}
	}
	@DrawLoop {
		SetTexture(foeImage);
		SetGraphicRect(0, 0, 128, 128);
		SetGraphicScale(1, 1);
		SetGraphicAngle(0, 0, 0);
		SetAlpha(255);
		DrawGraphic(GetX, GetY);
	}
	@Finalize {
		loop(20) {
			CreateShot01(GetX, GetY, rand(3,6), rand(0,360), WHITE03, 0);
		}
	}
}