Ejemplo n.º 1
0
    public static void Btl2dStatReq(BTL_DATA pBtl)
    {
        Byte   b             = 0;
        UInt16 fig_stat_info = pBtl.fig_stat_info;

        if (pBtl.bi.disappear == 0)
        {
            if ((fig_stat_info & 1) != 0)
            {
                BTL2D_ENT btl2D_ENT = btl2d.Btl2dReqHP(pBtl, pBtl.fig_regene_hp, (UInt16)(((fig_stat_info & 8) == 0) ? 192 : 0), 0);
                btl2D_ENT.NoClip = 1;
                btl2D_ENT.Yofs   = -12;
                b = 4;
            }
            if ((fig_stat_info & 2) != 0)
            {
                BTL2D_ENT btl2D_ENT = btl2d.Btl2dReqHP(pBtl, pBtl.fig_poison_hp, 0, b);
                btl2D_ENT.NoClip = 1;
                btl2D_ENT.Yofs   = -12;
                b = (Byte)(b + 4);
            }
            if ((fig_stat_info & 4) != 0)
            {
                BTL2D_ENT btl2D_ENT = btl2d.Btl2dReqMP(pBtl, pBtl.fig_poison_mp, 0, b);
                btl2D_ENT.NoClip = 1;
                btl2D_ENT.Yofs   = -12;
            }
        }
        pBtl.fig_stat_info = 0;
        pBtl.fig_regene_hp = 0;
        pBtl.fig_poison_hp = 0;
        pBtl.fig_poison_mp = 0;
    }
Ejemplo n.º 2
0
    public static BTL2D_ENT Btl2dReqSymbol(BTL_DATA pBtl, Byte pNum, UInt16 pCol, Byte pDelay)
    {
        BTL2D_ENT freeEntry = btl2d.GetFreeEntry(pBtl);

        freeEntry.Type           = 2;
        freeEntry.Delay          = pDelay;
        freeEntry.Work.Num.Color = pCol;
        freeEntry.Work.Num.Value = pNum;
        return(freeEntry);
    }
Ejemplo n.º 3
0
    public static BTL2D_ENT GetFreeEntry(BTL_DATA pBtl)
    {
        FF9StateBattleSystem ff9Battle      = FF9StateSystem.Battle.FF9Battle;
        BTL2D_WORK           btl2d_work_set = ff9Battle.btl2d_work_set;
        Int16 num = (Int16)(btl2d_work_set.NewID - 1);

        if (num < 0)
        {
            num = 15;
        }
        btl2d_work_set.NewID = num;
        BTL2D_ENT btl2D_ENT = btl2d_work_set.Entry[num];

        btl2D_ENT.BtlPtr = pBtl;
        btl2D_ENT.Cnt    = 0;
        btl2D_ENT.Delay  = 0;
        btl2D_ENT.trans  = pBtl.gameObject.transform.GetChildByName("bone" + pBtl.tar_bone.ToString("D3"));
        Vector3   position   = btl2D_ENT.trans.position;
        BTL2D_ENT btl2D_ENT2 = btl2D_ENT;

        btl2D_ENT2.Yofs          = (SByte)(btl2D_ENT2.Yofs + 4);
        btl2D_ENT.trans.position = position;
        return(btl2D_ENT);
    }
