﻿# Player-only overrides for scheme-level (romance/seduction) hard blocks.
#
# These triggers are used by vanilla scheme validation; we neutralize only the
# "player acting" side via `limit = { is_ai = no }`, leaving AI logic vanilla.

#Needs CHARACTER and FAITH
relation_with_character_is_incestuous_in_faith_trigger = {
	trigger_if = {
		limit = { is_ai = no }
		always = no
	}

	# Player is unrestricted -> treat relation as non-incestuous in player's faith context.
	# AI follows vanilla doctrine rules.
	OR = {
		#doctrine_consanguinity_dynastic; not within the same descent group
		AND = {
			$FAITH$ = { has_doctrine = doctrine_consanguinity_dynastic }
			OR = {
				is_close_or_extended_family_of = $CHARACTER$
				dynasty = $CHARACTER$.dynasty
			}
		}
		#doctrine_consanguinity_restricted; absolutely no family business
		AND = {
			$FAITH$ = { has_doctrine = doctrine_consanguinity_restricted }
			is_close_or_extended_family_of = $CHARACTER$
		}
		#doctrine_consanguinity_cousins; the only acceptable incest is with your cousin
		AND = {
			$FAITH$ = { has_doctrine = doctrine_consanguinity_cousins }
			OR = {
				is_close_family_of = $CHARACTER$ #[parents, children, siblings, grandparents, grandchildren]
				is_uncle_or_aunt_of = $CHARACTER$
				is_nibling_of = $CHARACTER$
			}
		}
		#doctrine_consanguinity_aunt_nephew_and_uncle_niece; extended family is ok
		AND = {
			$FAITH$ = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
			is_close_family_of = $CHARACTER$
		}
		#doctrine_consanguinity_unrestricted; all forms of incest is acceptable
	}
}

#Needs CHARACTER and FAITH
relation_with_character_is_sodomy_in_faith_trigger = {
	trigger_if = {
		limit = { is_ai = no }
		always = no
	}

	# AI follows vanilla homosexuality doctrine logic.
	is_male = yes
	$CHARACTER$ = { is_male = yes }
	$FAITH$ = {
		OR = {
			has_doctrine_parameter = homosexuality_shunned
			has_doctrine_parameter = homosexuality_illegal
		}
	}
}

