Exemplo n.º 1
0
        private bool conversation_begin_courtship_for_hero_on_condition()
        {
            ISettingsProvider settings = new MASettings();

            if (Hero.OneToOneConversationHero.Age >= Campaign.Current.Models.AgeModel.HeroComesOfAge)
            {
                if (settings.Debug)
                {
                    MAHelper.Print("MCM: " + MASettings.UsingMCM);
                    MAHelper.Print("Difficulty: " + settings.Difficulty);
                    MAHelper.Print("Orientation: " + settings.SexualOrientation);
                    MAHelper.Print("Cheating: " + settings.Cheating);
                    MAHelper.Print("Polygamy: " + settings.Polygamy);
                    MAHelper.Print("Incest: " + settings.Incest);
                    MAHelper.Print("Romantic Level: " + Romance.GetRomanticLevel(Hero.MainHero, Hero.OneToOneConversationHero).ToString());
                }

                // OnNeNousDitPasTout/GrandesMaree Patch
                // In Fact we can't go through Romance.RomanceLevelEnum.Untested
                // because for the next modification, there will be another romance status
                // And we must have only have one romance status for each relation
                if (Romance.GetRomanticLevel(Hero.MainHero, Hero.OneToOneConversationHero) == Romance.RomanceLevelEnum.Untested)
                {
                    Util.Util.CleanRomance(Hero.MainHero, Hero.OneToOneConversationHero);
                    bool areMarried = Util.Util.AreMarried(Hero.MainHero, Hero.OneToOneConversationHero);
                    if (areMarried)
                    {
                        ChangeRomanticStateAction.Apply(Hero.MainHero, Hero.OneToOneConversationHero, Romance.RomanceLevelEnum.Ended);
                        MAHelper.Print("PATCH Married New Romantic Level: " + Romance.GetRomanticLevel(Hero.MainHero, Hero.OneToOneConversationHero).ToString());
                    }
                }
            }
            return(Hero.OneToOneConversationHero.IsWanderer && Hero.OneToOneConversationHero.IsPlayerCompanion);
        }
        private static void Postfix(Hero hero)
        {
            // Make things looks better in the encyclopedia
            ISettingsProvider settings = new MASettings();

            if (hero == Hero.MainHero)
            {
                MAHelper.Print("Post Pregnancy Check: " + hero);
                MAHelper.Print("   Main Hero Spouse Unassigned");
                hero.Spouse = null;
            }
            if (Hero.MainHero.ExSpouses.Contains(hero) || hero.Spouse == Hero.MainHero)
            {
                if (hero.Spouse is null || hero.Spouse != Hero.MainHero)
                {
                    MAHelper.Print("Post Pregnancy Check: " + hero);
                    MAHelper.Print("   Spouse is Main Hero");
                    if (!settings.Polyamory)
                    {
                        // Remove any extra duplicate exspouses
                        MAHelper.RemoveExSpouses(hero, true);
                    }
                    hero.Spouse = Hero.MainHero;
                }
            }
            foreach (Hero exSpouse in hero.ExSpouses.ToList())
            {
                MAHelper.RemoveExSpouses(hero);
                MAHelper.RemoveExSpouses(exSpouse);
            }
        }
Exemplo n.º 3
0
        public override bool IsCoupleSuitableForMarriage(Hero firstHero, Hero secondHero)
        {
            ISettingsProvider settings = new MASettings();
            bool isMainHero            = firstHero == Hero.MainHero || secondHero == Hero.MainHero;
            bool isHomosexual          = settings.SexualOrientation == "Homosexual" && isMainHero;
            bool isBisexual            = settings.SexualOrientation == "Bisexual" && isMainHero;
            bool isIncestuous          = settings.Incest && isMainHero;
            bool discoverAncestors     = !DiscoverAncestors(firstHero, 3).Intersect(DiscoverAncestors(secondHero, 3)).Any();

            Clan clan = firstHero.Clan;

            if (clan?.Leader == firstHero && !isMainHero)
            {
                Clan clan2 = secondHero.Clan;
                if (clan2?.Leader == secondHero)
                {
                    return(false);
                }
            }
            if (isIncestuous)
            {
                discoverAncestors = true;
            }
            if (isHomosexual)
            {
                return(firstHero.IsFemale == secondHero.IsFemale && discoverAncestors && IsSuitableForMarriage(firstHero) && IsSuitableForMarriage(secondHero));
            }
            if (isBisexual)
            {
                return(discoverAncestors && IsSuitableForMarriage(firstHero) && IsSuitableForMarriage(secondHero));
            }
            return(firstHero.IsFemale != secondHero.IsFemale && discoverAncestors && IsSuitableForMarriage(firstHero) && IsSuitableForMarriage(secondHero));
        }
