
#Title[]
#Text[vYċ܁B
łɕ܂łĂ܂XyB

Փx̂͒߁B]
#Image[.\img\Refracted_Shot.png]
#BackGround[Defoult]
#BGM[bgm\bgm.wav]
#PlayLevel[]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{
    @Initialize
    {
        let SpellName = "uvY@ -" ~ TextLevel(Level) ~ "-v";	//Xy
        CutIn(YOUMU, SpellName, NULL, 0, 0, 0, 0);	//Xy錾
        SetLife(2000);			//̗
        SetTimer(60);			//
        SetScore(1356789);		//_
        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));
        }

    }

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

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

        wait(TimeToMagic);

        TRefractionControl;		//ܒeϐ̑
        SetPrisms;			//vY̐ݒuE]
        TBorderLine;			//ʒuւ̗֎~
        Secand;			//͂߂郂[VEԌo

        RefractedShot;			//ܒe̔
        TScatterShot;			//Ue
        let DmgR = [70, 60, 40, 30, 20][Level];
        SetDamageRate(DmgR, DmgR);	//퓬_[W[g
    }

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

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

    sub Secand			//͂߂郂[V
    {
        let time = TimeFirstMagic;

        Concentration01(time);
        wait(time);
    }

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

    //vYEܒe䕔
        //w߉
        #include_function".\12.Refracted_Shot\Refraction_Control.txt"

        //vY
        #include_function".\12.Refracted_Shot\Set_Prism.txt"
        #include_function".\00.Common\Refraction\Control_Prism.txt"

        //ܒe
        #include_function".\12.Refracted_Shot\Fire_Refracted_Shot.txt"
        #include_function".\00.Common\Refraction\Control_Refracted_Shot.txt"

    //UeS
    #include_function".\12.Refracted_Shot\Scatter_Shot.txt"

    //@ړW
    #include_function".\12.Refracted_Shot\Border_Line.txt"

    //
    #include_function".\00.Common\Refraction\Calculation.txt"
    #include_function".\12.Refracted_Shot\Global_Variable.txt"

}
