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);
            }));
        }
Beispiel #2
0
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    doNothingChoice,
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                int modValue = calcModValueBasedOnSide(2, choosingPlayer);
                findAspectTracksWithProp(game, Property.French)[0].AddToValue(modValue);
            }));

            TrialEvents.Add(
                new CardEffectPair(
                    doNothingChoice,
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                int modValue = calcModValueBasedOnSide(2, choosingPlayer);
                findAspectTracksWithProp(game, Property.English)[0].AddToValue(modValue);
            }));

            TrialEvents.Add(
                new CardEffectPair(
                    doNothingChoice,
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                int modValue = calcModValueBasedOnSide(1, choosingPlayer);
                findAspectTracksWithProp(game, Property.Merchant, Property.Farmer).ForEach(t => t.AddToValue(modValue));
            }));
        }
        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);
            }));
        }
Beispiel #4
0
 protected override void addTrialEventsAndChoices()
 {
     TrialEvents.Add(
         new CardEffectPair(
             genAspectTrackForModCardChoice(new HashSet <Property>(), 1, 1, false, this.CardInfo.TrialInChiefInfos[0].Description),
             raiseGuiltAndOneAspectEffect));
 }
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    doNothingChoice,
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                game.Board.GetInsanityTrack().AddToValue(-1);
            },
                    (Game game, Player choosingPlayer) =>
            {
                return(game.OfficersRecalledPlayable);
            }));

            TrialEvents.Add(
                new CardEffectPair(
                    doNothingChoice,
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                int modVal = calcModValueBasedOnSide(2, choosingPlayer);

                findAspectTracksWithProp(game, Property.Catholic)[0].AddToValue(modVal);
            },
                    (Game game, Player choosingPlayer) =>
            {
                return(game.OfficersRecalledPlayable);
            }));
        }
Beispiel #6
0
        public static void TrackEvent(TrialEvents trialEvent, string eventParams)
        {
            if (IsTrialEnabled || SaasDataService.IsSaasEnabled)
            {
                new System.Threading.Tasks.Task(() =>
                {
                    try
                    {
                        new WebClient().DownloadString(
                            string.Format(UrlTrialEvents, SettingsLic.LicKey, trialEvent.ToString(),
                                          HttpUtility.UrlEncode(eventParams)));
                        UpdateAchievements();
                    }
                    catch (Exception ex)
                    {
                        Debug.LogError(ex, false);
                    }
                }).Start();

                if (HttpContext.Current.Session["TrialEvents"] == null)
                {
                    HttpContext.Current.Session["TrialEvents"] = new List <KeyValuePair <TrialEvents, string> >();
                }
                ((List <KeyValuePair <TrialEvents, string> >)HttpContext.Current.Session["TrialEvents"]).Add(
                    new KeyValuePair <TrialEvents, string>(trialEvent, eventParams));
            }
        }
Beispiel #7
0
 protected override void addTrialEventsAndChoices()
 {
     TrialEvents.Add(
         new CardEffectPair(
             doNothingChoice,
             (Game game, Player choosingPlayer, BoardChoices boardChoices) =>
     {
         game.Board.GetInsanityTrack().AddToValue(-1);
     }));
 }
 protected override void addTrialEventsAndChoices()
 {
     TrialEvents.Add(
         new CardEffectPair(
             doNothingChoice,
             (Game game, Player choosingPlayer, BoardChoices boardChoices) =>
     {
         game.Board.GetInsanityTrack().AddToValue(1);
         findAspectTracksWithProp(game, Property.French, Property.Protestant, Property.Catholic).ForEach(t => t.AddToValue(-2));
     }));
 }
 protected override void addTrialEventsAndChoices()
 {
     TrialEvents.Add(
         new CardEffectPair(
             doNothingChoice,
             (Game game, Player choosingPlayer, BoardChoices boardChoices) =>
     {
         game.Board.GetInsanityTrack().AddToValue(-1);
         findAspectTracksWithProp(game, Property.French)[0].AddToValue(2);
     }));
 }
 protected override void addTrialEventsAndChoices()
 {
     TrialEvents.Add(
         new CardEffectPair(
             doNothingChoice,
             (Game game, Player choosingPlayer, BoardChoices choices) =>
     {
         List <AspectTrack> ats = findAspectTracksWithProp(game, Property.English, Property.French);
         ats.ForEach(t => t.AddToValue(t.Properties.Contains(Property.English) ? 2 : 3));
     }));
 }
