﻿
# These are the "goals" for freeing the Keeper of Souls
# The more completed goals, the better ritual you can perform
regula_free_keeper_of_souls_triggers = {
	OR = {
		# You are always spellbound, freebie goal
		custom_description = {
			text = regula_player_entranced_trigger
			any_secret = {
				secret_type = regula_covert_conversion
			}
		}

		# Title/Realm requirements
		# You have a title of Duchy or higher
		highest_held_title_tier >=3
		# Your realm size is greater then 5
		realm_size >= 5

		# Primary Wife is secretly charmed (and that you have one!)
		custom_description = {
			text = regula_spouse_entranced_trigger
			primary_spouse ?= {
				any_secret = {
					secret_type = regula_covert_conversion
				}
			}
		}

		# Two powerful vassals are secretly charmed
		# If Feudal/Clan/Tribal
		trigger_if = {
			limit = {
				OR = {
					has_government = feudal_government
					has_government = clan_government
					has_government = tribal_government
				}
			}
			custom_description = {
				text = regula_2_covert_powerful_vassals_trigger
				regula_num_covert_powerful_vassals >= 2
			}
		}

		# You are at absolute Dominance or greater
		# If Nomad
		trigger_if = {
			limit = {
				government_has_flag = government_is_nomadic
			}
			custom_description = {
				text = regula_has_absolute_dominance_trigger
				OR = {
					has_realm_law = nomadic_authority_4
					has_realm_law = nomadic_authority_5
				}
			}
		}

		# If Administrative, must be a powerful family or higher
		trigger_if = {
			limit = {
				has_government = administrative_government
			}
			house ?= {
				custom_description = {
					text = regula_is_powerful_or_dominant_family_trigger
						OR = {
							is_powerful_family = yes
							is_dominant_family = yes
						}
				}
			}
		}

		# Any two Court position holders are secretly charmed
		custom_description = {
			text = regula_2_court_positions_entranced_trigger
			any_court_position_holder = {
				count >= 2
				any_secret = {
					secret_type = regula_covert_conversion
				}
			}
		}
	}
}

regula_free_keeper_of_souls_unlanded_triggers = {
	OR = {
		# You are always spellbound, freebie goal
		custom_description = {
			text = regula_player_entranced_trigger
			any_secret = {
				secret_type = regula_covert_conversion
			}
		}

		# Primary Wife is secretly charmed (and that you have one!)
		custom_description = {
			text = regula_spouse_entranced_trigger
			primary_spouse ?= {
				any_secret = {
					secret_type = regula_covert_conversion
				}
			}
		}

		# Any two camp position holders (officer) are secretly charmed
		custom_description = {
			text = regula_2_camp_positions_entranced_trigger
			any_court_position_holder = {
				count >= 2
				any_secret = {
					secret_type = regula_covert_conversion
				}
			}
		}

		# At least six followers are secretly charmed
		custom_description = {
			text = regula_6_followers_entranced_trigger
			any_courtier = {
				count >= 6
				any_secret = {
					secret_type = regula_covert_conversion
				}
			}
		}

		# You have at least two building upgrades out of six (that are regula)
		# This is for camps
		trigger_if = {
			limit = {
				is_landless_adventurer = yes
			}
			domicile = {
				calc_true_if = {
					amount >= 2
					has_domicile_building_or_higher = baggage_train_submissive_servants_01
					has_domicile_building_or_higher = barber_tent_healing_rituals_01
					has_domicile_building_or_higher = mess_tent_aphrodisiacs_01
					has_domicile_building_or_higher = camp_fire_enticing_offers_01
					has_domicile_building_or_higher = proving_grounds_famuli_trainer_01
					has_domicile_building_or_higher = camp_perimeter_captivating_maidens_01
				}
			}
		}

		# If we are landless, but have an estate under admin, check if we are a powerful family
		trigger_if = {
			limit = {
				is_landless_adventurer = no
				government_allows = administrative
			}
			house ?= {
				is_powerful_family = yes
			}
		}
	}
}