﻿# A recruitment event (similar to Invite Debutantes mod)
# Allows you to recruit a Magi initiate if you have a holy order
# If your holy orders have lots of land (all added together), the quality of initiates will increase
# From Commonor -> Noble -> Royal
regula_take_initiates_from_holy_order_decision = {
	# Text
	title = regula_take_initiates_from_holy_order_decision.t
	desc = regula_take_initiates_from_holy_order_decision_desc
	selection_tooltip = regula_take_initiates_from_holy_order_decision_tooltip
	confirm_text = regula_take_initiates_from_holy_order_decision_confirm.a

	# Art
	picture = {
		reference = "gfx/interface/illustrations/decisions/regula_corrupt_holy_order_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
		faith = {
			any_faith_holy_order = { # Your faith must have a Holy Order
				always = yes
			}
		}
		dynasty ?= { # You do not have the Dynasty legacy that lets you skip the cooldown
			NOT = { has_dynasty_perk = regula_legacy_3 }
		}
	}

	is_valid = {
		OR = {
			custom_description = {
				text = regula_take_initiates_from_holy_order_common_trigger
			}
			custom_description = {
				text = regula_take_initiates_from_holy_order_noble_trigger
				regula_num_holy_order_counties >= 15
			}
			custom_description = {
				text = regula_take_initiates_from_holy_order_royal_trigger
				regula_num_holy_order_counties >= 30
			}
	
		}
	}

	is_valid_showing_failures_only = {
		is_imprisoned = no
	}

	# Cooldown
	cooldown = { years = 5 }

	# Cost
	cost = {
		prestige = regula_claim_initiates_prestige_cost
	}

	# Effect
	effect = {
		custom_tooltip = "regula_take_initiates_from_holy_order_decision_tooltip_effect"
		if = {
			limit = {
				character_has_regula_holy_effect_female_offspring = yes
			}
			# We get extra choices if we have Female Offspring holy site
			trigger_event = {
				id = regula_take_initiates_from_holy_order.0002
			}
		} else = {
			trigger_event = {
				id = regula_take_initiates_from_holy_order.0001
			}
		}
	}
}

regula_take_initiates_from_holy_order_decision_no_cooldown = {
	# Text
	title = regula_take_initiates_from_holy_order_decision.t
	desc = regula_take_initiates_from_holy_order_decision_desc
	selection_tooltip = regula_take_initiates_from_holy_order_decision_tooltip
	confirm_text = regula_take_initiates_from_holy_order_decision_confirm.a

	# Art
	picture = {
		reference = "gfx/interface/illustrations/decisions/regula_corrupt_holy_order_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
		faith = {
			any_faith_holy_order = { # Your faith must have a Holy Order
				always = yes
			}
		}
		dynasty ?= { # You have the Dynasty legacy that lets you skip the cooldown
			has_dynasty_perk = regula_legacy_3
		}
	}

	is_valid = {
		OR = {
			custom_description = {
				text = regula_take_initiates_from_holy_order_common_trigger
			}
			custom_description = {
				text = regula_take_initiates_from_holy_order_noble_trigger
				regula_num_holy_order_counties >= 15
			}
			custom_description = {
				text = regula_take_initiates_from_holy_order_royal_trigger
				regula_num_holy_order_counties >= 30
			}
		}
	}

	is_valid_showing_failures_only = {
		is_imprisoned = no
	}

	# Cost
	cost = {
		prestige = regula_claim_initiates_prestige_cost
	}

	# Effect
	effect = {
		custom_tooltip = "regula_take_initiates_from_holy_order_decision_tooltip_effect"
		if = {
			limit = {
				character_has_regula_holy_effect_female_offspring = yes
			}
			# We get extra choices if we have Female Offspring holy site
			trigger_event = {
				id = regula_take_initiates_from_holy_order.0002
			}
		} else = {
			trigger_event = {
				id = regula_take_initiates_from_holy_order.0001
			}
		}
	}
}
