﻿# Note that some Paradox Bugs have been fixed; for Rite tenet and human sacrifice compatibility and an additional piety cost in Sun Worship and Cthonic Redoubts
#############################
# Standard Faith Tenets		#
#############################

tenet_divine_marriage = {
	name = {
		first_valid = {
			triggered_desc = {
				trigger = {
					religion_tag = zoroastrianism_religion
				}
				desc = tenet_divine_marriage_xwedodah 
			}
			desc = tenet_divine_marriage_name
		}
	}
	piety_cost = {
		value = faith_doctrine_cost_high
		if = {
			limit = { has_doctrine = tenet_divine_marriage }
			multiply = faith_unchanged_doctrine_cost_mult
		}
		else_if = {
			limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			multiply = faith_changed_doctrine_cost_mult_two_step
		}
		else_if = {
			limit = { has_doctrine = doctrine_consanguinity_cousins }
			multiply = faith_changed_doctrine_cost_mult_three_step
		}			
		else_if = {
			limit = { has_doctrine = doctrine_consanguinity_restricted }
			multiply = faith_changed_doctrine_cost_mult_four_step
		}
		else_if = {
			limit = { has_doctrine = doctrine_consanguinity_dynastic }
			multiply = faith_changed_doctrine_cost_mult_four_step
		}			
	}
	parameters = {
		consanguinity_unrestricted_marriage = yes
		consanguinity_unrestricted_incest = yes
		allows_cousin_marriage = yes
		allows_aunt_nephew_and_uncle_niece_marriage = yes
		allows_unrestricted_marriage = yes			
		divine_marriage_opinion = 10
		divine_marriage_piety_gain_active = yes
	}
	traits = {
		virtues = { 
			pure_blooded = 2 
			incestuous
		}
	}
}

