Skip to content

Fix the converter trying to appoint invalid married court chaplains #2127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion ImperatorToCK3/CK3/Titles/Title.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1357,11 +1357,19 @@ private void AppointCouncilMembersFromImperator(ReligionCollection religionColle
if (rulerFaithId is null || rulerFaithId != ck3Official.GetFaithId(bookmarkDate)) {
continue;
}

// If the faith has Disallowed Clerical Marriage, don't allow married court chaplains.
var rulerFaith = religionCollection.GetFaith(rulerFaithId);
if (rulerFaith?.HasDoctrine("doctrine_clerical_marriage_disallowed") == true) {
if (ck3Official.GetSpouseIds(bookmarkDate).Count > 0) {
continue;
}
}

// If the court faith has doctrine_theocracy_temporal (Theocratic Clerical Tradition), the court chaplain should
// be either theocratic or landless.
// For the purpose of the conversion, we simply require them to be landless.
if (religionCollection.GetFaith(rulerFaithId)?.HasDoctrine("doctrine_theocracy_temporal") == true) {
if (rulerFaith?.HasDoctrine("doctrine_theocracy_temporal") == true) {
if (heldTitlesCount > 0) {
continue;
}
Expand Down
Loading