Пример #1
0
        private int GetThreatValue(EThreat threat)
        {
            switch (threat)
            {
            case EThreat.Five:
                return(10000);

            case EThreat.OpenFour:
                return(5000);

            case EThreat.SimpleFour:
                return(2200);

            case EThreat.OpenThree:
                return(1000);

            case EThreat.BrokenThree:
                return(1000);

            case EThreat.SimpleThree:
                return(250);

            case EThreat.Two:
                return(150);

            default:
                throw new Exception($"Value not assigned for {threat}");
            }
        }
Пример #2
0
        private void HandleIndex(EThreat threat, string stat, string value)
        {
            var secondaryStat = ESecondaryStat.None;

            if (EnumUtil <ESecondaryStat> .TryGetEnumValue(stat, ref secondaryStat))
            {
                this._threats.Table[threat].Add(secondaryStat, double.Parse(value));
            }
        }
Пример #3
0
 public void AddThreatParticles(EThreat type, CharParticlePair threat, bool lTeam)
 {
     if (lTeam)
     {
         this._lTeamThreatTable[type].Add(threat);
     }
     else
     {
         this._rTeamThreatTable[type].Add(threat);
     }
 }
Пример #4
0
        private void SetThreatPoints(EThreat type, CChar agent)
        {
            var    paramValues = ThreatTable.Instance.Table[type];
            double threat      = 0;

            foreach (var kvp in paramValues)
            {
                threat += agent.Proxy.GetStat(kvp.Key) * kvp.Value;
            }
            this._threats.Add(type, new CharParticlePair(agent.Proxy.GetGuid().ToString(), threat));
        }
Пример #5
0
        public double GetThreatValue(EThreat type, bool lTeam)
        {
            double threat = 0;

            if (lTeam)
            {
                foreach (var pair in this._lTeamThreatTable[type])
                {
                    threat += pair.Value;
                }
            }
            else
            {
                foreach (var pair in this._rTeamThreatTable[type])
                {
                    threat += pair.Value;
                }
            }
            return(threat);
        }