
#Title[]
#Text[ˁBǂɔ˂邩͗\H

ϋvXyB]
#Image[.\img\Diffused_Reflection.png]
#BackGround[Defoult]
#BGM[bgm\bgm.wav]
#PlayLevel[]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{
    @Initialize
    {
        let SpellName = "uꕑq -" ~ TextLevel(Level) ~ "-v";	//Xy
        CutIn(YOUMU, SpellName, NULL, 0, 0, 0, 0);	//Xy錾
        SetLife(2000);			//̗
        SetTimer([30, 35, 35, 40, 60][Level]);	//
        SetScore(rand(12345678, 87654321));	//_
        SetDamageRate(0, 0);		//_[WBo܂ł͖G?

        LoadGraphic(imgBoss);
        SetTexture(imgBoss);
        SetGraphic0;

        TMain;
    }


    @MainLoop
    {
        //G@̒eE@ւ̓蔻Ȃ

        yield;
    }


    @DrawLoop
    {
        DrawGraphic(GetX, GetY);	//G@̕`
    }


    @Finalize
    {
        DeleteGraphic(imgBoss);

        loop(12 * (Level + 1))		//o}L͑؁B
        {
            CreateItem(ITEM_SCORE, GetX + rand(-32, 32), GetY + rand(-32, 32));
        }

    }

    task TMain
    {
        SetDurableSpellCard;		//ϋveݒ
        SetAlpha(96);			//
        if( !debug ) {Expert;}		//ReBj[EfobOL[
        yield;

        First;				//ʒuւ̈ړ

        Mirror;		        	//˃[U[
        TAddReflectedShot;		//˒e̐
        OuterShot;			//Oe̐Bincluded
    }

    sub First			//ʒuւ̈ړ
    {
        let time = TimeToApply;
        let x = GetCenterX;
        let y = [GetClipMinY + 128, GetCenterY][[0, 0, 0, 1, 1][Level]];

        SetMovePosition02(x, y, time);
        SetGraphicM;
        wait(time);
        SetGraphic0;
    }



    //Oψ
    #include_function".\01.common.txt"

    //ˋW
    #include_function".\13.Diffused_Reflection\Mirror.txt"

   //˒eW
    #include_function".\13.Diffused_Reflection\Add_Reflected_Shot.txt"
    #include_function".\00.Common\Reflection\Control_Reflected_Shot.txt"

     //OeW
    #include_function".\13.Diffused_Reflection\Outer_Shot.txt"
    #include_function".\00.Common\Reflection\Create_Outer_Shot.txt"

    //W
    #include_function".\13.Diffused_Reflection\Global_Variable.txt"

}
