Пример #1
0
    public void AiBehavior(string Stage)
    {
        AiPlayer temp = players[turn].GetComponent <AiPlayer>();

        switch (Stage)
        {
        case "Start":
            if (temp.SponserQuest(players, questCard.numberOfStages, this, CanPlayerSponsor()) == true)
            {
                SponsorQuest();
            }
            temp.SetupQuest(questCard.numberOfStages, this);
            if (hands[turn].cards.Count >= 12)
            {
                HandleTextFile.WriteLog("AI Log: Force Ai Discard " + hands[turn].cards[0].name, GameControler.SName);
                while (hands[turn].cards.Count >= 12)
                {
                    DiscardCard(0);
                }
            }
            EndTurn();
            break;

        case "Join":
            temp.joinQuest(questCard.numberOfStages, this);
            break;

        case "Play":
            temp.playStage(this);
            if (hands[turn].cards.Count >= 12)
            {
                HandleTextFile.WriteLog("AI Log: Force Ai Discard " + hands[turn].cards[0].name, GameControler.SName);
                while (hands[turn].cards.Count >= 12)
                {
                    DiscardCard(0);
                }
            }
            EndTurn();
            break;

        default:
            break;
        }
    }