Ejemplo n.º 4
0
    public static void Btl2dMain()
    {
        FF9StateBattleSystem ff9Battle      = FF9StateSystem.Battle.FF9Battle;
        BTL2D_WORK           btl2d_work_set = ff9Battle.btl2d_work_set;
        Int16 num = btl2d_work_set.NewID;

        for (Int16 num2 = 0; num2 < 16; num2 = (Int16)(num2 + 1))
        {
            BTL2D_ENT btl2D_ENT = btl2d_work_set.Entry[num];
            if (btl2D_ENT.BtlPtr != null)
            {
                if (btl2D_ENT.Type > 2)
                {
                    btl2D_ENT.BtlPtr = null;
                }
                else if (btl2D_ENT.Delay != 0)
                {
                    BTL2D_ENT btl2D_ENT2 = btl2D_ENT;
                    btl2D_ENT2.Delay = (Byte)(btl2D_ENT2.Delay - 1);
                }
                else
                {
                    String text = String.Empty;
                    HUDMessage.MessageStyle style = HUDMessage.MessageStyle.DAMAGE;
                    if (btl2D_ENT.Type == 0)
                    {
                        if (btl2D_ENT.Work.Num.Color == 0)
                        {
                            style = HUDMessage.MessageStyle.DAMAGE;
                        }
                        else
                        {
                            style = HUDMessage.MessageStyle.RESTORE_HP;
                        }
                        text = btl2D_ENT.Work.Num.Value.ToString();
                    }
                    else if (btl2D_ENT.Type == 1)
                    {
                        if (btl2D_ENT.Work.Num.Color == 0)
                        {
                            style = HUDMessage.MessageStyle.DAMAGE;
                        }
                        else
                        {
                            style = HUDMessage.MessageStyle.RESTORE_MP;
                        }
                        text = btl2D_ENT.Work.Num.Value.ToString() + " " + Localization.Get("MPCaption");
                    }
                    else if (btl2D_ENT.Type == 2)
                    {
                        if (btl2D_ENT.Work.Num.Value == 0u)
                        {
                            text  = Localization.Get("Miss");
                            style = HUDMessage.MessageStyle.MISS;
                        }
                        else if (btl2D_ENT.Work.Num.Value == 1u)
                        {
                            text  = Localization.Get("Death");
                            style = HUDMessage.MessageStyle.DEATH;
                        }
                        else if (btl2D_ENT.Work.Num.Value == 2u)
                        {
                            text  = Localization.Get("Guard");
                            style = HUDMessage.MessageStyle.GUARD;
                        }
                        else if (btl2D_ENT.Work.Num.Value == 3u)
                        {
                            text  = NGUIText.FF9YellowColor + Localization.Get("Critical") + "[-] \n " + text;
                            style = HUDMessage.MessageStyle.CRITICAL;
                        }
                    }
                    Singleton <HUDMessage> .Instance.Show(btl2D_ENT.trans, text, style, new Vector3(0f, btl2D_ENT.Yofs, 0f), 0);

                    UIManager.Battle.DisplayParty();
                    btl2D_ENT.BtlPtr = null;
                }
            }
            num = (Int16)(num + 1);
            if (num >= 16)
            {
                num = 0;
            }
        }
        btl2d.Btl2dStatCount();
        if (SFX.GetEffectJTexUsed() == 0)
        {
            btl2d.Btl2dStatIcon();
        }
        BTL2D_WORK btl2D_WORK = btl2d_work_set;

        btl2D_WORK.Timer = (UInt16)(btl2D_WORK.Timer + 1);
        Byte b = Byte.MaxValue;

        for (BTL_DATA next = ff9Battle.btl_list.next; next != null; next = next.next)
        {
            if (next.bi.disappear == 0)
            {
                b = (Byte)(b & (Byte)(~(Byte)next.btl_id));
            }
        }
        btl2d_work_set.OldDisappear = b;
    }
Ejemplo n.º 5
0
    public static void Btl2dReq(BTL_DATA pBtl)
    {
        Byte   b        = 0;
        UInt16 fig_info = pBtl.fig_info;

        if (pBtl.bi.disappear == 0)
        {
            if ((fig_info & 256) != 0)
            {
                btl_para.SetTroubleDamage(new BattleUnit(pBtl));
            }
            if ((fig_info & 128) != 0)
            {
                btl2d.Btl2dReqSymbol(pBtl, 2, 0, 0);
            }
            else if ((fig_info & 96) != 0)
            {
                if ((fig_info & 32) != 0)
                {
                    btl2d.Btl2dReqSymbol(pBtl, 0, 0, 0);
                    b = 2;
                }
                if ((fig_info & 64) != 0)
                {
                    btl2d.Btl2dReqSymbol(pBtl, 1, 0, b);
                }
            }
            else
            {
                if ((fig_info & 1) != 0)
                {
                    if ((fig_info & 4) != 0)
                    {
                        BTL2D_ENT btl2D_ENT = btl2d.Btl2dReqSymbol(pBtl, 3, 128, 0);
                        b = 2;
                    }
                    if ((fig_info & 2) != 0)
                    {
                        btl2d.Btl2dReqHP(pBtl, pBtl.fig, 192, b);
                    }
                    else
                    {
                        btl2d.Btl2dReqHP(pBtl, pBtl.fig, 0, b);
                    }
                    b = (Byte)(b + 4);
                }
                if ((fig_info & 8) != 0)
                {
                    if ((fig_info & 16) != 0)
                    {
                        btl2d.Btl2dReqMP(pBtl, pBtl.m_fig, 192, b);
                    }
                    else
                    {
                        btl2d.Btl2dReqMP(pBtl, pBtl.m_fig, 0, b);
                    }
                }
            }
        }
        pBtl.fig_info = 0;
        pBtl.fig      = 0;
        pBtl.m_fig    = 0;
    }