
#Title[v攽]
#Text[Aˎ̎@_B

Normal`Hard̎@_3way
éA1炵Ă
ȂB(Lunaticł2)
A˂ƒr[
ɕUăvC[ɏP
B]
#Image[.\img\Reflected_Shot.png]
#BackGround[Defoult]
#BGM[bgm\bgm.wav]
#PlayLevel[]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{
    @Initialize
    {
        let SpellName = "uReflected Attack -" ~ TextLevel(Level) ~ "-v";	//Xy
        CutIn(YOUMU, SpellName, NULL, 0, 0, 0, 0);	//Xy錾
        SetLife(2000);			//̗
        SetTimer(60);			//
        SetScore(9876789);		//_
        SetDamageRate(0, 0);		//_[WBo܂ł͖G?

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

        TMain;
    }


    @MainLoop
    {
        SetCollisionA(GetX, GetY, 32);	//eւ̓蔻
        SetCollisionB(GetX, GetY, 16);	//@ւ̓蔻

        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));
        }

    }

 /*nT
*
*T1 o
*
*T2 ˋE@ǔ
*
*T3 ΂܂Jn
*loop
*{
*    T3 ˏ
*    T3 ˋ]Jn
*
*    T4 G@ړ
*
*    T5 G@~
*
*    T6 xƎ
*
*    T7 C
*    T7 ˋ~
*}
*
*荞ݏ
*TX lpA`΍
*/

    task TMain
    {
        if( !debug ) {Expert;}		//ReBj[EfobOL[
        yield;

        First;				//ʒuւ̈ړ
        SetDamageRate(5, 5);

        wait(TimeToMakeMirror);

        Mirror;			//ˋ̐B
        wait(TimeMirrorDelay);
 
        TScatterShot;			//΂܂
        let DmgR = [90, 80, 60, 60, 40][Level];
        SetDamageRate(DmgR, DmgR);

        loop
        {
            SetOrder;			//ˏ̌
            LockMirror = false;		//ˋ]Jn

            wait(TimeRotateToMove);

            EnemyMove;			//G@ړ

            wait(TimeMoveStopToWaning);

            WarnigLaser;			//xp[U[

            MainShot;			//C
            LockMirror = true;		//ˋŒ

            wait(TimeRestartRotate);
        }
    }

    sub First			//ʒuւ̈ړ
    {
        let time = TimeBossApply;
        let x = GetCenterX;
        let y = GetClipMinY + 64;

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

    //ˏ̐ݒ
    sub SetOrder
    {
        let n = length(ListMirrors);	//ˋ̐
        let order = NumberSelect(n + 1);	//ˋ̏̌
        if(order[0] == n)			//ˋ̏̕␳
        {
            order[0] = order[n];
            order[n] = n;
        }
        ReflectOrder = order;		//O[oϐ
    }


    //tH_F22.Reflected_ShotȂO[oϐ
    //gpO[oϐFȂ
    //o̓O[oϐFLockMirror

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

    //C֘AǗ
        //C
        #include_function".\22.Reflected_Shot\Main_Shot.txt"
        #include_function".\00.Common\Lock_with_Mirror\Control_Main_Shot.txt"

        //ˋ
        #include_function".\22.Reflected_Shot\Mirror.txt"
        #include_function".\00.Common\Lock_with_Mirror\Control_Mirror.txt"

        //xƎˉ
        #include_function".\22.Reflected_Shot\Warning_Laser.txt"
        #include_function".\00.Common\Lock_with_Mirror\Control_Warning_Laser.txt"

    //UeW
    #include_function".\22.Reflected_Shot\Scatter_Shot.txt"

    //G@S
    #include_function".\22.Reflected_Shot\Enemy_Move.txt"

    //
    #include_function".\00.Common\Lock_with_Mirror\Calculation.txt"
    #include_function".\22.Reflected_Shot\Global_Variable.txt"
}

  
