/// <summary>
        ///  重写use 在目标玩家的所有牌中选择一张 删除
        /// </summary>
        /// <param name="AbstractPlayer"></param>
        public new void Use(AbstractPlayer p, List <AbstractPlayer> players)
        {
            base.Use(p, players);
            // 触发技能
            p.GetTrigger().AfterMagic();

            // 如果无懈,则return
            AskWuXieKeJi(p, players);
            if (isWuXie)
            {
                //ViewManagement.getInstance().printBattleMsg(GetName() + "无效");
                //ViewManagement.getInstance().refreshAll();
                return;
            }
            if (p.GetState().IsAI())
            {
                AbstractPlayer target = players.ElementAt(0);
                if (target.GetState().GetCardList().Count() > 0)
                {
                    AbstractCard c = target.GetState().GetCardList().ElementAt(0);
                    target.GetAction().RemoveCard(c);
                    c.Gc();
                    //ModuleManagement.getInstance().getBattle().addOneCard(c);
                    p.RefreshView();
                    target.RefreshView();
                }
            }
            else
            {
                // pc = (Panel_Control)p.getPanel();
                //ps = new Panel_SelectCard(p, targetPlayers.ElementAt(0),
                //        Panel_SelectCard.CHAI);
                //// 显示选择面板等待处理
                //try {
                //    SwingUtilities.invokeAndWait(run);
                //} catch (InterruptedException e) {
                //    e.printStackTrace();
                //} catch (InvocationTargetException e) {
                //    e.printStackTrace();
                //}
            }
        }
Beispiel #2
0
 /// <summary>
 /// 判定触发
 /// 参数1:判定牌
 /// 参数2:判定结果
 /// </summary>
 /// <param name="c"></param>
 /// <param name="result"></param>
 public void afterCheck(AbstractCard c, bool result)
 {
     c.Gc();
 }