using System.Linq; using System.Globalization; using EDJournal; namespace NonaBGS.BGS { public class FactionKillBonds : LogEntry { public int TotalSum { get { return Entries .OfType() .Sum(x => x.Reward) ; } } public string VictimFaction { get { return Entries .OfType() .First() .VictimFaction ; } } public override int CompareTo(LogEntry other) { if (other.GetType() != typeof(FactionKillBonds)) { return -1; } var b = other as FactionKillBonds; if (b.VictimFaction == VictimFaction) { return 0; } return -1; } public override string ToString() { return string.Format("Faction Kill Bonds: {0} against {1}", Credits.FormatCredits(TotalSum), VictimFaction); } } }