﻿# More Doctrines for CK3 1.20 (converted from the 1.19 version, see pr_dev issue #191).
# Vanilla doctrines are no longer overridden (vanilla 1.20 applies), except doctrine_monogamy, which adds the
# switching costs from Bigamy/Trigamy. Each doctrine names its group (doctrine_group_type) and index.

# Vanilla 1.20 doctrine_monogamy plus the switching costs from Bigamy/Trigamy/Polygamy (More Doctrines)
doctrine_monogamy = {
	doctrine_group_type = doctrine_marriage_type
	index = 0
	divergence = 0

	piety_cost = {
		value = faith_doctrine_cost_mid
		if = {
			limit = { rite_has_doctrine = doctrine_monogamy }
			multiply = faith_unchanged_doctrine_cost_mult
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_bigamy }
			multiply = faith_changed_doctrine_cost_mult_two_step
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_trigamy }
			multiply = faith_changed_doctrine_cost_mult_three_step
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_polygamy }
			multiply = faith_changed_doctrine_cost_mult_four_step
		}
	}
	parameters = {
		doctrine_monogamy
		marriage_event
	}
	special_parameters = {
		number_of_spouses = 1
	}
}

doctrine_bigamy = {
	doctrine_group_type = doctrine_marriage_type
	index = 3
	piety_cost = {
		value = faith_doctrine_cost_mid
		if = {
			limit = { rite_has_doctrine = doctrine_bigamy }
			multiply = faith_unchanged_doctrine_cost_mult
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_monogamy }
			multiply = faith_changed_doctrine_cost_mult_two_step
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_trigamy }
			multiply = faith_changed_doctrine_cost_mult_two_step
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_polygamy }
			multiply = faith_changed_doctrine_cost_mult_three_step
		}
	}
	parameters = {
		spouse_piety_loss = yes
	}
	special_parameters = {
		number_of_spouses = 2
	}
}

doctrine_trigamy = {
	doctrine_group_type = doctrine_marriage_type
	index = 4
	piety_cost = {
		value = faith_doctrine_cost_mid
		if = {
			limit = { rite_has_doctrine = doctrine_trigamy }
			multiply = faith_unchanged_doctrine_cost_mult
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_bigamy }
			multiply = faith_changed_doctrine_cost_mult_two_step
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_polygamy }
			multiply = faith_changed_doctrine_cost_mult_two_step
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_monogamy }
			multiply = faith_changed_doctrine_cost_mult_three_step
		}
	}
	parameters = {
		spouse_piety_loss = yes
	}
	special_parameters = {
		number_of_spouses = 3
	}
}

doctrine_sacred_marriage = {
	doctrine_group_type = doctrine_stance_on_marriage
	index = 0
	piety_cost = {
		value = faith_doctrine_cost_mid
		if = {
			limit = { rite_has_doctrine = doctrine_sacred_marriage }
			multiply = faith_unchanged_doctrine_cost_mult
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_none_marriage }
			multiply = faith_changed_doctrine_cost_mult_two_step
		}
	}
	character_modifier = {
		monthly_piety = 0.25
	}
}

doctrine_worldly_marriage = {
	doctrine_group_type = doctrine_stance_on_marriage
	index = 1
	piety_cost = {
		value = faith_doctrine_cost_mid
		if = {
			limit = { rite_has_doctrine = doctrine_worldly_marriage }
			multiply = faith_unchanged_doctrine_cost_mult
		}
	}
	character_modifier = {
		stewardship = 1
	}
}

doctrine_none_marriage = {
	doctrine_group_type = doctrine_stance_on_marriage
	index = 2
	piety_cost = {
		value = faith_doctrine_cost_mid
		if = {
			limit = { rite_has_doctrine = doctrine_none_marriage }
			multiply = faith_unchanged_doctrine_cost_mult
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_sacred_marriage }
			multiply = faith_changed_doctrine_cost_mult_two_step
		}
	}
	character_modifier = {
		different_faith_opinion = 5
	}
}

doctrine_henotheistic = {	#One, may be more
	doctrine_group_type = doctrine_theism
	index = 2
	icon = "doctrine_henotheistic"
	piety_cost = {
		value = faith_doctrine_cost_high
		#value = faith_doctrine_cost_low
		if = {
			limit = { rite_has_doctrine = abrahamic_hostility_doctrine }
			multiply = faith_changed_doctrine_cost_mult_three_step
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_henotheistic }
			multiply = faith_unchanged_doctrine_cost_mult
		}
	}
	special_parameters = {
		hostility_levels = {
			unrelated = hostile
		}
	}
}

doctrine_ditheistic = {	#Only Two
	doctrine_group_type = doctrine_theism
	index = 3
	icon = "doctrine_ditheistic"
	piety_cost = {
		value = faith_doctrine_cost_high
		if = {
			limit = { rite_has_doctrine = abrahamic_hostility_doctrine }
			multiply = faith_changed_doctrine_cost_mult_three_step
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_ditheistic  }
			multiply = faith_unchanged_doctrine_cost_mult
		}
	}
	special_parameters = {
		hostility_levels = {
			unrelated = hostile
		}
	}
}

