public void AddDamageEntry(Guid id, int damage, List <DamageType> types) { if (!this.fActive) { return; } DamageLogEntry damageLogEntry = new DamageLogEntry() { CombatantID = id, Amount = damage, Types = types }; this.fEntries.Add(damageLogEntry); }
public int Damage(List <Guid> allyIDs) { int amount = 0; foreach (IEncounterLogEntry fEntry in this.fEntries) { DamageLogEntry damageLogEntry = fEntry as DamageLogEntry; if (damageLogEntry == null || !allyIDs.Contains(damageLogEntry.CombatantID)) { continue; } amount += damageLogEntry.Amount; } return(amount); }