﻿#NOTE!
#When you add new secrets, make sure they're properly included in these scripted triggers:
# trait_is_shunned_in_faith_trigger
# trait_is_criminal_in_faith_trigger
# secret_is_shunned_in_faith_trigger
# secret_is_criminal_in_faith_trigger

#Also, all secrets should be added through their associated scripted effect/effects, not by the add_secret effect


# Secret modding is very complicated and held together by a network of files duct taped together.
# Known places that must be looked into for EACH secret modded
# common\secret_type\00_secret_types.txt
# common\scripted_effects\00_secret_effects.txt			# Collection of effects such as piety loss when exposed. Most are type specific but we can reuse the POV notification effects.
# common\scripted_effects\00_adultery_effects.txt
# common\scripted_triggers\00_secret_triggers.txt		# General secret triggers such as what is blackmailable
# common\scripted_triggers\00_secret_type_triggers.txt	# Specific secret type triggers such as if witchcraft secret should even exist/be valid, and when to consider it shunned
# events\secret_events\secret_events.txt				# Expose events etc.
# Religion & doctrine pages are only referentially relevant; shouldn't require direct modding.
#  - May need to consider implications when a female is exposed for dressed/fighting like a warrior much like the issues faced by Joan of Arc
#  - Joan of Arc was burned for witchcraft and heresy, not for leading soldiers. However, cross dressing was part of her accusation for heresy.
#  		- However, was there any non-Catholic male-dominanted religions as punitive towards women fighting/dressed like men? Surely Aethelflaed serves as an early-catholic precedent that it's not inherently looked down upon.
# 		- Code warrior princess events first and separately integrate accusal for heresy/witchcraft/homosexuality for female warriors?


secret_warrior_training = {
	category = deviancy
	# deviancy seems most appropriate for cross-gender roles
	# Can secret categories be modded?

	is_valid = {
		secret_warrior_training_is_valid_trigger = {
			OWNER = scope:secret_owner
		}
	}

	is_shunned = { # if not clergy
		secret_warrior_training_is_shunned_trigger = {
			OWNER = scope:secret_owner
		}
	}

# Not currently used. Wait until I figure out what conditions would a Joan d'Arc situation be warranted.
	# is_criminal = { # for clergy 
	# 	secret_warrior_training_is_criminal_trigger = {
	# 		OWNER = scope:secret_owner
	# 	}
	# }

	on_expose = {
		save_scope_as = secret
		
		secret_exposed_notification_effect = yes

		scope:secret_owner = {
			if = {
				limit = {
					NOT = {
						this = scope:secret_exposer
					}
				}
				save_scope_as = owner
				# trigger_event = house_valor.0100 # TBD
			}
		}
	}
}