Beispiel #11
0
 protected override void addTrialEventsAndChoices()
 {
     TrialEvents.Add(
         new CardEffectPair(
             genAspectTrackForModCardChoice(new HashSet <Property>(), 1, 1, false, this.CardInfo.TrialInChiefInfos[0].Description),
             (Game game, Player choosingPlayer, BoardChoices choices) =>
     {
         raiseGuiltAndOneAspectEffect(game, choosingPlayer, choices);
         game.OfficersRecalledPlayable = true;
     }));
 }
 protected override void addTrialEventsAndChoices()
 {
     TrialEvents.Add(
         new CardEffectPair(
             doNothingChoice,
             (Game game, Player choosingPlayer, BoardChoices choices) =>
     {
         List <AspectTrack> ts = findAspectTracksWithProp(game, new Property[] { Property.Farmer, Property.Merchant });
         ts.ForEach(t => t.AddToValue(t.Properties.Contains(Property.Farmer) ? 2 : 1));
     }));
 }
Beispiel #13
0
 protected override void addTrialEventsAndChoices()
 {
     TrialEvents.Add(
         new CardEffectPair(
             doNothingChoice,
             (Game game, Player choosingPlayer, BoardChoices boardChoices) =>
     {
         int protModVal = calcModValueBasedOnSide(2, choosingPlayer);
         int cathModVal = calcModValueBasedOnSide(1, choosingPlayer);
         findAspectTracksWithProp(game, Property.Protestant, Property.Catholic).ForEach(t => t.AddToValue(t.Properties.Contains(Property.Protestant) ? protModVal : cathModVal));
     }));
 }
Beispiel #14
0
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    (Game game, Player choosingPlayer, ChoiceHandler choiceHandler) =>
            {
                List <BoardObject> bos = findAspectTracksWithProp(game).Cast <BoardObject>().ToList();

                BoardChoices boardChoices;
                choiceHandler.ChooseBoardObjects(
                    bos,
                    (Dictionary <BoardObject, int> selected) => { return(true); },
                    (List <BoardObject> choices, Dictionary <BoardObject, int> selected) =>
                {
                    List <BoardObject> newChoices = new List <BoardObject>(choices);
                    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);
                },
                    (Dictionary <BoardObject, int> selected) =>
                {
                    return(selected.Count == 3);
                },
                    game,
                    choosingPlayer,
                    this.CardInfo.TrialInChiefInfos[0].Description,
                    out boardChoices);

                return(boardChoices);
            },
                    (Game game, Player choosingPlayer, BoardChoices boardChoices) =>
            {
                game.Board.GetInsanityTrack().AddToValue(-calcModValueBasedOnSide(1, choosingPlayer));

                boardChoices.SelectedObjs.Keys.Cast <AspectTrack>().ToList().ForEach(t => t.AddToValue(calcModValueBasedOnSide(1, choosingPlayer)));
            }));
        }
Beispiel #15
0
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    doNothingChoice,
                    doNothingEffect,
                    (Game game, Player choosingPlayer) => { return(false); }));

            TrialEvents.Add(genAttorneyTrialAspectClearEffectPair(2, 1));

            TrialEvents.Add(genAttorneyTrialAddSwayEffectPair(2));
        }
Beispiel #16
0
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    doNothingChoice,
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                game.Board.GetGuiltTrack().AddToValue(1);

                findAspectTracksWithProp(game, Property.English, Property.GovWorker).ForEach(t => t.AddToValue(t.Properties.Contains(Property.English) ? 2 : 1));

                game.OfficersRecalledPlayable = true;
            }));
        }
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    genAspectTrackForModCardChoice(new HashSet <Property>(), 1, 1, false, this.CardInfo.TrialInChiefInfos[0].Description),
                    raiseGuiltAndOneAspectEffect));

            TrialEvents.Add(
                new CardEffectPair(
                    doNothingChoice,
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                findAspectTracksWithProp(game, new Property[] { Property.Protestant, Property.Farmer }).ForEach(t => t.AddToValue(1));
            }));
        }
Beispiel #18
0
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    genAspectTrackForModCardChoice(new HashSet <Property>(), 1, 1, false, this.CardInfo.TrialInChiefInfos[0].Description),
                    raiseGuiltAndOneAspectEffect));

            TrialEvents.Add(
                new CardEffectPair(
                    doNothingChoice,
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                game.Board.GetInsanityTrack().AddToValue(1);
            }));
        }
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    genAspectTrackForModCardChoice(new HashSet <Property>()
            {
                Property.Religion
            }, 1, 2, false, this.CardInfo.TrialInChiefInfos[0].Description),
                    (Game game, Player choosingPlayer, BoardChoices boardChoices) =>
            {
                game.Board.GetInsanityTrack().AddToValue(1);
                findAspectTracksWithProp(game, Property.English).ForEach(t => t.AddToValue(-2));

                ((AspectTrack)boardChoices.SelectedObjs.Keys.First()).AddToValue(-2);
            }));
        }
        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);
            }));
        }