doctrine_dihenotheistic = {	#Two, may be more
	doctrine_group_type = doctrine_theism
	index = 4
	icon = "doctrine_dihenotheistic"
	piety_cost = {
		value = faith_doctrine_cost_high
		if = {
			limit = { rite_has_doctrine = abrahamic_hostility_doctrine }
			multiply = faith_changed_doctrine_cost_mult_three_step
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_dihenotheistic }
			multiply = faith_unchanged_doctrine_cost_mult
		}
	}
	special_parameters = {
		hostility_levels = {
			unrelated = hostile
		}
	}
}

doctrine_tritheistic = {	#Only Three
	doctrine_group_type = doctrine_theism
	index = 5
	icon = "doctrine_tritheistic"
	piety_cost = {
		value = faith_doctrine_cost_high
		if = {
			limit = { rite_has_doctrine = abrahamic_hostility_doctrine }
			multiply = faith_changed_doctrine_cost_mult_three_step
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_tritheistic }
			multiply = faith_unchanged_doctrine_cost_mult
		}
	}
	special_parameters = {
		hostility_levels = {
			unrelated = hostile
		}
	}
}

doctrine_trihenotheistic = {	#Three, may be more
	doctrine_group_type = doctrine_theism
	index = 6
	icon = "doctrine_trihenotheistic"
	piety_cost = {
		value = faith_doctrine_cost_high
		if = {
			limit = { rite_has_doctrine = abrahamic_hostility_doctrine }
			multiply = faith_changed_doctrine_cost_mult_three_step
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_trihenotheistic }
			multiply = faith_unchanged_doctrine_cost_mult
		}
	}
	special_parameters = {
		hostility_levels = {
			unrelated = hostile
		}
	}
}

doctrine_kathenotheistic = {	#Many, but one is worshipped at a time
	doctrine_group_type = doctrine_theism
	index = 7
	icon = "doctrine_kathenotheistic"
	piety_cost = {
		value = faith_doctrine_cost_high
		if = {
			limit = { rite_has_doctrine = abrahamic_hostility_doctrine }
			multiply = faith_changed_doctrine_cost_mult_three_step
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_kathenotheistic }
			multiply = faith_unchanged_doctrine_cost_mult
		}
	}
	special_parameters = {
		hostility_levels = {
			unrelated = hostile
		}
	}
}

doctrine_agnostic = {	#No Gods, but there may be one
	doctrine_group_type = doctrine_theism
	index = 8
	icon = "doctrine_agnostic"
	piety_cost = {
		#value = faith_doctrine_cost_mid
		value = faith_doctrine_cost_high
		if = {
			limit = { rite_has_doctrine = abrahamic_hostility_doctrine }
			multiply = faith_changed_doctrine_cost_mult_three_step
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_agnostic }
			multiply = faith_changed_doctrine_cost_mult_three_step
		}
	}
	special_parameters = {
		hostility_levels = {
			unrelated = evil
		}
	}
}

doctrine_ethereal = {
	doctrine_group_type = doctrine_nature_of_godhood
	index = 0
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		learning_per_piety_level = 1
	}
}

doctrine_immortal = {
	doctrine_group_type = doctrine_nature_of_godhood
	index = 1
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		monthly_piety_gain_mult = 0.1
	}
}

doctrine_ethereal_immortal = {
	doctrine_group_type = doctrine_nature_of_godhood
	index = 2
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		monthly_piety = 0.4
	}
}

doctrine_aeonic = {
	doctrine_group_type = doctrine_nature_of_godhood
	index = 3
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		martial_per_piety_level = 1
		knight_effectiveness_mult = 0.1
	}
}

doctrine_spiritual = {
	doctrine_group_type = doctrine_nature_of_godhood
	index = 4
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		stress_gain_mult = -0.15
	}
}

doctrine_personal = {
	doctrine_group_type = doctrine_nature_of_godhood
	index = 5
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		monthly_piety = 0.2
		monthly_piety_gain_mult = 0.05
	}
}

doctrine_theistic_creation = {
	doctrine_group_type = doctrine_cosmology
	index = 0
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		stress_gain_mult = -0.15
	}
}

doctrine_eternal = {
	doctrine_group_type = doctrine_cosmology
	index = 1
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		learning = 1
	}
}

doctrine_cyclic = {
	doctrine_group_type = doctrine_cosmology
	index = 2
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		knight_effectiveness_mult = 0.05
	}
}

doctrine_dualistic = {
	doctrine_group_type = doctrine_cosmology
	index = 3
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	can_pick = {
		custom_description = {
			text = incompatible_doctrine_dualistic_ditheistic_trigger
			OR = {
				doctrine:doctrine_dihenotheistic = { is_in_list = selected_doctrines }
				doctrine:doctrine_ditheistic = { is_in_list = selected_doctrines }
			}
		}
	}
	character_modifier = {
		learning_per_piety_level = 2
	}
}

