﻿#avoiding doing these things as tenets for the sake of better compatibility with other mods

doctrine_edge_of_madness = {	# The key will be used for the doctrine icon, combined with the path in the define FAITH_DOCTRINE_ICON_PATH
#necronomicon/elder sign symbol
	# Optional. If not specified, the loc key "doctrine_group_key_name" will be used
	# Optional. If not specified, the loc key "doctrine_group_key_desc" will be used
	group = "main_group"
	is_available_on_create = {
		religion_tag = mythos_religion
	}
	mythos_embrace_madness_doctrine = {
		# Optional. If not specified, the loc key "doctrine_key_name" will be used
		# Optional. If not specified, the loc key "doctrine_key_desc" will be used
		piety_cost = {
			value = faith_tenet_cost_mid

			# Multiplier for keeping same tenet
			if = {
				limit = { has_doctrine = mythos_embrace_madness_doctrine }
				multiply = faith_unchanged_doctrine_cost_mult
			}
		}
		parameters = {
			hostility_override_mythos_embrace_madness_doctrine = 1
			opinion_of_mythos_avoid_madness_doctrine = -5
		}
		traits = {
			virtues = { lunatic = 2 arbitrary = 0.5 }
		}
	}
	mythos_avoid_madness_doctrine = {
		# Optional. If not specified, the loc key "doctrine_key_name" will be used
		# Optional. If not specified, the loc key "doctrine_key_desc" will be used
		piety_cost = {
			value = faith_tenet_cost_low

			# Multiplier for keeping same tenet
			if = {
				limit = { has_doctrine = mythos_avoid_madness_doctrine }
				multiply = faith_unchanged_doctrine_cost_mult
			}
		}
		parameters = {
			opinion_of_mythos_embrace_madness_doctrine = -5
		}
	}
}

#override adding Covenant with the Deep
doctrine_marriage_type = {
	group = "marriage"

	doctrine_monogamy = {
		piety_cost = {
			value = faith_doctrine_cost_mid
			if = {
				limit = { has_doctrine = doctrine_monogamy }
				multiply = faith_unchanged_doctrine_cost_mult
			}
		}
		parameters = {
			number_of_spouses = 1
			marriage_event = yes
			opinion_of_doctrine_mythos_deep_covenant = -10
		}
	}

	doctrine_polygamy = {
		piety_cost = {
			value = faith_doctrine_cost_mid
			if = {
				limit = { has_doctrine = doctrine_polygamy }
				multiply = faith_unchanged_doctrine_cost_mult
			}
		}
		parameters = {
			number_of_spouses = 4
			spouse_piety_loss = yes
		}
	}

	doctrine_concubines = {
		piety_cost = {
			value = faith_doctrine_cost_mid
			if = {
				limit = { has_doctrine = doctrine_concubines }
				multiply = faith_unchanged_doctrine_cost_mult
			}
		}
		parameters = {
			number_of_spouses = 1
			number_of_consorts = 3
			opinion_of_doctrine_mythos_deep_covenant = -5
		}
	}

	doctrine_mythos_deep_covenant = {
		# Optional. If not specified, the loc key "doctrine_key_name" will be used
		# Optional. If not specified, the loc key "doctrine_key_desc" will be used
		is_shown = {
			religion_tag = mythos_religion
		}
		piety_cost = {
			value = faith_doctrine_cost_mid
			if = {
				limit = { has_doctrine = doctrine_mythos_deep_covenant }
				multiply = faith_unchanged_doctrine_cost_mult
			}
		}
		parameters = {
			number_of_spouses = 1
			marriage_event = yes
		}
		traits = {
			virtues = {
				mythos_deep_hybrid_3 = 2
				mythos_deep_hybrid_4 = 2
				mythos_deep_hybrid_5 = 3
				mythos_deep_hybrid_1 = 1
				mythos_deep_hybrid_2 = 1
			}
		}
		#character_modifier:
		#	add decision generating hybrid child and decision to head to sea
		#	refusing covenant is grounds for imprisonment, ai will always fulfill
		#	being visibly hybrid is considered witchcraft
		#	ai will always head to sea eventually, not doing so is increasingly stressful but gives significant bonuses including immortality
	}
}
