private void OnRomanticStateChanged(Hero hero1, Hero hero2, Romance.RomanceLevelEnum toWhat) { if (((playerRelative == hero1 && proposedSpouseForPlayerRelative == hero2) || (playerRelative == hero2 && proposedSpouseForPlayerRelative == hero1)) && toWhat == Romance.RomanceLevelEnum.Marriage) { shouldJoinPartyAfterOffer = false; } }
private static void OnRomanticStateChanged(Hero hero1, Hero hero2, Romance.RomanceLevelEnum level) { if ((int)level == ZenDzeeRomanceHelper.RomanceLevel_Lovers) { #if ENABLE_LOGS InformationManager.DisplayMessage(new InformationMessage(hero1.Name + " and " + hero2.Name + " started romance as lovers.")); #endif } else if (level == Romance.RomanceLevelEnum.Marriage) { ZenDzeeRomanceHelper.EndLoverRomances(hero1); ZenDzeeRomanceHelper.EndLoverRomances(hero2); } }
// 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)); } }
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); }