doctrine_chaos_into_world = {
	doctrine_group_type = doctrine_cosmology
	index = 4
	piety_cost = {
		value = faith_doctrine_cost_mid
	}
	can_pick = {
		custom_description = {
			text = incompatible_doctrine_chaos_into_world_polytheistic_trigger
			NOR = {
				doctrine:doctrine_monotheist = { is_in_list = selected_doctrines }
				doctrine:doctrine_henotheistic = { is_in_list = selected_doctrines }
				doctrine:doctrine_agnostic = { is_in_list = selected_doctrines }
			}
		}
	}
	character_modifier = {
		stewardship = 1
	}
}

doctrine_demigods = {
	doctrine_group_type = doctrine_deities
	index = 0
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		monthly_piety_gain_per_knight_add = 0.1
	}
}

doctrine_archangels = {
	doctrine_group_type = doctrine_deities
	index = 1
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		religious_vassal_opinion = 5
	}
}

doctrine_aspects = {
	doctrine_group_type = doctrine_deities
	index = 2
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		learning_per_prestige_level = 1
	}
}

doctrine_spirits = {
	doctrine_group_type = doctrine_deities
	index = 3
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		stress_loss_mult = 0.1
	}
}

doctrine_deities_none = {
	doctrine_group_type = doctrine_deities
	index = 4
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		monthly_prestige_gain_mult = 0.05
	}
}

doctrine_prophets = {
	doctrine_group_type = doctrine_divine_guidance
	index = 0
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		same_faith_opinion = 5
	}
}

doctrine_anointed_deliverer = {
	doctrine_group_type = doctrine_divine_guidance
	index = 1
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		clergy_opinion = 3
		learning = 1
	}
}

doctrine_gurus = {
	doctrine_group_type = doctrine_divine_guidance
	index = 2
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		stress_loss_mult = 0.15
	}
}

doctrine_avatars = {
	doctrine_group_type = doctrine_divine_guidance
	index = 3
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		learning = 2
	}
}

doctrine_enlightened_monks = {
	doctrine_group_type = doctrine_divine_guidance
	index = 4
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		learning = 1
		monthly_learning_lifestyle_xp_gain_mult = 0.2
	}
}

doctrine_divine_guidance_none = {
	doctrine_group_type = doctrine_divine_guidance
	index = 5
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		monthly_learning_lifestyle_xp_gain_mult = 0.15
	}
}

doctrine_apocalypse = {
	doctrine_group_type = doctrine_eschatology
	index = 0
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		stress_gain_mult = 0.1
		learning = 1
	}
}

doctrine_judgement_day = {
	doctrine_group_type = doctrine_eschatology
	index = 1
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		monthly_piety = 0.25
	}
}

doctrine_promised_deliverer = {
	doctrine_group_type = doctrine_eschatology
	index = 2
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		same_faith_opinion = 5
	}
}

doctrine_eschatology_none = {
	doctrine_group_type = doctrine_eschatology
	index = 3
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		stewardship = 1
	}
}

doctrine_paradise = {
	doctrine_group_type = doctrine_thanatology
	index = 0
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		stress_gain_mult = -0.2
	}
}

doctrine_underworld = {
	doctrine_group_type = doctrine_thanatology
	index = 1
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		monthly_piety = 0.4
	}
}

doctrine_paradise_and_underworld = {
	doctrine_group_type = doctrine_thanatology
	index = 2
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		stress_gain_mult = -0.1
		monthly_piety = 0.2
	}
}

doctrine_eternal_feast = {
	doctrine_group_type = doctrine_thanatology
	index = 3
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		diplomacy_per_piety_level = 1
	}
}

doctrine_paramount = {
	doctrine_group_type = doctrine_prayer
	index = 0
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		monthly_piety = 0.5
	}
}

doctrine_obligatory = {
	doctrine_group_type = doctrine_prayer
	index = 1
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		monthly_piety = 0.2
		learning = 1
	}
}

doctrine_recommended = {
	doctrine_group_type = doctrine_prayer
	index = 2
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		learning_per_piety_level = 1
	}
}

doctrine_autonomous = {
	doctrine_group_type = doctrine_prayer
	index = 3
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		learning_per_prestige_level = 1
	}
}

doctrine_mandatory_atone = {
	doctrine_group_type = doctrine_atonement
	index = 0
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		piety_level_impact_mult = 0.2
	}
}

doctrine_encouraged_atone = {
	doctrine_group_type = doctrine_atonement
	index = 1
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		piety_level_impact_mult = 0.1
		monthly_piety = 0.1
	}
}

doctrine_atonement_none = {
	doctrine_group_type = doctrine_atonement
	index = 2
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		learning = 1
	}
}

doctrine_mandatory_alms = {
	doctrine_group_type = doctrine_almsgiving
	index = 0
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		piety_level_impact_mult = 0.3
		domain_tax_mult_even_if_baron = -0.1
	}
}

doctrine_encouraged_alms = {
	doctrine_group_type = doctrine_almsgiving
	index = 1
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		piety_level_impact_mult = 0.1
	}
}

doctrine_almsgiving_none = {
	doctrine_group_type = doctrine_almsgiving
	index = 2
	piety_cost = {
		value = faith_doctrine_cost_low
	}
	character_modifier = {
		learning = 1
	}
}
