﻿# This decision allows you to switch between Harem tenets
# This is either:
# 1. Concubinocracy - Paelex have high status, are considered to be your leaders of the realm alongside you
# 2. Contubernalium - Greater use of Contubernalis, all, including Paelex are your tools to be used at your will
# Triggers an event depending on current tenet to switch to other tenet
regula_change_harem_tenet_decision = {
	# Text
	title = regula_change_harem_tenet_decision.t
	desc = {
		triggered_desc = {
			trigger = {
				faith = {
					has_doctrine = tenet_regula_devoted 
				}
			}
			desc = regula_change_harem_tenet_decision.desc_paelex
		}
		triggered_desc = {
			trigger = {
				faith = {
					has_doctrine = tenet_regula_sacrifice 
				}
			}
			desc = regula_change_harem_tenet_decision.desc_sacrifice
		}
	}
	confirm_text = regula_change_harem_tenet_decision.a

	# Art
	picture = {
		reference = "gfx/interface/illustrations/decisions/regula_change_harem_tenet_decision.dds"
	}

	# Grouping
	decision_group_type = regula
	sort_order = 1

	# AI
	# This is player only
	ai_check_interval = 0
	ai_potential = { always = no }
	ai_will_do = { base = 0 }

	# Triggers for showing
	is_shown = {
		is_ai = no
		is_regula_trigger = yes
	}

	is_valid_showing_failures_only = {
		is_available = yes
	}

	# Cooldown
	cooldown = { years = 10 }

	# Cost
	cost = {
		piety = regula_change_harem_tenet_piety_cost
	}

	# Effect
	effect = {
		if = {
			limit = { faith = { has_doctrine = tenet_regula_devoted } }

			show_as_tooltip = {
				faith = {
					add_doctrine = tenet_regula_sacrifice
				}
			}

			trigger_event = regula_change_harem_tenet_event.1000
		}
		else = {

			show_as_tooltip = {
				faith = {
					add_doctrine = tenet_regula_devoted
					every_faith_character = {
						limit = {
							has_trait = contubernalis
							NOT = { this = scope:contubernalis }
						}
						death = {
							death_reason = death_contubernalis_cutoff_from_magister
						}
					}
				}
			}

			trigger_event = regula_change_harem_tenet_event.2000
		}
	}
}