public override async Task Process(BattleEventArgs arg)
        {
            AttackEventArgs e = arg as AttackEventArgs;

            string[] array = e.Skill.Item.Summonid.Split(new char[]
            {
                ','
            });
            e.Attacker.FaceTo(e.Point.transform.position);
            this.damageInfo             = this.CreateDamageInfo(e.Attacker, e.Defender, e.Skill);
            this.damageInfo.FloorEffect = e.Point.gameObject;
            await 0.1f;
            for (int i = 0; i < array.Length; i++)
            {
                string summonid = array[i];
                this.manager.GetCellNearestCamera();
                WuxiaCell point = e.Point;
                WuxiaUnit unit  = this.manager.AddUnit(summonid, e.Attacker.faction, (i == 0) ? point.CellNumber : -2, false);
                unit.Actor.transform.localScale = new Vector3(1.5f, 1.5f, 1.5f);
                unit.transform.forward          = e.Attacker.transform.forward;
                unit.gameObject.OnTerrain(unit.transform.position);
                unit.gameObject.SetActive(false);
                this.summonUnits.Add(unit);
                unit.OnTurnStart();
                // 半即时支持
                if (HookInitiactiveBattle.bTimed)
                {
                    HookInitiactiveBattle.Timed_EncourageUnit(unit);
                }
            }
            await 0.1f;
            if (GameConfig.IsSkipSkillEffect)
            {
                this.ProcessAnimationTrack(this.damageInfo);
            }
            else
            {
                Task <float> attackEventTime = this.ProcessAnimation(this.damageInfo, 0f);
                await        attackEventTime;
                await attackEventTime.Result;
            }
            base.ProcessSkillMPCost(e);
            if (e.Attacker[BattleLiberatedState.No_CoolDown] == 0)
            {
                e.Skill.CurrentCD = e.Skill.MaxCD;
            }
        }
        public static bool TimedPatch_End1(EndUnit __instance)
        {
            Console.WriteLine("EndUnit.OnEnable()");
            var t        = Traverse.Create(__instance);
            var selected = t.Property("SelectedUnit");

            if (bTimed && UnitWantWait)   // 处理等待
            {
                UnitWantWait = false;     // 重置等待
                Timed_WaitUnit();
                UpdateTimedUI();
                FSM.UI.CloseMenu();
                FSM.UI.CloseUnitInfo();
                WuxiaUnit wuxiaUnit = Timed_Current();
                if (wuxiaUnit != null && wuxiaUnit.faction == Faction.Player)
                {
                    t.Method("FirstUnitSelect").GetValue();//__instance.FirstUnitSelect();
                    __instance.SendEvent("FINISHED");
                    return(false);
                }
                //__instance.SelectedUnit = null;
                selected.SetValue(null);
                __instance.SendEvent("ENDTURN");
                return(false);
            }
            BM.Time = BattleEventToggleTime.EndUnit;
            BM.OnBattleEvent(BattleEventToggleTime.EndUnit, Array.Empty <object>());
            FSM.UI.CloseMenu();
            FSM.UI.CloseUnitInfo();
            if (!BM.IsEvent)
            {
                if (selected.GetValue <WuxiaUnit>() != null)
                {
                    WuxiaUnit selectedUnit = selected.GetValue <WuxiaUnit>();
                    if (selectedUnit != null)
                    {
                        selectedUnit.OnUnitEnd();
                    }
                    WuxiaUnit selectedUnit2 = selected.GetValue <WuxiaUnit>();
                    if (selectedUnit2 != null)
                    {
                        selectedUnit2.OnTurnEnd();
                    }
                    if (selected.GetValue <WuxiaUnit>()[BattleLiberatedState.InfiniteAction] > 0)
                    {
                        WuxiaUnit selectedUnit3 = selected.GetValue <WuxiaUnit>();
                        if (selectedUnit3 != null)
                        {
                            selectedUnit3.OnTurnStart();
                        }
                    }
                    if (selected.GetValue <WuxiaUnit>()[BattleLiberatedState.Encourage] > 0)
                    {
                        WuxiaUnit selectedUnit4 = selected.GetValue <WuxiaUnit>();
                        if (selectedUnit4 != null)
                        {
                            selectedUnit4.OnTurnStart();
                        }
                    }
                    selected.GetValue <WuxiaUnit>().OnBufferEvent(BufferTiming.EndUnit);
                }
                t.Method("OnUnitEnd").GetValue();//this.OnUnitEnd();
            }
            return(false);
        }