tenet_rite = {
	icon = core_tenet_rite

	is_shown = {
		# Filter out religions that use a branch system.
		NOR = {
			religion = religion:islam_religion
			religion = religion:zoroastrianism_religion
		}
		# We also only want people with existing spiritual HoFs.
		exists = religious_head
		has_doctrine_parameter = spiritual_head_of_faith
	}

	can_pick = {
		# Must have a theocratic HoF.
		custom_description = {
			text = doctrine_requires_theocratic_head_of_faith_trigger
			doctrine:doctrine_spiritual_head = { is_in_list = selected_doctrines }
		}
		# !!! SECTION NOTE !!!
		## We check for tenets rather than doctrine parameters here because doctrine parameters cannot be checked in the selected_doctrines list, so we maintain such throughout the section for consistency.
		# Some tenet/doctrine configurations are mutually exclusive.
		## Pacifists vs. war-mongers.
		custom_description = {
			text = incompatible_tenet_shared_hof_pacifists_vs_warmongers
			NOR = {
				# Either you're trying to be pacifist and your HoF hates it...
				AND = {
					OR = {
						doctrine:tenet_dharmic_pacifism = { is_in_list = selected_doctrines }
						doctrine:tenet_pacifism = { is_in_list = selected_doctrines }
					}
					religious_head.faith = {
						OR = {
							has_doctrine = tenet_armed_pilgrimages
							has_doctrine = tenet_struggle_submission
							has_doctrine = tenet_warmonger
							has_doctrine = tenet_pursuit_of_power
						}
					}
				}
				# ... or your HoF is and hates your warmongering.
				AND = {
					OR = {
						doctrine:tenet_armed_pilgrimages = { is_in_list = selected_doctrines }
						doctrine:tenet_struggle_submission = { is_in_list = selected_doctrines }
						doctrine:tenet_warmonger = { is_in_list = selected_doctrines }
						doctrine:tenet_pursuit_of_power = { is_in_list = selected_doctrines }
					}
					religious_head.faith = {
						OR = {
							has_doctrine = tenet_dharmic_pacifism
							has_doctrine = tenet_pacifism
						}
					}
				}
			}
		}
		## Criminal witches vs. adorcists.
		custom_description = {
			text = incompatible_tenet_shared_hof_criminal_witches_vs_adorcists
			NOR = {
				# Either you're big on possessions but your HoF hates witchcraft...
				AND = {
					doctrine:tenet_adorcism = { is_in_list = selected_doctrines }
					religious_head.faith = { has_doctrine = doctrine_witchcraft_crime }
				}
				# ... or you hate witchcraft but your HoF likes possessions.
				AND = {
					doctrine:doctrine_witchcraft_crime = { is_in_list = selected_doctrines }
					religious_head.faith = { has_doctrine = tenet_adorcism }
				}
			}
		}
		## Hedonists vs. ascetics.
		custom_description = {
			text = incompatible_tenet_shared_hof_hedonists_vs_ascetics
			NOR = {
				# Either you like to indulge but your HoF believes less is more...
				AND = {
					doctrine:tenet_hedonistic = { is_in_list = selected_doctrines }
					religious_head.faith = { has_doctrine = tenet_asceticism }
				}
				# ... or your HoF throws constant wild parties whilst you prefer to sit and chill.
				AND = {
					doctrine:tenet_asceticism = { is_in_list = selected_doctrines }
					religious_head.faith = { has_doctrine = tenet_hedonistic }
				}
			}
		}
		## Cannibals vs. non-cannibals of any kind.
		custom_description = {
			text = incompatible_tenet_shared_hof_cannibals_vs_non_cannibals
			NOR = {
				# Cannibal-you doesn't get why your non-cannibal HoF freaks out when you offer them a hand...
				AND = {
					doctrine:tenet_ritual_cannibalism = { is_in_list = selected_doctrines }
					NOT = {
						religious_head.faith = { has_doctrine = tenet_ritual_cannibalism }
					}
				}
				# ... or cannibal-HoF thinks you need to chill the hell out whilst they eat this dude.
				AND = {
					religious_head.faith = { has_doctrine = tenet_ritual_cannibalism }						
					NOT = {
						doctrine:tenet_ritual_cannibalism = { is_in_list = selected_doctrines }
					}
				}
			}
		}
		# Some tenet/doctrine configurations are unilaterally exclusive.
		## HumSac/GruFes are disliked by anyone who doesn't also actively believe in such.
		custom_description = {
			text = incompatible_tenet_shared_hof_world_vs_humsac_grufes
			# Your HoF will not put up with your HumSackery if they don't also go in for it.
			trigger_if = {
				limit = {
					OR = {
						doctrine:tenet_gruesome_festivals = { is_in_list = selected_doctrines }
						doctrine:tenet_human_sacrifice = { is_in_list = selected_doctrines }
					}
				}
				OR = {  #mz_tag NOR to OR
					religious_head.faith = { has_doctrine = tenet_gruesome_festivals }
					religious_head.faith = { has_doctrine = tenet_human_sacrifice }
				}
			}
		}
		## Monogamy doesn't like polygamy.
		custom_description = {
			text = incompatible_tenet_shared_hof_monogamy_vs_polygamy
			# Monogamous HoFs do not appreciate polygamy.
			trigger_if = {
				limit = {
					doctrine:doctrine_polygamy = { is_in_list = selected_doctrines }
				}
				NOT = {
					religious_head.faith = { has_doctrine = doctrine_monogamy }
				}
			}
		}
		## All lesser variations of incest don't like unrestricted incest.
		custom_description = {
			text = incompatible_tenet_shared_hof_world_vs_unrestricted_incest
			# Non-incestual HoFs really take issue with unrestricted incest.
			trigger_if = {
				limit = {
					doctrine:doctrine_consanguinity_unrestricted = { is_in_list = selected_doctrines }
				}
				religious_head.faith = { has_doctrine = doctrine_consanguinity_unrestricted }
			}
		}
	}

	piety_cost = {
		value = faith_tenet_cost_low
	}

	parameters = {
		maintains_head_of_faith_on_creation = yes
		# For loc:
		ecumenical_christians_keep_ecumenism = yes
		# And finally, you and your old faith see each other as astray.
		## Please note, unlike other hostility overrides, this is _bilateral_, not unilateral.
		same_hof_hostility_override = 1
	}

	character_modifier = {
		faith_creation_piety_cost_mult = -0.25
		opinion_of_same_faith = 5
		religious_head_opinion = -10
	}
}