Exemplo n.º 4
0
        public override bool IsSuitableForMarriage(Hero maidenOrSuitor)
        {
            ISettingsProvider settings = new MASettings();
            bool inConversation, isCheating, isPolygamous;

            inConversation = isCheating = isPolygamous = false;
            if (Hero.OneToOneConversationHero is not null)
            {
                inConversation = maidenOrSuitor == Hero.MainHero || maidenOrSuitor == Hero.OneToOneConversationHero;
                isCheating     = settings.Cheating && inConversation && Hero.OneToOneConversationHero.Spouse is not null;
                isPolygamous   = settings.Polygamy && inConversation && Hero.OneToOneConversationHero.Spouse is null;
            }
            if (!maidenOrSuitor.IsAlive || maidenOrSuitor.IsNotable || maidenOrSuitor.IsTemplate)
            {
                return(false);
            }
            if (maidenOrSuitor.Spouse is null && !maidenOrSuitor.ExSpouses.Any(exSpouse => exSpouse.IsAlive) || isPolygamous || isCheating)
            {
                if (maidenOrSuitor.IsFemale)
                {
                    return(maidenOrSuitor.CharacterObject.Age >= Campaign.Current.Models.MarriageModel.MinimumMarriageAgeFemale);
                }
                return(maidenOrSuitor.CharacterObject.Age >= Campaign.Current.Models.MarriageModel.MinimumMarriageAgeMale);
            }
            return(false);
        }
        private static void Postfix2(ref CampaignTime __result)
        {
            ISettingsProvider settings = new MASettings();

            if (settings.RetryCourtship)
            {
                __result = CampaignTime.DaysFromNow(1f);
            }
        }
Exemplo n.º 6
0
        public static void Print(string message)
        {
            ISettingsProvider settings = new MASettings();

            if (settings.Debug)
            {
                // Custom purple!
                Color color = new(0.6f, 0.2f, 1f);
                InformationManager.DisplayMessage(new InformationMessage(message, color));
            }
        }
        private static bool Prefix3(ref bool __result)
        {
            ISettingsProvider settings = new MASettings();

            if (settings.Difficulty == "Very Easy" || (settings.Difficulty == "Easy" && !Hero.OneToOneConversationHero.IsNoble && !Hero.OneToOneConversationHero.IsMinorFactionHero))
            {
                __result = false;
                return(false);
            }
            return(true);
        }
Exemplo n.º 8
0
        private static bool Prefix(Hero forHero)
        {
            ISettingsProvider settings = new MASettings();

            if (settings.Polygamy)
            {
                foreach (Romance.RomanticState romanticState in Romance.RomanticStateList.ToList())
                {
                    if (forHero == Hero.MainHero && romanticState.Level == Romance.RomanceLevelEnum.Marriage)
                    {
                        romanticState.Level = Romance.RomanceLevelEnum.Ended;
                    }
                }
                return(false);
            }
            return(true);
        }
Exemplo n.º 9
0
        private bool conversation_adopt_child_on_condition()
        {
            ISettingsProvider settings = new MASettings();

            StringHelpers.SetCharacterProperties("CONVERSATION_CHARACTER", CharacterObject.OneToOneConversationCharacter);
            _agent = Math.Abs(Campaign.Current.ConversationManager.OneToOneConversationAgent.GetHashCode());
            if (_adoptableAgents is null || _notAdoptableAgents is null)
            {
                _adoptableAgents    = new List <int>();
                _notAdoptableAgents = new List <int>();
            }
            if (_notAdoptableAgents.Contains(_agent))
            {
                MAHelper.Print("Cannot Adopt");
                return(false);
            }
            if (_adoptableAgents.Contains(_agent))
            {
                MAHelper.Print("Can Adopt");
                return(true);
            }
            if (Campaign.Current.ConversationManager.OneToOneConversationAgent.Age < Campaign.Current.Models.AgeModel.HeroComesOfAge)
            {
                MAHelper.Print("Adoption: " + settings.Adoption);
                if (!settings.Adoption)
                {
                    return(false);
                }
                MAHelper.Print("Adoption Chance: " + settings.AdoptionChance);
                // You only roll once!
                float random = MBRandom.RandomFloat;
                MAHelper.Print("Random Number: " + random);
                if (random < settings.AdoptionChance)
                {
                    _adoptableAgents.Add(_agent);
                    return(true);
                }
                else
                {
                    _notAdoptableAgents.Add(_agent);
                }
            }
            return(false);
        }
