Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }