Beispiel #1
0
        // will skip if already processed
        public void ProcessLie(string lier, CommsTypeEnum topic, string msg, CommsEvent fromComms)
        {
            if (CurrentTurnAlreadyProcessedComms.Contains(fromComms))
            {
                return;
            }
            CurrentTurnAlreadyProcessedComms.Add(fromComms);
            KnownLies.Add(fromComms);

            Relation(lier).DarkSideSuspicion += 5;
            Trace(false, "Detect lie +5");

            // can rat out a fellow vampire we don't like
            if (!Me.IsVampire || Relation(lier).Enmity > r.NextDouble() * 2)
            {
                if (Me.Strategy == StrategyEnum.AI)
                {
                    var comms = new CommsEvent(Me, topic, false, Me.Game.GetPlayer(lier));
                    if (topic != CommsTypeEnum.LiedAboutSleeping)
                    {
                        // don't announce lied-about-sleeping because  processed elsewhere
                        //Me.Game.AddToLog(comms);
                        Me.Game.Hub.AnnounceComms(Me.Game, comms, true, Me.Game.GetPlayer(lier).NameSpan + " lied! " + msg);
                    }
                }
            }
        }
Beispiel #2
0
 public CommsEvent(Player subject, CommsTypeEnum type, bool lied, Player whom = null, Player where = null)
 {
     EventType = type;
     Speaker   = subject;
     Whom      = whom;
     Lied      = lied;
     Where     = where;
 }
Beispiel #3
0
 public bool AreMutuallyExclusive(CommsTypeEnum c1, CommsTypeEnum c2)
 {
     if (IsSleepDeclaration(c1) && c2 == CommsTypeEnum.WentOut)
     {
         return(true);
     }
     if (IsSleepDeclaration(c2) && c1 == CommsTypeEnum.WentOut)
     {
         return(true);
     }
     return(false);
 }
Beispiel #4
0
 public bool AreEquivalent(CommsTypeEnum c1, CommsTypeEnum c2)
 {
     if (c1 == c2)
     {
         return(true);
     }
     if (IsSleepDeclaration(c1) && IsSleepDeclaration(c2))
     {
         return(true);
     }
     if (IsLieAccusation(c1) && IsLieAccusation(c2))
     {
         return(true);
     }
     return(false);
 }
Beispiel #5
0
 public bool IsLieAccusation(CommsTypeEnum c1)
 {
     return(c1 == CommsTypeEnum.GenericLie ||
            c1 == CommsTypeEnum.LiedAboutBeingBitten ||
            c1 == CommsTypeEnum.LiedAboutSleeping);
 }
Beispiel #6
0
 public bool IsSleepDeclaration(CommsTypeEnum c1)
 {
     return(c1 == CommsTypeEnum.Slept || c1 == CommsTypeEnum.WillSleep);
 }