예제 #1
0
        public void SettleThreats()
        {
            var victims = new Dictionary <IPlayer, IDeath>();

            foreach (var threat in Threats)
            {
                if (threat.Victim.Perks.CurrentDefense >= threat.Strength)
                {
                    continue;
                }

                var victim = threat.Victim;
                if (victims.TryGetValue(victim, out _))
                {
                    victims[victim].Description += Environment.NewLine + threat.Description;
                }
                else
                {
                    threat.Victim.Alive = false; // TODO: Change active depending on the action
                    victims[victim]     = threat;
                }
            }

            Threats.Clear();
            UndisclosedDeaths.AddRange(victims.Values);
        }