using EDPlayerJournal.Entries;
namespace EDPlayerJournal.BGS;
public class ThargoidKill : Transaction {
///
/// Thargoid vessel that was killed
///
public ThargoidVessel ThargoidType { get; set; } = ThargoidVessel.Unknown;
///
/// Name of the thargoid type killed
///
public string? ThargoidName { get; set; }
///
/// Total reward received
///
public ulong TotalReward {
get { return (ulong)Entries.OfType().Sum(x => (decimal)x.Reward); }
}
///
/// Kiling thargoids contributes to the system wide effort of
/// the thargoid war.
///
public override bool SystemContribution {
get { return true; }
}
public ThargoidKill() { }
public ThargoidKill(FactionKillBondEntry entry) {
if (!Factions.IsThargoid(entry.VictimFaction)) {
throw new Exception("Not a valid thargoid kill");
}
Entries.Add(entry);
ThargoidType = Thargoid.GetVesselByPayout(entry.Reward);
ThargoidName = Thargoid.GetVesselName(ThargoidType);
}
public override string ToString() {
return string.Format("{0}x {1} killed", Entries.Count, ThargoidName);
}
}