//Music
let MU1a=("script\Music\Stage 1.mp3"); let MU2a=("script\Music\Stage 2.mp3"); let MU3a=("script\Music\Stage 3.mp3");
let MU4a=("script\Music\Stage 4.mp3"); let MU5a=("script\Music\Stage 5.mp3"); let MU6a=("script\Music\Stage 6.mp3");
let MU7a=("script\Music\Stage Extra.mp3"); let MU8a=("script\Music\Stage Nightmare.mp3");
let MU1b=("script\Music\Boss 1.mp3"); let MU2b=("script\Music\Boss 2.mp3"); let MU3b=("script\Music\Boss 3.mp3");
let MU4b=("script\Music\Boss 4.mp3"); let MU5b=("script\Music\Boss 5.mp3"); let MU6b=("script\Music\Boss 6.mp3");
let MU7b=("script\Music\Boss Extra.mp3"); let MU8b=("script\Music\Boss Nightmare.mp3");
let MUmain=("script\Music\Main Menu.mp3");
let MUtrump=("script\Music\Trump Card.mp3");
let MUcredits=("script\Music\Credits.mp3");

//Sounds
let SEextralife=("script\SoundEffects\extralife.wav");
let SEpowerup=("\script\SoundEffects\itempowerup.wav");
let SEmaxpower=("\script\SoundEffects\itemmaxpower.wav");

//Boss Graphics
let GRkurumi=("\script\Images\CharacterSprites\Kurumi.png");
let GRhotaru=("\script\Images\CharacterSprites\Hotaru.png");
let GRtomoko=("\script\Images\CharacterSprites\Tomoko.png");
let GRsetsuko=("\script\Images\CharacterSprites\Setsuko.png");
let GRayano=("\script\Images\CharacterSprites\Ayano.png");
let GRmidori=("\script\Images\CharacterSprites\Midori.png");
let GRtomomi=("\script\Images\CharacterSprites\Tomomi.png");
let GRyouko=("\script\Images\CharacterSprites\Youko.png");
let GRamaya=("\script\Images\CharacterSprites\Amaya.png");
let GRsayuri=("\script\Images\CharacterSprites\Sayuri.png");
let GRmai=("\script\Images\CharacterSprites\Mai.png");
let GRharuna=("\script\Images\CharacterSprites\Haruna.png");
let GRtakeo=("\script\Images\CharacterSprites\Takeo.png");
let GRmasahiro=("\script\Images\CharacterSprites\Masahiro.png");
let GRryo=("\script\Images\CharacterSprites\Ryo.png");
let GRshinichi=("\script\Images\CharacterSprites\Shinichi.png");
let GRnanami=("\script\Images\CharacterSprites\Nanami.png");
let GRwitches=("\script\Images\CharacterSprites\Witches.png");
let GRempty=("\script\Images\CharacterSprites\Empty.png");

//General Variables
let miny=GetClipMinY; let maxy=GetClipMaxY; let minx=GetClipMinX; let maxx=GetClipMaxX;
let cx=GetCenterX; let cy=GetCenterY;
let frame=0; let time=0; let wait=0;
let loaddata=0; let stageloaded=0;

//Main menu Variables
let mainmenu=1; //1=main screen 2=character select 3=spell practise 4=high score

//Stage Variables
let stage=0;
let phase=0; let stagephase=0; let nextphase=0;
let enemyx=0; let enemyy=0; let enemiescalled=0;
let topbar=0; let sidebar=0; let topbarmove=0; let sidebarmove=0;
let stageintrowait=0; let intro=0;

//Boss Movement Variables
let boss1=0; let accel1=0; let radius1=0;
let movecounter1=0; let movetime1=0; let moved1=false;
let boss1ani=0;
let boss1oldx=0; let boss1oldy=0;
let boss2=0; let accel2=0; let radius2=0;
let movecounter2=0; let movetime2=0; let moved2=false;
let boss2ani=0;
let boss2oldx=0; let boss2oldy=0;
let outfit1=1; let outfit2=1;

//Framework Data
let frameloaded=0;
let framework=0;
let framelives=0; let lifecounter=[];
let framepower=0; let powercounter=[];
let framemaxpower=0; let maxpowercounter=[];
let framebombs=0; let bombcounter=[];
let framepoints=0; let pointcounter=[];
let framemaxpoints=0; let maxpointcounter=[];
let framegraze=0; let grazecounter=[];
let framescore=0; let scorecounter=[];
let framehighscore=0; let highscorecounter=[];
let points=0;
let framestagebar=0;
let framedifficultybar=0;

//Framework Graphics
let GRframe1=("\script\Images\OtherEffects\Framework1.png");
let GRframe2=("\script\Images\OtherEffects\Framework2.png");
let GRblack=("\script\Images\OtherEffects\Wall.png");
let GRpowerbar=("\script\Images\OtherEffects\Powerbar.png");
let GRstagebar=("\script\Images\OtherEffects\StageBar.png");
let GRdifficultybar=("\script\Images\OtherEffects\DifficultyBar.png");
let GRcontinued=("\script\Images\OtherEffects\Continued.png");

//Background Data
let bgphase=0;
let hscroll=0; let vscroll=0; let scroll=0;
let scrollon=0; let scrollspeed=0;

let viewx=0; let newviewx=viewx; let viewy=0; let newviewy=viewy;
let viewanglexy=0; let viewradiusxy=0; let viewaccelxy=0; let viewspeedxy=0;
let viewmovetimexy=0; let viewmaxtimexy=0; let viewcounterxy=0;

let viewh=0; let newviewh=viewh; let viewv=0; let newviewv=viewv;
let viewanglehv=0; let viewradiushv=0; let viewaccelhv=0; let viewspeedhv=0;
let viewmovetimehv=0; let viewmaxtimehv=0; let viewcounterhv=0;
let basev=0;

//Powerbar Data
let EFpowerbar1=0; let EFpowerbar2=0; let EFpowerbar3=0;
let colorR=0; let colorG=0; let colorB=0; let poweredup=0;
let powerx=0; let maxpower=0; let powerdecrease=8; 
let deathtime=0;

//Other
let instage=false; // enables backgrounds
let guiloaded=false; // loads boss sprites, everything on the right
let EFblack=0; // the black cover during loading/credits/etc
let EFcontinued=0; // shows continued warning
let blackscreenalpha=0; // from the above
let absolutetime=0;
let oldscore=0;
let quittimer=0; //countdown to quit stage practise when holding C