Skip to content

Commit

Permalink
Fix the converter trying to appoint invalid married court chaplains (#…
Browse files Browse the repository at this point in the history
…2127) #patch
  • Loading branch information
IhateTrains authored Sep 1, 2024
1 parent 34aee13 commit 5b76c63
Showing 1 changed file with 9 additions and 1 deletion.
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

0 comments on commit 5b76c63

Please sign in to comment.