protected override void addSelectionEventsAndChoices()
 {
     SelectionEvents.Add(
         new CardEffectPair(
             genRevealOrPeakCardChoice(new HashSet <Property>(), 2, false, this.CardInfo.JurySelectionInfos[0].Description),
             peekAllAspects));
 }
        protected override void addSelectionEventsAndChoices()
        {
            SelectionEvents.Add(new CardEffectPair(
                                    genRevealOrPeakCardChoice(new HashSet <Property>(), 3, true, this.CardInfo.JurySelectionInfos[0].Description,
                                                              null,
                                                              (List <BoardObject> remainingChoices, Dictionary <BoardObject, int> selected) =>
            {
                List <BoardObject> newChoices = new List <BoardObject>(remainingChoices);
                foreach (BoardObject obj in selected.Keys)
                {
                    if (obj.Properties.Contains(Property.Religion))
                    {
                        newChoices = newChoices.Where(c => !c.Properties.Contains(Property.Religion)).ToList();
                    }

                    if (obj.Properties.Contains(Property.Occupation))
                    {
                        newChoices = newChoices.Where(c => !c.Properties.Contains(Property.Occupation)).ToList();
                    }

                    if (obj.Properties.Contains(Property.Language))
                    {
                        newChoices = newChoices.Where(c => !c.Properties.Contains(Property.Language)).ToList();
                    }
                }

                return(newChoices);
            }),
                                    revealAllAspects));
        }
Ejemplo n.º 3
0
        protected override void addSelectionEventsAndChoices()
        {
            SelectionEvents.Add(
                new CardEffectPair(
                    genRevealOrPeakCardChoice(
                        new HashSet <Property>(), 5, true, this.CardInfo.JurySelectionInfos[0].Description,
                        null,
                        (List <BoardObject> choices, Dictionary <BoardObject, int> selected) =>
            {
                List <BoardObject> newChoices = new List <BoardObject>(choices);

                int numRelig = 0;
                int numLang  = 0;
                int numOccu  = 0;

                foreach (var pairs in selected)
                {
                    newChoices.Remove(pairs.Key);

                    if (pairs.Key.Properties.Contains(Property.Religion))
                    {
                        numRelig += 1;
                    }
                    else if (pairs.Key.Properties.Contains(Property.Language))
                    {
                        numLang += 1;
                    }
                    else if (pairs.Key.Properties.Contains(Property.Occupation))
                    {
                        numOccu += 1;
                    }
                }

                if (numRelig >= 3)
                {
                    newChoices = newChoices.Where(bo => !bo.Properties.Contains(Property.Religion)).ToList();
                }

                if (numLang >= 3)
                {
                    newChoices = newChoices.Where(bo => !bo.Properties.Contains(Property.Language)).ToList();
                }

                if (numOccu >= 3)
                {
                    newChoices = newChoices.Where(bo => !bo.Properties.Contains(Property.Occupation)).ToList();
                }

                return(newChoices);
            }),
                    revealAllAspects));
        }
        protected override void addSelectionEventsAndChoices()
        {
            SelectionEvents.Add(
                new CardEffectPair(
                    genRevealOrPeakCardChoice(new HashSet <Property> {
                Property.Language
            }, 2, true, this.CardInfo.JurySelectionInfos[0].Description),
                    revealAllAspects));

            SelectionEvents.Add(
                new CardEffectPair(
                    genRevealOrPeakCardChoice(new HashSet <Property> {
                Property.Religion
            }, 1, true, this.CardInfo.JurySelectionInfos[1].Description),
                    revealAllAspects));
        }
Ejemplo n.º 5
0
        protected override void addSelectionEventsAndChoices()
        {
            SelectionEvents.Add(
                new CardEffectPair(
                    (Game game, Player choosingPlayer, ChoiceHandler choiceHandler) =>
            {
                BoardChoices boardChoices;

                choiceHandler.ChooseCards(
                    game.Discards.Cards,
                    (Dictionary <Card, int> selected) => { return(true); },
                    (List <Card> remainingChoices, Dictionary <Card, int> selected) => { return(remainingChoices); },
                    (Dictionary <Card, int> selected, bool isDone) => { return(selected.Count == 1); },
                    false,
                    game,
                    choosingPlayer,
                    CardInfo.JurySelectionInfos[0].Description,
                    out boardChoices);

                if (boardChoices.NotCancelled)
                {
                    Card card = boardChoices.SelectedCards.Keys.First();

                    choiceHandler.ChooseCardEffect(card, game, choosingPlayer, "Select Jury Selection event to play", out boardChoices.PlayInfo);

                    if (boardChoices.NotCancelled)
                    {
                        int idx = boardChoices.PlayInfo.eventIdx;
                        boardChoices.PlayInfo.resultBoardChoice = card.Template.SelectionEvents[idx].CardChoice(game, choosingPlayer, choiceHandler);

                        boardChoices.NotCancelled = boardChoices.PlayInfo.resultBoardChoice.NotCancelled;
                    }
                }

                return(boardChoices);
            },
                    (Game game, Player choosingPlayer, BoardChoices boardChoices) =>
            {
                Card card = boardChoices.SelectedCards.Keys.First();
                int idx   = boardChoices.PlayInfo.eventIdx;
                card.Template.SelectionEvents[idx].CardEffect(game, choosingPlayer, boardChoices.PlayInfo.resultBoardChoice);
            },
                    (Game game, Player choosingPlayer) =>
            {
                return(choosingPlayer.Hand.Cards.Count == 3);
            }));
        }
Ejemplo n.º 6
0
 protected override void addSelectionEventsAndChoices()
 {
     SelectionEvents.Add(genAttorneyJurySelectPeekEffectPair(4, 2, 0));
 }