Ejemplo n.º 1
0
 public void ShouKanPincer()
 {
     //上场大杀四方
     if (!BuffContrllor.ContainEffect(this, eBuff_Effect.Attack_BAN))
     {
         CheckPincer(0);
     }
 }
Ejemplo n.º 2
0
    //走棋
    virtual public void moveChess(Chess moving_chess, ChessContainer targetContainer, bool trigger_strike)
    {
        /*  移动耗牌
         * if (Data.MOVE_COST_HANDCARD)
         * {
         * CardContainer cdc;
         * GameObject[] cdcs;
         * ArrayList hand;
         * if (turn_player == ePlayer.Player1)
         * {
         * cdc = cardcont_p1[0].GetComponent<CardContainer>();
         * cdcs = cardcont_p1;
         * hand = player_1.hand_cards;
         * } else
         * {
         * cdc = cardcont_p2[0].GetComponent<CardContainer>();
         * cdcs = cardcont_p2;
         * hand = player_2.hand_cards;
         * }
         * if (cdc.gameObject.transform.childCount <= 0)
         * {
         * return;
         * }
         * Card card = cdc.gameObject.transform.GetChild(0).gameObject.GetComponent<Card>();
         * if (!judgeSelectCard(card))
         * return;
         * removeCard(card);
         * setHand(hand, cdcs);
         * }*/

        moving_chess.container.removeChess();
        targetContainer.appendChess(moving_chess);

        //驱散迷雾 随设计改变而无效
        //BKTools.FogLift(moving_chess.container.number, moving_chess.attribute.spd + GameRule.Default_PvE_Fog_Lift_Range, GameRule.Default_PvE_Fog_Lift_Range, new int[] { (int)moving_chess.belong });
        //攻击
        if (trigger_strike && !BuffContrllor.ContainEffect(moving_chess, eBuff_Effect.Attack_BAN))
        {
            moving_chess.CheckStrike(0);
        }
        //卡牌信息显示
        Main.Inst.clearCardInfo();
        //TODO 流程控制更新
        //		Main.Instance.b_setchess = true;
        //		Main.Instance.now_phase = ePhase.Battle;
        //		Main.Instance.b_phase_trigger = true;//从战斗阶段往主要阶段2

        //清除移动操作暴击
        Main.Inst.b_moving_chess = false;        //应该已经没用了
        Chess.clear_Moveable_Area();
        //清理所有移动标记(上面谁写的,都是错别字!
        foreach (var item in Main.Inst.chess_grids)
        {
            item.Value.clearMoveFlag();
        }

        CheckMoveEvent(moving_chess, nextPhaseDefault);
    }
Ejemplo n.º 3
0
    IEnumerator CheckLineCoroutine(float delay, bool isStrike)
    {
        Main.Inst.addDancer("checkline");
        yield return(new WaitForSeconds(delay));

        ArrayList search_list = new ArrayList();
        ArrayList result_list = new ArrayList();
        bool      check       = false;
        Chess     partner     = null;

        Main.Inst.b_battbe_phase_pincer_over = true;//偷懒 如果有夹击会自动取消
        for (int i = 0; i < 6; i++)
        {
            check = Main.Inst.dPincers[i](this, belong, ref search_list, ref partner, ref result_list, isStrike);
            if (isStrike)
            {
                partner = this;
            }


            if (search_list.Count > 0 && check)
            {
                if (!BuffContrllor.ContainEffect(partner, eBuff_Effect.Attack_BAN))
                {
                    StartCoroutine(play_pincer_attack(search_list, partner));
                }
            }
            search_list.Clear();
            check = false;
        }
        //         if (result_list.Count>0){
        //             StartCoroutine(OppoList(result_list, partner));
        //             yield return new WaitForSeconds(1);
        //         }
        search_list.Clear();
        result_list.Clear();
        //夹击结束标志,必须等待夹击完成
        //Main.Instance.battbe_phase_pincer_over = true;
        Main.Inst.redDancer("checkline");
        yield return(null);
    }
Ejemplo n.º 4
0
    virtual public void StartMoveChess(Chess c)
    {
        //if (Main.Inst.Action_Chance>0)
        //{
        //TODO overlay
        //当被施加不可移动BUFF时跳出
        if (BuffContrllor.ContainEffect(c, eBuff_Effect.Move_BAN))
        {
            return;
        }

        Main.Inst.setCardInfo(c.attribute.card_id, c);
        if (c.belong != Main.Inst.turn_player)
        {
            return;
        }

        Chess.clear_Moveable_Area();
        c.show_movable_area();
        Main.Inst.b_moving_chess = true;
        Main.Inst.moving_chess   = c;
        Main.Inst.showUnmovableArea(Main.Inst.turn_player);
        //}
    }