tenet_sun_worship = {
	icon = core_tenet_sun_worship

	piety_cost = {
		value = faith_tenet_cost_mid

		# Multiplier for keeping same tenet
		if = {
			limit = { has_doctrine = tenet_sun_worship }
			multiply = faith_unchanged_doctrine_cost_mult
		}
	}

	is_shown = {
		OR = {
			religion_tag = zunism_religion
			has_doctrine = tenet_sun_worship #If you already have it
			AND = {
				religion_tag = hinduism_religion
				this = faith:saura #If you're into Saurism
			}
			
		}
	}

	parameters = {
		summer_festivals_active = yes
		trial_by_sun_active = yes
	}

	character_modifier = {
		desert_attrition_mult = -0.25
		desert_mountains_attrition_mult = -0.25
	}

	#mz_tag piety_cost = faith_tenet_cost_mid
}

tenet_cthonic_redoubts = {
	icon = core_tenet_cthonic_redoubts

	name = {
		first_valid = {
			triggered_desc = {
				trigger = {
					religion_tag = north_african_religion
				}
				desc = tenet_volcanic_veneration_name
			}
			desc = tenet_cthonic_redoubts_name
		}
	}

	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					religion_tag = north_african_religion
				}
				desc = tenet_volcanic_veneration_desc
			}
			desc = tenet_cthonic_redoubts_desc
		}
	}

	piety_cost = {
		value = faith_tenet_cost_mid

		# Multiplier for keeping same tenet
		if = {
			limit = { has_doctrine = tenet_cthonic_redoubts }
			multiply = faith_unchanged_doctrine_cost_mult
		}
		# Multiplier for traditional mountain-based religions or faiths.
		if = {
			limit = {
				OR = {
					this = faith:bosnian_church
					this = faith:armenian_apostolic
					this = faith:lamaism
					this = faith:vajrayana
					this = faith:mahayana
					this = faith:haymanot
					religion = religion:basque_religion
					religion = religion:kushitism_religion
					religion = religion:zunism_religion
					religion = religion:tani_religion
					religion = religion:qiangic_religion
					religion = religion:bon_religion
				}
			}
			multiply = faith_tenet_discount_mountain_background_value
		}
	}

	is_shown = { always = yes }

	parameters = {
		easier_to_convert_faith_in_mountains = yes
		easier_to_convert_culture_in_same_faith_mountains = yes
		harder_to_convert_faith_away_in_mountains = yes
	}

	character_modifier = {
		mountains_attrition_mult = -0.5
		mountains_levy_size = 0.3
		mountains_advantage = 5
		desert_mountains_attrition_mult = -0.5
		desert_mountains_levy_size = 0.3
		desert_mountains_advantage = 5
	}

	#mz_tag piety_cost = faith_tenet_cost_mid

	traits = {
		virtues = {
			# For the Jentillaks et al.
			giant
		}
	}
}

#############################
# Syncretic Faith Tenets	#
#############################

doctrine_mz_no_syncretism = {
	icon = "doctrine_mz_no_syncretism"
	piety_cost = {
		value = 0
		if = {
			limit = { has_doctrine = doctrine_mz_no_syncretism }
			value = 0
		}
		else_if = {
			limit = { 
				OR = { 	
					has_doctrine = tenet_sinitic_syncretism
					has_doctrine = tenet_eastern_syncretism
					has_doctrine = tenet_unreformed_syncretism
					has_doctrine = tenet_christian_syncretism
					has_doctrine = tenet_islamic_syncretism
					has_doctrine = tenet_jewish_syncretism
				} 
			}
			value = faith_tenet_cost_high
		}
	}
	character_modifier = {
		name = doctrine_mz_no_syncretism_effect
		opinion_of_different_faith = -5
	}
}

