示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        public override string Print(bool link = true, DwarfObject pov = null)
        {
            string eventString = GetYearTime() + HistoricalFigure1.ToLink(link, pov);

            if (SubType == HfSimpleBattleType.Hf2LostAfterGivingWounds)
            {
                eventString = GetYearTime() + HistoricalFigure2.ToLink(link, pov) + " was forced to retreat from "
                              + HistoricalFigure1.ToLink(link, pov) + " despite the latter's wounds";
            }
            else if (SubType == HfSimpleBattleType.Hf2LostAfterMutualWounds)
            {
                eventString += " eventually prevailed and " + HistoricalFigure2.ToLink(link, pov)
                               + " was forced to make a hasty escape";
            }
            else if (SubType == HfSimpleBattleType.Hf2LostAfterReceivingWounds)
            {
                eventString = GetYearTime() + HistoricalFigure2.ToLink(link, pov) + " managed to escape from "
                              + HistoricalFigure1.ToLink(link, pov) + "'s onslaught";
            }
            else if (SubType == HfSimpleBattleType.Scuffle)
            {
                eventString += " fought with " + HistoricalFigure2.ToLink(link, pov) + ". While defeated, the latter escaped unscathed";
            }
            else if (SubType == HfSimpleBattleType.Attacked)
            {
                eventString += " attacked " + HistoricalFigure2.ToLink(link, pov);
            }
            else if (SubType == HfSimpleBattleType.Confronted)
            {
                eventString += " confronted " + HistoricalFigure2.ToLink(link, pov);
            }
            else if (SubType == HfSimpleBattleType.HappenedUpon)
            {
                eventString += " happened upon " + HistoricalFigure2.ToLink(link, pov);
            }
            else if (SubType == HfSimpleBattleType.Ambushed)
            {
                eventString += " ambushed " + HistoricalFigure2.ToLink(link, pov);
            }
            else if (SubType == HfSimpleBattleType.Cornered)
            {
                eventString += " cornered " + HistoricalFigure2.ToLink(link, pov);
            }
            else if (SubType == HfSimpleBattleType.Surprised)
            {
                eventString += " suprised " + HistoricalFigure2.ToLink(link, pov);
            }
            else
            {
                eventString += " fought (" + UnknownSubType + ") " + HistoricalFigure2.ToLink(link, pov);
            }

            eventString += PrintParentCollection(link, pov);
            eventString += ".";
            return(eventString);
        }
示例#4
0
        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);
        }
示例#5
0
        public override string Print(bool link = true, DwarfObject pov = null)
        {
            string eventString = GetYearTime();

            eventString += HistoricalFigure1.ToLink(link, pov, this);
            Identity identity1 = HistoricalFigure1?.Identities.FirstOrDefault(i => i.Id == IdentityId1);

            if (identity1 != null)
            {
                eventString += " as '" + identity1.Print(link, pov, this) + "'";
            }
            eventString += ", formed a false friendship with ";
            eventString += HistoricalFigure2.ToLink(link, pov, this);
            Identity identity2 = HistoricalFigure2?.Identities.FirstOrDefault(i => i.Id == IdentityId2);

            if (identity2 != null)
            {
                eventString += " as '" + identity2.Print(link, pov, this) + "'";
            }
            if (HfRep2Of1 == ReputationType.Buddy || HfRep2Of1 == ReputationType.Friendly)
            {
                eventString += " in order to extract information";
            }
            else if (HfRep2Of1 == ReputationType.InformationSource)
            {
                eventString += " where each used the other for information";
            }
            eventString += " in ";
            if (Site != null)
            {
                eventString += Site.ToLink(link, pov, this);
            }
            else if (Region != null)
            {
                eventString += Region.ToLink(link, pov, this);
            }
            else if (UndergroundRegion != null)
            {
                eventString += UndergroundRegion.ToLink(link, pov, this);
            }
            else
            {
                eventString += "UNKNOWN LOCATION";
            }
            eventString += PrintParentCollection(link, pov);
            eventString += ".";
            return(eventString);
        }
示例#6
0
        public override string Print(bool link = true, DwarfObject pov = null)
        {
            string eventString = GetYearTime();

            eventString += HistoricalFigure1.ToLink(link, pov);
            if (IdentityId1 > 0)
            {
                eventString += " as '" + IdentityId1 + "'";
            }
            eventString += ", formed a false friendship with ";
            eventString += HistoricalFigure2.ToLink(link, pov);
            if (IdentityId2 > 0)
            {
                eventString += " as '" + IdentityId2 + "'";
            }
            if (HfRep2Of1 == ReputationType.Buddy)
            {
                eventString += " in order to extract information";
            }
            else if (HfRep2Of1 == ReputationType.InformationSource)
            {
                eventString += " where each used the other for information";
            }
            eventString += " in ";
            if (Site != null)
            {
                eventString += Site.ToLink(link, pov);
            }
            else if (Region != null)
            {
                eventString += Region.ToLink(link, pov);
            }
            else if (UndergroundRegion != null)
            {
                eventString += UndergroundRegion.ToLink(link, pov);
            }
            else
            {
                eventString += "UNKNOWN LOCATION";
            }
            eventString += PrintParentCollection(link, pov);
            eventString += ".";
            return(eventString);
        }
示例#7
0
        public override string Print(bool link = true, DwarfObject pov = null)
        {
            string eventString = GetYearTime() + " " + HistoricalFigure1.ToLink(link, pov) + " was reunited with " + HistoricalFigure2.ToLink(link, pov);

            if (Site != null)
            {
                eventString += " in " + Site.ToLink(link, pov);
            }
            else if (Region != null)
            {
                eventString += " in " + Region.ToLink(link, pov);
            }

            eventString += PrintParentCollection(link, pov);
            eventString += ".";
            return(eventString);
        }