예제 #1
0
파일: AIMove.cs 프로젝트: loneNerd/Bang
    private static void _LowHealth()
    {
        if (_bot.CurrentHealth > 2)
        {
            return;
        }

        PackAsset stagecoach = _bot.Hand.Find(card => card.CardName == ECardName.Stagecoach);
        PackAsset wellsFargo = _bot.Hand.Find(card => card.CardName == ECardName.WellsFargo);

        if (wellsFargo != null)
        {
            GetCardsLogic.StageCoach(_bot, wellsFargo);
            _bot.UsingCard(wellsFargo);
        }
        else if (stagecoach != null)
        {
            GetCardsLogic.StageCoach(_bot, stagecoach);
            _bot.UsingCard(stagecoach);
        }

        PackAsset store = _bot.Hand.Find(card => card.CardName == ECardName.Store);

        if (store != null)
        {
            StoreLogic.Store(_bot, store);
            _bot.UsingCard(store);
        }

        PackAsset saloon = _bot.Hand.Find(card => card.CardName == ECardName.Saloon);

        if (_bot.CurrentHealth == 1 && saloon != null)
        {
            SaloonLogic.Saloon(_bot, saloon);
            _bot.UsingCard(saloon);
        }
    }