tenet_sinitic_syncretism = {
	icon = "core_tenet_sinitic_syncretism"
	piety_cost = {
		if = {
			limit = {
				OR = {
					religion_tag = buddhism_religion
					has_doctrine = pagan_hostility_doctrine
				}
			}
			value = faith_tenet_cost_low
		}
		else_if = {
			limit = {
				religion_tag = islam_religion
			}
			value = faith_tenet_cost_high
		}
		else = {
			value = faith_tenet_cost_mid
		}

		# Multiplier for keeping same tenet
		if = {
			limit = { has_doctrine = tenet_sinitic_syncretism }
			multiply = faith_unchanged_doctrine_cost_mult
		}
	}

	is_shown = {
		OR = {
			has_doctrine = abrahamic_hostility_doctrine
			has_doctrine = pagan_hostility_doctrine
			has_doctrine = eastern_hostility_doctrine
		}
	}
	can_pick = {
		custom_description = {
			text = incompatible_tenet_gnosticism_trigger
			NOT = {
				doctrine:tenet_gnosticism = { is_in_list = selected_doctrines }
			}
		}
		custom_description = {
			text = incompatible_tenet_other_syncretism_trigger
			NOR = {
				doctrine:tenet_eastern_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_unreformed_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_christian_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_islamic_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_jewish_syncretism = { is_in_list = selected_doctrines }
			}
		}
	}
	parameters = {
		hostility_override_sinitic_hostility_doctrine = 1
		#For loc:
		is_sinitic_faith_bilateral_loc_override = 1
		sinitic_syncretic_actor_opinion_active = yes
		opinion_of_sinitic_syncretic_recipient_opinion_active = 30 #Sync this to syncretic_mutual_opinion_bonus_value
	}
	traits = {
		virtues = { honest }
		sins = { wrathful }
	}
}

tenet_eastern_syncretism = {
	icon = "core_tenet_eastern_syncretism"
	piety_cost = {
		if = {
			limit = {
				OR = {
					religion_tag = dualism_religion
					has_doctrine = pagan_hostility_doctrine
				}
			}
			value = faith_tenet_cost_low
		}
		else_if = {
			limit = {
				religion_tag = islam_religion
			}
			value = faith_tenet_cost_high
		}
		else = {
			value = faith_tenet_cost_mid
		}

		# Multiplier for keeping same tenet
		if = {
			limit = { has_doctrine = tenet_eastern_syncretism }
			multiply = faith_unchanged_doctrine_cost_mult
		}
	}

	is_shown = {
		OR = {
			has_doctrine = abrahamic_hostility_doctrine
			has_doctrine = pagan_hostility_doctrine
			has_doctrine = sinitic_hostility_doctrine
		}
	}
	can_pick = {
		custom_description = {
			text = incompatible_tenet_gnosticism_trigger
			NOT = {
				doctrine:tenet_gnosticism = { is_in_list = selected_doctrines }
			}
		}
		custom_description = {
			text = incompatible_tenet_other_syncretism_trigger
			NOR = {
				doctrine:tenet_unreformed_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_christian_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_islamic_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_jewish_syncretism = { is_in_list = selected_doctrines }
			}
		}
	}
	parameters = {
		hostility_override_eastern_hostility_doctrine = 1
		#For loc:
		is_eastern_faith_bilateral_loc_override = 1
		eastern_syncretic_actor_opinion_active = yes
		opinion_of_eastern_syncretic_recipient_opinion_active = 30 #Sync this to syncretic_mutual_opinion_bonus_value
	}
	traits = {
		virtues = { honest }
		sins = { wrathful }
	}
}

tenet_unreformed_syncretism = {
	icon = "core_tenet_unreformed_syncretism"
	piety_cost = {
		if = {
			limit = { doctrine:doctrine_pluralism_pluralistic = {is_in_list = selected_doctrines} }
			value = faith_tenet_cost_low
		}
		else_if = {
			limit = { doctrine:doctrine_pluralism_fundamentalist = {is_in_list = selected_doctrines} }
			value = faith_tenet_cost_high
		}
		else = {
			value = faith_tenet_cost_mid
		}

		# Multiplier for keeping same tenet
		if = {
			limit = { has_doctrine = tenet_unreformed_syncretism }
			multiply = faith_unchanged_doctrine_cost_mult
		}
	}


	is_shown = {
		NOT = { has_doctrine = pagan_hostility_doctrine }
	}
	can_pick = {
		custom_description = {
			text = incompatible_tenet_other_syncretism_trigger
			NOR = {
				doctrine:tenet_eastern_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_christian_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_islamic_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_jewish_syncretism = { is_in_list = selected_doctrines }
			}
		}
	}
	parameters = {
		hostility_override_unreformed_faith_doctrine = 2
		hostility_override_west_african_unreformed_faith_doctrine = 2
		unreformed_syncretic_actor_opinion_active = yes
		opinion_of_unreformed_syncretic_recipient_opinion_active = 30 #Sync this to syncretic_mutual_opinion_bonus_value
		unreformed_syncretic_conversion_malus_active = yes
	}
	traits = {
		virtues = { humble }
		sins = { arrogant }
	}
}

