#TouhouDanmakufu[Stage]
#Title[CURSE 1 Vs Aya Shameimaru- Easy]
#Text[Made By Gusano2314
Easier Version for the ones who cried on the original difficulty]
#Player[.\gusano\Gusano.txt]
#ScriptVersion[2]

script_stage_main {
#include_function ".\1Config.txt"
let diff = 0;
let c = 0;
let slide = 0;
let spin = 0;
let trigger=false;
	let pointnorm=50;
	let start=0;
	let partframe=0;
	let NameOff=0;
	let headertime=460;
	let scalex=4;
	let alps=255;
	let scaley=0;
	let cx=GetCenterX;
	let cy=GetCenterY;
	let a = 0;
let CSD = GetCurrentScriptDirectory;
let boss_script = GetCurrentScriptDirectory ~ "2plurale.txt";
#include_function ".\stgframe.txt"
#include_function ".\FunctionLib.dnh"

let atardecer = GetCurrentScriptDirectory ~ "system\Noche.jpg";
let lados1 = GetCurrentScriptDirectory ~ "system\water.png";
let camino1 = GetCurrentScriptDirectory ~ "system\stage02a.png";
let arbol1 = GetCurrentScriptDirectory ~ "system\4.png";
let a = 0;
		let scale=1.4;
		let b = 0;
		let c = 0;
LoadGraphic(atardecer);
LoadGraphic(lados1);
LoadGraphic(camino1);
LoadGraphic(arbol1);
@Initialize {
	LoadGraphic(stgframe); LoadGraphic(numbers); LoadGraphic(hud);
if(STGframe_activate == 1){
	StartSTGFrame;
}
//SetShotAutoDeleteClip(0,0,0,0);
	StageEX;
}

@Finalize {
	DeleteGraphic(bg1); DeleteGraphic(bgS1); DeleteGraphic(bgS2); DeleteGraphic(cherry);
	DeleteGraphic(stgframe); DeleteGraphic(numbers); DeleteGraphic(hud); DeleteGraphic(sprite); DeleteGraphic(familiar); DeleteGraphic(cutin);
	DeleteGraphic(magiccircle); DeleteGraphic(circle); DeleteGraphic(leaf); DeleteGraphic(spellline); DeleteGraphic(spellnames); DeleteGraphic(lifebar1); DeleteGraphic(lifebar2); DeleteGraphic(deathEff);
	DeleteMusic(music1);
	DeleteSE(sePlayerShot); DeleteSE(seExtend); DeleteSE(seItem); DeleteSE(seCaution); DeleteSE(seExplode00); DeleteSE(seExplode01);
	DeleteSE(seTan00); DeleteSE(seTan01); DeleteSE(seKira00); DeleteSE(seKira01); DeleteSE(seKira02); DeleteSE(seLaser00);
	DeleteSE(seOption); DeleteSE(seOptionHide); DeleteSE(seOptionShow); DeleteSE(seCharge);
	DeleteSE(seTimer00); DeleteSE(seTimer01); DeleteSE(seDamage00); DeleteSE(seDamage01); DeleteSE(seCardCall); DeleteSE(seCardGet);
}

@MainLoop {
		yield;
partframe++;
		if(partframe%5==0 && OnEnemySpell==false){	
		}
		if(trigger==false){c +=0.05;}else if(trigger==true){c-= 0.05}
		if(c >= 80) {trigger=true}
		if(c<= -80){trigger=false}
		a += 15;					
		if(a >= 512) {				
			a -= 512;
}		
}

task StageEX {
	ExpertEx(true, 65535, 3);
	loop(120) { yield; }
	//PlayMusic(music1);
 wait(300);
  CreateEnemyBossFromFile(boss_script, 0, 0, 0, 0, 0);
WaitForNoEnemy;
wait(120);
  ClearStage;

}
//task wait(t){
//loop(t){yield;}
//}
@BackGround{
SetPerspectiveClip(0, 1500);		
		SetFog(900, 1400, 0, 0, 50);		
		SetViewTo(0, 0, -100);		
		SetViewFrom(450, 0, 90);	
		SetColor(255,255,255);

		SetAlpha(255);
		SetTexture(lados1);
SetColor(255,255,255);
SetRenderState(ALPHA);
DrawGraphic(cx,cy);
		SetGraphicRect(0, 0 - a*1.5, 762*2,512*5 - a*1.5);
//SetGraphicRect(0, 0 - a/4, 762*3, 512*5 - a/4);
		SetGraphicAngle(40, 90, 0);
		SetGraphicScale(1.3,1.2);
		DrawGraphic3D(0, -100, -75);
}
}
}