public override void OnDie()
 {
     foreach (BattleUnitModel target in BattleObjectManager.instance.GetAliveList())
     {
         Buf_AlphaSapphire.DestroyBuf(target);
     }
 }
            public static void DestroyBuf(BattleUnitModel model)
            {
                List <BattleUnitBuf> activatedBufList = model.bufListDetail.GetActivatedBufList();
                Buf_AlphaSapphire    buf = activatedBufList.Find((BattleUnitBuf x) => x is Buf_AlphaSapphire) as Buf_AlphaSapphire;
                bool flag = buf == null;

                if (!flag)
                {
                    buf.Destroy();
                }
            }
            public static void AddBuf(BattleUnitModel model)
            {
                List <BattleUnitBuf> activatedBufList = model.bufListDetail.GetActivatedBufList();
                Buf_AlphaSapphire    buf = activatedBufList.Find((BattleUnitBuf x) => x is Buf_AlphaSapphire) as Buf_AlphaSapphire;
                bool flag = buf == null;

                if (flag)
                {
                    buf       = new Buf_AlphaSapphire(model);
                    buf.stack = 1;
                    model.bufListDetail.AddBuf(buf);
                }
                else
                {
                    buf.stack = 1;
                }
            }
            public static int GetBuf(BattleUnitModel model)
            {
                List <BattleUnitBuf> activatedBufList = model.bufListDetail.GetActivatedBufList();
                Buf_AlphaSapphire    buf = activatedBufList.Find((BattleUnitBuf x) => x is Buf_AlphaSapphire) as Buf_AlphaSapphire;
                bool flag = buf == null;
                int  result;

                if (flag)
                {
                    result = 0;
                }
                else
                {
                    result = buf.stack;
                }
                return(result);
            }