#include_function ".\AnimationLib.dnh"
#include_function ".\BGControl.txt";
let name=GetCurrentScriptDirectory~"system\name.png";
let iku= GetCurrentScriptDirectory~"images\dot_iku.png";
let iku1= GetCurrentScriptDirectory~"images\cdbg0.png";
let iku2=GetCurrentScriptDirectory~"images\cdbg1.png";
LoadGraphic(name);
LoadGraphic(iku);
LoadGraphic(iku1);
LoadGraphic(iku2);


function InitBoss{MagicCircle(false);SetEnemyMarker(true)}



function DrawBoss(char){
    CreateAnimation("Boss", "idle", 9);
    SetAnimationFrame("Boss", "idle", 0, char, 6, 0,0,128,128);
    SetAnimationFrame("Boss", "idle", 1, char, 6, 0,128,128,256);
    SetAnimationFrame("Boss", "idle", 2, char, 6, 0,256,128,384);
    SetAnimationFrame("Boss", "idle", 3, char, 6, 0,0,128,128);
    SetAnimationFrame("Boss", "idle", 4, char, 6, 0,128,128,256);
    SetAnimationFrame("Boss", "idle", 5, char, 6, 0,256,128,384);
    SetAnimationFrame("Boss", "idle", 6, char, 6, 0,0,128,128);
    SetAnimationFrame("Boss", "idle", 7, char, 6, 128,0,256,128);
    SetAnimationFrame("Boss", "idle", 8, char, 6, 128,128,256,256);

    CreateAnimation("Boss", "moveright", 2);
    SetAnimationFrame("Boss", "moveright", 0, char, 6, 256,256,384,384);
    SetAnimationFrame("Boss", "moveright", 1, char, 6, 256,384,384,512);

    CreateAnimation("Boss", "moveleft", 2);
    SetAnimationFrame("Boss", "moveleft", 0, char, 6, 256,0,384,128);
    SetAnimationFrame("Boss", "moveleft", 1,char, 6, 256,128,384,256);

    CreateAnimation("Boss", "attack0", 3);
    SetAnimationFrame("Boss", "attack0", 0, char, 6, 512,0,640,128);
    SetAnimationFrame("Boss", "attack0", 1,char, 6, 512,128,640,256);
    SetAnimationFrame("Boss", "attack0", 2,char, 6, 512,256,640,384);

    CreateAnimation("Boss", "attack1", 3);
    SetAnimationFrame("Boss", "attack1", 0, char, 6, 640,0,768,128);
    SetAnimationFrame("Boss", "attack1", 1,char, 6, 640,128,768,256);
    SetAnimationFrame("Boss", "attack1", 2,char, 6, 640,256,768,384);

    CreateAnimation("Boss", "attack2start", 3);
    SetAnimationFrame("Boss", "attack2start", 0, char, 6, 768,0,896,128);
    SetAnimationFrame("Boss", "attack2start", 1,char, 6, 768,128,896,256);
    SetAnimationFrame("Boss", "attack2start", 2,char, 6, 768,256,896,384);

    CreateAnimation("Boss", "attack2in", 2);
    SetAnimationFrame("Boss", "attack2in", 0, char, 6, 768,384,896,512);
    SetAnimationFrame("Boss", "attack2in", 1,char, 6, 896,0,1024,128);

    CreateAnimation("Boss", "attack2end", 3);
    SetAnimationFrame("Boss", "attack2end", 0, char, 6, 896,128,1024,256);
    SetAnimationFrame("Boss", "attack2end", 1,char, 6, 896,256,1024,384);
    SetAnimationFrame("Boss", "attack2end", 2,char, 6, 896,384,1024,512);
}


///////////////BOSSES BACKGROUND////////////////
function IkuBG{
SetAlpha(255);
SetGraphicAngle(0,0,0);
SetGraphicScale(1,1);
BgScroll(iku1, 0, 0);
BgScrollEx2(iku2, -1, -1, 1, 150);


}


///////////////////////////LALALA///////////////////////////////
  function Wait(t){
    loop(t){yield;}
  }

