private IEnumerator SummonMinionsReponse(CompletedCardPlayAction pca) { var card = pca.CardPlayed; Console.WriteLine($"TRIGGER - {card.Title}, {card.Location.GetFriendlyName()}"); var keyword = card.GetKeywords().Intersect(MinionKeywords, StringComparer.Ordinal).First(); string msg = $"{TurnTaker.Name} summons forth his {keyword} minions."; var coroutine = GameController.SendMessageAction(msg, Priority.High, GetCardSource(), new[] { card }, true); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } coroutine = GameController.PlayCards(DecisionMaker, c => (c.Location == TurnTaker.Deck || c.Location == TurnTaker.Trash) && c.DoKeywordsContain(keyword), false, true, cardSource: GetCardSource()); if (base.UseUnityCoroutines) { yield return(base.GameController.StartCoroutine(coroutine)); } else { base.GameController.ExhaustCoroutine(coroutine); } //Note: using the GameAction shuffleLocation screws something with the card being played. This doesn't. TurnTaker.Deck.ShuffleCards(); }
private bool SummonMinionCriteria(CompletedCardPlayAction pca) { if (!pca.IsPutIntoPlay && pca.Origin == TurnTaker.Deck && !pca.PlayedFromBottom) { var c = pca.CardPlayed; if (c.Owner == TurnTaker && c.GetKeywords().Intersect(MinionKeywords, StringComparer.Ordinal).Any()) { return(true); } } return(false); }