public override void ParseExcel(DataRow row) { if (Convert.ToInt32(row[3].ToString()) >= 5000000) { LineDay l = new LineDay(Convert.ToInt32(row[2].ToString()), row[0].ToString()); if (!LD.Contains(l)) { LD.Add(l); } } if (row[6].ToString().ToUpper().Contains("FC")) { if (Convert.ToInt32(row[3].ToString()) >= 5000000) { FCcount += 1; } FCtime += Convert.ToInt16(row[7].ToString()); } else if (row[6].ToString().ToUpper().Contains("FB")) { if (Convert.ToInt32(row[3].ToString()) >= 5000000) { FBcount += 1; } FBtime += Convert.ToInt16(row[7].ToString()); } else if (row[6].ToString().ToUpper().Contains("RB")) { if (row[6].ToString().ToUpper().Contains("RB40")) { if (Convert.ToInt32(row[3].ToString()) >= 5000000) { RB40count += 1; } RB40time += Convert.ToInt16(row[7].ToString()); } if (row[6].ToString().ToUpper().Contains("RB60")) { if (Convert.ToInt32(row[3].ToString()) >= 5000000) { RB60count += 1; } RB60time += Convert.ToInt16(row[7].ToString()); } } else if (row[6].ToString().ToUpper().Contains("RC")) { if (Convert.ToInt32(row[3].ToString()) >= 5000000) { RCcount += 1; } RCtime += Convert.ToInt16(row[7].ToString()); } }
public override void ParseExcel(DataRow row) { //Console.WriteLine("Not needed to Parse :D"); if (Convert.ToInt32(row[3].ToString()) >= 5000000) { LineDay l = new LineDay(Convert.ToInt32(row[2].ToString()), row[0].ToString()); if (!LD.Contains(l)) { LD.Add(l); } } }
/// <summary> /// </summary> /// <param name="line"></param> public void SetDamageTaken(Line line) { if ((LimitBreaks.IsLimit(line.Action)) && Settings.Default.IgnoreLimitBreaks) { return; } Last20DamageTakenActions.Add(new LineHistory(line)); if (Last20DamageTakenActions.Count > 20) { Last20DamageTakenActions.RemoveAt(0); } //LineHistory.Add(new LineHistory(line)); var fields = line.GetType() .GetProperties(); var abilityGroup = GetGroup("DamageTakenByAction"); StatGroup subAbilityGroup; if (!abilityGroup.TryGetGroup(line.Action, out subAbilityGroup)) { subAbilityGroup = new StatGroup(line.Action); subAbilityGroup.Stats.AddStats(DamageTakenStatList(null)); abilityGroup.AddGroup(subAbilityGroup); } var damageGroup = GetGroup("DamageTakenByPlayers"); StatGroup subPlayerGroup; if (!damageGroup.TryGetGroup(line.Source, out subPlayerGroup)) { subPlayerGroup = new StatGroup(line.Source); subPlayerGroup.Stats.AddStats(DamageTakenStatList(null)); damageGroup.AddGroup(subPlayerGroup); } var abilities = subPlayerGroup.GetGroup("DamageTakenByPlayersByAction"); StatGroup subPlayerAbilityGroup; if (!abilities.TryGetGroup(line.Action, out subPlayerAbilityGroup)) { subPlayerAbilityGroup = new StatGroup(line.Action); subPlayerAbilityGroup.Stats.AddStats(DamageTakenStatList(subPlayerGroup, true)); abilities.AddGroup(subPlayerAbilityGroup); } Stats.IncrementStat("TotalDamageTakenActionsUsed"); subAbilityGroup.Stats.IncrementStat("TotalDamageTakenActionsUsed"); subPlayerGroup.Stats.IncrementStat("TotalDamageTakenActionsUsed"); subPlayerAbilityGroup.Stats.IncrementStat("TotalDamageTakenActionsUsed"); if (line.Hit) { Stats.IncrementStat("TotalOverallDamageTaken", line.Amount); subAbilityGroup.Stats.IncrementStat("TotalOverallDamageTaken", line.Amount); subPlayerGroup.Stats.IncrementStat("TotalOverallDamageTaken", line.Amount); subPlayerAbilityGroup.Stats.IncrementStat("TotalOverallDamageTaken", line.Amount); if (line.Crit) { Stats.IncrementStat("DamageTakenCritHit"); subAbilityGroup.Stats.IncrementStat("DamageTakenCritHit"); subPlayerGroup.Stats.IncrementStat("DamageTakenCritHit"); subPlayerAbilityGroup.Stats.IncrementStat("DamageTakenCritHit"); Stats.IncrementStat("CriticalDamageTaken", line.Amount); subAbilityGroup.Stats.IncrementStat("CriticalDamageTaken", line.Amount); subPlayerGroup.Stats.IncrementStat("CriticalDamageTaken", line.Amount); subPlayerAbilityGroup.Stats.IncrementStat("CriticalDamageTaken", line.Amount); if (line.Modifier != 0) { var mod = ParseHelper.GetBonusAmount(line.Amount, line.Modifier); var modStat = "DamageTakenCritMod"; Stats.IncrementStat(modStat, mod); subAbilityGroup.Stats.IncrementStat(modStat, mod); subPlayerGroup.Stats.IncrementStat(modStat, mod); subPlayerAbilityGroup.Stats.IncrementStat(modStat, mod); } } else { Stats.IncrementStat("DamageTakenRegHit"); subAbilityGroup.Stats.IncrementStat("DamageTakenRegHit"); subPlayerGroup.Stats.IncrementStat("DamageTakenRegHit"); subPlayerAbilityGroup.Stats.IncrementStat("DamageTakenRegHit"); Stats.IncrementStat("RegularDamageTaken", line.Amount); subAbilityGroup.Stats.IncrementStat("RegularDamageTaken", line.Amount); subPlayerGroup.Stats.IncrementStat("RegularDamageTaken", line.Amount); subPlayerAbilityGroup.Stats.IncrementStat("RegularDamageTaken", line.Amount); if (line.Modifier != 0) { var mod = ParseHelper.GetBonusAmount(line.Amount, line.Modifier); var modStat = "DamageTakenRegMod"; Stats.IncrementStat(modStat, mod); subAbilityGroup.Stats.IncrementStat(modStat, mod); subPlayerGroup.Stats.IncrementStat(modStat, mod); subPlayerAbilityGroup.Stats.IncrementStat(modStat, mod); } } } else { Stats.IncrementStat("DamageTakenRegMiss"); subAbilityGroup.Stats.IncrementStat("DamageTakenRegMiss"); subPlayerGroup.Stats.IncrementStat("DamageTakenRegMiss"); subPlayerAbilityGroup.Stats.IncrementStat("DamageTakenRegMiss"); } foreach (var stat in fields.Where(stat => LD.Contains(stat.Name)) .Where(stat => Equals(stat.GetValue(line), true))) { var regStat = String.Format("DamageTaken{0}", stat.Name); Stats.IncrementStat(regStat); subAbilityGroup.Stats.IncrementStat(regStat); subPlayerGroup.Stats.IncrementStat(regStat); subPlayerAbilityGroup.Stats.IncrementStat(regStat); if (line.Modifier == 0) { continue; } var mod = ParseHelper.GetBonusAmount(line.Amount, line.Modifier); var modStat = String.Format("DamageTaken{0}Mod", stat.Name); Stats.IncrementStat(modStat, mod); subAbilityGroup.Stats.IncrementStat(modStat, mod); subPlayerGroup.Stats.IncrementStat(modStat, mod); subPlayerAbilityGroup.Stats.IncrementStat(modStat, mod); } }
/// <summary> /// </summary> /// <param name="line"></param> /// <param name="isDamageOverTime"></param> public void SetDamage(Line line, bool isDamageOverTime = false) { //LineHistory.Add(new LineHistory(line)); Last20DamageActions.Add(new LineHistory(line)); if (Last20DamageActions.Count > 20) { Last20DamageActions.RemoveAt(0); } var fields = line.GetType() .GetProperties(); var currentDamage = line.Crit ? line.Amount > 0 ? ParseHelper.GetOriginalAmount(line.Amount, (decimal).5) : 0 : line.Amount; if (currentDamage > 0) { ParseHelper.LastAmountByAction.EnsureMonsterAction(line.Source, line.Action, currentDamage); } var abilityGroup = GetGroup("DamageByAction"); StatGroup subAbilityGroup; if (!abilityGroup.TryGetGroup(line.Action, out subAbilityGroup)) { subAbilityGroup = new StatGroup(line.Action); subAbilityGroup.Stats.AddStats(DamageStatList(null)); abilityGroup.AddGroup(subAbilityGroup); } var playerGroup = GetGroup("DamageToPlayers"); StatGroup subPlayerGroup; if (!playerGroup.TryGetGroup(line.Target, out subPlayerGroup)) { subPlayerGroup = new StatGroup(line.Target); subPlayerGroup.Stats.AddStats(DamageStatList(null)); playerGroup.AddGroup(subPlayerGroup); } var monsters = subPlayerGroup.GetGroup("DamageToPlayersByAction"); StatGroup subPlayerAbilityGroup; if (!monsters.TryGetGroup(line.Action, out subPlayerAbilityGroup)) { subPlayerAbilityGroup = new StatGroup(line.Action); subPlayerAbilityGroup.Stats.AddStats(DamageStatList(subPlayerGroup, true)); monsters.AddGroup(subPlayerAbilityGroup); } if (!isDamageOverTime) { Stats.IncrementStat("TotalDamageActionsUsed"); subAbilityGroup.Stats.IncrementStat("TotalDamageActionsUsed"); subPlayerGroup.Stats.IncrementStat("TotalDamageActionsUsed"); subPlayerAbilityGroup.Stats.IncrementStat("TotalDamageActionsUsed"); } if (line.Hit) { Stats.IncrementStat("TotalOverallDamage", line.Amount); subAbilityGroup.Stats.IncrementStat("TotalOverallDamage", line.Amount); subPlayerGroup.Stats.IncrementStat("TotalOverallDamage", line.Amount); subPlayerAbilityGroup.Stats.IncrementStat("TotalOverallDamage", line.Amount); if (line.Crit) { Stats.IncrementStat("DamageCritHit"); subAbilityGroup.Stats.IncrementStat("DamageCritHit"); subPlayerGroup.Stats.IncrementStat("DamageCritHit"); subPlayerAbilityGroup.Stats.IncrementStat("DamageCritHit"); Stats.IncrementStat("CriticalDamage", line.Amount); subAbilityGroup.Stats.IncrementStat("CriticalDamage", line.Amount); subPlayerGroup.Stats.IncrementStat("CriticalDamage", line.Amount); subPlayerAbilityGroup.Stats.IncrementStat("CriticalDamage", line.Amount); if (line.Modifier != 0) { var mod = ParseHelper.GetBonusAmount(line.Amount, line.Modifier); var modStat = "DamageCritMod"; Stats.IncrementStat(modStat, mod); subAbilityGroup.Stats.IncrementStat(modStat, mod); subPlayerGroup.Stats.IncrementStat(modStat, mod); subPlayerAbilityGroup.Stats.IncrementStat(modStat, mod); } } else { Stats.IncrementStat("DamageRegHit"); subAbilityGroup.Stats.IncrementStat("DamageRegHit"); subPlayerGroup.Stats.IncrementStat("DamageRegHit"); subPlayerAbilityGroup.Stats.IncrementStat("DamageRegHit"); Stats.IncrementStat("RegularDamage", line.Amount); subAbilityGroup.Stats.IncrementStat("RegularDamage", line.Amount); subPlayerGroup.Stats.IncrementStat("RegularDamage", line.Amount); subPlayerAbilityGroup.Stats.IncrementStat("RegularDamage", line.Amount); if (line.Modifier != 0) { var mod = ParseHelper.GetBonusAmount(line.Amount, line.Modifier); var modStat = "DamageRegMod"; Stats.IncrementStat(modStat, mod); subAbilityGroup.Stats.IncrementStat(modStat, mod); subPlayerGroup.Stats.IncrementStat(modStat, mod); subPlayerAbilityGroup.Stats.IncrementStat(modStat, mod); } } } else { Stats.IncrementStat("DamageRegMiss"); subAbilityGroup.Stats.IncrementStat("DamageRegMiss"); subPlayerGroup.Stats.IncrementStat("DamageRegMiss"); subPlayerAbilityGroup.Stats.IncrementStat("DamageRegMiss"); } foreach (var stat in fields.Where(stat => LD.Contains(stat.Name)) .Where(stat => Equals(stat.GetValue(line), true))) { var regStat = String.Format("Damage{0}", stat.Name); Stats.IncrementStat(regStat); subAbilityGroup.Stats.IncrementStat(regStat); subPlayerGroup.Stats.IncrementStat(regStat); subPlayerAbilityGroup.Stats.IncrementStat(regStat); if (line.Modifier == 0) { continue; } var mod = ParseHelper.GetBonusAmount(line.Amount, line.Modifier); var modStat = String.Format("Damage{0}Mod", stat.Name); Stats.IncrementStat(modStat, mod); subAbilityGroup.Stats.IncrementStat(modStat, mod); subPlayerGroup.Stats.IncrementStat(modStat, mod); subPlayerAbilityGroup.Stats.IncrementStat(modStat, mod); } }
/// <summary> /// </summary> /// <param name="line"></param> public void SetDamage(Line line) { if (this.Name == Constants.CharacterName) { // LineHistory.Add(new LineHistory(line)); } this.Last20DamageActions.Add(new LineHistory(line)); if (this.Last20DamageActions.Count > 20) { this.Last20DamageActions.RemoveAt(0); } if (LimitBreaks.IsLimit(line.Action) && Settings.Default.IgnoreLimitBreaks) { return; } PropertyInfo[] fields = line.GetType().GetProperties(); var currentDamage = line.Crit ? line.Amount > 0 ? ParseHelper.GetOriginalAmount(line.Amount, .5) : 0 : line.Amount; if (currentDamage > 0) { ParseHelper.LastAmountByAction.EnsurePlayerAction(line.Source, line.Action, currentDamage); } StatGroup abilityGroup = this.GetGroup("DamageByAction"); StatGroup subAbilityGroup; if (!abilityGroup.TryGetGroup(line.Action, out subAbilityGroup)) { subAbilityGroup = new StatGroup(line.Action); subAbilityGroup.Stats.AddStats(this.DamageStatList(null)); abilityGroup.AddGroup(subAbilityGroup); } StatGroup monsterGroup = this.GetGroup("DamageToMonsters"); StatGroup subMonsterGroup; if (!monsterGroup.TryGetGroup(line.Target, out subMonsterGroup)) { subMonsterGroup = new StatGroup(line.Target); subMonsterGroup.Stats.AddStats(this.DamageStatList(null)); monsterGroup.AddGroup(subMonsterGroup); } StatGroup monsters = subMonsterGroup.GetGroup("DamageToMonstersByAction"); StatGroup subMonsterAbilityGroup; if (!monsters.TryGetGroup(line.Action, out subMonsterAbilityGroup)) { subMonsterAbilityGroup = new StatGroup(line.Action); subMonsterAbilityGroup.Stats.AddStats(this.DamageStatList(subMonsterGroup, true)); monsters.AddGroup(subMonsterAbilityGroup); } this.Stats.IncrementStat("TotalDamageActionsUsed"); subAbilityGroup.Stats.IncrementStat("TotalDamageActionsUsed"); subMonsterGroup.Stats.IncrementStat("TotalDamageActionsUsed"); subMonsterAbilityGroup.Stats.IncrementStat("TotalDamageActionsUsed"); if (line.Hit) { this.Stats.IncrementStat("TotalOverallDamage", line.Amount); subAbilityGroup.Stats.IncrementStat("TotalOverallDamage", line.Amount); subMonsterGroup.Stats.IncrementStat("TotalOverallDamage", line.Amount); subMonsterAbilityGroup.Stats.IncrementStat("TotalOverallDamage", line.Amount); if (line.Crit) { this.Stats.IncrementStat("DamageCritHit"); subAbilityGroup.Stats.IncrementStat("DamageCritHit"); subMonsterGroup.Stats.IncrementStat("DamageCritHit"); subMonsterAbilityGroup.Stats.IncrementStat("DamageCritHit"); this.Stats.IncrementStat("CriticalDamage", line.Amount); subAbilityGroup.Stats.IncrementStat("CriticalDamage", line.Amount); subMonsterGroup.Stats.IncrementStat("CriticalDamage", line.Amount); subMonsterAbilityGroup.Stats.IncrementStat("CriticalDamage", line.Amount); if (line.Modifier != 0) { var mod = ParseHelper.GetBonusAmount(line.Amount, line.Modifier); var modStat = "DamageCritMod"; this.Stats.IncrementStat(modStat, mod); subAbilityGroup.Stats.IncrementStat(modStat, mod); subMonsterGroup.Stats.IncrementStat(modStat, mod); subMonsterAbilityGroup.Stats.IncrementStat(modStat, mod); } } else { this.Stats.IncrementStat("DamageRegHit"); subAbilityGroup.Stats.IncrementStat("DamageRegHit"); subMonsterGroup.Stats.IncrementStat("DamageRegHit"); subMonsterAbilityGroup.Stats.IncrementStat("DamageRegHit"); this.Stats.IncrementStat("RegularDamage", line.Amount); subAbilityGroup.Stats.IncrementStat("RegularDamage", line.Amount); subMonsterGroup.Stats.IncrementStat("RegularDamage", line.Amount); subMonsterAbilityGroup.Stats.IncrementStat("RegularDamage", line.Amount); if (line.Modifier != 0) { var mod = ParseHelper.GetBonusAmount(line.Amount, line.Modifier); var modStat = "DamageRegMod"; this.Stats.IncrementStat(modStat, mod); subAbilityGroup.Stats.IncrementStat(modStat, mod); subMonsterGroup.Stats.IncrementStat(modStat, mod); subMonsterAbilityGroup.Stats.IncrementStat(modStat, mod); } } } else { this.Stats.IncrementStat("DamageRegMiss"); subAbilityGroup.Stats.IncrementStat("DamageRegMiss"); subMonsterGroup.Stats.IncrementStat("DamageRegMiss"); subMonsterAbilityGroup.Stats.IncrementStat("DamageRegMiss"); } foreach (PropertyInfo stat in fields.Where(stat => LD.Contains(stat.Name)).Where(stat => Equals(stat.GetValue(line), true))) { var regStat = $"Damage{stat.Name}"; this.Stats.IncrementStat(regStat); subAbilityGroup.Stats.IncrementStat(regStat); subMonsterGroup.Stats.IncrementStat(regStat); subMonsterAbilityGroup.Stats.IncrementStat(regStat); if (line.Modifier == 0) { continue; } var mod = ParseHelper.GetBonusAmount(line.Amount, line.Modifier); var modStat = $"Damage{stat.Name}Mod"; this.Stats.IncrementStat(modStat, mod); subAbilityGroup.Stats.IncrementStat(modStat, mod); subMonsterGroup.Stats.IncrementStat(modStat, mod); subMonsterAbilityGroup.Stats.IncrementStat(modStat, mod); } System.Console.WriteLine($"Dmg update: now: {line.Amount} (crit: {line.Crit}), Total: {this.Stats.GetStatValue("TotalDamageActionsUsed")}, crit: {this.Stats.GetStatValue("DamageCritHit")} "); }
public override void ParseExcel(DataRow row) { if (Convert.ToInt32(row[3].ToString()) >= 5000000) { LineDay l = new LineDay(Convert.ToInt32(row[2].ToString()), row[0].ToString()); if (!LD.Contains(l)) { LD.Add(l); } } if (row[6].ToString().ToUpper().Contains("VST") || row[6].ToString().ToUpper().Contains("MITTE") || row[6].ToString().ToUpper().Contains("M-TEIL") || row[6].ToString().Contains("Motorschutzabdeckung") || row[6].ToString().Contains("Sichtschutz")) { SPtime += Convert.ToInt16(row[7].ToString()); SPcount++; } //Console.WriteLine(row[6].ToString()); if (row[6].ToString().ToUpper().Contains("FAKI")) { if (Convert.ToInt32(row[3].ToString()) >= 5000000) { FCcount += 1; } FCtime += Convert.ToInt16(row[7].ToString()); } else if (row[6].ToString().ToUpper().Contains("FALE")) { if (Convert.ToInt32(row[3].ToString()) >= 5000000) { FBcount += 1; } FBtime += Convert.ToInt16(row[7].ToString()); } else if (row[6].ToString().ToUpper().Contains("FOLE")) { if (Convert.ToInt32(row[3].ToString()) >= 5000000) { if ((row[6].ToString().ToUpper().Contains("FSS"))) { RB100count += 1; } else if ((row[6].ToString().ToUpper().Contains("FES"))) { RB40count += 1; } } if (row[6].ToString().ToUpper().Contains("FES") || (row[6].ToString().ToUpper().Contains("FSS"))) { RBtime += Convert.ToInt16(row[7].ToString()); } } else if (row[6].ToString().ToUpper().Contains("FOKI")) { if (Convert.ToInt32(row[3].ToString()) >= 5000000) { if (row[6].ToString().ToUpper().Contains("FOKI") && (row[6].ToString().ToUpper().Contains("FSS"))) { RC100count += 1; } if (row[6].ToString().ToUpper().Contains("FOKI") && (row[6].ToString().ToUpper().Contains("FES"))) { RC40count += 1; } } if (row[6].ToString().ToUpper().Contains("FES") || (row[6].ToString().ToUpper().Contains("FSS"))) { RCtime += Convert.ToInt16(row[7].ToString()); } } }
/// <summary> /// </summary> /// <param name="line"></param> public void SetDamageTaken(Line line) { if (this.Name == Constants.CharacterName) { // LineHistory.Add(new LineHistory(line)); } this.Last20DamageTakenActions.Add(new LineHistory(line)); if (this.Last20DamageTakenActions.Count > 20) { this.Last20DamageTakenActions.RemoveAt(0); } PropertyInfo[] fields = line.GetType().GetProperties(); StatGroup abilityGroup = this.GetGroup("DamageTakenByAction"); StatGroup subAbilityGroup; if (!abilityGroup.TryGetGroup(line.Action, out subAbilityGroup)) { subAbilityGroup = new StatGroup(line.Action); subAbilityGroup.Stats.AddStats(this.DamageTakenStatList(null)); abilityGroup.AddGroup(subAbilityGroup); } StatGroup damageGroup = this.GetGroup("DamageTakenByMonsters"); StatGroup subMonsterGroup; if (!damageGroup.TryGetGroup(line.Source, out subMonsterGroup)) { subMonsterGroup = new StatGroup(line.Source); subMonsterGroup.Stats.AddStats(this.DamageTakenStatList(null)); damageGroup.AddGroup(subMonsterGroup); } StatGroup abilities = subMonsterGroup.GetGroup("DamageTakenByMonstersByAction"); StatGroup subMonsterAbilityGroup; if (!abilities.TryGetGroup(line.Action, out subMonsterAbilityGroup)) { subMonsterAbilityGroup = new StatGroup(line.Action); subMonsterAbilityGroup.Stats.AddStats(this.DamageTakenStatList(subMonsterGroup, true)); abilities.AddGroup(subMonsterAbilityGroup); } this.Stats.IncrementStat("TotalDamageTakenActionsUsed"); subAbilityGroup.Stats.IncrementStat("TotalDamageTakenActionsUsed"); subMonsterGroup.Stats.IncrementStat("TotalDamageTakenActionsUsed"); subMonsterAbilityGroup.Stats.IncrementStat("TotalDamageTakenActionsUsed"); if (line.Hit) { this.Stats.IncrementStat("TotalOverallDamageTaken", line.Amount); subAbilityGroup.Stats.IncrementStat("TotalOverallDamageTaken", line.Amount); subMonsterGroup.Stats.IncrementStat("TotalOverallDamageTaken", line.Amount); subMonsterAbilityGroup.Stats.IncrementStat("TotalOverallDamageTaken", line.Amount); if (line.Crit) { this.Stats.IncrementStat("DamageTakenCritHit"); subAbilityGroup.Stats.IncrementStat("DamageTakenCritHit"); subMonsterGroup.Stats.IncrementStat("DamageTakenCritHit"); subMonsterAbilityGroup.Stats.IncrementStat("DamageTakenCritHit"); this.Stats.IncrementStat("CriticalDamageTaken", line.Amount); subAbilityGroup.Stats.IncrementStat("CriticalDamageTaken", line.Amount); subMonsterGroup.Stats.IncrementStat("CriticalDamageTaken", line.Amount); subMonsterAbilityGroup.Stats.IncrementStat("CriticalDamageTaken", line.Amount); if (line.Modifier != 0) { var mod = ParseHelper.GetBonusAmount(line.Amount, line.Modifier); var modStat = "DamageTakenCritMod"; this.Stats.IncrementStat(modStat, mod); subAbilityGroup.Stats.IncrementStat(modStat, mod); subMonsterGroup.Stats.IncrementStat(modStat, mod); subMonsterAbilityGroup.Stats.IncrementStat(modStat, mod); } } else { this.Stats.IncrementStat("DamageTakenRegHit"); subAbilityGroup.Stats.IncrementStat("DamageTakenRegHit"); subMonsterGroup.Stats.IncrementStat("DamageTakenRegHit"); subMonsterAbilityGroup.Stats.IncrementStat("DamageTakenRegHit"); this.Stats.IncrementStat("RegularDamageTaken", line.Amount); subAbilityGroup.Stats.IncrementStat("RegularDamageTaken", line.Amount); subMonsterGroup.Stats.IncrementStat("RegularDamageTaken", line.Amount); subMonsterAbilityGroup.Stats.IncrementStat("RegularDamageTaken", line.Amount); if (line.Modifier != 0) { var mod = ParseHelper.GetBonusAmount(line.Amount, line.Modifier); var modStat = "DamageTakenRegMod"; this.Stats.IncrementStat(modStat, mod); subAbilityGroup.Stats.IncrementStat(modStat, mod); subMonsterGroup.Stats.IncrementStat(modStat, mod); subMonsterAbilityGroup.Stats.IncrementStat(modStat, mod); } } } else { this.Stats.IncrementStat("DamageTakenRegMiss"); subAbilityGroup.Stats.IncrementStat("DamageTakenRegMiss"); subMonsterGroup.Stats.IncrementStat("DamageTakenRegMiss"); subMonsterAbilityGroup.Stats.IncrementStat("DamageTakenRegMiss"); } foreach (PropertyInfo stat in fields.Where(stat => LD.Contains(stat.Name)).Where(stat => Equals(stat.GetValue(line), true))) { var regStat = $"DamageTaken{stat.Name}"; this.Stats.IncrementStat(regStat); subAbilityGroup.Stats.IncrementStat(regStat); subMonsterGroup.Stats.IncrementStat(regStat); subMonsterAbilityGroup.Stats.IncrementStat(regStat); if (line.Modifier == 0) { continue; } var mod = ParseHelper.GetBonusAmount(line.Amount, line.Modifier); var modStat = $"DamageTaken{stat.Name}Mod"; this.Stats.IncrementStat(modStat, mod); subAbilityGroup.Stats.IncrementStat(modStat, mod); subMonsterGroup.Stats.IncrementStat(modStat, mod); subMonsterAbilityGroup.Stats.IncrementStat(modStat, mod); } }