protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    doNothingChoice,
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                game.Board.GetInsanityTrack().AddToValue(-1);
            }));

            TrialEvents.Add(
                new CardEffectPair(
                    (Game game, Player choosingPlayer, ChoiceHandler choiceHandler) =>
            {
                CardChoice peekFunc = genRevealOrPeakCardChoice(new HashSet <Property>()
                {
                    Property.Religion
                }, 2, false, this.CardInfo.TrialInChiefInfos[1].Description);
                BoardChoices boardChoices = peekFunc(game, choosingPlayer, choiceHandler);

                if (boardChoices.NotCancelled)
                {
                    boardChoices.NotCancelled = handleMomentOfInsightChoice(new Player.PlayerSide[] { Player.PlayerSide.Prosecution },
                                                                            game, choosingPlayer, choiceHandler, out boardChoices.MoIInfo);
                }

                return(boardChoices);
            },
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                peekAllAspects(game, choosingPlayer, choices);
                handleMomentOfInsight(game, choosingPlayer, choices);
            }));
        }
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    (Game game, Player choosingPlayer, ChoiceHandler choiceHandler) =>
            {
                CardChoice pickAspectFunc = genAspectTrackForModCardChoice(new HashSet <Property>()
                {
                    Property.Occupation
                }, 1, 2, true, this.CardInfo.TrialInChiefInfos[0].Description);
                BoardChoices boardChoices = pickAspectFunc(game, choosingPlayer, choiceHandler);

                if (boardChoices.NotCancelled)
                {
                    boardChoices.NotCancelled = handleMomentOfInsightChoice(new Player.PlayerSide[] { Player.PlayerSide.Prosecution, Player.PlayerSide.Defense },
                                                                            game, choosingPlayer, choiceHandler, out boardChoices.MoIInfo);
                }

                return(boardChoices);
            },
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                int modValue = calcModValueBasedOnSide(2, choosingPlayer);
                choices.SelectedObjs.Keys.Cast <AspectTrack>().ToList().ForEach(t => t.AddToValue(modValue));
                handleMomentOfInsight(game, choosingPlayer, choices);
            }));
        }
示例#3
0
 public abstract void ChooseBoardObjects(List <BoardObject> choices,
                                         Func <Dictionary <BoardObject, int>, bool> validateChoices,
                                         Func <List <BoardObject>, Dictionary <BoardObject, int>, List <BoardObject> > filterChoices,
                                         Func <Dictionary <BoardObject, int>, bool> choicesComplete,
                                         Game game,
                                         Player choosingPlayer,
                                         string description,
                                         out BoardChoices boardChoice);
示例#4
0
 public abstract void ChooseCards(List <Card> choices,
                                  Func <Dictionary <Card, int>, bool> validateChoices,
                                  Func <List <Card>, Dictionary <Card, int>, List <Card> > filterChoices,
                                  Func <Dictionary <Card, int>, bool, bool> choicesComplete,
                                  bool stoppable,
                                  Game game,
                                  Player choosingPlayer,
                                  string description,
                                  out BoardChoices boardChoice);
示例#5
0
        protected void handleMomentOfInsight(Game game, Player choosingPlayer, BoardChoices choices)
        {
            if (choices.MoIInfo.Use == BoardChoices.MomentOfInsightInfo.MomentOfInsightUse.Reveal)
            {
                game.GetOtherPlayer(choosingPlayer).RevealCardInSummation();
            }
            else if (choices.MoIInfo.Use == BoardChoices.MomentOfInsightInfo.MomentOfInsightUse.Swap)
            {
                Player player = choosingPlayer;

                player.SummationDeck.MoveCard(choices.MoIInfo.HandCard);
                player.Hand.MoveCard(choices.MoIInfo.SummationCard);
            }
        }
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    (Game game, Player choosingPlayer, ChoiceHandler choiceHandler) =>
            {
                BoardChoices choices = new BoardChoices();

                choices.NotCancelled = handleMomentOfInsightChoice(new Player.PlayerSide[] { Player.PlayerSide.Prosecution }, game, choosingPlayer, choiceHandler, out choices.MoIInfo);

                return(choices);
            },
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                game.Board.GetInsanityTrack().AddToValue(-1);
                handleMomentOfInsight(game, choosingPlayer, choices);
            }));
        }
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    (Game game, Player choosingPlayer, ChoiceHandler choiceHandler) =>
            {
                BoardChoices boardChoices = new BoardChoices();
                boardChoices.NotCancelled = boardChoices.NotCancelled = handleMomentOfInsightChoice(new Player.PlayerSide[] { Player.PlayerSide.Prosecution, Player.PlayerSide.Defense },
                                                                                                    game, choosingPlayer, choiceHandler, out boardChoices.MoIInfo);

                return(boardChoices);
            },
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                foreach (Jury jury in game.Board.Juries)
                {
                    jury.Aspects[2].Peek(choosingPlayer.Side);
                }

                handleMomentOfInsight(game, choosingPlayer, choices);
            }));
        }
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    (Game game, Player choosingPlayer, ChoiceHandler choiceHandler) =>
            {
                BoardChoices choices = new BoardChoices();
                choices.NotCancelled = handleMomentOfInsightChoice(new Player.PlayerSide[] { Player.PlayerSide.Defense }, game, choosingPlayer, choiceHandler, out choices.MoIInfo);
                return(choices);
            },
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                game.Board.GetInsanityTrack().AddToValue(1);
                handleMomentOfInsight(game, choosingPlayer, choices);
            }));

            TrialEvents.Add(
                new CardEffectPair(
                    doNothingChoice,
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                findAspectTracksWithProp(game, Property.Farmer, Property.French).ForEach(t => t.AddToValue(-2));
            }));
        }
