當前位置: 首頁>>代碼示例>>C#>>正文


C# Board.GetCard方法代碼示例

本文整理匯總了C#中Board.GetCard方法的典型用法代碼示例。如果您正苦於以下問題:C# Board.GetCard方法的具體用法?C# Board.GetCard怎麽用?C# Board.GetCard使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Board的用法示例。


在下文中一共展示了Board.GetCard方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: OnPlay

 public override void OnPlay(ref Board board, Card target = null,int index = 0,int choice = 0)
 {
     base.OnPlay(ref board, target,index);
     if(board.WeaponFriend != null)
     {
         board.GetCard(Id).currentAtk += board.WeaponFriend.CurrentAtk;
     }
 }
開發者ID:jrgutier,項目名稱:SmartCC,代碼行數:8,代碼來源:NEW1_018.cs

示例2: OnCastSpell

 public override void OnCastSpell(ref Board board, Card Spell)
 {
     if(IsFriend)
     {
         board.GetCard(Id).currentAtk++;
     }
     base.OnCastSpell(ref board, Spell);
 }
開發者ID:jrgutier,項目名稱:SmartCC,代碼行數:8,代碼來源:NEW1_012.cs

示例3: OnPlay

        public override void OnPlay(ref Board board, Card target = null,int index = 0,int choice = 0)
        {
            base.OnPlay(ref board, target,index);

            if (!board.IsCombo())
                return;

            int cardsplayed = 0;
            foreach(Action a in board.ActionsStack)
            {
                if (a.Type == Action.ActionType.CAST_MINION || a.Type == Action.ActionType.CAST_SPELL || a.Type == Action.ActionType.CAST_WEAPON)
                {
                    cardsplayed++;
                }
            }

            board.GetCard(Id).currentAtk += 2 * cardsplayed;
            board.GetCard(Id).CurrentHealth += 2 * cardsplayed;
            board.GetCard(Id).maxHealth += 2 * cardsplayed;
        }
開發者ID:jrgutier,項目名稱:SmartCC,代碼行數:20,代碼來源:EX1_613.cs

示例4: OnPlay

        public override void OnPlay(ref Board board, Card target = null,int index = 0,int choice = 0)
        {
            base.OnPlay(ref board, target,index);

            Card left = null;
            Card right = null;

            int atkBuff = 0;
            int healBuff = 0;

            foreach(Card c in board.MinionFriend)
            {
                if (c.Index == index - 1)
                    left = c;
                if (c.Index == Index + 1)
                    right = c;
            }

            if(left != null)
            {
                atkBuff += left.CurrentAtk;
                healBuff += left.CurrentHealth;
                board.RemoveCardFromBoard(left.Id);
            }
            if (right != null)
            {
                atkBuff += right.CurrentAtk;
                healBuff += right.CurrentHealth;
                board.RemoveCardFromBoard(right.Id);

            }

            board.GetCard(Id).currentAtk += atkBuff;
            board.GetCard(Id).maxHealth += healBuff;
            board.GetCard(Id).CurrentHealth += healBuff;
        }
開發者ID:jrgutier,項目名稱:SmartCC,代碼行數:36,代碼來源:EX1_304.cs

示例5: OnPlay

 public override void OnPlay(ref Board board, Card target = null,int index = 0,int choice = 0)
 {
     base.OnPlay(ref board, target,index);
     board.GetCard(Id).Damage(3, ref board);
 }
開發者ID:jrgutier,項目名稱:SmartCC,代碼行數:5,代碼來源:CS2_181.cs

示例6: OnOtherMinionDeath

 public override void OnOtherMinionDeath(ref Board board, bool friend, Card minion)
 {
     board.GetCard(Id).currentAtk++;
 }
開發者ID:jrgutier,項目名稱:SmartCC,代碼行數:4,代碼來源:tt_004.cs

示例7: OnPlay

 public override void OnPlay(ref Board board, Card target = null,int index = 0,int choice = 0)
 {
     base.OnPlay(ref board, target,index);
     board.GetCard(Id).CurrentHealth += board.Hand.Count;
     board.GetCard(Id).maxHealth += board.Hand.Count;
 }
開發者ID:jrgutier,項目名稱:SmartCC,代碼行數:6,代碼來源:EX1_043.cs


注:本文中的Board.GetCard方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。