Exemplo n.º 10
0
        // This will either skip or continue romance
        // CoupleAgreedOnMarriage = triggers marriage before bartering
        // CourtshipStarted = skip everything
        // return false = carry out entire romance
        private bool conversation_finalize_courtship_for_hero_on_condition()
        {
            ISettingsProvider settings = new MASettings();

            Romance.RomanceLevelEnum romanticLevel = Romance.GetRomanticLevel(Hero.MainHero, Hero.OneToOneConversationHero);
            bool clanLeader = Hero.MainHero.Clan.Leader == Hero.MainHero && Hero.MainHero.Clan.Lords.Contains(Hero.OneToOneConversationHero);

            if (settings.Difficulty == "Realistic")
            {
                // Skip issues with bartering marriage within clans
                // If you are the leader of the clan then it is a problem
                if (clanLeader)
                {
                    MAHelper.Print("Realistic: Clan Leader");
                    return(Romance.MarriageCourtshipPossibility(Hero.MainHero, Hero.OneToOneConversationHero) && romanticLevel == Romance.RomanceLevelEnum.CoupleAgreedOnMarriage);
                }
                if (Hero.OneToOneConversationHero.IsNoble || Hero.OneToOneConversationHero.IsMinorFactionHero)
                {
                    MAHelper.Print("Realistic: Noble");
                    return(false);
                }
                return(Romance.MarriageCourtshipPossibility(Hero.MainHero, Hero.OneToOneConversationHero) && romanticLevel == Romance.RomanceLevelEnum.CoupleAgreedOnMarriage);
            }
            else
            {
                if (clanLeader)
                {
                    if (settings.Difficulty == "Easy")
                    {
                        MAHelper.Print("Easy: Clan Leader");
                        return(Romance.MarriageCourtshipPossibility(Hero.MainHero, Hero.OneToOneConversationHero) && romanticLevel == Romance.RomanceLevelEnum.CoupleAgreedOnMarriage);
                    }
                    MAHelper.Print("Very Easy: Clan Leader");
                    return(Romance.MarriageCourtshipPossibility(Hero.MainHero, Hero.OneToOneConversationHero) && (romanticLevel == Romance.RomanceLevelEnum.CourtshipStarted || romanticLevel == Romance.RomanceLevelEnum.CoupleDecidedThatTheyAreCompatible));
                }
                if (settings.Difficulty == "Easy" && (Hero.OneToOneConversationHero.IsNoble || Hero.OneToOneConversationHero.IsMinorFactionHero))
                {
                    MAHelper.Print("Easy: Noble");
                    return(false);
                }
                MAHelper.Print("Very Easy");
                return(Romance.MarriageCourtshipPossibility(Hero.MainHero, Hero.OneToOneConversationHero) && (romanticLevel == Romance.RomanceLevelEnum.CourtshipStarted || romanticLevel == Romance.RomanceLevelEnum.CoupleDecidedThatTheyAreCompatible));
            }
        }
        private static TextObject SpousesSpouse(Hero spouse, Hero queriedHero)
        {
            ISettingsProvider settings = new MASettings();

            // Find out spouse's gender
            // Male spouse
            if (!spouse.IsFemale)
            {
                // Find out spouse's spouse's gender
                if (!queriedHero.IsFemale)
                {
                    // Male other spouse
                    return(settings.Polyamory ? FindText("str_husband") : FindText("str_husbands_husband"));
                }
                // Female other spouse
                return(settings.Polyamory ? FindText("str_wife") : FindText("str_husbands_wife"));
            }
            if (!queriedHero.IsFemale)
            {
                return(settings.Polyamory ? FindText("str_husband") : FindText("str_wifes_husband"));
            }
            return(settings.Polyamory ? FindText("str_wife") : FindText("str_wifes_wife"));
        }