tenet_christian_syncretism = {
	icon = "core_tenet_christian_syncretism"
	piety_cost = {
		if = {
			limit = {
				OR = {
					religion_tag = islam_religion
					religion_tag = dualism_religion
				}
			}
			value = faith_tenet_cost_low
		}
		else = {
			value = faith_tenet_cost_mid
		}

		# Multiplier for keeping same tenet
		if = {
			limit = { has_doctrine = tenet_christian_syncretism }
			multiply = faith_unchanged_doctrine_cost_mult
		}
	}

	is_shown = {
		NOT = { religion_tag = christianity_religion }
	}
	can_pick = {
		custom_description = {
			text = incompatible_tenet_other_syncretism_trigger
			NOR = {
				doctrine:tenet_eastern_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_unreformed_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_islamic_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_jewish_syncretism = { is_in_list = selected_doctrines }
			}
		}
	}

	parameters = {
		hostility_override_special_doctrine_is_christian_faith = 2
		#For loc:
		is_christian_faith_bilateral_loc_override = 2
		# This parameter is empty; the syncretic religious trigger checks against the doctrine, as that's much clearer in tooltips and allows us to use a unified syncretic trigger per-religion rather than having bitty situational triggers.
		can_use_christian_artefacts = yes
		christian_syncretic_actor_opinion_active = yes
		opinion_of_christian_syncretic_recipient_opinion_active = 30 #Sync this to syncretic_mutual_opinion_bonus_value
	}

	traits = {
		virtues = { compassionate }
		sins = { callous sadistic }
	}
}

tenet_islamic_syncretism = {
	icon = "core_tenet_islamic_syncretism"
	piety_cost = {
		if = {
			limit = {
				OR = {
					religion_tag = christianity_religion
					religion_tag = dualism_religion
				}
			}
			value = faith_tenet_cost_low
		}
		else = {
			value = faith_tenet_cost_mid
		}

		# Multiplier for keeping same tenet
		if = {
			limit = { has_doctrine = tenet_islamic_syncretism }
			multiply = faith_unchanged_doctrine_cost_mult
		}
	}

	is_shown = {
		NOT = { religion_tag = islam_religion }
	}

	can_pick = {
		custom_description = {
			text = incompatible_tenet_other_syncretism_trigger
			NOR = {
				doctrine:tenet_eastern_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_unreformed_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_christian_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_jewish_syncretism = { is_in_list = selected_doctrines }
			}
		}
	}

	parameters = {
		hostility_override_special_doctrine_is_islamic_faith = 2
		# This parameter is empty; the syncretic religious trigger checks against the doctrine, as that's much clearer in tooltips and allows us to use a unified syncretic trigger per-religion rather than having bitty situational triggers.
		can_use_islamic_artefacts = yes
		islamic_syncretic_actor_opinion_active = yes
		opinion_of_islamic_syncretic_recipient_opinion_active = 30 #Sync this to syncretic_mutual_opinion_bonus_value
	}

	traits = {
		virtues = { generous }
		sins = { greedy arbitrary }
	}
}

