Ejemplo n.º 1
0
        public AgreementFormed(List<Property> properties, World world) : base(properties, world)
        {
            foreach (Property property in properties)
            {
                switch (property.Name)
                {
                    case "agreement_id": AgreementId = Convert.ToInt32(property.Value); break;
                    case "successful": property.Known = true; Successful = true; break;
                    case "failed_judgment_test": property.Known = true; FailedJudgmentTest = true; break;
                    case "delegated": property.Known = true; Delegated = true; break;
                    case "action": Action = property.Value; break;
                    case "method": Method = 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;
                    case "ally_defense_bonus": AllyDefenseBonus = Convert.ToInt32(property.Value); break;
                    case "coconspirator_bonus": CoconspiratorBonus = Convert.ToInt32(property.Value); 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 "concluder_hfid": Concluder = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break;
                    case "agreement_subject_id": AgreementSubjectId = Convert.ToInt32(property.Value); break;
                    case "reason":
                        switch (property.Value)
                        {
                            case "arrived at location": Reason = AgreementReason.ArrivedAtLocation; break;
                            case "violent disagreement": Reason = AgreementReason.ViolentDisagreement; break;
                            case "whim": Reason = AgreementReason.Whim; break;
                            default:
                                Reason = AgreementReason.Unknown;
                                world.ParsingErrors.Report("Unknown Agreement Reason: " + property.Value);
                                break;
                        }
                        break;
                }
            }
            Concluder.AddEvent(this);
            RelevantEntity.AddEvent(this);
        }
        // Similar to failed intrigue corruption
        public HfsFormedIntrigueRelationship(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 "successful": property.Known = true; Successful = true; break;

                case "corruptor_seen_as": CorruptorSeenAs = property.Value; break;

                case "target_seen_as": TargetSeenAs = property.Value; break;

                case "circumstance": Circumstance = property.Value; break;

                case "circumstance_id": CircumstanceId = 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);
            RelevantEntity.AddEvent(this);
        }