Пример #1
0
    //自身回合结束处理
    private IEnumerator SelfBoutEndHandle()
    {
        FighterData boutEndFighterData = (FighterData)_battleModel.selfData.Clone();

        Message.Send(MsgType.SELF_BOUT_END, boutEndFighterData);

        //虚无卡牌,在回合结束时消耗
        var handListCopy = new List <CardInstance>(_battleModel.GetHandList());

        foreach (var handCard in handListCopy)
        {
            CardTemplate cardTpl = CardTemplateData.GetData(handCard.tplId);
            if (cardTpl == null)
            {
                continue;
            }

            if (cardTpl.bEthereal)
            {
                _battleModel.ExhaustHandCard(handCard);
            }
        }

        //回合结束buff结算
        SettleBuffOnBoutEnd(_battleModel.selfData);

        //手牌飞入弃牌堆
        handListCopy = new List <CardInstance>(_battleModel.GetHandList());
        foreach (var handCard in handListCopy)
        {
            _battleModel.MoveHandCardToUsed(handCard);
        }
        yield return(new WaitForSeconds(AnimationTime.HAND_TO_USED));
    }