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}"); } }
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)); } }
public void AddThreatParticles(EThreat type, CharParticlePair threat, bool lTeam) { if (lTeam) { this._lTeamThreatTable[type].Add(threat); } else { this._rTeamThreatTable[type].Add(threat); } }
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)); }
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); }