/// <summary>
        /// 去除死去随从
        /// </summary>
        /// <param name="evt"></param>
        /// <param name="本方对方标识"></param>
        /// <returns></returns>
        public List <MinionCard> ClearDead(BattleEventHandler evt, bool 本方对方标识)
        {
            //必须是当前的随从,不能使编号
            //如果是沉默状态的随从,无亡语效果!
            List <MinionCard> DeadList = new List <MinionCard>();
            var CloneMinions           = new MinionCard[SystemManager.MaxMinionCount];
            int ALive = 0;

            for (int i = 0; i < SystemManager.MaxMinionCount; i++)
            {
                if (BattleMinions[i] != null)
                {
                    if (BattleMinions[i].生命值 > 0)
                    {
                        CloneMinions[ALive] = BattleMinions[i];
                        ALive++;
                    }
                    else
                    {
                        DeadList.Add(BattleMinions[i]);
                        evt.事件池.Add(new EventCard.全局事件()
                        {
                            触发事件类型 = EventCard.事件类型枚举.死亡,
                            触发位置   = BattleMinions[i].战场位置,
                        });
                    }
                }
            }
            BattleMinions = CloneMinions;
            for (int i = 0; i < MinionCount; i++)
            {
                BattleMinions[i].战场位置.位置     = i + 1;
                BattleMinions[i].战场位置.本方对方标识 = 本方对方标识;
            }
            return(DeadList);
        }
Esempio n. 2
0
 /// <summary>
 /// 去除死去随从
 /// </summary>
 /// <param name="evt"></param>
 /// <param name="本方对方标识"></param>
 /// <returns></returns>
 public List<MinionCard> ClearDead(BattleEventHandler evt, bool 本方对方标识)
 {
     //必须是当前的随从,不能使编号
     //如果是沉默状态的随从,无亡语效果!
     List<MinionCard> DeadList = new List<MinionCard>();
     var CloneMinions = new MinionCard[SystemManager.MaxMinionCount];
     int ALive = 0;
     for (int i = 0; i < SystemManager.MaxMinionCount; i++)
     {
         if (BattleMinions[i] != null)
         {
             if (BattleMinions[i].生命值 > 0)
             {
                 CloneMinions[ALive] = BattleMinions[i];
                 ALive++;
             }
             else
             {
                 DeadList.Add(BattleMinions[i]);
                 evt.事件池.Add(new EventCard.全局事件()
                 {
                     触发事件类型 = EventCard.事件类型枚举.死亡,
                     触发位置 = BattleMinions[i].战场位置,
                 });
             }
         }
     }
     BattleMinions = CloneMinions;
     for (int i = 0; i < MinionCount; i++)
     {
         BattleMinions[i].战场位置.位置 = i + 1;
         BattleMinions[i].战场位置.本方对方标识 = 本方对方标识;
     }
     return DeadList;
 }