public override string LegendsDescription() { string timestring = base.LegendsDescription(); return(string.Format("{0} {1} launched an expedition to reclaim {2}.", timestring, SiteCiv.ToString(), Site.AltName)); }
public override string Print(bool link = true, DwarfObject pov = null) { string eventString = GetYearTime(); eventString += Spotter?.ToLink(true, pov) ?? "An unknown creature"; if (SiteCiv != null) { eventString += " of "; eventString += SiteCiv.ToLink(true, pov); } eventString += " spotted the forces"; if (LeaverCiv != null) { eventString += " of "; eventString += LeaverCiv.ToLink(true, pov); } eventString += " slipping out"; if (Site != null) { eventString += " of "; eventString += Site.ToLink(true, pov); } eventString += PrintParentCollection(link, pov); eventString += "."; return(eventString); }
internal override string ToTimelineString() { string timelinestring = base.ToTimelineString(); return(string.Format("{0} {1} reclaimed {2}.", timelinestring, SiteCiv.ToString(), Site.AltName)); }
public override string Print(bool link = true, DwarfObject pov = null) { string eventString = GetYearTime(); eventString += "the forces of "; eventString += FreeingCiv?.ToLink(link, pov, this) ?? "an unknown civilization"; eventString += " freed "; for (int i = 0; i < RescuedHistoricalFigures.Count; i++) { if (i > 0) { eventString += " and "; } eventString += RescuedHistoricalFigures[i]?.ToLink(link, pov, this) ?? "an unknown creature"; } if (Site != null) { eventString += " from " + Site.ToLink(link, pov, this); } if (SiteCiv != null) { eventString += " and " + SiteCiv.ToLink(link, pov, this); } if (HoldingCiv != null) { eventString += " of " + HoldingCiv.ToLink(link, pov, this); } eventString += PrintParentCollection(link, pov); eventString += "."; return(eventString); }
public HfAttackedSite(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "attacker_hfid": Attacker = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "defender_civ_id": DefenderCiv = world.GetEntity(Convert.ToInt32(property.Value)); break; case "site_civ_id": SiteCiv = world.GetEntity(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; } } Attacker.AddEvent(this); DefenderCiv.AddEvent(this); SiteCiv.AddEvent(this); Site.AddEvent(this); }
public override string LegendsDescription() { string timestring = base.LegendsDescription(); return(string.Format("{0} {1} defeated {2} of {3} and destroyed {4}.", timestring, AttackerCiv.ToString(), SiteCiv.ToString(), DefenderCiv.ToString(), Site.AltName)); }
public HfFreed(List <Property> properties, World world) : base(properties, world) { RescuedHistoricalFigures = new List <HistoricalFigure>(); foreach (Property property in properties) { switch (property.Name) { case "freeing_civ_id": FreeingCiv = world.GetEntity(Convert.ToInt32(property.Value)); break; case "freeing_hfid": FreeingHf = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "rescued_hfid": RescuedHistoricalFigures.Add(world.GetHistoricalFigure(Convert.ToInt32(property.Value))); break; case "site_civ_id": SiteCiv = world.GetEntity(Convert.ToInt32(property.Value)); break; case "holding_civ_id": HoldingCiv = world.GetEntity(Convert.ToInt32(property.Value)); break; } } foreach (var rescuedHistoricalFigure in RescuedHistoricalFigures) { rescuedHistoricalFigure.AddEvent(this); } FreeingCiv.AddEvent(this); FreeingHf.AddEvent(this); Site.AddEvent(this); SiteCiv.AddEvent(this); HoldingCiv.AddEvent(this); }
} // TODO // legends_plus.xml public CreateEntityPosition(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "histfig": HistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "civ": Civ = world.GetEntity(Convert.ToInt32(property.Value)); break; case "site_civ": SiteCiv = world.GetEntity(Convert.ToInt32(property.Value)); break; case "position": Position = property.Value; break; case "reason": Reason = Convert.ToInt32(property.Value); break; } } HistoricalFigure.AddEvent(this); Civ.AddEvent(this); if (SiteCiv != Civ) { SiteCiv.AddEvent(this); } }
public override string LegendsDescription() { string timestring = base.LegendsDescription(); return(string.Format("{0} {1} defeated {2} and placed the {3} {4} in charge of {5}. The new government was called {6}.", timestring, AttackerCiv.ToString(), SiteCiv.ToString(), NewLeaderHF.Race.ToString(), NewLeaderHF.ToString(), Site.AltName, NewSiteCiv.ToString())); }
public override string LegendsDescription() { string timestring = base.LegendsDescription(); return(string.Format("{0} {1} of {2} finished contruction of {3} connecting {4} and {5}.", timestring, SiteCiv.ToString(), Civ.ToString(), "CONSTRUCTION " + WC.ToString(), Site1.ToString(), Site2.ToString())); }
public override string LegendsDescription() { string timestring = base.LegendsDescription(); return(string.Format("{0} {1} defeated {2} and took over {3}. The new government was called {4}.", timestring, AttackerCiv.ToString(), SiteCiv.ToString(), Site.AltName, NewSiteCiv.ToString())); }
public override string LegendsDescription() { string timestring = base.LegendsDescription(); return(string.Format("{0} {1} of {2} abandoned the settlement of {3}.", timestring, SiteCiv.ToString(), Civ.ToString(), Site.AltName)); }
public HfDestroyedSite(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "attacker_hfid": Attacker = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "defender_civ_id": DefenderCiv = world.GetEntity(Convert.ToInt32(property.Value)); break; case "site_civ_id": SiteCiv = world.GetEntity(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; } } Attacker.AddEvent(this); DefenderCiv.AddEvent(this); SiteCiv.AddEvent(this); Site.AddEvent(this); OwnerPeriod lastSiteOwnerPeriod = Site.OwnerHistory.LastOrDefault(); if (lastSiteOwnerPeriod != null) { lastSiteOwnerPeriod.EndYear = Year; lastSiteOwnerPeriod.EndCause = "destroyed"; lastSiteOwnerPeriod.Ender = Attacker; } if (DefenderCiv != null) { OwnerPeriod lastDefenderCivOwnerPeriod = DefenderCiv.SiteHistory.LastOrDefault(s => s.Site == Site); if (lastDefenderCivOwnerPeriod != null) { lastDefenderCivOwnerPeriod.EndYear = Year; lastDefenderCivOwnerPeriod.EndCause = "destroyed"; lastDefenderCivOwnerPeriod.Ender = Attacker; } } OwnerPeriod lastSiteCiveOwnerPeriod = SiteCiv.SiteHistory.LastOrDefault(s => s.Site == Site); if (lastSiteCiveOwnerPeriod != null) { lastSiteCiveOwnerPeriod.EndYear = Year; lastSiteCiveOwnerPeriod.EndCause = "destroyed"; lastSiteCiveOwnerPeriod.Ender = Attacker; } }
public CreateEntityPosition(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "histfig": HistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "civ": Civ = world.GetEntity(Convert.ToInt32(property.Value)); break; case "site_civ": SiteCiv = world.GetEntity(Convert.ToInt32(property.Value)); break; case "position": Position = property.Value; break; case "reason": switch (property.Value) { case "0": case "force_of_argument": Reason = ReasonForCreatingEntity.ForceOfArgument; break; case "1": case "threat_of_violence": Reason = ReasonForCreatingEntity.ThreatOfViolence; break; case "2": case "collaboration": Reason = ReasonForCreatingEntity.Collaboration; break; case "3": case "wave_of_popular_support": Reason = ReasonForCreatingEntity.WaveOfPopularSupport; break; case "4": case "as_a_matter_of_course": Reason = ReasonForCreatingEntity.AsAMatterOfCourse; break; } break; } } HistoricalFigure.AddEvent(this); Civ.AddEvent(this); if (SiteCiv != Civ) { SiteCiv.AddEvent(this); } }
public override string LegendsDescription() { string timestring = base.LegendsDescription(); if (SiteCiv == null) { return(string.Format("{0} {1} founded {2}.", timestring, Civ.ToString(), Site.AltName)); } else { return(string.Format("{0} {1} of {2} founded {3}.", timestring, SiteCiv.ToString(), Civ.ToString(), Site.AltName)); } }
public override string Print(bool link = true, DwarfObject pov = null) { string eventString = GetYearTime(); eventString += Spotter.ToLink(true, pov); eventString += " of "; eventString += SiteCiv.ToLink(true, pov); eventString += " spotted the forces of "; eventString += LeaverCiv?.ToLink(true, pov) ?? "an unknown civilization"; eventString += " slipping out of "; eventString += Site?.ToLink(true, pov); eventString += PrintParentCollection(link, pov); eventString += "."; return(eventString); }
public override string Print(bool link = true, DwarfObject pov = null) { string eventString = GetYearTime(); eventString += Attacker?.ToLink(true, pov) ?? "an unknown civilization"; eventString += " slipped into "; eventString += Site?.ToLink(true, pov) ?? "an unknown site"; if (SiteCiv != null) { eventString += " undetected by "; eventString += SiteCiv.ToLink(true, pov); eventString += " of "; eventString += Defender?.ToLink(true, pov) ?? "an unknown civilization"; } eventString += PrintParentCollection(link, pov); eventString += "."; return(eventString); }
public override string LegendsDescription() { string timestring = base.LegendsDescription(); if (SiteCiv == null) { return(string.Format("{0} {1} constructed {2} in {3}.", timestring, Civ.ToString(), "UNKNOWN", Site.AltName)); } else { return(string.Format("{0} {1} of {2} constructed {3} in {4}.", timestring, SiteCiv.ToString(), Civ.ToString(), "UNKNOWN", Site.AltName)); } }
public override string LegendsDescription() { string timestring = base.LegendsDescription(); if (DefenderGeneralHF == null) { return(string.Format("{0} {1} attacked {2} of {3} at {4}. \n" + "The {5} {6} led the attack.", timestring, AttackerCiv.ToString(), SiteCiv.ToString(), DefenderCiv.ToString(), Site.AltName, AttackerGeneralHF.Race.ToString(), AttackerGeneralHF.ToString())); } else { return(string.Format("{0} {1} attacked {2} of {3} at {4}. \n" + "The {5} {6} led the attack, \nand the defenders were led by the {7} {8}.", timestring, AttackerCiv.ToString(), SiteCiv.ToString(), DefenderCiv.ToString(), Site.AltName, AttackerGeneralHF.Race.ToString(), AttackerGeneralHF.ToString(), DefenderGeneralHF.Race.ToString(), DefenderGeneralHF.ToString())); } }
public SpottedLeavingSite(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "spotter_hfid": Spotter = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "leaver_civ_id": LeaverCiv = world.GetEntity(Convert.ToInt32(property.Value)); break; case "site_civ_id": SiteCiv = world.GetEntity(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; } } Spotter.AddEvent(this); LeaverCiv.AddEvent(this); SiteCiv.AddEvent(this); Site.AddEvent(this); }
public override string Print(bool link = true, DwarfObject pov = null) { string eventString = GetYearTime() + Attacker.ToLink(link, pov) + " attacked " + SiteCiv.ToLink(link, pov); if (DefenderCiv != null && DefenderCiv != SiteCiv) { eventString += " of " + DefenderCiv.ToLink(link, pov); } eventString += " at " + Site.ToLink(link, pov); eventString += PrintParentCollection(link, pov); eventString += "."; return(eventString); }
public override string Print(bool link = true, DwarfObject pov = null) { string eventString = GetYearTime(); switch (Reason) { case 0: eventString += HistoricalFigure != null?HistoricalFigure.ToLink(link, pov) : "UNKNOWN HISTORICAL FIGURE"; eventString += " of "; eventString += Civ != null?Civ.ToLink(link, pov) : "UNKNOWN CIV"; eventString += " created the position of "; eventString += !string.IsNullOrWhiteSpace(Position) ? Position : "UNKNOWN POSITION"; eventString += " through force of argument"; break; case 1: eventString += HistoricalFigure != null?HistoricalFigure.ToLink(link, pov) : "UNKNOWN HISTORICAL FIGURE"; eventString += " of "; eventString += Civ != null?Civ.ToLink(link, pov) : "UNKNOWN CIV"; eventString += " compelled the creation of the position of "; eventString += !string.IsNullOrWhiteSpace(Position) ? Position : "UNKNOWN POSITION"; eventString += " with threats of violence"; break; case 2: eventString += SiteCiv != null?SiteCiv.ToLink(link, pov) : "UNKNOWN ENTITY"; eventString += " collaborated to create the position of "; eventString += !string.IsNullOrWhiteSpace(Position) ? Position : "UNKNOWN POSITION"; break; case 3: eventString += HistoricalFigure != null?HistoricalFigure.ToLink(link, pov) : "UNKNOWN HISTORICAL FIGURE"; eventString += " of "; eventString += Civ != null?Civ.ToLink(link, pov) : "UNKNOWN CIV"; eventString += " created the position of "; eventString += !string.IsNullOrWhiteSpace(Position) ? Position : "UNKNOWN POSITION"; eventString += ", pushed by a wave of popular support"; break; case 4: eventString += HistoricalFigure != null?HistoricalFigure.ToLink(link, pov) : "UNKNOWN HISTORICAL FIGURE"; eventString += " of "; eventString += Civ != null?Civ.ToLink(link, pov) : "UNKNOWN CIV"; eventString += " created the position of "; eventString += !string.IsNullOrWhiteSpace(Position) ? Position : "UNKNOWN POSITION"; eventString += " as a matter of course"; break; } eventString += PrintParentCollection(link, pov); eventString += "."; return(eventString); }