示例#9
0
        public bool PlayAsEvent(Game game, Player choosingPlayer, int idx, ChoiceHandler choiceHandler)
        {
            GameState.GameStateType curStateType = game.CurState.StateType;

            CardTemplate.CardChoice cardChoice = null;
            CardTemplate.CardEffect cardEffect = null;

            if (curStateType == GameState.GameStateType.JurySelection)
            {
                cardChoice = Template.SelectionEvents[idx].CardChoice;
                cardEffect = Template.SelectionEvents[idx].CardEffect;
            }
            else if (curStateType == GameState.GameStateType.TrialInChief)
            {
                cardChoice = Template.TrialEvents[idx].CardChoice;
                cardEffect = Template.TrialEvents[idx].CardEffect;
            }
            else if (curStateType == GameState.GameStateType.Summation)
            {
                cardChoice = Template.SummationEvents[idx].CardChoice;
                cardEffect = Template.SummationEvents[idx].CardEffect;
            }

            System.Diagnostics.Debug.Assert(cardChoice != null && cardEffect != null, "Card choice or card effect is null. Should never happen");

            BoardChoices choices = cardChoice(game, choosingPlayer, choiceHandler);

            if (choices.NotCancelled)
            {
                FileLogger.Instance.Log(choices.ToStringForEvent());

                cardEffect(game, choosingPlayer, choices);
            }

            return(choices.NotCancelled);
        }
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    (Game game, Player choosingPlayer, ChoiceHandler choiceHandler) =>
            {
                BoardChoices boardChoices = new BoardChoices();
                boardChoices.NotCancelled = handleMomentOfInsightChoice(
                    new Player.PlayerSide[] { Player.PlayerSide.Prosecution, Player.PlayerSide.Defense },
                    game, choosingPlayer, choiceHandler, out boardChoices.MoIInfo);

                return(boardChoices);
            },
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                findAspectTracksWithProp(game, Property.Farmer).ForEach(t => t.AddToValue(calcModValueBasedOnSide(2, choosingPlayer)));
                handleMomentOfInsight(game, choosingPlayer, choices);
            }));

            TrialEvents.Add(
                new CardEffectPair(
                    (Game game, Player choosingPlayer, ChoiceHandler choiceHandler) =>
            {
                BoardChoices boardChoices = new BoardChoices();
                boardChoices.NotCancelled = handleMomentOfInsightChoice(
                    new Player.PlayerSide[] { Player.PlayerSide.Defense },
                    game, choosingPlayer, choiceHandler, out boardChoices.MoIInfo);

                return(boardChoices);
            },
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                findAspectTracksWithProp(game, Property.French).ForEach(t => t.AddToValue(-2));
                handleMomentOfInsight(game, choosingPlayer, choices);
            }));
        }
示例#11
0
 protected void peekAllAspects(Game game, Player choosingPlayer, BoardChoices choices)
 {
     choices.SelectedObjs.Keys.Cast <Jury.JuryAspect>().ToList().ForEach(a => a.Peek(choosingPlayer.Side));
 }
示例#12
0
 protected void revealAllAspects(Game game, Player choosingPlayer, BoardChoices choices)
 {
     choices.SelectedObjs.Keys.Cast <Jury.JuryAspect>().ToList().ForEach(a => a.Reveal());
 }
示例#13
0
 // Common enough in cards that we'll just simplify it for ourselves.
 protected void raiseGuiltAndOneAspectEffect(Game game, Player choosingPlayer, BoardChoices choices)
 {
     game.Board.GetGuiltTrack().AddToValue(1);
     choices.SelectedObjs.Keys.Cast <AspectTrack>().ToList().ForEach(t => t.AddToValue(1));
 }
示例#14
0
 protected void doNothingEffect(Game game, Player choosingPlayer, BoardChoices choices)
 {
     // Do nothing.
 }
示例#15
0
        protected BoardChoices doNothingChoice(Game game, Player choosingPlayer, ChoiceHandler choiceHandler)
        {
            BoardChoices choices = new BoardChoices();

            return(choices);
        }