コード例 #1
0
 void _GetAllAttackingActions()
 {
     if (turn == Complete.GameManager.Turn.AITurn)
     {
         //Generate All Possible Placing
         List <List <Card> > temp = ProduceAllAttackCombinations(AITableCards);
         foreach (Card PlayerCard in PlayerTableCards)
         {
             for (int i = 0; i < temp.Count; i++)
             {
                 AIState State = gameObject.AddComponent <AIState>();
                 State.NewState(PlayerTableCards, AIHandCards, AITableCards, PlayerHero, AIHero, maxMana, PlayerMana, AIMana, turn, this);
                 for (int j = 0; j < temp[i].Count; j++)
                 {
                     if (temp[i][j].canPlay)
                     {
                         if (temp[i][j].cardType == Card.CardType.Monster)
                         {
                             State.CardAttackCard(temp[i][j], PlayerCard);
                         }
                         else if (temp[i][j].cardType == Card.CardType.Magic)
                         {
                             if (temp[i][j].cardeffect == Card.CardEffect.ToSpecific)
                             {
                                 State.CardMagicCard(temp[i][j], PlayerCard);
                             }
                         }
                     }
                 }
                 State.Calculate_State_Score();
                 ChildsStatus.Add(State);
             }
         }
     }
 }