private static bool PlaySanctionsCard(BotMain bot, CardInstance card)
{
var canSanction = bot.Players.Values.Where(o => o.State == GamePlayerState.Playing && bot.IsOpponent(o.ID)).Select(o => o.ID).ToList();
if (canSanction.Count == 0)
return false;
var sanction = bot.UseRandomness ? RandomUtility.WeightedRandom(canSanction, o => bot.WeightedNeighbors[o]) : canSanction.OrderByDescending(o => bot.WeightedNeighbors[o]).First();
AILog.Log("PlayCards", "Sanctioning " + sanction);
bot.Orders.AddOrder(GameOrderPlayCardSanctions.Create(card.ID, bot.PlayerID, sanction));
return true;
}
https://github.com/FizzerWL/WarLight.AI/blob/master/Prod/MakeOrders/PlayCards.cs