Exemplo n.º 12
0
        private void conversation_courtship_success_on_consequence()
        {
            ISettingsProvider settings = new MASettings();
            Hero hero          = Hero.MainHero;
            Hero spouse        = Hero.OneToOneConversationHero;
            Hero oldSpouse     = hero.Spouse;
            Hero cheatedSpouse = spouse.Spouse;

            // If you are marrying a kingdom ruler as a kingdom ruler yourself,
            // the kingdom ruler will have to give up being clan head.
            // Apparently causes issues if this is not done.
            if (spouse.IsFactionLeader && !spouse.IsMinorFactionHero)
            {
                if (hero.Clan.Kingdom != spouse.Clan.Kingdom)
                {
                    if (hero.Clan.Kingdom?.Leader != hero)
                    {
                        // Join kingdom due to lowborn status
                        if (hero.Clan.Leader == Hero.MainHero)
                        {
                            ChangeClanLeaderAction.ApplyWithoutSelectedNewLeader(hero.Clan);
                            if (hero.Clan.Leader == Hero.MainHero)
                            {
                                MAHelper.Print("No Heirs");
                                DestroyClanAction.Apply(hero.Clan);
                                MAHelper.Print("Eliminated Player Clan");
                            }
                        }
                        foreach (Hero companion in hero.Clan.Companions.ToList())
                        {
                            bool inParty = false;
                            if (companion.PartyBelongedTo == MobileParty.MainParty)
                            {
                                inParty = true;
                            }
                            RemoveCompanionAction.ApplyByFire(hero.Clan, companion);
                            AddCompanionAction.Apply(spouse.Clan, companion);
                            if (inParty)
                            {
                                AddHeroToPartyAction.Apply(companion, MobileParty.MainParty, true);
                            }
                        }
                        hero.Clan = spouse.Clan;
                        var current = Traverse.Create <Campaign>().Property("Current").GetValue <Campaign>();
                        Traverse.Create(current).Property("PlayerDefaultFaction").SetValue(spouse.Clan);
                        MAHelper.Print("Lowborn Player Married to Kingdom Ruler");
                    }
                    else
                    {
                        ChangeClanLeaderAction.ApplyWithoutSelectedNewLeader(spouse.Clan);
                        MAHelper.Print("Kingdom Ruler Stepped Down and Married to Player");
                    }
                }
            }
            // New nobility
            MAHelper.OccupationToLord(spouse.CharacterObject);
            if (!spouse.IsNoble)
            {
                spouse.IsNoble = true;
                MAHelper.Print("Spouse to Noble");
            }
            // Dodge the party crash for characters part 1
            bool dodge = false;

            if (spouse.PartyBelongedTo == MobileParty.MainParty)
            {
                AccessTools.Property(typeof(Hero), "PartyBelongedTo").SetValue(spouse, null, null);
                MAHelper.Print("Spouse Already in Player's Party");
                dodge = true;
            }
            // Apply marriage
            ChangeRomanticStateAction.Apply(hero, spouse, Romance.RomanceLevelEnum.Marriage);
            MAHelper.Print("Marriage Action Applied");
            if (oldSpouse is not null)
            {
                MAHelper.RemoveExSpouses(oldSpouse);
            }
            // Dodge the party crash for characters part 2
            if (dodge)
            {
                AccessTools.Property(typeof(Hero), "PartyBelongedTo").SetValue(spouse, MobileParty.MainParty, null);
            }
            // Activate character if not already activated
            if (!spouse.HasMet)
            {
                spouse.HasMet = true;
            }
            if (!spouse.IsActive)
            {
                spouse.ChangeState(Hero.CharacterStates.Active);
                MAHelper.Print("Activated Spouse");
            }
            if (spouse.IsPlayerCompanion)
            {
                spouse.CompanionOf = null;
                MAHelper.Print("Spouse No Longer Companion");
            }
            if (settings.Cheating && cheatedSpouse is not null)
            {
                MAHelper.RemoveExSpouses(cheatedSpouse, true);
                MAHelper.RemoveExSpouses(spouse, true);
                MAHelper.Print("Spouse Broke Off Past Marriage");
            }
            MAHelper.RemoveExSpouses(hero);
            MAHelper.RemoveExSpouses(spouse);
            PlayerEncounter.LeaveEncounter = true;
            // New fix to stop some kingdom rulers from disappearing
            if (spouse.PartyBelongedTo != MobileParty.MainParty)
            {
                AddHeroToPartyAction.Apply(spouse, MobileParty.MainParty, true);
            }
        }
        private static void Prefix(Hero hero)
        {
            ISettingsProvider settings = new MASettings();

            if (hero.IsFemale && hero.IsAlive && hero.Age > Campaign.Current.Models.AgeModel.HeroComesOfAge)
            {
                // If you are the MainHero go through advanced process
                if (hero == Hero.MainHero || hero == Hero.MainHero.Spouse || Hero.MainHero.ExSpouses.Contains(hero))
                {
                    if (hero.Spouse is null && (hero.ExSpouses.IsEmpty() || hero.ExSpouses is null))
                    {
                        MAHelper.Print("    No Spouse");
                        return;
                    }
                    _spouses = new List <Hero>();
                    MAHelper.Print("Hero: " + hero);
                    if (hero.Spouse is not null && hero == Hero.MainHero)
                    {
                        _spouses.Add(hero.Spouse);
                        MAHelper.Print("Spouse to Collection: " + hero.Spouse);
                    }
                    if (settings.Polyamory && hero != Hero.MainHero)
                    {
                        MAHelper.Print("Polyamory");
                        if (hero.Spouse != Hero.MainHero)
                        {
                            _spouses.Add(Hero.MainHero);
                            MAHelper.Print("Main Hero to Collection: " + Hero.MainHero);
                        }
                        if (Hero.MainHero.Spouse is not null && Hero.MainHero.Spouse != hero)
                        {
                            _spouses.Add(Hero.MainHero.Spouse);
                            MAHelper.Print("Main Hero Spouse to Collection: " + Hero.MainHero.Spouse);
                        }
                        foreach (Hero exSpouse in Hero.MainHero.ExSpouses.Distinct().ToList())
                        {
                            if (exSpouse != hero && exSpouse.IsAlive)
                            {
                                _spouses.Add(exSpouse);
                                MAHelper.Print("Main Hero ExSpouse to Collection: " + exSpouse);
                            }
                        }
                    }
                    else
                    {
                        // Taken out of polyamory mode
                        if (hero.Spouse != Hero.MainHero && hero != Hero.MainHero)
                        {
                            _spouses.Add(Hero.MainHero);
                            MAHelper.Print("Spouse is Main Hero: " + Hero.MainHero);
                        }
                        if (hero == Hero.MainHero)
                        {
                            foreach (Hero exSpouse in hero.ExSpouses.Distinct().ToList())
                            {
                                if (exSpouse.IsAlive)
                                {
                                    _spouses.Add(exSpouse);
                                    MAHelper.Print("ExSpouse to Collection: " + exSpouse);
                                }
                            }
                        }
                    }
                    if (_spouses.Count() > 1)
                    {
                        // The shuffle!
                        List <int> attractionGoal = new();
                        int        attraction     = 0;
                        foreach (Hero spouse in _spouses)
                        {
                            attraction += Romance.GetAttractionValueAsPercent(hero, spouse);
                            attractionGoal.Add(attraction);
                            MAHelper.Print("Spouse: " + spouse);
                            MAHelper.Print("Attraction: " + attraction);
                        }
                        int attractionRandom = MBRandom.RandomInt(attraction);
                        MAHelper.Print("Random: " + attractionRandom);
                        int i = 0;
                        while (i < _spouses.Count)
                        {
                            if (attractionRandom < attractionGoal[i])
                            {
                                MAHelper.Print("Index: " + i);
                                break;
                            }
                            i++;
                        }
                        hero.Spouse        = _spouses[i];
                        _spouses[i].Spouse = hero;
                    }
                    else
                    {
                        var spouse = _spouses.FirstOrDefault();
                        if (spouse is not null)
                        {
                            hero.Spouse   = spouse;
                            spouse.Spouse = hero;
                        }
                    }
                    if (hero.Spouse is null)
                    {
                        MAHelper.Print("   No Spouse");
                    }
                    else
                    {
                        MAHelper.Print("   Spouse Assigned: " + hero.Spouse);
                    }
                }
            }
            // Outside of female pregnancy behavior
            if (hero.Spouse is not null)
            {
                if (hero.IsFemale == hero.Spouse.IsFemale)
                {
                    // Decided to do this at the end so that you are not always going out with the opposite gender
                    MAHelper.Print("   Spouse Unassigned: " + hero.Spouse);
                    hero.Spouse.Spouse = null;
                    hero.Spouse        = null;
                }
            }
        }
        public static bool conversation_player_can_open_courtship_on_condition()
        {
            ISettingsProvider settings = new MASettings();

            if (Hero.OneToOneConversationHero is null)
            {
                return(false);
            }
            bool flag = Hero.MainHero.IsFemale && settings.SexualOrientation == "Heterosexual" || !Hero.MainHero.IsFemale && settings.SexualOrientation == "Homosexual" || !Hero.OneToOneConversationHero.IsFemale && settings.SexualOrientation == "Bisexual";

            Romance.RomanceLevelEnum romanceLevel = Romance.GetRomanticLevel(Hero.MainHero, Hero.OneToOneConversationHero); // better to use a local variable
            MAHelper.Print("Courtship Possible: " + Romance.MarriageCourtshipPossibility(Hero.MainHero, Hero.OneToOneConversationHero).ToString());
            MAHelper.Print("Romantic Level: " + romanceLevel.ToString());
            MAHelper.Print("Retry Courtship: " + settings.RetryCourtship.ToString());

            if (Romance.MarriageCourtshipPossibility(Hero.MainHero, Hero.OneToOneConversationHero) && romanceLevel == Romance.RomanceLevelEnum.Untested)
            {
                if (Hero.OneToOneConversationHero.IsNoble || Hero.OneToOneConversationHero.IsMinorFactionHero)
                {
                    if (Hero.OneToOneConversationHero.Spouse is null)
                    {
                        MBTextManager.SetTextVariable("FLIRTATION_LINE",
                                                      flag
                                ? "{=lord_flirt}My lord, I note that you have not yet taken a spouse."
                                : "{=v1hC6Aem}My lady, I wish to profess myself your most ardent admirer.", false);
                    }
                    else
                    {
                        MBTextManager.SetTextVariable("FLIRTATION_LINE",
                                                      flag
                                ? "{=lord_cheating_flirt}My lord, I note that you might wish for a new spouse."
                                : "{=v1hC6Aem}My lady, I wish to profess myself your most ardent admirer.", false);
                    }
                }
                else
                {
                    MBTextManager.SetTextVariable("FLIRTATION_LINE",
                                                  flag
                            ? "{=goodman_flirt}Goodman, I note that you have not yet taken a spouse."
                            : "{=goodwife_flirt}Goodwife, I wish to profess myself your most ardent admirer.", false);
                }
                return(true);
            }

            bool areMarried = Util.Util.AreMarried(Hero.MainHero, Hero.OneToOneConversationHero);

            if (romanceLevel == Romance.RomanceLevelEnum.FailedInCompatibility ||
                romanceLevel == Romance.RomanceLevelEnum.FailedInPracticalities ||
                (romanceLevel == Romance.RomanceLevelEnum.Ended && settings.RetryCourtship && !areMarried)
                )
            {
                if (Hero.OneToOneConversationHero.IsNoble || Hero.OneToOneConversationHero.IsMinorFactionHero)
                {
                    MBTextManager.SetTextVariable("FLIRTATION_LINE",
                                                  flag
                            ? "{=2WnhUBMM}My lord, may you give me another chance to prove myself?"
                            : "{=4iTaEZKg}My lady, may you give me another chance to prove myself?", false);
                }
                else
                {
                    MBTextManager.SetTextVariable("FLIRTATION_LINE",
                                                  flag
                            ? "{=goodman_chance}Goodman, may you give me another chance to prove myself?"
                            : "{=goodwife_chance}Goodwife, may you give me another chance to prove myself?", false);
                }
                // Retry Courtship feature!
                if (settings.RetryCourtship)
                {
                    if (romanceLevel == Romance.RomanceLevelEnum.Ended)
                    {
                        // OnNeNousDitPasTout/GrandesMaree Patch
                        // Patch we must have only have one romance status for each relation
                        Util.Util.CleanRomance(Hero.MainHero, Hero.OneToOneConversationHero);
                    }

                    if (romanceLevel == Romance.RomanceLevelEnum.FailedInCompatibility || romanceLevel == Romance.RomanceLevelEnum.Ended)
                    {
                        ChangeRomanticStateAction.Apply(Hero.MainHero, Hero.OneToOneConversationHero, Romance.RomanceLevelEnum.CourtshipStarted);
                    }
                    else if (romanceLevel == Romance.RomanceLevelEnum.FailedInPracticalities)
                    {
                        ChangeRomanticStateAction.Apply(Hero.MainHero, Hero.OneToOneConversationHero, Romance.RomanceLevelEnum.CoupleDecidedThatTheyAreCompatible);
                    }
                }
                return(true);
            }
            return(false);
        }
        private static TextObject GetHeroRelationToHeroTextShort(Hero queriedHero, Hero baseHero)
        {
            if (baseHero.Father == queriedHero && (baseHero.Spouse == queriedHero || queriedHero.ExSpouses.Contains(baseHero) || baseHero.ExSpouses.Contains(queriedHero)))
            {
                return(GameTexts.FindText("str_fatherhusband"));
            }
            if (baseHero.Mother == queriedHero && (baseHero.Spouse == queriedHero || queriedHero.ExSpouses.Contains(baseHero) || baseHero.ExSpouses.Contains(queriedHero)))
            {
                return(GameTexts.FindText("str_motherwife"));
            }
            if (baseHero.Siblings.Contains(queriedHero) && (baseHero.Spouse == queriedHero || queriedHero.ExSpouses.Contains(baseHero) || baseHero.ExSpouses.Contains(queriedHero)))
            {
                if (!queriedHero.IsFemale)
                {
                    return(GameTexts.FindText("str_brotherhusband"));
                }
                return(GameTexts.FindText("str_sisterwife"));
            }
            if (baseHero.Children.Contains(queriedHero) && (baseHero.Spouse == queriedHero || queriedHero.ExSpouses.Contains(baseHero) || baseHero.ExSpouses.Contains(queriedHero)))
            {
                if (!queriedHero.IsFemale)
                {
                    return(GameTexts.FindText("str_sonhusband"));
                }
                return(GameTexts.FindText("str_daughterwife"));
            }
            ISettingsProvider settings = new MASettings();

            if (settings.AdoptionTitles && settings.Adoption)
            {
                if ((baseHero.Mother is null) != (baseHero.Father is null))
                {
                    if (baseHero.Mother == queriedHero)
                    {
                        return(GameTexts.FindText("str_adoptivemother"));
                    }
                    if (baseHero.Father == queriedHero)
                    {
                        return(GameTexts.FindText("str_adoptivefather"));
                    }
                }
                if ((queriedHero.Mother is null) != (queriedHero.Father is null))
                {
                    if (baseHero.Children.Contains(queriedHero))
                    {
                        if (!queriedHero.IsFemale)
                        {
                            return(GameTexts.FindText("str_adoptedson"));
                        }
                        return(GameTexts.FindText("str_adopteddaughter"));
                    }
                }
            }
            if (baseHero.Spouse == queriedHero || queriedHero.ExSpouses.Contains(baseHero) || baseHero.ExSpouses.Contains(queriedHero))
            {
                if (!queriedHero.IsAlive || !baseHero.IsAlive)
                {
                    if (!queriedHero.IsFemale)
                    {
                        return(GameTexts.FindText("str_exhusband"));
                    }
                    return(GameTexts.FindText("str_exwife"));
                }
                else if (!queriedHero.IsFemale)
                {
                    return(GameTexts.FindText("str_husband"));
                }
                return(GameTexts.FindText("str_wife"));
            }

            // Revamped spouse's spouse
            if (baseHero.Spouse is not null)
            {
                // Spouse to ExSpouse
                foreach (Hero spouse in baseHero.Spouse.ExSpouses)
                {
                    List <Hero> otherSpouses = spouse.ExSpouses.Where(x => x.IsAlive).ToList();
                    foreach (Hero otherSpouse in otherSpouses)
                    {
                        if (otherSpouse == queriedHero)
                        {
                            return(SpousesSpouse(spouse, queriedHero));
                        }
                    }
                }
            }
            List <Hero> spouses = baseHero.ExSpouses.Where(x => x.IsAlive).ToList();

            foreach (Hero spouse in spouses)
            {
                // ExSpouse to Spouse
                if (spouse.Spouse == queriedHero)
                {
                    return(SpousesSpouse(spouse, queriedHero));
                }
                List <Hero> otherSpouses = spouse.ExSpouses.Where(x => x.IsAlive).ToList();
                // ExSpouse to ExSpouse
                foreach (Hero otherSpouse in otherSpouses)
                {
                    if (otherSpouse == queriedHero)
                    {
                        return(SpousesSpouse(spouse, queriedHero));
                    }
                }
            }
            return(TextObject.Empty);
        }