use_convert_to_everpreg_witchcraft_secrecy_trigger = {
	scope:owner = {
		any_secret = { secret_type = secret_everpreg_witch }
		save_temporary_scope_as = everpreg_witchract_secrecy_check
		trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { TRAIT = witch GENDER_CHARACTER = scope:everpreg_witchraft_secrecy_check }
	}
}

knows_about_character_being_everpreg_witch_trigger = {
	OR = {
		$CHARACTER$ = { 
			OR = {
			has_trait = everpreg_1
			has_trait = everpreg_2
			has_trait = everpreg_3
			}
		}
		any_known_secret = {
			secret_owner = $CHARACTER$
			secret_type = secret_everpreg_witch
		}
	}
}

can_join_everpreg_witch_ritual = {
	faith = scope:host.faith
	is_available_for_activity_trigger = yes	
	save_temporary_scope_as = invited_everpreg_witch
	OR = {
		AND = { #Both know about each other's everpreg_witch status
			NOT = { has_relation_rival = scope:host } #No non-house rivals
			scope:host = { knows_about_character_being_everpreg_witch_trigger = { CHARACTER = scope:invited_everpreg_witch } }
			knows_about_character_being_everpreg_witch_trigger = { CHARACTER = scope:host }
		}
		AND = { #Same house & everpreg_witch
			is_everpreg_witch_trigger = yes
			exists = house
			house = scope:host.house
		}
	}
	NOT = {
		any_in_list = {
			list = potential_guests
			this = prev
		}
	}
}

potential_everpreg_witch_friend_trigger = {
	faith = $CHARACTER$.faith
	knows_about_character_being_everpreg_witch_trigger = { CHARACTER = $CHARACTER$ }
	save_temporary_scope_as = trigger_everpreg_witch_friend
	$CHARACTER$ = { knows_about_character_being_everpreg_witch_trigger = { CHARACTER = scope:trigger_everpreg_witch_friend } }
}

is_everpreg_witch_trigger = {
	custom_description = {
		text = is_an_everpreg_witch
		subject = this
		OR = {
			has_trait = everpreg_1
			has_trait = everpreg_2
			has_trait = everpreg_3
			any_secret = { secret_type = secret_everpreg_witch }
		}
		faith = { has_doctrine_parameter = tenet_everpreg_holywomb }
	}
}

is_everpreg_witch_known_by_trigger = {
	OR = {
		custom_description = {
			text = has_an_everpreg_witch_secret_known_by_character
			subject = this
			object = $CHARACTER$
			OR = {
				has_trait = everpreg_1
				has_trait = everpreg_2
				has_trait = everpreg_3
				any_secret = { secret_type = secret_everpreg_witch }
			}
			faith = { has_doctrine_parameter = tenet_everpreg_holywomb }			
			#any_secret = {
			#	secret_type = secret_everpreg_witch
			#	is_known_by = $CHARACTER$
			#}
		}
	}
}

# SECRET WITCH
secret_everpreg_witch_is_valid_trigger = {
	$OWNER$ = {
		NOT = {
			OR = {
				has_trait = everpreg_1
				has_trait = everpreg_2
				has_trait = everpreg_3
				any_secret = { secret_type = secret_everpreg_witch }
			}
			faith = { has_doctrine_parameter = tenet_everpreg_holywomb }
		}
	}
}


#Simple Check if a given Secret Type is blackmailable
	# NOTE THAT THIS CAN ONLY EVER CORRECTLY EVALUATE SECRETS THAT THE TARGET DOES NOT ALREADY HAVE
	# ALSO NOTE THAT IT WILL ONLY EVER RETURN TRUE FOR SECRETS THAT ARE NOT RELIANT ON HAVING A VALID TARGET
secret_type_is_everpreg_blackmailable_simple_trigger = {
	# TYPE
	# TARGET

	save_temporary_scope_value_as = {
		name = type_flag
		value = flag:$TYPE$
	}
	trigger_if = {
		limit = {
			scope:type_flag = flag:secret_everpreg_witch
		}
		secret_everpreg_witch_is_valid_trigger = {
			OWNER = $TARGET$
		}
		OR = {
			secret_witch_is_shunned_trigger = {
				OWNER = $TARGET$
			}
			secret_witch_is_criminal_trigger = {
				OWNER = $TARGET$
			}
		}
		NOT = {
			$BLACKMAILER$ = { is_everpreg_witch_trigger = yes }
		}
	}
	trigger_else = { #Murder stuff, Bastard secrets, etc.
		always = no
	}
}