Beispiel #21
0
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    doNothingChoice,
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                game.Board.GetInsanityTrack().AddToValue(1);
            }));

            TrialEvents.Add(
                new CardEffectPair(
                    genRevealOrPeakCardChoice(new HashSet <Property>()
            {
                Property.Religion
            }, 3, false, this.CardInfo.TrialInChiefInfos[1].Description),
                    peekAllAspects));
        }
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    genAspectTrackForModCardChoice(new HashSet <Property>(), 1, 1, false, this.CardInfo.TrialInChiefInfos[0].Description),
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                game.Board.GetGuiltTrack().AddToValue(1);
                choices.SelectedObjs.Keys.Cast <AspectTrack>().ToList().ForEach(t => t.AddToValue(1));
            }));

            TrialEvents.Add(
                new CardEffectPair(
                    genAspectTrackForModCardChoice(new HashSet <Property>(), 1, 2, true, this.CardInfo.TrialInChiefInfos[1].Description),
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                int modValue = calcModValueBasedOnSide(2, choosingPlayer);
                choices.SelectedObjs.Keys.Cast <AspectTrack>().ToList().ForEach(t => t.AddToValue(modValue));
            }));
        }
Beispiel #23
0
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    genAspectTrackForModCardChoice(new HashSet <Property>(), 1, 1, false, this.CardInfo.TrialInChiefInfos[0].Description),
                    raiseGuiltAndOneAspectEffect));

            TrialEvents.Add(
                new CardEffectPair(
                    doNothingChoice,
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                List <Jury.JuryAspect> juryAspects = game.FindBO(
                    (BoardObject bo) =>
                {
                    return(bo.Properties.Contains(Property.Jury) && bo.Properties.Contains(Property.Aspect) && bo.Properties.Contains(Property.Language));
                }).Cast <Jury.JuryAspect>().ToList();

                juryAspects.ForEach(ja => ja.Peek(choosingPlayer.Side));
            }));
        }
        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);
            }));
        }
Beispiel #25
0
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    doNothingChoice,
                    (Game game, Player choosingPlayer, BoardChoices boardChoices) =>
            {
                game.Board.GetGuiltTrack().AddToValue(1);
                findAspectTracksWithProp(game, Property.English, Property.Occupation).ForEach(t => t.AddToValue(t.Properties.Contains(Property.English) ? 2 : 1));
            }));

            TrialEvents.Add(
                new CardEffectPair(
                    doNothingChoice,
                    (Game game, Player choosingPlayer, BoardChoices boardChoices) =>
            {
                game.Board.GetGuiltTrack().AddToValue(1);

                int modVal = calcModValueBasedOnSide(2, choosingPlayer);

                findAspectTracksWithProp(game, Property.Religion).ForEach(t => t.AddToValue(modVal));
            }));
        }
        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));
            }));
        }
Beispiel #27
0
        protected override void addTrialEventsAndChoices()
        {
            TrialEvents.Add(
                new CardEffectPair(
                    genAspectTrackForModCardChoice(new HashSet <Property>(), 1, 1, false, this.CardInfo.TrialInChiefInfos[0].Description),
                    raiseGuiltAndOneAspectEffect));

            TrialEvents.Add(
                new CardEffectPair(
                    doNothingChoice,
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                findAspectTracksWithProp(game, Property.English)[0].AddToValue(2);
            }));

            TrialEvents.Add(
                new CardEffectPair(
                    doNothingChoice,
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                int modval = calcModValueBasedOnSide(1, choosingPlayer);
                findAspectTracksWithProp(game, Property.GovWorker, Property.Farmer).ForEach(t => t.AddToValue(modval));
            }));
        }
        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);
            }));
        }
Beispiel #29
0
        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) =>
            {
                List <Card> selectableCards = choosingPlayer.Hand.Cards;

                BoardChoices boardChoice;
                choiceHandler.ChooseCards(
                    selectableCards,
                    (Dictionary <Card, int> selected) =>
                {
                    bool noDup = true;

                    foreach (var val in selected.Values)
                    {
                        if (val != 1)
                        {
                            noDup = false;
                            break;
                        }
                    }

                    return(noDup);
                },
                    (List <Card> remainingChoices, Dictionary <Card, int> selected) =>
                {
                    foreach (var card in selected.Keys)
                    {
                        remainingChoices.Remove(card);
                    }

                    return(remainingChoices);
                },
                    (Dictionary <Card, int> selected, bool isDone) =>
                {
                    return((isDone && selected.Count == 1) || selected.Count == 2);
                },
                    true,
                    game,
                    choosingPlayer,
                    this.CardInfo.TrialInChiefInfos[0].Description,
                    out boardChoice);

                return(boardChoice);
            },
                    (Game game, Player choosingPlayer, BoardChoices choices) =>
            {
                int numCardsToMul = choices.SelectedCards.Count;
                choices.SelectedCards.Keys.ToList().ForEach(c => game.Discards.MoveCard(c));
                game.Deck.DealCards(numCardsToMul).ForEach(c => choosingPlayer.Hand.MoveCard(c));
            }));
        }