예제 #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);
             }
         }
     }
 }
예제 #2
0
 public void GetAllPlacingActions()
 {
     if (turn == Complete.GameManager.Turn.AITurn)
     {
         if (AIHandCards.Count == 0)
         {
             Debug.Log("No Cards");
             //EndTurn Nothing To Play
         }
         else
         {
             //Generate All Possible Placing
             List <List <Card> > temp = ProducePlacing(AIHandCards);
             Debug.Log("ProducePlacing");
             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);
                 //if(temp[i].Count>0)
                 for (int j = 0; j < temp[i].Count; j++)
                 {
                     Debug.LogWarning("Place Card");
                     State.PlaceCard(temp[i][j]);
                 }
                 State.Calculate_State_Score();
                 ChildsStatus.Add(State);
             }
         }
     }
     Debug.Log("DonePlacing");
 }
예제 #3
0
    void _GetAllAttackingHeroActions()
    {
        List <List <Card> > temp = ProduceAllAttackCombinations(AITableCards);

        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)
                {
                    State.CardAttackHero(temp[i][j], PlayerHero);
                }
            }
            State.Calculate_State_Score();
            ChildsStatus.Add(State);
        }
    }