tenet_jewish_syncretism = {
	icon = "core_tenet_jewish_syncretism"
	piety_cost = {
		if = {
			limit = {
				OR = {
					religion_tag = judaism_religion
					religion_tag = christianity_religion
					religion_tag = dualism_religion
				}
			}
			value = faith_tenet_cost_low
		}
		else = {
			value = faith_tenet_cost_mid
		}

		# Multiplier for keeping same tenet
		if = {
			limit = { has_doctrine = tenet_jewish_syncretism }
			multiply = faith_unchanged_doctrine_cost_mult
		}
	}

	is_shown = {
		NOT = { religion_tag = judaism_religion }
	}
	can_pick = {
		custom_description = {
			text = incompatible_tenet_other_syncretism_trigger
			NOR = {
				doctrine:tenet_eastern_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_unreformed_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_christian_syncretism = { is_in_list = selected_doctrines }
				doctrine:tenet_islamic_syncretism = { is_in_list = selected_doctrines }
			}
		}
	}

	parameters = {
		hostility_override_special_doctrine_is_jewish_faith = 2
		# This parameter is empty; the syncretic religious trigger checks against the doctrine, as that's much clearer in tooltips and allows us to use a unified syncretic trigger per-religion rather than having bitty situational triggers.
		can_use_jewish_artefacts = yes
		jewish_syncretic_actor_opinion_active = yes
		opinion_of_jewish_syncretic_recipient_opinion_active = 30 #Sync this to syncretic_mutual_opinion_bonus_value
	}

	traits = {
		virtues = { patient }
		sins = { cynical greedy }
	}
}

#############################
# Custom Faith Tenets		#
#############################

tenet_natural_primitivism = {
	icon = core_tenet_natural_primitivism

	can_pick = {
		custom_description = {
			text = incompatible_with_crimes_trigger
			NOR = {
				doctrine:doctrine_adultery_women_crime = { is_in_list = selected_doctrines }
				doctrine:doctrine_homosexuality_crime = { is_in_list = selected_doctrines }
				doctrine:doctrine_adultery_men_crime = { is_in_list = selected_doctrines }
				doctrine:doctrine_witchcraft_crime = { is_in_list = selected_doctrines }
				doctrine:doctrine_deviancy_crime = { is_in_list = selected_doctrines }
			}
			OR = {
				doctrine:doctrine_kinslaying_accepted = { is_in_list = selected_doctrines }
				doctrine:doctrine_kinslaying_shunned = { is_in_list = selected_doctrines }
			}
		}
		custom_description = {
			text = mz_requires_full_nudity
			doctrine:doctrine_mz_full_nudity = { is_in_list = selected_doctrines }
		} #mz_tag		
	}

	piety_cost = {
		if = {
			limit = {
				religion = religion:hinduism_religion
				religion = religion:jainism_religion
			}
			value = faith_tenet_cost_mid
		}
		else_if = {
			limit = {
				has_doctrine = pagan_hostility_doctrine
				religion = religion:buddhism_religion
				religion = religion:christianity_religion
				religion = religion:dualism_religion
			}
			value = faith_tenet_cost_high
		}
		else = {
			value = faith_tenet_cost_massive
		}

		# Multiplier for keeping same tenet
		if = {
			limit = { has_doctrine = tenet_natural_primitivism }
			multiply = faith_unchanged_doctrine_cost_mult
		}
	}

	parameters = {
		naked_adherents_active = yes
		natural_primitivism_law_cost_increase = yes
	}

	character_modifier = {
		tyranny_gain_mult = 1.00
		stress_gain_mult = -0.25
		stress_loss_mult = 0.25
	}
}

tenet_polyamory = {
	piety_cost = {
		if = {
			limit = {
				religion_tag = hinduism_religion
			}
			value = faith_tenet_cost_low
		}
		else_if = {
			limit = {
				OR = {
					religion_tag = christianity_religion
					religion_tag = judaism_religion
					religion_tag = islam_religion
					religion_tag = buddhism_religion
					religion_tag = jainism_religion
				}
			}
			value = faith_tenet_cost_high
		}
		else = {
			value = faith_tenet_cost_mid
		}

		# Multiplier for keeping same tenet
		if = {
			limit = { has_doctrine = tenet_polyamory }
			multiply = faith_unchanged_doctrine_cost_mult
		}
	}

	can_pick = {
		custom_description = {
			text = ADULTERY_MUST_BE_FULLY_ACCEPTED
			NOR = {
				doctrine:doctrine_adultery_women_crime = { is_in_list = selected_doctrines }
				doctrine:doctrine_adultery_women_shunned = { is_in_list = selected_doctrines }
				doctrine:doctrine_adultery_men_crime = { is_in_list = selected_doctrines }
				doctrine:doctrine_adultery_men_shunned = { is_in_list = selected_doctrines }
			}
		}
	}

	parameters = {
		no_unfaithfulness_penalty_active = yes
	}
}