public ArtifactLost(List <Property> properties, World world) : base(properties, world) { int sitePropertyId = -1; foreach (Property property in properties) { switch (property.Name) { case "artifact_id": Artifact = world.GetArtifact(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "site_property_id": sitePropertyId = Convert.ToInt32(property.Value); break; } } if (Site != null && sitePropertyId != -1) { SiteProperty = Site.SiteProperties.FirstOrDefault(sp => sp.Id == sitePropertyId); } Artifact.AddEvent(this); Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }
public HfReachSummit(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "group_hfid": HistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "site": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "coords": Coordinates = Formatting.ConvertToLocation(property.Value); break; case "group": if (HistoricalFigure == null) { HistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); } else { property.Known = true; } break; } } HistoricalFigure.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); Site.AddEvent(this); }
public Gamble(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "old_account": OldAccount = Convert.ToInt32(property.Value); break; case "new_account": NewAccount = Convert.ToInt32(property.Value); break; case "gambler_hfid": Gambler = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "structure_id": StructureId = Convert.ToInt32(property.Value); break; } } if (Site != null) { Structure = Site.Structures.FirstOrDefault(structure => structure.Id == StructureId); } Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); Gambler.AddEvent(this); Structure.AddEvent(this); }
public HfRevived(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "ghost": _ghost = property.Value; break; case "hfid": HistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "raised_before": RaisedBefore = true; property.Known = true; break; } } HistoricalFigure.AddEvent(this); Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }
public HfReunion(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "group_1_hfid": HistoricalFigure1 = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "group_2_hfid": HistoricalFigure2 = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; } } HistoricalFigure1.AddEvent(this); HistoricalFigure2.AddEvent(this); Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }
public HfAbducted(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "target_hfid": Target = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "snatcher_hfid": Snatcher = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; } } Target.AddEvent(this); Snatcher.AddEvent(this); Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }
public HfTravel(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "coords": Coordinates = Formatting.ConvertToLocation(property.Value); break; case "escape": Escaped = true; property.Known = true; break; case "return": Returned = true; property.Known = true; break; case "group_hfid": HistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; } } HistoricalFigure.AddEvent(this); Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }
public HfsFormedReputationRelationship(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "hfid1": HistoricalFigure1 = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "hfid2": HistoricalFigure2 = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "identity_id1": IdentityId1 = Convert.ToInt32(property.Value); break; case "identity_id2": IdentityId2 = Convert.ToInt32(property.Value); break; case "hf_rep_1_of_2": switch (property.Value) { case "information source": HfRep1Of2 = ReputationType.InformationSource; break; default: property.Known = false; break; } break; case "hf_rep_2_of_1": switch (property.Value) { case "information source": HfRep2Of1 = ReputationType.InformationSource; break; case "buddy": HfRep2Of1 = ReputationType.Buddy; break; default: property.Known = false; break; } break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; } } HistoricalFigure1.AddEvent(this); HistoricalFigure2.AddEvent(this); Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }
public FieldBattle(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "coords": Coordinates = Formatting.ConvertToLocation(property.Value); break; case "attacker_civ_id": Attacker = world.GetEntity(Convert.ToInt32(property.Value)); break; case "defender_civ_id": Defender = world.GetEntity(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "attacker_general_hfid": AttackerGeneral = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "defender_general_hfid": DefenderGeneral = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; } } Attacker.AddEvent(this); Defender.AddEvent(this); AttackerGeneral.AddEvent(this); DefenderGeneral.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }
public EntityIncorporated(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "joiner_entity_id": JoinerEntity = world.GetEntity(Convert.ToInt32(property.Value)); break; case "joined_entity_id": JoinedEntity = world.GetEntity(Convert.ToInt32(property.Value)); break; case "leader_hfid": Leader = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "partial_incorporation": property.Known = true; PartialIncorporation = true; break; } } Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); Leader.AddEvent(this); JoinerEntity.AddEvent(this); JoinedEntity.AddEvent(this); }
public HfPerformedHorribleExperiments(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "group_hfid": GroupHistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "structure_id": StructureId = Convert.ToInt32(property.Value); break; } } if (Site != null) { Structure = Site.Structures.FirstOrDefault(structure => structure.Id == StructureId); } Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); Structure.AddEvent(this); }
public OccasionEvent(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "civ_id": Civ = world.GetEntity(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "occasion_id": OccasionId = Convert.ToInt32(property.Value); break; case "schedule_id": ScheduleId = Convert.ToInt32(property.Value); break; } } if (Civ != null && Civ.Occassions.Any()) { EntityOccasion = Civ.Occassions.ElementAt(OccasionId); if (EntityOccasion != null) { Schedule = EntityOccasion.Schedules.ElementAt(ScheduleId); // DEBUG //if (Schedule.Reference != -1 && Schedule.Type == ScheduleType.Storytelling) //{ // WorldEvent worldEvent = World.GetEvent(Schedule.Reference) as WorldEvent; // if (!(worldEvent is IFeatured)) // { // world.ParsingErrors.Report("Unknown Occasion Feature - worldEvent.Type: " + worldEvent.Type); // } //} } } Civ.AddEvent(this); Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }
public HfSimpleBattleEvent(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "subtype": switch (property.Value) { case "attacked": SubType = HfSimpleBattleType.Attacked; break; case "scuffle": SubType = HfSimpleBattleType.Scuffle; break; case "confront": SubType = HfSimpleBattleType.Confronted; break; case "2 lost after receiving wounds": SubType = HfSimpleBattleType.Hf2LostAfterReceivingWounds; break; case "2 lost after giving wounds": SubType = HfSimpleBattleType.Hf2LostAfterGivingWounds; break; case "2 lost after mutual wounds": SubType = HfSimpleBattleType.Hf2LostAfterMutualWounds; break; case "happen upon": SubType = HfSimpleBattleType.HappenedUpon; break; case "ambushed": SubType = HfSimpleBattleType.Ambushed; break; case "corner": SubType = HfSimpleBattleType.Cornered; break; case "surprised": SubType = HfSimpleBattleType.Surprised; break; case "got into a brawl": SubType = HfSimpleBattleType.GotIntoABrawl; break; case "subdued": SubType = HfSimpleBattleType.Subdued; break; default: SubType = HfSimpleBattleType.Unknown; UnknownSubType = property.Value; property.Known = false; break; } break; case "group_1_hfid": HistoricalFigure1 = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "group_2_hfid": HistoricalFigure2 = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; } } HistoricalFigure1.AddEvent(this); HistoricalFigure2.AddEvent(this); Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }
public HfConfronted(List <Property> properties, World world) : base(properties, world) { Reasons = new List <ConfrontReason>(); _unknownReasons = new List <string>(); foreach (Property property in properties) { switch (property.Name) { case "hfid": HistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "situation": switch (property.Value) { case "general suspicion": Situation = ConfrontSituation.GeneralSuspicion; break; default: Situation = ConfrontSituation.Unknown; _unknownSituation = property.Value; world.ParsingErrors.Report("Unknown HF Confronted Situation: " + _unknownSituation); break; } break; case "reason": switch (property.Value) { case "murder": Reasons.Add(ConfrontReason.Murder); break; case "ageless": Reasons.Add(ConfrontReason.Ageless); break; default: Reasons.Add(ConfrontReason.Unknown); _unknownReasons.Add(property.Value); world.ParsingErrors.Report("Unknown HF Confronted Reason: " + property.Value); break; } break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "coords": Coordinates = Formatting.ConvertToLocation(property.Value); break; } } HistoricalFigure.AddEvent(this); Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }
public BodyAbused(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "coords": Coordinates = Formatting.ConvertToLocation(property.Value); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "site": if (Site == null) { Site = world.GetSite(Convert.ToInt32(property.Value)); } else { property.Known = true; } break; case "civ": Abuser = world.GetEntity(Convert.ToInt32(property.Value)); break; case "bodies": Body = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "histfig": HistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "props_item_type": ItemType = property.Value; break; case "props_item_subtype": ItemSubType = property.Value; break; case "props_item_mat": Material = property.Value; break; case "abuse_type": AbuseTypeId = Convert.ToInt32(property.Value); break; case "props_pile_type": PileTypeId = Convert.ToInt32(property.Value); break; case "props_item_mat_type": MaterialTypeId = Convert.ToInt32(property.Value); break; case "props_item_mat_index": MaterialIndex = Convert.ToInt32(property.Value); break; } } Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); Body.AddEvent(this); HistoricalFigure.AddEvent(this); Abuser.AddEvent(this); }
public ArtifactFound(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "artifact_id": Artifact = world.GetArtifact(Convert.ToInt32(property.Value)); break; case "hist_figure_id": HistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "site_property_id": SitePropertyId = Convert.ToInt32(property.Value); break; case "structure_id": StructureId = Convert.ToInt32(property.Value); break; case "unit_id": UnitId = Convert.ToInt32(property.Value); if (UnitId != -1) { property.Known = false; } break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; } } if (Site != null) { Structure = Site.Structures.FirstOrDefault(structure => structure.Id == StructureId); SiteProperty = Site.SiteProperties.FirstOrDefault(sp => sp.Id == SitePropertyId); } Artifact.AddEvent(this); HistoricalFigure.AddEvent(this); Site.AddEvent(this); Structure.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }
public HfRelationShipDenied(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "seeker_hfid": Seeker = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "target_hfid": Target = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "relationship": Relationship = property.Value; break; case "reason": Reason = property.Value; break; case "reason_id": ReasonHf = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; } } Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); Seeker.AddEvent(this); Target.AddEvent(this); if (ReasonHf != null && !ReasonHf.Equals(Seeker) && !ReasonHf.Equals(Target)) { ReasonHf.AddEvent(this); } }
public ChangeHfBodyState(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "hfid": HistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "body_state": switch (property.Value) { case "entombed at site": BodyState = BodyState.EntombedAtSite; break; default: BodyState = BodyState.Unknown; _unknownBodyState = property.Value; world.ParsingErrors.Report("Unknown HF Body State: " + _unknownBodyState); break; } break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "structure_id": case "building_id": StructureId = Convert.ToInt32(property.Value); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "coords": Coordinates = Formatting.ConvertToLocation(property.Value); break; } } if (Site != null) { Structure = Site.Structures.FirstOrDefault(structure => structure.Id == StructureId); } Structure.AddEvent(this); HistoricalFigure.AddEvent(this); Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }
public CreatureDevoured(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "victim": Victim = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "eater": Eater = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "entity": Entity = world.GetEntity(Convert.ToInt32(property.Value)); break; case "race": Race = property.Value.Replace("_", " "); break; case "caste": Caste = property.Value; break; case "site": if (Site == null) { Site = world.GetSite(Convert.ToInt32(property.Value)); } else { property.Known = true; } break; } } Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); Eater.AddEvent(this); Victim.AddEvent(this); Entity.AddEvent(this); }
public ChangeHfJob(List <Property> properties, World world) : base(properties, world) { NewJob = "UNKNOWN JOB"; OldJob = "UNKNOWN JOB"; foreach (Property property in properties) { switch (property.Name) { case "hfid": HistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "new_job": NewJob = string.Intern(property.Value.Replace("_", " ")); break; case "old_job": OldJob = string.Intern(property.Value.Replace("_", " ")); break; case "site": if (Site == null) { Site = world.GetSite(Convert.ToInt32(property.Value)); } else { property.Known = true; } break; } } HistoricalFigure.AddEvent(this); Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }
// http://www.bay12games.com/dwarves/mantisbt/view.php?id=11335 // 0011335: <site_entity_id> and <civ_entity_id> of "entity breach feature layer" event point both to same entity public EntityBreachFeatureLayer(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "site_entity_id": SiteEntity = world.GetEntity(Convert.ToInt32(property.Value)); break; case "civ_entity_id": CivEntity = world.GetEntity(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; } } if (SiteEntity != CivEntity) { SiteEntity.AddEvent(this); } CivEntity.AddEvent(this); Site.AddEvent(this); UndergroundRegion.AddEvent(this); }
public HfRecruitedUnitTypeForEntity(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "hfid": HistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "entity_id": Entity = world.GetEntity(Convert.ToInt32(property.Value)); break; case "unit_type": switch (property.Value) { case "monk": UnitType = UnitType.Monk; break; default: property.Known = false; break; } break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; } } HistoricalFigure.AddEvent(this); Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }
public HfWounded(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "woundee_hfid": Woundee = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "wounder_hfid": Wounder = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "woundee": if (Woundee == null) { Woundee = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); } else { property.Known = true; } break; case "wounder": if (Wounder == null) { Wounder = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); } else { property.Known = true; } break; case "site": if (Site == null) { Site = world.GetSite(Convert.ToInt32(property.Value)); } else { property.Known = true; } break; case "woundee_race": WoundeeRace = Convert.ToInt32(property.Value); break; case "woundee_caste": WoundeeCaste = Convert.ToInt32(property.Value); break; case "body_part": BodyPart = Convert.ToInt32(property.Value); break; case "injury_type": InjuryType = Convert.ToInt32(property.Value); break; case "part_lost": PartLost = Convert.ToInt32(property.Value); break; case "was_torture": property.Known = true; WasTorture = true; break; } } Woundee.AddEvent(this); if (Woundee != Wounder) { Wounder.AddEvent(this); } Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }
public HfDied(List <Property> properties, World world) : base(properties, world) { ItemId = -1; ShooterItemId = -1; SlayerItemId = -1; SlayerShooterItemId = -1; SlayerRace = "UNKNOWN"; SlayerCaste = "UNKNOWN"; Cause = DeathCause.Unknown; foreach (Property property in properties) { switch (property.Name) { case "slayer_item_id": SlayerItemId = Convert.ToInt32(property.Value); break; case "slayer_shooter_item_id": SlayerShooterItemId = Convert.ToInt32(property.Value); break; case "cause": switch (property.Value) { case "hunger": Cause = DeathCause.Starved; break; case "struck": Cause = DeathCause.Struck; break; case "murdered": Cause = DeathCause.Murdered; break; case "old age": Cause = DeathCause.OldAge; break; case "dragonfire": Cause = DeathCause.DragonsFire; break; case "shot": Cause = DeathCause.Shot; break; case "fire": Cause = DeathCause.Burned; break; case "thirst": Cause = DeathCause.Thirst; break; case "air": Cause = DeathCause.Suffocated; break; case "blood": Cause = DeathCause.Bled; break; case "cold": Cause = DeathCause.Cold; break; case "crushed bridge": Cause = DeathCause.CrushedByABridge; break; case "drown": Cause = DeathCause.Drowned; break; case "infection": Cause = DeathCause.Infection; break; case "obstacle": Cause = DeathCause.CollidedWithAnObstacle; break; case "put to rest": Cause = DeathCause.PutToRest; break; case "quitdead": Cause = DeathCause.StarvedQuit; break; case "trap": Cause = DeathCause.Trap; break; case "crushed": Cause = DeathCause.CaveIn; break; case "cage blasted": Cause = DeathCause.InACage; break; case "freezing water": Cause = DeathCause.FrozenInWater; break; case "exec generic": Cause = DeathCause.ExecutedGeneric; break; case "exec fed to beasts": Cause = DeathCause.ExecutedFedToBeasts; break; case "exec burned alive": Cause = DeathCause.ExecutedBurnedAlive; break; case "exec crucified": Cause = DeathCause.ExecutedCrucified; break; case "exec drowned": Cause = DeathCause.ExecutedDrowned; break; case "exec hacked to pieces": Cause = DeathCause.ExecutedHackedToPieces; break; case "exec buried alive": Cause = DeathCause.ExecutedBuriedAlive; break; case "exec beheaded": Cause = DeathCause.ExecutedBeheaded; break; case "blood drained": Cause = DeathCause.DrainedBlood; break; case "collapsed": Cause = DeathCause.Collapsed; break; case "scared to death": Cause = DeathCause.ScaredToDeath; break; case "scuttled": Cause = DeathCause.Scuttled; break; case "flying object": Cause = DeathCause.FlyingObject; break; case "slaughtered": Cause = DeathCause.Slaughtered; break; case "melt": Cause = DeathCause.Melted; break; case "spikes": Cause = DeathCause.Spikes; break; case "heat": Cause = DeathCause.Heat; break; case "vanish": Cause = DeathCause.Vanish; break; case "cooling magma": Cause = DeathCause.CoolingMagma; break; case "vehicle": Cause = DeathCause.Vehicle; break; case "suicide drowned": Cause = DeathCause.SuicideDrowned; break; case "suicide leaping": Cause = DeathCause.SuicideLeaping; break; case "chasm": Cause = DeathCause.Chasm; break; default: Cause = DeathCause.Unknown; UnknownCause = property.Value; world.ParsingErrors.Report("|==> Events 'hf died'/ \nUnknown Death Cause: " + UnknownCause); break; } break; case "slayer_race": SlayerRace = Formatting.FormatRace(property.Value); break; case "slayer_caste": SlayerCaste = property.Value; break; case "hfid": HistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "slayer_hfid": Slayer = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "victim_hf": if (HistoricalFigure == null) { HistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); } else { property.Known = true; } break; case "slayer_hf": if (Slayer == null) { Slayer = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); } else { property.Known = true; } break; case "site": if (Site == null) { Site = world.GetSite(Convert.ToInt32(property.Value)); } else { property.Known = true; } break; case "death_cause": property.Known = true; break; case "item": ItemId = Convert.ToInt32(property.Value); break; case "item_type": ItemType = property.Value; break; case "item_subtype": ItemSubType = property.Value; break; case "mat": ItemMaterial = property.Value; break; case "artifact_id": Artifact = world.GetArtifact(Convert.ToInt32(property.Value)); break; case "shooter_item": ShooterItemId = Convert.ToInt32(property.Value); break; case "shooter_item_type": ShooterItemType = property.Value; break; case "shooter_item_subtype": ShooterItemSubType = property.Value; break; case "shooter_mat": ShooterItemMaterial = property.Value; break; case "shooter_artifact_id": ShooterArtifact = world.GetArtifact(Convert.ToInt32(property.Value)); break; } } HistoricalFigure.AddEvent(this); if (HistoricalFigure.DeathCause == DeathCause.None) { HistoricalFigure.DeathCause = Cause; } if (Slayer != null) { if (HistoricalFigure != Slayer) { Slayer.AddEvent(this); } Slayer.NotableKills.Add(this); } Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); Artifact.AddEvent(this); }
public SquadVsSquad(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "a_hfid": AttackerHistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "d_hfid": DefenderHistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "a_squad_id": AttackerSquadId = Convert.ToInt32(property.Value); break; case "d_squad_id": DefenderSquadId = Convert.ToInt32(property.Value); break; case "d_race": DefenderRaceId = Convert.ToInt32(property.Value); break; case "d_interaction": // TODO last checked in version 0.44.10 property.Known = true; break; case "d_effect": // TODO last checked in version 0.44.10 property.Known = true; break; case "d_number": DefenderNumber = Convert.ToInt32(property.Value); break; case "d_slain": DefenderSlain = Convert.ToInt32(property.Value); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "structure_id": StructureId = Convert.ToInt32(property.Value); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "a_leader_hfid": AttackerLeader = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "d_leader_hfid": DefenderLeader = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "a_leadership_roll": AttackerLeadershipRoll = Convert.ToInt32(property.Value); break; case "d_leadership_roll": DefenderLeadershipRoll = Convert.ToInt32(property.Value); break; } } if (Site != null) { Structure = Site.Structures.FirstOrDefault(structure => structure.Id == StructureId); } AttackerHistoricalFigure.AddEvent(this); DefenderHistoricalFigure.AddEvent(this); Site.AddEvent(this); Structure.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); if (AttackerLeader != AttackerHistoricalFigure) { AttackerLeader.AddEvent(this); } if (DefenderLeader != DefenderHistoricalFigure) { DefenderLeader.AddEvent(this); } }
public BodyAbused(List <Property> properties, World world) : base(properties, world) { Bodies = new List <HistoricalFigure>(); int structureId = -1; foreach (Property property in properties) { switch (property.Name) { case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "coords": Coordinates = Formatting.ConvertToLocation(property.Value); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "site": if (Site == null) { Site = world.GetSite(Convert.ToInt32(property.Value)); } else { property.Known = true; } break; case "civ": Abuser = world.GetEntity(Convert.ToInt32(property.Value)); break; case "victim_entity": Victim = world.GetEntity(Convert.ToInt32(property.Value)); break; case "bodies": Bodies.Add(world.GetHistoricalFigure(Convert.ToInt32(property.Value))); break; case "histfig": HistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "props_item_type": case "item_type": ItemType = property.Value; break; case "props_item_subtype": case "item_subtype": ItemSubType = property.Value; break; case "props_item_mat": case "item_mat": Material = property.Value; break; case "abuse_type": switch (property.Value) { case "0": case "impaled": AbuseType = AbuseType.Impaled; break; case "1": case "piled": AbuseType = AbuseType.Piled; break; case "2": case "flayed": AbuseType = AbuseType.Flayed; break; case "3": case "hung": AbuseType = AbuseType.Hung; break; case "4": case "mutilated": AbuseType = AbuseType.Mutilated; break; case "5": case "animated": AbuseType = AbuseType.Animated; break; default: property.Known = false; break; } break; case "pile_type": switch (property.Value) { case "gruesomesculpture": PileType = PileType.GruesomeSculpture; break; case "grislymound": PileType = PileType.GrislyMound; break; case "grotesquepillar": PileType = PileType.GrotesquePillar; break; default: property.Known = false; break; } break; case "props_pile_type": PileTypeId = Convert.ToInt32(property.Value); break; case "props_item_mat_type": MaterialTypeId = Convert.ToInt32(property.Value); break; case "props_item_mat_index": MaterialIndex = Convert.ToInt32(property.Value); break; case "tree": property.Known = true; // TODO no idea what this is break; case "structure": structureId = Convert.ToInt32(property.Value); break; case "interaction": property.Known = true; // TODO no idea what this is break; } } Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); Bodies.ForEach(body => { if (body != HistoricalFigure.Unknown) { body.AddEvent(this); if (AbuseType == AbuseType.Animated) { body.CreatureTypes.Add(new HistoricalFigure.CreatureType("animated corpse", this)); } } }); HistoricalFigure.AddEvent(this); Abuser.AddEvent(this); Victim.AddEvent(this); if (structureId != -1 && Site != null) { Structure = Site.Structures.FirstOrDefault(structure => structure.Id == structureId); Structure.AddEvent(this); } }
public BodyAbused(List <Property> properties, World world) : base(properties, world) { Bodies = new List <HistoricalFigure>(); foreach (Property property in properties) { switch (property.Name) { case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "coords": Coordinates = Formatting.ConvertToLocation(property.Value); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "site": if (Site == null) { Site = world.GetSite(Convert.ToInt32(property.Value)); } else { property.Known = true; } break; case "civ": Abuser = world.GetEntity(Convert.ToInt32(property.Value)); break; case "bodies": Bodies.Add(world.GetHistoricalFigure(Convert.ToInt32(property.Value))); break; case "histfig": HistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "props_item_type": ItemType = property.Value; break; case "props_item_subtype": ItemSubType = property.Value; break; case "props_item_mat": Material = property.Value; break; case "abuse_type": switch (property.Value) { case "0": AbuseType = AbuseType.Impaled; break; case "1": AbuseType = AbuseType.Piled; break; case "2": AbuseType = AbuseType.Flayed; break; case "3": AbuseType = AbuseType.Hung; break; case "4": AbuseType = AbuseType.Mutilated; break; case "5": AbuseType = AbuseType.Animated; break; default: property.Known = false; break; } break; case "props_pile_type": PileTypeId = Convert.ToInt32(property.Value); break; case "props_item_mat_type": MaterialTypeId = Convert.ToInt32(property.Value); break; case "props_item_mat_index": MaterialIndex = Convert.ToInt32(property.Value); break; } } Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); Bodies.ForEach(body => { if (body != HistoricalFigure.Unknown) { body.AddEvent(this); if (AbuseType == AbuseType.Animated) { body.CreatureTypes.Add(new HistoricalFigure.CreatureType("animated corpse", this)); } } }); HistoricalFigure.AddEvent(this); Abuser.AddEvent(this); }
public TacticalSituation(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "a_tactician_hfid": AttackerTactician = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "d_tactician_hfid": DefenderTactician = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "a_tactics_roll": AttackerTacticsRoll = Convert.ToInt32(property.Value); break; case "d_tactics_roll": DefenderTacticsRoll = Convert.ToInt32(property.Value); break; case "situation": switch (property.Value) { case "neither favored": Situation = TacticalSituationType.NeitherFavored; break; case "a slightly favored": Situation = TacticalSituationType.AttackersSlightlyFavored; break; case "d slightly favored": Situation = TacticalSituationType.DefendersSlightlyFavored; break; case "a strongly favored": Situation = TacticalSituationType.AttackersStronglyFavored; break; case "d strongly favored": Situation = TacticalSituationType.DefendersStronglyFavored; break; default: property.Known = false; break; } break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "structure_id": StructureId = Convert.ToInt32(property.Value); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "start": // TODO last checked in version 0.44.10 property.Known = true; break; } } if (Site != null) { Structure = Site.Structures.FirstOrDefault(structure => structure.Id == StructureId); } AttackerTactician.AddEvent(this); DefenderTactician.AddEvent(this); Site.AddEvent(this); Structure.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }
// Similar to hfs formed intrigue relationship public FailedIntrigueCorruption(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "corruptor_hfid": CorruptorHf = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "target_hfid": TargetHf = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "failed_judgment_test": property.Known = true; FailedJudgmentTest = true; break; case "action": switch (property.Value.Replace("_", " ")) { case "bribe official": Action = IntrigueAction.BribeOfficial; break; case "induce to embezzle": Action = IntrigueAction.InduceToEmbezzle; break; case "corrupt in place": Action = IntrigueAction.CorruptInPlace; break; case "bring into network": Action = IntrigueAction.BringIntoNetwork; break; default: property.Known = false; break; } break; case "method": switch (property.Value.Replace("_", " ")) { case "intimidate": Method = IntrigueMethod.Intimidate; break; case "flatter": Method = IntrigueMethod.Flatter; break; case "bribe": Method = IntrigueMethod.Bribe; break; case "precedence": Method = IntrigueMethod.Precedence; break; case "offer immortality": Method = IntrigueMethod.OfferImmortality; break; case "religious sympathy": Method = IntrigueMethod.ReligiousSympathy; break; case "blackmail over embezzlement": Method = IntrigueMethod.BlackmailOverEmbezzlement; break; case "revenge on grudge": Method = IntrigueMethod.RevengeOnGrudge; break; default: property.Known = false; break; } break; case "top_facet": TopFacet = property.Value; break; case "top_facet_rating": TopFacetRating = Convert.ToInt32(property.Value); break; case "top_facet_modifier": TopFacetModifier = Convert.ToInt32(property.Value); break; case "top_value": TopValue = property.Value; break; case "top_value_rating": TopValueRating = Convert.ToInt32(property.Value); break; case "top_value_modifier": TopValueModifier = Convert.ToInt32(property.Value); break; case "top_relationship_factor": TopRelationshipFactor = property.Value; break; case "top_relationship_rating": TopRelationshipRating = Convert.ToInt32(property.Value); break; case "top_relationship_modifier": TopRelationshipModifier = Convert.ToInt32(property.Value); break; case "ally_defense_bonus": AllyDefenseBonus = Convert.ToInt32(property.Value); break; case "coconspirator_bonus": CoConspiratorBonus = Convert.ToInt32(property.Value); break; case "lure_hfid": LureHf = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "corruptor_identity": CorruptorIdentityId = Convert.ToInt32(property.Value); break; case "target_identity": TargetIdentityId = Convert.ToInt32(property.Value); break; case "relevant_entity_id": RelevantEntity = world.GetEntity(Convert.ToInt32(property.Value)); break; case "relevant_position_profile_id": RelevantPositionProfileId = Convert.ToInt32(property.Value); break; case "relevant_id_for_method": RelevantIdForMethod = Convert.ToInt32(property.Value); break; } } CorruptorHf.AddEvent(this); TargetHf.AddEvent(this); Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); LureHf.AddEvent(this); }
public ChangeHfState(List <Property> properties, World world) : base(properties, world) { foreach (Property property in properties) { switch (property.Name) { case "state": switch (property.Value) { case "settled": State = HfState.Settled; break; case "wandering": State = HfState.Wandering; break; case "scouting": State = HfState.Scouting; break; case "snatcher": State = HfState.Snatcher; break; case "refugee": State = HfState.Refugee; break; case "thief": State = HfState.Thief; break; case "hunting": State = HfState.Hunting; break; case "visiting": State = HfState.Visiting; break; default: State = HfState.Unknown; property.Known = false; break; } break; case "substate": SubState = Convert.ToInt32(property.Value); break; case "coords": Coordinates = Formatting.ConvertToLocation(property.Value); break; case "hfid": HistoricalFigure = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break; case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "subregion_id": Region = world.GetRegion(Convert.ToInt32(property.Value)); break; case "feature_layer_id": UndergroundRegion = world.GetUndergroundRegion(Convert.ToInt32(property.Value)); break; case "site": Site = world.GetSite(Convert.ToInt32(property.Value)); break; case "mood": switch (property.Value) { case "macabre": Mood = Mood.Macabre; break; case "secretive": Mood = Mood.Secretive; break; case "insane": Mood = Mood.Insane; break; case "possessed": Mood = Mood.Possessed; break; case "berserk": Mood = Mood.Berserk; break; case "fey": Mood = Mood.Fey; break; case "melancholy": Mood = Mood.Melancholy; break; case "fell": Mood = Mood.Fell; break; case "catatonic": Mood = Mood.Catatonic; break; default: Mood = Mood.Unknown; property.Known = false; break; } break; case "reason": switch (property.Value) { case "failed mood": Reason = ChangeHfStateReason.FailedMood; break; case "gather information": Reason = ChangeHfStateReason.GatherInformation; break; case "be with master": Reason = ChangeHfStateReason.BeWithMaster; break; case "flight": Reason = ChangeHfStateReason.Flight; break; case "scholarship": Reason = ChangeHfStateReason.Scholarship; break; case "on a pilgrimage": Reason = ChangeHfStateReason.Pilgrimage; break; case "lack of sleep": Reason = ChangeHfStateReason.LackOfSleep; break; default: if (property.Value != "-1") { property.Known = false; } break; } break; } } if (HistoricalFigure != null) { HistoricalFigure.AddEvent(this); HistoricalFigure.States.Add(new HistoricalFigure.State(State, Year)); HistoricalFigure.State lastState = HistoricalFigure.States.LastOrDefault(); if (lastState != null) { lastState.EndYear = Year; } HistoricalFigure.CurrentState = State; } Site.AddEvent(this); Region.AddEvent(this); UndergroundRegion.AddEvent(this); }