﻿namespace = tour_general

##Bilateral Vassal Events
# tour_general.1003 - Vassal: Your liege just suggested to purge all local cats/dogs
# 
# 
# 
# 
##Vassal Events
# tour_general.2000 - Find secret/hook on your liege/key member of liege's court
# tour_general.2001 - Help liege entourage member, gain scheme progress
# 
# 
# 
##Bilateral Liege Events
# tour_general.3003-4 - Liege: You are a fanatical cat/dog person
# 
# 
# 
# 
##Liege Events
# tour_general.4000 - Parade your entourage prisoners down the holding main street
# tour_general.4001-5 - Search a room and find vassal secrets
# tour_general.4006 - Come across a drunk vassal servant, gain scheme buff/s
# tour_general.4007 - Gain a hook on one of the vassal's close characters
# 

scripted_trigger tour_general_has_empathetic_personality = {
	OR = {
		has_trait = compassionate
		has_trait = humble
		has_trait = gregarious
		has_trait = shy
		has_trait = forgiving
	}
}

scripted_trigger tour_general_has_vengeful_personality = {
	OR = {
		has_trait = deceitful
		has_trait = arrogant
		has_trait = cynical
		has_trait = wrathful
		has_trait = vengeful
		has_trait = irritable
		has_trait = sadistic
		has_trait = callous
		has_trait = fickle
	}
}

scripted_trigger tour_general_had_or_has_a_cat_trigger = {
	OR = {
		any_owned_story = { type = story_cycle_pet_cat }
		has_character_modifier = cat_story_modifier
		has_character_flag = had_cat_story
	}
}

scripted_trigger tour_general_had_or_has_a_dog_trigger = {
	OR = {
		any_owned_story = { type = story_cycle_pet_dog }
		has_character_modifier = dog_story_modifier
		has_character_flag = had_dog_story
	}
}

scripted_trigger tour_general_has_only_a_cat_trigger = {
	OR = {
		any_owned_story = { type = story_cycle_pet_cat }
		has_character_modifier = cat_story_modifier
	}
	NOR = {
		any_owned_story = { type = story_cycle_pet_dog }
		has_character_modifier = dog_story_modifier
	}
}

scripted_trigger tour_general_has_only_a_dog_trigger = {
	OR = {
		any_owned_story = { type = story_cycle_pet_dog }
		has_character_modifier = dog_story_modifier
	}
	NOR = {
		any_owned_story = { type = story_cycle_pet_cat }
		has_character_modifier = cat_story_modifier
	}
}

scripted_trigger tour_general_lowborn_pool_character_trigger = {
	is_lowborn = yes
	has_dynasty = no
	faith = location.county.faith
	culture = location.county.culture
	has_any_good_relationship_with_root_trigger = no
	has_any_bad_relationship_with_root_trigger = no
}

scripted_trigger tour_general_is_available_councillor_with_secret_trigger = {
	is_available_travelling_adult = yes
	any_secret = {
		exists = this
		NOT = { is_known_by = root }
	}
	root = {
		can_add_hook = {
			target = prev #The councillor
			type = suspicious_activity_hook
		}
	}
}

scripted_effect tour_general_vassal_kills_pets_effect = {
	scope:visiting_liege = {
		add_dread = major_dread_gain
		if = {
			limit = {
				scope:visiting_liege = {
					is_ai = yes
				}
			}
			add_opinion = {
				target = scope:stop_host_scope
				modifier = tour_loyal_subject_opinion
				opinion = 30
			}
		}
	}
	if = {
		limit = {
			scope:visiting_liege = { has_character_flag = cat_person }
		}
		scope:stop_host_scope = {
			add_character_modifier = {
				modifier = tour_vassal_dog_killer_modifier
				years = 10
			}
		}
	}
	else_if = {
		limit = {
			scope:visiting_liege = { has_character_flag = dog_person }
		}
		scope:stop_host_scope = {
			add_character_modifier = {
				modifier = tour_vassal_cat_killer_modifier
				years = 10
			}
		}
	}
	scope:stop_host_scope = {
		add_dread = minor_dread_gain
	}
}

scripted_effect tour_general_vassal_offers_up_pet_effect = {
	scope:visiting_liege = {
		add_dread = massive_dread_gain
		if = {
			limit = {
				scope:stop_host_scope = {
					is_ai = yes
				}
			}
			add_opinion = {
				target = scope:stop_host_scope
				modifier = tour_loyal_subject_opinion
				opinion = 50
			}
		}
	}
	scope:stop_host_scope = {
		if = {
			limit = {
				scope:visiting_liege = {
					is_ai = yes
				}
			}
			add_hook = {
				type = loyalty_hook
				target = scope:visiting_liege
			}
			improve_relationship_effect = {
				TARGET = scope:visiting_liege
				REASON = friend_offered_up_pet
			}
		}
		if = {
			limit = {
				tour_general_has_only_a_cat_trigger = yes
			}
			random_owned_story = {
				type = story_cycle_pet_cat
				save_scope_as = tour_general_cat_story
			}
			create_character_memory = {
    			type = sacrificed_my_cat_memory
    			participants = {
    				liege = scope:visiting_liege
    			}
    		}
    		if = {
	    		limit = { 
	    			exists = var:sacrificed_cat_name 
	    		}
	    		remove_variable = sacrificed_cat_name
	    		set_variable = {
    				name = sacrificed_cat_name
    				value = var:story_cycle_cat_name
    			}
    		}
    		else = {
	    		set_variable = {
    				name = sacrificed_cat_name
    				value = var:story_cycle_cat_name
    			}
    		}
			scope:tour_general_cat_story = { end_story = yes }
		}
		if = {
			limit = {
				tour_general_has_only_a_dog_trigger = yes
			}
			random_owned_story = {
				type = story_cycle_pet_dog
				save_scope_as = tour_general_dog_story
			}
			create_character_memory = {
    			type = sacrificed_my_dog_memory
    			participants = {
    				liege = scope:visiting_liege
    			}
    		}
    		if = {
	    		limit = { 
	    			exists = var:sacrificed_dog_name 
	    		}
	    		remove_variable = sacrificed_dog_name
	    		set_variable = {
    				name = sacrificed_dog_name
    				value = var:story_cycle_dog_name
    			}
    		}
    		else = {
	    		set_variable = {
    				name = sacrificed_dog_name
    				value = var:story_cycle_dog_name
    			}
    		}
			scope:tour_general_dog_story = { end_story = yes }
		}
	}
}

scripted_effect tour_general_vassal_opinions_effect = {
	#Approvers
	##Tooltip if too many
	if = {
		limit = {
			list_size = {
				name = approving_subjects_list
				value > 3
			}
		}
		custom_tooltip = tour_general.3003.fanatic_subjects_approve.tt
		if = {
			limit = { has_character_flag = cat_person }
			hidden_effect = {
				every_in_list = {
					list = approving_subjects_list
					add_opinion = {
						modifier = tour_fanatic_cat_lover_subject_opinion
						target = root
						opinion = 20
					}
				}
			}
		}
		else = {
			hidden_effect = {
				every_in_list = {
					list = approving_subjects_list
					add_opinion = {
						modifier = tour_fanatic_dog_lover_subject_opinion
						target = root
						opinion = 20
					}
				}
			}
		}
		
	}
	#Else list the individuals
	else = {
		if = {
			limit = { has_character_flag = cat_person }
			every_in_list = {
				list = approving_subjects_list
				add_opinion = {
					modifier = tour_fanatic_cat_lover_subject_opinion
					target = root
					opinion = 20
				}
			}
		}
		else = {
			every_in_list = {
				list = approving_subjects_list
				add_opinion = {
					modifier = tour_fanatic_dog_lover_subject_opinion
					target = root
					opinion = 20
				}
			}
		}
	}
	#Disapprovers
	##Tooltip if too many
	if = {
		limit = {
			list_size = {
				name = disapproving_subjects_list
				value > 3
			}
		}
		custom_tooltip = tour_general.3003.compassionate_subjects_disapprove.tt
		hidden_effect = {
			every_in_list = {
				list = disapproving_subjects_list
				add_opinion = {
					modifier = tour_disapprove_of_killing_opinion
					target = root
					opinion = -20
				}
			}
		}
	}
	#Else list the individuals
	else = {
		every_in_list = {
			list = disapproving_subjects_list
			add_opinion = {
				modifier = tour_disapprove_of_killing_opinion
				target = root
				opinion = -20
			}
		}
	}
}

scripted_effect tour_general_liege_kills_pets_effect = {
	scope:visiting_liege = {
		add_dread = major_dread_gain
		if = {
			limit = { has_character_flag = cat_person }
			add_character_modifier = {
				modifier = tour_liege_dog_killer_modifier
				years = 10
			}
			scope:stop_host_scope = {
				worsen_relationship_effect = {
					TARGET = scope:visiting_liege
					REASON = rival_dog_killer
				}
			}
		}
		else_if = {
			limit = { has_character_flag = dog_person }
			add_character_modifier = {
				modifier = tour_liege_cat_killer_modifier
				years = 10
			}
			scope:stop_host_scope = {
				worsen_relationship_effect = {
					TARGET = scope:visiting_liege
					REASON = rival_cat_killer
				}
			}
		}
		tour_general_vassal_opinions_effect = yes
	}
}

##Bilateral Vassal Events
#Vassal: Your liege just suggested to purge all local cats/dogs
tour_general.1003 = {
	type = activity_event
	title = tour_general.1003.t
	desc = {
		first_valid = {
			#Liege suggested to purge dogs
			triggered_desc = {
				trigger = {
					scope:visiting_liege = { has_character_flag = cat_person }
				}
				desc = tour_general.1003.desc_purge_dogs
			}
			#Liege suggested to purge cats
			triggered_desc = {
				trigger = {
					scope:visiting_liege = { has_character_flag = dog_person }
				}
				desc = tour_general.1003.desc_purge_cats
			}
		}
		first_valid = {
			#You have a ... dog
			triggered_desc = {
				trigger = {
					scope:visiting_liege = { has_character_flag = cat_person }
					any_owned_story = { type = story_cycle_pet_dog }
					has_character_modifier = dog_story_modifier
					can_add_hook = {
						target = scope:visiting_liege
						type = loyalty_hook
					}
				}
				desc = tour_general.1003.desc_pet_dog_outro
			}
			#You have a ... cat
			triggered_desc = {
				trigger = {
					scope:visiting_liege = { has_character_flag = dog_person }
					any_owned_story = { type = story_cycle_pet_cat }
					has_character_modifier = cat_story_modifier
					can_add_hook = {
						target = scope:visiting_liege
						type = loyalty_hook
					}
				}
				desc = tour_general.1003.desc_pet_cat_outro
			}
			#Default
			triggered_desc = {
				desc = tour_general.1003.desc_default_outro
			}
		}
	}
	theme = tour_stop
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				OR = {
					AND = {
						scope:visiting_liege = { has_character_flag = cat_person }
						tour_general_has_only_a_dog_trigger = yes
					}
					AND = {
						scope:visiting_liege = { has_character_flag = dog_person }
						tour_general_has_only_a_cat_trigger = yes
					}
				}
				can_add_hook = {
					target = scope:visiting_liege
					type = loyalty_hook
				}
			}
			animation = shock
		}
		animation = worry
	}
	right_portrait = {
		character = scope:visiting_liege
		animation = personality_callous
	}
	#Offer up your cat/dog
	option = { 
		name = {
			trigger = {
				scope:visiting_liege = { has_character_flag = cat_person }
				tour_general_has_only_a_dog_trigger = yes
			}
			text = tour_general.1003.a_dog
		}
		name = {
			trigger = {
				scope:visiting_liege = { has_character_flag = dog_person }
				tour_general_has_only_a_cat_trigger = yes
			}
			text = tour_general.1003.a_cat
		}
		#Mitten's/Spot's sacrifice will save the rest of the cats/dogs
		flavor = {
			first_valid = {
				triggered_desc = {
					trigger = { 
						scope:visiting_liege = { has_character_flag = cat_person }
						tour_general_has_only_a_dog_trigger = yes
					}
					desc = tour_general.1003.a_dog.flavor
				}
				triggered_desc = {
					trigger = { 
						scope:visiting_liege = { has_character_flag = dog_person }
						tour_general_has_only_a_cat_trigger = yes
					}
					desc = tour_general.1003.a_cat.flavor
				}
			}
		}
		trigger = {
			OR = {
				AND = {
					scope:visiting_liege = { has_character_flag = cat_person }
					tour_general_has_only_a_dog_trigger = yes
				}
				AND = {
					scope:visiting_liege = { has_character_flag = dog_person }
					tour_general_has_only_a_cat_trigger = yes
				}
			}
			can_add_hook = {
				target = scope:visiting_liege
				type = loyalty_hook
			}
		}
		show_as_tooltip = { tour_general_vassal_offers_up_pet_effect = yes }
		#Set up for resolution event
		if = {
			limit = { tour_general_has_only_a_dog_trigger = yes }
			scope:visiting_liege = {
				set_variable = {
					name = 1003_vassal_choice
					value = flag:sacrifice_dog
				}
			}
		}
		else_if = {
			limit = { tour_general_has_only_a_cat_trigger = yes }
			scope:visiting_liege = {
				set_variable = {
					name = 1003_vassal_choice
					value = flag:sacrifice_cat
				}
			}
		}
		#Witches probably don't want to give up their familiar
		if = {
			limit = { is_witch_trigger = yes }
			stress_impact = {
				base = medium_stress_impact_gain
				compassionate = major_stress_impact_gain
				loyal = medium_stress_impact_loss
				disloyal = minor_stress_impact_gain
			}
		}
		else_if = {
			limit = {
				OR = {
					has_trait = sadistic
					has_trait = callous
				}
			}
			stress_impact = {
				compassionate = major_stress_impact_gain
				loyal = medium_stress_impact_loss
				disloyal = minor_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				base = minor_stress_impact_gain
				compassionate = major_stress_impact_gain
				loyal = medium_stress_impact_loss
				disloyal = minor_stress_impact_gain
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				has_relation_rival = scope:visiting_liege
				factor = 0
			}
			modifier = {
				NOR = {
					has_trait = sadistic
					has_trait = callous
				}
				stress_level >= 2
				factor = 0.5
			}
			modifier = {
				has_trait = loyal
				add = 25
			}
			modifier = {
				OR = {
					has_trait = sadistic
					has_trait = callous
				}
				add = 50
			}
			modifier = {
				has_trait = ambitious
				add = 25
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_energy = 1
				ai_zeal = 1
				ai_rationality = 1
				ai_vengefulness = -1
				ai_honor = -2
				ai_sociability = -2
				ai_compassion = -4
			}
		}
	}
	#Purge all other cats/dogs
	option = { 
		name = tour_general.1003.b
		show_as_tooltip = { tour_general_vassal_kills_pets_effect = yes }
		#Set up for resolution event
		scope:visiting_liege = {
			set_variable = {
				name = 1003_vassal_choice
				value = flag:purge_strays
			}
		}
		#Harmony with living creatures?
		if = {
			limit = { is_witch_trigger = yes }
			stress_impact = {
				base = minor_stress_impact_gain
				compassionate = medium_stress_impact_gain
				sadistic = medium_stress_impact_loss
			}
		}
		else = {
			stress_impact = {
				compassionate = medium_stress_impact_gain
				sadistic = medium_stress_impact_loss
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				trigger_if = {
					limit = {
						OR = {
							AND = {
								scope:visiting_liege = { has_character_flag = cat_person }
								tour_general_has_only_a_dog_trigger = yes
							}
							AND = {
								scope:visiting_liege = { has_character_flag = dog_person }
								tour_general_has_only_a_cat_trigger = yes
							}
						}
					}
					has_trait = compassionate
				}
				trigger_else = {
					always = no
				}
				add = 25
			}
			modifier = {
				has_relation_rival = scope:visiting_liege
				factor = 0.5
			}
			modifier = {
				has_trait = loyal
				add = 25
			}
			modifier = {
				OR = {
					has_trait = sadistic
					has_trait = callous
				}
				add = 25
			}
			modifier = {
				has_trait = ambitious
				add = 25
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_rationality = 1
				ai_energy = 1
				ai_honor = -1
				ai_sociability = -2
				ai_compassion = -2
			}
		}
	}
	#I don't want any part in this
	option = { 
		name = tour_general.1003.c
		show_as_tooltip = { tour_general_liege_kills_pets_effect = yes }
		#Set up for resolution event
		scope:visiting_liege = {
			set_variable = {
				name = 1003_vassal_choice
				value = flag:declined
			}
		}
		stress_impact = {
			sadistic = minor_stress_impact_gain
			ambitious = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				has_relation_rival = scope:visiting_liege
				factor = 1
			}
			modifier = {
				has_trait = disloyal
				add = 25
			}
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
					has_trait = vengeful
				}
				add = 50
			}
			ai_value_modifier = {
				ai_compassion = 4
				ai_honor = 2
				ai_boldness = 2
			}
		}
	}
	after = {
		scope:visiting_liege = {
			trigger_event = tour_general.3004
		}
	}
}

scripted_trigger 2000_suitable_entourage_character_trigger = {
	is_available_travelling_adult = yes
	drinks_alcohol_trigger = yes
	root = {
		can_add_hook = {
			target = prev #The entourage character
			type = suspicious_activity_hook
		}
	}
	can_add_hook = {
		target = root
		type = suspicious_activity_hook
	}
}

scripted_trigger 2000_liege_secret_known_to_entourage_character_trigger = {
	2000_suitable_entourage_character_trigger = yes
	any_known_secret = {
		secret_owner = scope:visiting_liege
		NOT = { is_known_by = root }
	}
}

scripted_trigger 2000_entourage_character_with_secret_trigger = {
	2000_suitable_entourage_character_trigger = yes
	any_secret = {
		NOT = { is_known_by = root }
	}
}

##Vassal Events
#Find secret/hook on your liege/key member of liege's court
tour_general.2000 = {
	type = activity_event
	title = tour_general.2000.t
	desc = {
		desc = tour_general.2000.desc_intro
		first_valid = {
			#Oversteps about liege
			triggered_desc = {
				trigger = {
					scope:2000_secret_to_learn = {
						secret_owner = scope:visiting_liege
					}
				}
				desc = tour_general.2000.desc_liege
			}
			#Oversteps about themselves
			triggered_desc = {
				trigger = {
					scope:2000_secret_to_learn = {
						secret_owner != scope:visiting_liege
					}
				}
				desc = tour_general.2000.desc_self
			}
		}
		desc = tour_general.2000.desc_outro
	}
	theme = tour_stop
	override_background = { reference = bp1_bonfire }
	left_portrait = {
		character = root
		animation = personality_compassionate
	}
	right_portrait = {
		character = scope:2000_secret_holder
		animation = drink
	}
	lower_right_portrait = {
		character = scope:visiting_liege
	}
	cooldown = { years = 10 }
	trigger = {
		#Only player characters
		is_ai = no
		#Any tasty secrets?
		scope:visiting_liege = {
			OR = {
				#Does an entourage character know something about a liege secret
				current_travel_plan = {
					any_entourage_character = { 2000_liege_secret_known_to_entourage_character_trigger = yes }
				}
				#Or does a key member of the liege's court have a hookable secret
				current_travel_plan = {
					any_entourage_character = { 2000_entourage_character_with_secret_trigger = yes }
				}
			}
		}
	}
	weight_multiplier = {
		base = 1
		modifier = {
			scope:visiting_liege = {
				OR = {
					#Does an entourage character know something about a liege secret
					current_travel_plan = {
						any_entourage_character = { 
							2000_liege_secret_known_to_entourage_character_trigger = yes 
							OR = {
								has_trait = drunkard
								has_trait = disloyal
							}
						}
					}
					#Or does a key member of the liege's court have a hookable secret
					current_travel_plan = {
						any_entourage_character = { 
							2000_entourage_character_with_secret_trigger = yes 
							OR = {
								has_trait = drunkard
								has_trait = disloyal
							}
						}
					}
				}
			}
			factor = 2
		}
	}
	immediate = {
		play_music_cue = "mx_cue_in_taberna_instrumental"
		scope:visiting_liege = {
			if = {
				limit = {
					current_travel_plan = {
						any_entourage_character = { 2000_liege_secret_known_to_entourage_character_trigger = yes }
					}
				}
				current_travel_plan = {
					random_entourage_character = {
						limit = { 2000_liege_secret_known_to_entourage_character_trigger = yes }
						save_scope_as = 2000_secret_holder
					}
				}
				scope:2000_secret_holder = {
					random_known_secret = {
						limit = {
							secret_owner = scope:visiting_liege
							NOT = { is_known_by = root }
						}
						save_scope_as = 2000_secret_to_learn
					}
				}
			}
			else_if = {
				limit = {
					current_travel_plan = {
						any_entourage_character = { 2000_entourage_character_with_secret_trigger = yes }
					}
				}
				current_travel_plan = {
					random_entourage_character = {
						limit = { 2000_entourage_character_with_secret_trigger = yes }
						save_scope_as = 2000_secret_holder
					}
				}
				scope:2000_secret_holder = {
					random_secret = {
						limit = {
							NOT = { is_known_by = root }
						}
						save_scope_as = 2000_secret_to_learn
					}
				}
			}
			#List approving subjects
			every_vassal_or_below = {
				limit = {
					OR = {
						#If you kill cats - these people have also killed cats
						has_character_modifier = tour_liege_cat_killer_modifier
						has_character_modifier = tour_vassal_cat_killer_modifier
						OR = {
							has_trait = sadistic
							has_trait = callous
							has_trait = zealous
						}
						#Cat/dog owners
						tour_general_has_only_a_dog_trigger = yes
					}
					this != scope:stop_host_scope
				}
				add_to_list = approving_subjects_list
			}
			#List disapproving subjects
			every_vassal_or_below = {
				limit = {
					OR = {
						#If you kill cats - these people have killed dogs
						has_character_modifier = tour_liege_dog_killer_modifier
						has_character_modifier = tour_vassal_dog_killer_modifier
						has_trait = compassionate
						tour_general_has_only_a_cat_trigger = yes
						AND = {
							is_witch_trigger = yes
							NOT = { has_trait = sadistic }
						}
					}
					NOR = { 
						this = scope:stop_host_scope
						is_in_list = approving_subjects_list
					}
				}
				add_to_list = disapproving_subjects_list
			}
		}
	}
	#Coax information out of them
	option = { 
		#Tell me more about your liege
		name = {
			trigger = {
				scope:2000_secret_to_learn = { secret_owner = scope:visiting_liege }
			}
			text = tour_general.2000.a_liege
		}
		#Tell me more about _your_ secret
		name = {
			trigger = {
				scope:2000_secret_to_learn = {
					secret_owner != scope:visiting_liege
				}
			}
			text = tour_general.2000.a
		}
    	duel = {
    		skill = diplomacy
    		target = scope:2000_secret_holder
    		#Get them to spill the beans on their liege
    		50 = {
    			trigger = {
					scope:2000_secret_to_learn = {
						secret_owner = scope:visiting_liege
					}
				}
    			compare_modifier = {
    				value = scope:duel_value
    				multiplier = 3.5
    				min = 49
    			}
    			modifier = {
    				scope:2000_secret_holder = {
    					OR = {
    						has_trait = disloyal
    						has_trait = deceitful
    					}
    				}
    				factor = 1.5
    			}
    			desc = tour_general.2000.a_spill_beans.desc
				send_interface_toast = {
					type = event_toast_effect_good
					left_icon = root
					right_icon = scope:stop_host_scope
					title = tour_general.2000.a_spill_beans.t
					custom_tooltip = tour_general.2000.a_liege_beans.tt
					hidden_effect = {
						scope:2000_secret_to_learn = { reveal_to = root }
					}		
				}
    		}
    		#Or spill the beans on themselves
    		50 = {
    			trigger = {
					scope:2000_secret_to_learn = {
						secret_owner != scope:visiting_liege
					}
				}
    			compare_modifier = {
    				value = scope:duel_value
    				multiplier = 3.5
    				min = 49
    			}
    			modifier = {
    				scope:2000_secret_holder = {
    					OR = {
    						has_trait = loyal
    						has_trait = craven
    					}
    				}
    				factor = 0.5
    			}
    			desc = tour_general.2000.a_spill_beans.desc
				send_interface_toast = {
					type = event_toast_effect_good
					left_icon = root
					right_icon = scope:2000_secret_holder
					title = tour_general.2000.a_spill_beans.t
					custom_tooltip = tour_general.2000.a_self_beans.tt
					hidden_effect = {
						scope:2000_secret_to_learn = { reveal_to = root }
					}
				}
    		}
    		#... or they see what you're doing
    		50 = {
    			compare_modifier = {
    				value = scope:duel_value
    				multiplier = -3.5
    				min = -49
    			}
    			modifier = {
    				scope:2000_secret_holder = {
    					has_trait = drunkard
    				}
    				factor = 0.5
    			}
    			desc = tour_general.2000.a_unsuccessful.desc
				send_interface_toast = {
					type = event_toast_effect_bad
					left_icon = root
					right_icon = scope:2000_secret_holder
					title = tour_general.2000.a_unsuccessful.t
					scope:2000_secret_holder = {
						add_hook = {
							target = root
							type = suspicious_activity_hook
						}
					}
				}
    		}
    	}
		stress_impact = {
			honest = minor_stress_impact_gain
			craven = minor_stress_impact_gain
			ambitious = minor_stress_impact_loss
		}
		ai_chance = {
			base = 50
			modifier = {
				has_relation_rival = scope:2000_secret_to_learn.secret_owner
				add = 50
			}
			modifier = {
				OR = {
					has_trait = disloyal
					has_trait = deceitful
					has_trait = ambitious
				}
				add = 50
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_rationality = 1
				ai_honor = -1
			}
		}
	}
	#Or settle for them behaving disloyally
	option = { 
		name = tour_general.2000.b
		add_hook = {
			target = scope:2000_secret_holder
			type = suspicious_activity_hook
		}
		stress_impact = {
			honest = minor_stress_impact_loss
			ambitious = minor_stress_impact_gain
			brave = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50 
			modifier = {
				OR = {
					has_trait = loyal
					has_trait = honest
					has_trait = craven
				}
				add = 50
			}
			ai_value_modifier = {
				ai_compassion = 2
				ai_honor = 1
				ai_boldness = -2
			}
		}
	}
}

scripted_trigger 2001_suitable_scheme_trigger = {
	scheme_owner = root
	scheme_target_character = prev #The entourage character
	is_scheme_exposed = no
}

scripted_trigger 2001_suitable_precarious_entourage_character_trigger = {
	is_available_travelling_adult = yes
	OR = {
		#Precarious hashishiyah situation
		has_trait = hashishiyah
		#Precarious privy situation
		NOR = { 
			has_trait = callous
			has_trait = wrathful
		}
	}
}

#Help liege entourage member, gain scheme progress
tour_general.2001 = {
	type = activity_event
	title = tour_general.2001.t
	desc = {
		first_valid = {
			#Entourage member is hashishiyah addict
			triggered_desc = {
				trigger = {
					scope:2001_precarious_entourage_character = { has_trait = hashishiyah }
				}
				desc = tour_general.2001.desc_hashish
			}
			#Entourage member caught in the _necessarium_ (privy)
			triggered_desc = {
				desc = tour_general.2001.desc_privy
			}
		}
		desc = tour_general.2001.desc_outro
	}
	theme = tour_stop
	#Somewhere outside the holding
	override_background = {
		trigger = {
			scope:2001_precarious_entourage_character = { has_trait = hashishiyah }
		}
		reference = bp1_crossroads_inn
	}
	#A privy somewhere in the holding
	override_background = {
		trigger = {
			NOT = { 
				scope:2001_precarious_entourage_character = { has_trait = hashishiyah } 
			}
		}
		reference = alley_day
	}
	left_portrait = {
		character = root
		#We're both druggies
		triggered_animation = {
			trigger = {
				scope:2001_precarious_entourage_character = { has_trait = hashishiyah }
				has_trait = hashishiyah
			}
			animation = personality_dishonorable
		}
		#I am condemning your abuse
		triggered_animation = {
			trigger = {
				scope:2001_precarious_entourage_character = { has_trait = hashishiyah }
				faith = {
					trait_is_sin = hashishiyah
				}
				has_trait = zealous
			}
			animation = disapproval
		}
		#Tsk, junkies
		triggered_animation = {
			trigger = {
				scope:2001_precarious_entourage_character = { has_trait = hashishiyah }
			}
			animation = personality_callous
		}
		#Privy situation
		animation = disbelief
	}
	right_portrait = {
		character = scope:2001_precarious_entourage_character
		#Junkie
		triggered_animation = {
			trigger = {
				scope:2001_precarious_entourage_character = { has_trait = hashishiyah }
			}
			animation = personality_irrational
		}
		#Privy
		animation = pain
	}
	lower_center_portrait = {
		trigger = {
			scope:2001_scheme_target != scope:visiting_liege
		}
		character = scope:2001_scheme_target
	}
	lower_right_portrait = {
		character = scope:visiting_liege
	}
	cooldown = { years = 10 }
	trigger = {
		#Any active schemes against the entourage?
		scope:visiting_liege = {
			current_travel_plan ?= {
				any_entourage_character = {
					is_adult = yes
					count > 2
				}
				any_entourage_character = {
					is_available_travelling_adult = yes
					any_targeting_scheme = {
						2001_suitable_scheme_trigger = yes
						save_temporary_scope_as = scheme_check
					}
					save_temporary_scope_as = entourage_character_check
				}
				any_entourage_character = {
					2001_suitable_precarious_entourage_character_trigger = yes
					NOR = { 
						this = scope:visiting_liege
						this = scope:entourage_character_check
						has_relation_rival = root
						#Shouldn't be involved in the scheme
						scope:scheme_check = {
							scheme_is_character_agent = prev #The entourage character
						}
					}
				}
			}
		}
	}
	weight_multiplier = {
		base = 1
		#Weight up if the precarious character is hashishiyah and we're hashishiyah
		modifier = {
			scope:visiting_liege = {
				current_travel_plan = {
					any_entourage_character = {
						is_adult = yes
						count > 2
					}
					any_entourage_character = {
						is_available_travelling_adult = yes
						any_targeting_scheme = {
							2001_suitable_scheme_trigger = yes
							save_temporary_scope_as = scheme_check
						}
						save_temporary_scope_as = entourage_character_check
					}
					any_entourage_character = {
						is_available_travelling_adult = yes
						has_trait = hashishiyah
						NOR = { 
							this = scope:visiting_liege
							this = scope:entourage_character_check
							has_relation_rival = root
							#Shouldn't be involved in the scheme
							scope:scheme_check = {
								scheme_is_character_agent = prev #The entourage character
							}
						}
					}
				}
			}
			has_trait = hashishiyah
			factor = 2
		}
	}
	immediate = {
		#Find our scheme target
		scope:visiting_liege = {
			current_travel_plan = {
				random_entourage_character = {
					limit = {
						is_available_travelling_adult = yes
						any_targeting_scheme = { 2001_suitable_scheme_trigger = yes }
					}
					save_scope_as = 2001_scheme_target
				}
			}
		}
		#Nail the scheme
		scope:2001_scheme_target = {
			random_targeting_scheme = {
				limit = {
					scheme_owner = root
					is_scheme_exposed = no
				}
				save_scope_as = 2001_scheme_to_buff
			}
		}
		#Find the precarious entourage member
		scope:visiting_liege = {
			current_travel_plan = {
				random_entourage_character = {
					#Prioritize hashishiyah
					limit = {
						is_available_travelling_adult = yes
						has_trait = hashishiyah
						NOR = { 
							this = scope:visiting_liege
							this = scope:2001_scheme_target
							has_relation_rival = root
							#Shouldn't be involved in the scheme
							scope:2001_scheme_to_buff = {
								scheme_is_character_agent = prev
							}
						}
					}
					alternative_limit = {
						is_available_travelling_adult = yes
						NOR = { 
							has_trait = callous
							has_trait = wrathful
							this = scope:visiting_liege
							this = scope:2001_scheme_target
							has_relation_rival = root
							#Shouldn't be involved in the scheme
							scope:2001_scheme_to_buff = {
								scheme_is_character_agent = prev
							}
						}
					}
					save_scope_as = 2001_precarious_entourage_character
				}
			}
		}
	}
	#Help them out
	option = { 
		#Duuuude...
		name = {
			trigger = { 
				scope:2001_precarious_entourage_character = { has_trait = hashishiyah }
			}
			text = tour_general.2001.a_hashish
		}
		#Hold on, let me help out
		name = tour_general.2001.a
		#If we're buying drugs
		if = {
			limit = {
				scope:2001_precarious_entourage_character = { has_trait = hashishiyah }
			}
			remove_short_term_gold = medium_gold_value
			random_list = {
				#Success
				1 = {
					desc = tour_general.2001.b_super_success.desc
			    	send_interface_toast = {
						left_icon = root
						right_icon = scope:2001_scheme_target
						title = tour_general.2001.b_super_success.t
						scope:2001_scheme_to_buff = {
							add_scheme_modifier = { type = tour_scheme_excellent_success_modifier }
						}
					}
				}
				#Secrecy
				1 = {
					trigger = {
						scope:2001_scheme_to_buff = {
							#Only if the scheme is considered secret
							is_type_secret = yes
						}
					}
					desc = tour_general.2001.b_super_secrecy.desc
			    	send_interface_toast = {
						left_icon = root
						right_icon = scope:2001_scheme_target
						title = tour_general.2001.b_super_secrecy.t
						scope:2001_scheme_to_buff = {
							add_scheme_modifier = { type = tour_scheme_excellent_secrecy_modifier }
						}
					}
				}
			}
			if = {
				limit = {
					faith = { trait_is_sin = hashishiyah }
				}
				stress_impact = {
					zealous = minor_stress_impact_gain
				}
			}
			else = {
				stress_impact = {
					arrogant = minor_stress_impact_gain
				}
			}
		}
		#If we're helping their privy situation
		else = {
	    	duel = {
	    		skills = { prowess learning }
	    		value = medium_skill_rating
	    		#You help them out discreetly
	    		50 = {
	    			compare_modifier = {
	    				value = scope:duel_value
	    				multiplier = 3.5
	    				min = -49
	    			}
	    			desc = tour_general.4004.a_discreet.desc
    				send_interface_toast = {
    					type = event_toast_effect_good
    					left_icon = root
    					right_icon = scope:2001_precarious_entourage_character
    					title = tour_general.4004.a_discreet.t
    					scope:2001_precarious_entourage_character = {
    						add_opinion = {
    							modifier = grateful_opinion
    							target = root
    							opinion = 20
    						}
    					}
    				}
	    		}
	    		#You get... stained
	    		50 = {
	    			compare_modifier = {
	    				value = scope:duel_value
	    				multiplier = -3.5
	    				min = -49
	    			}
	    			desc = tour_general.4004.a_stained.desc
    				send_interface_toast = {
    					type = event_toast_effect_bad
    					left_icon = root
    					title = tour_general.4004.a_stained.t
    					add_prestige = medium_prestige_loss	
    				}
	    		}	
	    	}
			random_list = {
				#Success
				1 = {
					desc = tour_general.2001.a_success.desc
			    	send_interface_toast = {
						left_icon = root
						right_icon = scope:2001_scheme_target
						title = tour_general.2001.a_success.t
						scope:2001_scheme_to_buff = {
							add_scheme_modifier = { type = tour_scheme_success_modifier }
						}
					}
				}
				#Secrecy
				1 = {
					trigger = {
						scope:2001_scheme_to_buff = {
							#Only if the scheme is considered secret
							is_type_secret = yes
						}
					}
					desc = tour_general.2001.a_secrecy.desc
			    	send_interface_toast = {
						left_icon = root
						right_icon = scope:2001_scheme_target
						title = tour_general.2001.a_secrecy.t
						scope:2001_scheme_to_buff = {
							add_scheme_modifier = { type = tour_scheme_secrecy_modifier }
						}
					}
				}
			}
			stress_impact = {
				arrogant = minor_stress_impact_gain
				compassionate = minor_stress_impact_loss
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				scope:2001_precarious_entourage_character = { has_trait = hashishiyah }
				short_term_gold <= medium_gold_value
				factor = 0
			}
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = honest
				}
				add = 50
			}
			ai_value_modifier = {
				ai_compassion = 2
				ai_honor = 1
				ai_energy = 1
				ai_greed = -1
				ai_boldness = -2
			}
		}
	}
	#Hashish together
	option = { 
		name = tour_general.2001.b
		trigger = {
			scope:2001_precarious_entourage_character = { has_trait = hashishiyah }
			has_trait = hashishiyah
		}
		random_list = {
			#Super success
			35 = {
				desc = tour_general.2001.b_super_success.desc
		    	send_interface_toast = {
					left_icon = root
					right_icon = scope:2001_scheme_target
					title = tour_general.2001.b_super_success.t
					scope:2001_scheme_to_buff = {
						add_scheme_modifier = { type = tour_scheme_excellent_success_modifier }
					}
				}
			}
			#Super secrecy
			35 = {
				trigger = {
					#Only if the scheme is considered secret
					scope:2001_scheme_to_buff = { is_type_secret = yes }
				}
				desc = tour_general.2001.b_super_secrecy.desc
		    	send_interface_toast = {
					left_icon = root
					right_icon = scope:2001_scheme_target
					title = tour_general.2001.b_super_secrecy.t
					scope:2001_scheme_to_buff = {
						add_scheme_modifier = { type = tour_scheme_excellent_secrecy_modifier }
					}
				}
			}
			#OR you both get knocked out
			30 = {
				desc = tour_general.2001.b_spaceout.desc
				#If we're a scholar and/or whole of body, less chance for us to get knocked out
				modifier = {
					OR = {
						has_trait = scholar
						has_trait = whole_of_body
					}
					add = -10
				}
				#Remove additional chance if we only have the success option
				modifier = {
					scope:2001_scheme_to_buff = {
						is_type_secret = no
					}
					add = -20
				}
				custom_tooltip = tour_general.4006.b_passout_tt
		    	send_interface_toast = {
					left_icon = root
					title = tour_general.2001.b_spaceout.t
					desc = tour_general.4006.b_passout_tt
				}
			}
		}
		if = {
			limit = {
				faith = { trait_is_sin = hashishiyah }
			}
			stress_impact = {
				base = minor_stress_impact_gain
				zealous = minor_stress_impact_gain
				#Traits who don't care negate this
				callous = medium_stress_impact_loss
				arbitrary = medium_stress_impact_loss
				cynical = medium_stress_impact_loss
			}
		}
		else = {
			stress_impact = {
				temperate = minor_stress_impact_gain
			}
		}
		ai_chance = {
			#Hashish gonna hashish
			base = 100
			modifier = {
				has_trait = zealous
				factor = 0.5
			}
			ai_value_modifier = {
				ai_compassion = 2
			}
		}
	}
	#Or walk away
	option = { 
		name = tour_general.2001.c
		stress_impact = {
			honest = minor_stress_impact_loss
			ambitious = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				OR = {
					has_trait = callous
					has_trait = sadistic
				}
				add = 50
			}
			ai_value_modifier = {
				ai_greed = 1
				ai_energy = -1
				ai_honor = -1
				ai_compassion = -2
			}
		}
	}
}

##Bilateral Liege events

#Liege: You are a fanatical cat/dog person
tour_general.3003 = {
	type = activity_event
	title = {
		first_valid = {
			#Cats rule and dogs drool
			triggered_desc = {
				trigger = {
					has_character_flag = cat_person
				}
				desc = tour_general.3003.t_cat
			}
			#Dogs rule and cats drool
			triggered_desc = {
				trigger = {
					has_character_flag = dog_person
				}
				desc = tour_general.3003.t_dog
			}
		}
	}
	desc = {
		first_valid = {
			#Cats rule and dogs drool
			triggered_desc = {
				trigger = {
					has_character_flag = cat_person
				}
				desc = tour_general.3003.desc_love_cats
			}
			#Dogs rule and cats drool
			triggered_desc = {
				trigger = {
					has_character_flag = dog_person
				}
				desc = tour_general.3003.desc_love_dogs
			}
		}
	}
	theme = tour_stop
	override_background = { reference = alley_day }
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				tour_general_has_empathetic_personality = yes
			}
			animation = stress
		}
		animation = rage
	}
	right_portrait = {
		character = scope:stop_host_scope
		animation = personality_rational
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling_adult = yes
		OR = {
			AND = {
				tour_general_had_or_has_a_cat_trigger = yes
				tour_general_had_or_has_a_dog_trigger = no
			}
			AND = {
				tour_general_had_or_has_a_cat_trigger = no
				tour_general_had_or_has_a_dog_trigger = yes
			}	
		}
		#This might be a bit jarring for non-intimidation tours?
		involved_activity = {
			has_activity_option = {
				category = special_type
				option = tour_type_intimidation
			}
		}
	}
	#More likely if the host has a pet...
	weight_multiplier = {
		base = 1
		modifier = {
			scope:stop_host_scope = {
				OR = {
					tour_general_has_only_a_cat_trigger = yes
					tour_general_has_only_a_dog_trigger = yes
				}
			}
			factor = 2
		}
		modifier = {
			has_trait = zealous
			add = 100
		}
	}
	immediate = {
		#We have/had a cat
		if = {
			limit = {
				tour_general_had_or_has_a_cat_trigger = yes
				tour_general_had_or_has_a_dog_trigger = no
			}
			add_character_flag = {
				flag = cat_person
				days = 10
			}
			#List approving subjects
			every_vassal_or_below = {
				limit = {
					OR = {
						#If you kill dogs - these people have also killed dogs
						has_character_modifier = tour_liege_dog_killer_modifier
						has_character_modifier = tour_vassal_dog_killer_modifier
						OR = {
							has_trait = sadistic
							has_trait = callous
							has_trait = zealous
						}
						#Cat/dog owners
						tour_general_has_only_a_cat_trigger = yes
					}
					this != scope:stop_host_scope
				}
				add_to_list = approving_subjects_list
			}
			#List disapproving subjects
			every_vassal_or_below = {
				limit = {
					#If you kill dogs - these people have killed cats
					OR = {
						has_character_modifier = tour_liege_cat_killer_modifier
						has_character_modifier = tour_vassal_cat_killer_modifier
						has_trait = compassionate
						tour_general_has_only_a_dog_trigger = yes
						AND = {
							is_witch_trigger = yes
							NOT = { has_trait = sadistic }
						}
					}
					NOR = { 
						this = scope:stop_host_scope
						is_in_list = approving_subjects_list
					}
				}
				add_to_list = disapproving_subjects_list
			}
		}
		#We have/had a dog
		if = {
			limit = {
				tour_general_had_or_has_a_cat_trigger = no
				tour_general_had_or_has_a_dog_trigger = yes
			}
			add_character_flag = {
				flag = dog_person
				days = 10
			}
			#List approving subjects
			every_vassal_or_below = {
				limit = {
					OR = {
						#If you kill cats - these people have also killed cats
						has_character_modifier = tour_liege_cat_killer_modifier
						has_character_modifier = tour_vassal_cat_killer_modifier
						OR = {
							has_trait = sadistic
							has_trait = callous
							has_trait = zealous
						}
						#Cat/dog owners
						tour_general_has_only_a_dog_trigger = yes
					}
					this != scope:stop_host_scope
				}
				add_to_list = approving_subjects_list
			}
			#List disapproving subjects
			every_vassal_or_below = {
				limit = {
					OR = {
						#If you kill cats - these people have killed dogs
						has_character_modifier = tour_liege_dog_killer_modifier
						has_character_modifier = tour_vassal_dog_killer_modifier
						has_trait = compassionate
						tour_general_has_only_a_cat_trigger = yes
						AND = {
							is_witch_trigger = yes
							NOT = { has_trait = sadistic }
						}
					}
					NOR = { 
						this = scope:stop_host_scope
						is_in_list = approving_subjects_list
					}
				}
				add_to_list = disapproving_subjects_list
			}
		}
	}
	option = { 
		name = tour_general.3003.a
		custom_tooltip = tour_general.3003.a_host_decides.tt
		#Show the potential outcomes, depending on what the vassal chooses to do
		show_as_tooltip = {
			random_list = {
				#The vassal does the killing
				1 = {
					show_chance = no
					desc = tour_general.3003.a_potential_outcome_agree
					show_as_tooltip = { tour_general_vassal_kills_pets_effect = yes }
				}
				#The vassal appeases you by offering up their cat/dog
				1 = {
					trigger = {
						scope:stop_host_scope = {
							OR = {
								tour_general_has_only_a_cat_trigger = yes
								tour_general_has_only_a_dog_trigger = yes
							}
							can_add_hook = {
								target = scope:visiting_liege
								type = loyalty_hook
							}
						}
					}
					show_chance = no
					desc = tour_general.3003.a_potential_outcome_offer_up_pet
					show_as_tooltip = { tour_general_vassal_offers_up_pet_effect = yes }
				}
				#You do the killing
				1 = {
					show_chance = no
					desc = tour_general.3003.a_potential_outcome_disagree
					show_as_tooltip = { tour_general_liege_kills_pets_effect = yes }
				}
			}
		}
		scope:stop_host_scope = {
			trigger_event = tour_general.1003
		}
		stress_impact = {
			compassionate = major_stress_impact_gain
			forgiving = medium_stress_impact_gain
			sadistic = medium_stress_impact_loss
			paranoid = minor_stress_impact_loss
			eccentric = minor_stress_impact_loss
		}
		ai_chance = {
			base = 50
			modifier = {
				scope:stop_host_scope = {
					has_trait = loyal
				}
				add = 25
			}
			modifier = {
				OR = {
					has_trait = lunatic
					has_trait = possessed
					has_trait = paranoid
					has_trait = sadistic
					has_trait = zealous
				}
				add = 50
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_vengefulness = 1
				ai_energy = 1
				ai_zeal = 1
				ai_rationality = -1
				ai_honor = -1
				ai_sociability = -1
				ai_compassion = -2
			}
		}
	}
	#Nah
	option = {
		name = {
			trigger = { tour_general_has_vengeful_personality = yes }
			text = tour_general.3003.b_cynical
		}
		name = tour_general.3003.b
		stress_impact = {
			sadistic = minor_stress_impact_gain
			paranoid = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				scope:stop_host_scope = {
					has_trait = disloyal
				}
				add = 25
			}
			modifier = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
					has_trait = humble
				}
				add = 50
			}
			modifier = {
				dread > 50
				add = 25
			}
			ai_value_modifier = {
				ai_compassion = 3
				ai_sociability = 2
				ai_rationality = 2
				ai_honor = 1
				ai_zeal = -1
				ai_energy = -1
				ai_vengefulness = -1
				ai_boldness = -1
			}
		}
	}
}

#Liege: Did you vassal decide to help you kill cats/dogs?
tour_general.3004 = {
	type = activity_event
	title = tour_general.3004.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = var:1003_vassal_choice
					OR = {
						var:1003_vassal_choice = flag:sacrifice_cat
						var:1003_vassal_choice = flag:sacrifice_dog
					}
				}
				desc = tour_general.3004.desc_intro_sacrifice
			}
			triggered_desc = {
				desc = tour_general.3004.desc_intro
			}
		} 
		first_valid = {
			#Vassal gave up pet
			triggered_desc = {
				trigger = {
					exists = var:1003_vassal_choice
					OR = {
						var:1003_vassal_choice = flag:sacrifice_cat
						var:1003_vassal_choice = flag:sacrifice_dog
					}
				}
				desc = tour_general.3004.desc_vassal_sacrifice
			}
			#Vassal killed animals
			triggered_desc = {
				trigger = {
					exists = var:1003_vassal_choice
					var:1003_vassal_choice = flag:purge_strays
				}
				desc = tour_general.3004.desc_vassal_help
			}
			#Vassal refused
			triggered_desc = {
				trigger = {
					exists = var:1003_vassal_choice
					var:1003_vassal_choice = flag:declined
				}
				desc = tour_general.3004.desc_no_help
			}
		}
		desc = tour_general.3004.desc_outro
	}
	theme = tour_stop
	override_background = { reference = gallows }
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				tour_general_has_empathetic_personality = yes
			}
			animation = stress
		}
		animation = personality_cynical
	}
	immediate = {
		if = {
			limit = {
				exists = var:1003_vassal_choice
				OR = {
					var:1003_vassal_choice = flag:sacrifice_cat
					var:1003_vassal_choice = flag:sacrifice_dog
				}	
			}
			tour_general_vassal_offers_up_pet_effect = yes
		}
		else_if = {
			limit = {
				exists = var:1003_vassal_choice
				var:1003_vassal_choice = flag:purge_strays
			}
			tour_general_vassal_kills_pets_effect = yes
		}
		else_if = {
			limit = {
				exists = var:1003_vassal_choice
				var:1003_vassal_choice = flag:declined
			}
			tour_general_liege_kills_pets_effect = yes
		}
	}
	#Confirm
	option = { 
		name = tour_general.3004.a
		ai_chance = {
			base = 100
		}
	}
	after = {
		if = {
			limit = { exists = var:1003_vassal_choice }
			remove_variable = 1003_vassal_choice
		}
		if = {
			limit = { has_character_flag = cat_person }
			remove_character_flag = cat_person
		}
		if = {
			limit = { has_character_flag = dog_person }
			remove_character_flag = dog_person
		}
	}
}

##Liege Events
#Parade your entourage prisoners down the holding main street
tour_general.4000 = {
	type = activity_event
	title = tour_general.4000.t
	desc = tour_general.4000.desc
	theme = tour_stop
	override_background = { reference = courtyard }
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				tour_general_has_empathetic_personality = yes
			}
			animation = worry
		}
		animation = personality_callous
	}
	right_portrait = {
		character = scope:parade_master
		animation = marshal
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling_adult = yes
		current_travel_plan = {
			any_entourage_character = {
				is_imprisoned_by = root
				is_adult = yes
				count >= 2
			}
			exists = travel_leader
		}
		#This might be a bit jarring for non-intimidation tours?
		involved_activity = {
			has_activity_option = {
				category = special_type
				option = tour_type_intimidation
			}
		}
	}
	#More likely for intimidation tour
	weight_multiplier = {
		base = 1
		modifier = {
			tour_general_has_vengeful_personality = yes
			factor = 2
		}
		modifier = {
			has_activity_intent = justice_intent
			add = 100
		}
	}
	immediate = {
		#Grab someone martial to parade them
		if = {
			limit = {
				exists = cp:councillor_marshal
				current_travel_plan = {
					any_entourage_character = { has_council_position = councillor_marshal }
				}
			}
			current_travel_plan = {
				random_entourage_character = {
					limit = { has_council_position = councillor_marshal }
					save_scope_as = parade_master
				}
			}
		}
		else_if = {
			limit = {
				current_travel_plan = {
					any_entourage_character = {
						OR = {
							has_court_position = bodyguard_court_position
							has_court_position = akolouthos_court_position
							is_knight_of = root
						}
					}
				}
			}
			current_travel_plan = {
				random_entourage_character = {
					limit = { has_court_position = bodyguard_court_position }
					alternative_limit = { has_court_position = akolouthos_court_position }
					alternative_limit = { is_knight_of = root }
					save_scope_as = parade_master
				}
			}
		}
		else = {
			current_travel_plan.travel_leader = { save_scope_as = parade_master }
		}
		add_character_flag = wear_armor
		scope:parade_master = {
			add_character_flag = wear_armor
		}
	}
	#Parade them!
	option = { 
		name = tour_general.4000.a
		random_list = {
			#Parade successful
			75 = {
				desc = tour_general.4000.a_parade.desc
		    	send_interface_toast = {
					left_icon = root
					right_icon = location.county
					title = tour_general.4000.a_parade.t
					add_dread = medium_dread_gain
					add_character_modifier = {
						modifier = tour_paraded_prisoners_modifier
						years = 10
					}
				}
			}
			#Someone throws a rotten egg at you
			25 = {
				modifier = {
					dread < 25
					add = 10
				}
				modifier = {
					scope:stop_host_scope.culture != root.culture
					add = 10
				}
				desc = tour_general.4000.a_egged.desc
		    	send_interface_toast = {
					left_icon = root
					right_icon = location.county
					title = tour_general.4000.a_egged.t
					add_dread = minor_dread_loss
				}
				
			}
		}
		stress_impact = {
			compassionate = medium_stress_impact_gain
			humble = minor_stress_impact_gain
			shy = medium_stress_impact_loss
			forgiving = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				has_trait = just
				add = 50
			}
			modifier = {
				has_trait = vengeful
				add = 25
			}
			ai_value_modifier = {
				ai_boldness = 1
				ai_energy = 1
				ai_rationality = 1
				ai_compassion = -1
			}
		}
	}
	#_Drag_ them
	option = { 
		name = tour_general.4000.b
		flavor = tour_general.4000.b.flavor
		trigger = {
			tour_general_has_vengeful_personality = yes
		}
		current_travel_plan = {
			every_entourage_character = {
				limit = {
					is_imprisoned_by = root
					is_adult = yes
				}
				increase_wounds_effect = { REASON = dragged }
			}
		}
		add_dread = massive_dread_gain
		add_character_modifier = {
			modifier = tour_dragged_prisoners_modifier
			years = 10
		}
		#That's a bit excessive, liege?
		location.county = {
			add_county_modifier = {
				modifier = tour_dragged_prisoners_through_holding_modifier
				years = 10
			}
		}
		stress_impact = {
			compassionate = major_stress_impact_gain
			humble = medium_stress_impact_gain
			gregarious = minor_stress_impact_gain
			shy = medium_stress_impact_gain
			forgiving = major_stress_impact_gain
			sadistic = medium_stress_impact_loss
		}
		ai_chance = {
			base = 50
			modifier = {
				trigger_if = {
					limit = {
						has_relation_rival = scope:stop_host_scope
						scope:stop_host_scope = {
							OR = {
								has_trait = compassionate
								has_trait = forgiving
							}
						}
						NOR = {
							has_trait = compassionate
							has_trait = forgiving
						}
					}
				}
				trigger_else = {
					always = no
				}
				factor = 2
			}
			modifier = {
				trigger_if = {
					limit = {
						has_relation_rival = scope:stop_host_scope
						scope:stop_host_scope = {
							NOR = {
								has_trait = compassionate
								has_trait = forgiving
							}
						}
					}
				}
				trigger_else = {
					always = no
				}
				factor = 1.5
			}
			modifier = {
				has_trait = sadistic
				add = 50
			}
			modifier = {
				has_trait = callous
				add = 25
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_vengefulness = 2
				ai_energy = 1
				ai_compassion = -2
			}
		}
	}
	#... no, let's not
	option = { 
		name = tour_general.4000.c
		stress_impact = {
			arrogant = minor_stress_impact_gain
			cynical = minor_stress_impact_gain
			calm = minor_stress_impact_loss
			vengeful = minor_stress_impact_gain
			irritable = minor_stress_impact_gain
			sadistic = minor_stress_impact_gain
			callous = minor_stress_impact_gain
			compassionate = medium_stress_impact_loss
			forgiving = medium_stress_impact_loss
		}
		ai_chance = {
			base = 50
			modifier = {
				dread > 75
				factor = 2
			}
			modifier = {
				has_trait = compassionate
				add = 50
			}
			modifier = {
				has_trait = forgiving
				add = 25
			}
			ai_value_modifier = {
				ai_compassion = 2
				ai_sociability = 2
			}
		}
	}
	after = {
		remove_character_flag = wear_armor
		scope:parade_master = {
			remove_character_flag = wear_armor
		}
	}
}

scripted_effect 4001_search_stress_effect = {
	stress_impact = {
		honest = minor_stress_impact_gain
		craven = minor_stress_impact_gain
		paranoid = medium_stress_impact_gain
	}
}

scripted_effect 4001_room_resolution_effect = {
	#Got caught!
	if = {
		limit = {
			has_character_flag = room_$ROOM$
			has_character_flag = 4001_got_caught
		}
		trigger_event = tour_general.4004
	}
	#Wrong room!
	else_if = {
		limit = { has_character_flag = room_faux_$ROOM$ }
		trigger_event = tour_general.4003
	}
	#Yay secret!
	else = {
		trigger_event = tour_general.4002
	}
}

scripted_effect 4001_display_potential_outcome_effect = {
	random_list = {
		#You learn a secret about vassal
		1 = {
			show_chance = no
			desc = tour_general.4001.outcome_a_desc
			custom_tooltip = tour_general.4001.outcome_a
		}
		#You find nothing
		1 = {
			show_chance = no
			desc = tour_general.4001.outcome_b_desc
		}
		#You get caught red-handed
		1 = {
			show_chance = no
			desc = tour_general.4001.outcome_c_desc
			show_as_tooltip = {
				if = {
					limit = { diplomacy > 10 }
			    	duel = {
			    		skill = diplomacy
			    		target = scope:stop_host_scope
			    		#You convince them
			    		50 = {
			    			compare_modifier = {
			    				value = scope:duel_value
			    				multiplier = 3.5
			    				min = -49
			    			}
			    			desc = tour_general.4004.a_diplomacy_convinced.desc
		    				send_interface_toast = {
		    					type = event_toast_text_and_effect_good
		    					left_icon = root
		    					right_icon = scope:stop_host_scope
		    					title = tour_general.4004.a_diplomacy_convinced.t
		    					desc = tour_general.4004.a_diplomacy_convinced.desc
								add_character_modifier = {
							    	modifier = tour_smooth_talker_modifier
							    	years = 10
							    }		
		    				}
			    		}
			    		#They are _not_ convinced
			    		50 = {
			    			compare_modifier = {
			    				value = scope:duel_value
			    				multiplier = -3.5
			    				min = -49
			    			}
			    			desc = tour_general.4004.a_diplomacy_nonconvinced.desc
		    				send_interface_toast = {
		    					type = event_toast_effect_bad
		    					left_icon = root
		    					right_icon = scope:stop_host_scope
		    					title = tour_general.4004.a_diplomacy_nonconvinced.t
								add_character_modifier = {
							    	modifier = tour_snooping_liege_modifier
							    	years = 10
							    }
		    					scope:stop_host_scope = {
								    add_opinion = {
		    							modifier = spied_on_me_opinion
		    							target = root
		    							opinion = -20
		    						}
		    						if = {
		    							limit = { is_ai = no }
		    							#Caught your liege snooping
		    							send_interface_toast = {
		    								type = event_toast_text_neutral
		    								left_icon = scope:stop_host_scope
		    								right_icon = scope:visiting_liege
		    								title = tour_general.4004.a_diplomacy_snooping.t
		    								desc = tour_general.4004.a_diplomacy_snooping.desc
		    							}
		    						}
		    					}
		    				}
			    		}
			    	}
				}
				else = {
					add_character_modifier = {
				    	modifier = tour_snooping_liege_modifier
				    	years = 10
				    }
					scope:stop_host_scope = {
					    add_opinion = {
							modifier = spied_on_me_opinion
							target = root
							opinion = -20
						}
						if = {
							limit = { is_ai = no }
							#Caught your liege snooping
							send_interface_toast = {
								type = event_toast_text_neutral
								left_icon = scope:stop_host_scope
								right_icon = scope:visiting_liege
								title = tour_general.4004.a_diplomacy_snooping.t
								desc = tour_general.4004.a_diplomacy_snooping.desc
							}
						}
					}
				}
			}
		}
	}
}

scripted_effect 4001_search_room_effect = {
	#Show potential outcome
	4001_display_potential_outcome_effect = yes
	#Determine what happens
	4001_room_resolution_effect = { ROOM = $ROOM$ }
	4001_search_stress_effect = yes
}

#Search a room and find vassal secrets
tour_general.4001 = {
	type = activity_event
	title = tour_general.4001.t
	desc = tour_general.4001.desc
	theme = tour_stop
	left_portrait = {
		character = root
		animation = personality_dishonorable
	}
	lower_right_portrait = {
		character = scope:stop_host_scope
	}
	cooldown = { years = 10 }
	trigger = {
		#Only player characters
		is_ai = no
		is_available_travelling_adult = yes
		scope:stop_host_scope = {
			#Against AI vassals
			is_ai = yes
			any_secret = {
				exists = this
				NOT = { is_known_by = root }
				OR = {
					secret_type = secret_deviant
					secret_type = secret_homosexual
					secret_type = secret_murder_attempt
					secret_type = secret_cannibal
					secret_type = secret_lover
					secret_type = secret_murder
					secret_type = secret_non_believer
					secret_type = secret_incest
					secret_type = secret_witch
					secret_type = secret_embezzler
				}
			}
		}
	}
	immediate = {
		scope:stop_host_scope = {
			random_secret = {
				limit = {
					NOT = { is_known_by = root }
					OR = {
						secret_type = secret_deviant
						secret_type = secret_homosexual
						secret_type = secret_murder_attempt
						secret_type = secret_cannibal
						secret_type = secret_lover
						secret_type = secret_murder
						secret_type = secret_non_believer
						secret_type = secret_incest
						secret_type = secret_witch
						secret_type = secret_embezzler
					}
				}
				save_scope_as = 4001_secret_to_learn
			}
		}
		#Pick the actual location of the secret
		if = {
			limit = {
				scope:4001_secret_to_learn = {
					OR = {
						secret_type = secret_murder_attempt
						secret_type = secret_homosexual
					}
				}
			}
			add_character_flag = room_bedchamber
		}
		if = {
			limit = {
				scope:4001_secret_to_learn = {
					OR = {
						secret_type = secret_deviant
						secret_type = secret_murder
						secret_type = secret_embezzler
					}
				}
			}
			add_character_flag = room_council_chamber
		}
		if = {
			limit = {
				scope:4001_secret_to_learn = {
					OR = {
						secret_type = secret_non_believer
						secret_type = secret_witch
						secret_type = secret_lover
					}
				}
			}
			add_character_flag = room_shrine
		}
		if = {
			limit = {
				scope:4001_secret_to_learn = {
					OR = {
						secret_type = secret_cannibal
						secret_type = secret_incest
					}
				}
			}
			add_character_flag = room_kitchen
		}
		#Pick a faux secret location
		random_list = {
			#Faux bedchamber
			1 = {
				trigger = {
					NOR = {
						has_character_flag = room_bedchamber
					}
				}
				add_character_flag = room_faux_bedchamber
			}
			#Faux council chamber
			1 = {
				trigger = {
					NOR = {
						has_character_flag = room_council_chamber
					}
				}
				add_character_flag = room_faux_council_chamber
			}
			#Faux shrine
			1 = {
				trigger = {
					NOR = {
						has_character_flag = room_shrine
					}
				}
				add_character_flag = room_faux_shrine
			}
			#Faux kitchen
			1 = {
				trigger = {
					NOR = {
						has_character_flag = room_kitchen
					}
				}
				add_character_flag = room_faux_kitchen
			}
		}
		random_list = {
			75 = {
				#Not caught
			}
			25 = {
				add_character_flag = 4001_got_caught
			}
		}
	}
	#Search the bedchamber
	option = { 
		name = tour_general.4001.a
		trigger = {
			OR = {
				has_character_flag = room_bedchamber
				has_character_flag = room_faux_bedchamber
			}
		}
		custom_tooltip = tour_general.4001.a.tt
		set_variable = {
			name = 4001_room
			value = flag:bedchamber
		}
		4001_search_room_effect = { ROOM = bedchamber }
		ai_chance = {
			base = 50
			modifier = {
				OR = {
					has_trait = deceitful
					has_trait = ambitious
					has_trait = brave
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = lustful
					has_trait = seducer
					has_trait = rakish
				}
				add = 10
			}
			modifier = {
				has_trait = brave
				has_trait = paranoid
				factor = 2
			}
			ai_value_modifier = {
				ai_energy = 1
				ai_boldness = 1
				ai_honor = -1
			}
		}
	}
	#Search the council chamber
	option = { 
		name = tour_general.4001.b
		trigger = {
			OR = {
				has_character_flag = room_council_chamber
				has_character_flag = room_faux_council_chamber
			}
		}
		custom_tooltip = tour_general.4001.b.tt
		set_variable = {
			name = 4001_room
			value = flag:council_chamber
		}
		4001_search_room_effect = { ROOM = council_chamber }
		ai_chance = {
			base = 50
			modifier = {
				OR = {
					has_trait = deceitful
					has_trait = ambitious
					has_trait = brave
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = diligent
					has_trait = temperate
					has_trait = ambitious
				}
				add = 10
			}
			modifier = {
				has_trait = brave
				has_trait = paranoid
				factor = 2
			}
			ai_value_modifier = {
				ai_energy = 1
				ai_boldness = 1
				ai_honor = -1
			}
		}
	}
	#Search the shrine
	option = { 
		name = tour_general.4001.c
		trigger = {
			OR = {
				has_character_flag = room_shrine
				has_character_flag = room_faux_shrine
			}
		}
		custom_tooltip = tour_general.4001.c.tt
		set_variable = {
			name = 4001_room
			value = flag:shrine
		}
		4001_search_room_effect = { ROOM = shrine }
		ai_chance = {
			base = 50
			modifier = {
				OR = {
					has_trait = deceitful
					has_trait = ambitious
					has_trait = brave
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = zealous
					has_trait = cynical
				}
				add = 10
			}
			modifier = {
				has_trait = brave
				has_trait = paranoid
				factor = 2
			}
			ai_value_modifier = {
				ai_energy = 1
				ai_boldness = 1
				ai_honor = -1
			}
		}
	}
	#Search the kitchen
	option = { 
		name = tour_general.4001.d
		trigger = {
			OR = {
				has_character_flag = room_kitchen
				has_character_flag = room_faux_kitchen
			}
		}
		custom_tooltip = tour_general.4001.d.tt
		set_variable = {
			name = 4001_room
			value = flag:kitchen
		}
		4001_search_room_effect = { ROOM = kitchen }
		ai_chance = {
			base = 50
			modifier = {
				OR = {
					has_trait = deceitful
					has_trait = ambitious
					has_trait = brave
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = gluttonous
					has_trait = greedy
				}
				add = 10
			}
			modifier = {
				has_trait = brave
				has_trait = paranoid
				factor = 2
			}
			ai_value_modifier = {
				ai_energy = 1
				ai_boldness = 1
				ai_honor = -1
			}
		}
	}
	#... no
	option = { 
		name = tour_general.4001.e
		stress_impact = {
			honest = minor_stress_impact_loss
			ambitious = minor_stress_impact_gain
			brave = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				OR = {
					has_trait = lazy
					has_trait = content
				}
				add = 50
			}
			modifier = {
				OR = {
					has_trait = trusting
					has_trait = honest
					has_trait = craven

				}
				add = 50
			}
			modifier = {
				has_trait = craven
				has_trait = paranoid
				factor = 2
			}
			ai_value_modifier = {
				ai_honor = 1
				ai_energy = -1
				ai_boldness = -1
			}
		}
	}
}

#You find a secret!
tour_general.4002 = {
	type = activity_event
	title = tour_general.4002.t
	desc = {
		first_valid = {
			#Bedchamber
			triggered_desc = {
				trigger = {
					exists = var:4001_room
					var:4001_room = flag:bedchamber
					has_character_flag = room_bedchamber
				}
				desc = tour_general.4002.desc_bedchamber
			}
			#Council Chamber
			triggered_desc = {
				trigger = {
					exists = var:4001_room
					var:4001_room = flag:council_chamber
					has_character_flag = room_council_chamber
				}
				desc = tour_general.4002.desc_council_chamber
			}
			#Shrine
			triggered_desc = {
				trigger = {
					exists = var:4001_room
					var:4001_room = flag:shrine
					has_character_flag = room_shrine
				}
				desc = tour_general.4002.desc_shrine
			}
			#Kitchen
			triggered_desc = {
				trigger = {
					exists = var:4001_room
					var:4001_room = flag:kitchen
					has_character_flag = room_kitchen
				}
				desc = tour_general.4002.desc_kitchen
			}
		}
		first_valid = {
			#Deviant
			triggered_desc = {
				trigger = {
					scope:4001_secret_to_learn = { secret_type = secret_deviant }
				}
				desc = tour_general.4002.desc_deviant
			}
			#Homosexual
			triggered_desc = {
				trigger = {
					scope:4001_secret_to_learn = { secret_type = secret_homosexual }
				}
				desc = tour_general.4002.desc_homosexual
			}
			#Murder Attempt
			triggered_desc = {
				trigger = {
					scope:4001_secret_to_learn = { secret_type = secret_murder_attempt }
				}
				desc = tour_general.4002.desc_murder_attempt
			}
			#Cannibal
			triggered_desc = {
				trigger = {
					scope:4001_secret_to_learn = { secret_type = secret_cannibal }
				}
				desc = tour_general.4002.desc_cannibal
			}
			#Lover
			triggered_desc = {
				trigger = {
					scope:4001_secret_to_learn = { secret_type = secret_lover }
				}
				desc = tour_general.4002.desc_lover
			}
			#Murder
			triggered_desc = {
				trigger = {
					scope:4001_secret_to_learn = { secret_type = secret_murder }
				}
				desc = tour_general.4002.desc_murder
			}
			#Non-Believer
			triggered_desc = {
				trigger = {
					scope:4001_secret_to_learn = { secret_type = secret_non_believer }
				}
				desc = tour_general.4002.desc_non_believer
			}
			#Incest
			triggered_desc = {
				trigger = {
					scope:4001_secret_to_learn = { secret_type = secret_incest }
				}
				desc = tour_general.4002.desc_incest
			}
			#Witch
			triggered_desc = {
				trigger = {
					scope:4001_secret_to_learn = { secret_type = secret_witch }
				}
				desc = tour_general.4002.desc_witch
			}
			#Embezzler
			triggered_desc = {
				trigger = {
					scope:4001_secret_to_learn = { secret_type = secret_incest }
				}
				desc = tour_general.4002.desc_embezzler
			}
		}
	}
	theme = tour_stop
	#Bedchamber
	override_background = {
		trigger = {
			exists = var:4001_room
			var:4001_room = flag:bedchamber
		}
		reference = bedchamber
	}
	#Council Chamber
	override_background = {
		trigger = {
			exists = var:4001_room
			var:4001_room = flag:council_chamber
		}
		reference = council_chamber
	}
	#Shrine
	override_background = {
		trigger = {
			exists = var:4001_room
			var:4001_room = flag:shrine
		}
		reference = temple
	}
	#Kitchen
	override_background = {
		trigger = {
			exists = var:4001_room
			var:4001_room = flag:kitchen
		}
		reference = bp1_kitchen_western
	}
	left_portrait = {
		character = root
		animation = scheme
	}
	lower_right_portrait = {
		character = scope:stop_host_scope
	}
	#Ka-ching, secret found
	option = { 
		name = {
			text = {
				first_valid = {
					#Deviant
					triggered_desc = {
						trigger = {
							scope:4001_secret_to_learn = { secret_type = secret_deviant }
							any_secret = { type = secret_deviant }
						}
						desc = tour_general.4002.a_deviant
					}
					#Homosexual female
					triggered_desc = {
						trigger = {
							scope:4001_secret_to_learn = { secret_type = secret_homosexual }
							any_secret = { type = secret_homosexual }
							is_female = yes
							scope:stop_host_scope = { is_female = yes }
						}
						desc = tour_general.4002.a_homosexual_female
					}
					#Homosexual male
					triggered_desc = {
						trigger = {
							scope:4001_secret_to_learn = { secret_type = secret_homosexual }
							any_secret = { type = secret_homosexual }
							is_female = no
							scope:stop_host_scope = { is_female = no }
						}
						desc = tour_general.4002.a_homosexual_male
					}
					#Homosexual
					triggered_desc = {
						trigger = {
							scope:4001_secret_to_learn = { secret_type = secret_homosexual }
							any_secret = { type = secret_homosexual }
						}
						desc = tour_general.4002.a_homosexual
					}
					#Cannibal
					triggered_desc = {
						trigger = {
							scope:4001_secret_to_learn = { secret_type = secret_cannibal }
							any_secret = { type = secret_cannibal }
						}
						desc = tour_general.4002.a_cannibal
					}
					#Non-Believer
					triggered_desc = {
						trigger = {
							scope:4001_secret_to_learn = { secret_type = secret_non_believer }
							any_secret = { type = secret_non_believer }
						}
						desc = tour_general.4002.a_non_believer
					}
					#Incest
					triggered_desc = {
						trigger = {
							scope:4001_secret_to_learn = { secret_type = secret_incest }
							any_secret = { type = secret_incest }
						}
						desc = tour_general.4002.a_incest
					}
					#Witch
					triggered_desc = {
						trigger = {
							scope:4001_secret_to_learn = { secret_type = secret_witch }
							any_secret = { type = secret_witch }
						}
						desc = tour_general.4002.a_witch
					}
					triggered_desc = {
						desc = tour_general.4002.a
					}
				}
			}
		}
		scope:4001_secret_to_learn = { reveal_to = root }
		ai_chance = {
			base = 50
		}
	}
	after = {
		#Cleanup time!
		trigger_event = tour_general.4005
	}
}

#You find ... bupkis
tour_general.4003 = {
	type = activity_event
	title = tour_general.4003.t
	desc = {
		first_valid = {
			#Bedchamber
			triggered_desc = {
				trigger = {
					exists = var:4001_room
					var:4001_room = flag:bedchamber
					has_character_flag = room_faux_bedchamber
				}
				desc = tour_general.4003.desc_faux_bedchamber
			}
			#Council Chamber
			triggered_desc = {
				trigger = {
					exists = var:4001_room
					var:4001_room = flag:council_chamber
					has_character_flag = room_faux_council_chamber
				}
				desc = tour_general.4003.desc_faux_council_chamber
			}
			#Shrine
			triggered_desc = {
				trigger = {
					exists = var:4001_room
					var:4001_room = flag:shrine
					has_character_flag = room_faux_shrine
				}
				desc = tour_general.4003.desc_faux_shrine
			}
			#Let me tell you about the secret of... POTATOES
			triggered_desc = {
				trigger = {
					exists = var:4001_room
					var:4001_room = flag:kitchen
					has_character_flag = room_faux_kitchen
				}
				desc = tour_general.4003.desc_faux_kitchen
			}
		}
	}
	theme = tour_stop
	#Bedchamber
	override_background = {
		trigger = {
			exists = var:4001_room
			var:4001_room = flag:bedchamber
		}
		reference = bedchamber
	}
	#Council Chamber
	override_background = {
		trigger = {
			exists = var:4001_room
			var:4001_room = flag:council_chamber
		}
		reference = council_chamber
	}
	#Shrine
	override_background = {
		trigger = {
			exists = var:4001_room
			var:4001_room = flag:shrine
		}
		reference = temple
	}
	#Kitchen
	override_background = {
		trigger = {
			exists = var:4001_room
			var:4001_room = flag:kitchen
		}
		reference = bp1_kitchen_western
	}
	left_portrait = {
		character = root
		animation = personality_cynical
	}
	lower_right_portrait = {
		character = scope:stop_host_scope
	}
	immediate = {
		random_list = {
			1 = {
				dummy_female = {
					save_scope_as = servant_gender
				}
			}
			1 = {
				dummy_male = {
					save_scope_as = servant_gender
				}
			}
		}
		if = {
			limit = {
				exists = var:4001_room
				var:4001_room = flag:kitchen
			}
			location = { select_root_vegetable_effect = yes }
		}
	}
	#Meh 
	option = { 
		name = tour_general.4003.a
		ai_chance = {
			base = 50
		}
	}
	after = {
		if = {
			limit = {
				exists = var:root_vegetable
			}
			remove_variable = root_vegetable
		}
		#Cleanup time!
		trigger_event = tour_general.4005
	}
}

#You got caught!
tour_general.4004 = {
	type = activity_event
	title = tour_general.4004.t
	desc = {
		first_valid = {
			#Bedchamber
			triggered_desc = {
				trigger = {
					exists = var:4001_room
					var:4001_room = flag:bedchamber
					has_character_flag = 4001_got_caught
				}
				desc = tour_general.4004.desc_bedchamber_caught
			}
			#Council Chamber
			triggered_desc = {
				trigger = {
					exists = var:4001_room
					var:4001_room = flag:council_chamber
					has_character_flag = 4001_got_caught
				}
				desc = tour_general.4004.desc_council_chamber_caught
			}
			#Shrine
			triggered_desc = {
				trigger = {
					exists = var:4001_room
					var:4001_room = flag:shrine
					has_character_flag = 4001_got_caught
				}
				desc = tour_general.4004.desc_shrine_caught
			}
			#Kitchen
			triggered_desc = {
				trigger = {
					exists = var:4001_room
					var:4001_room = flag:kitchen
					has_character_flag = 4001_got_caught
				}
				desc = tour_general.4004.desc_kitchen_caught
			}
		}
		desc = tour_general.4004.desc_outro
	}
	theme = tour_stop
	#Bedchamber
	override_background = {
		trigger = {
			exists = var:4001_room
			var:4001_room = flag:bedchamber
		}
		reference = bedchamber
	}
	#Council Chamber
	override_background = {
		trigger = {
			exists = var:4001_room
			var:4001_room = flag:council_chamber
		}
		reference = council_chamber
	}
	#Shrine
	override_background = {
		trigger = {
			exists = var:4001_room
			var:4001_room = flag:shrine
		}
		reference = temple
	}
	#Kitchen
	override_background = {
		trigger = {
			exists = var:4001_room
			var:4001_room = flag:kitchen
		}
		reference = bp1_kitchen_western
	}
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				OR = {
					has_relation_potential_lover = scope:stop_host_scope
					has_relation_lover = scope:stop_host_scope
					has_relation_soulmate = scope:stop_host_scope
				}
			}
			animation = flirtation
		}
		triggered_animation = {
			trigger = {
				diplomacy > 10
			}
			animation = personality_rational
		}
		animation = shame
	}
	right_portrait = {
		character = scope:stop_host_scope
		animation = disapproval
	}
	#Oh no!
	option = {
		name = {
			trigger = { diplomacy > 10 }
			text = tour_general.4004.a_diplomacy
		}
		name = tour_general.4004.a
		if = {
			limit = { diplomacy > 10 }
	    	duel = {
	    		skill = diplomacy
	    		target = scope:stop_host_scope
	    		#You convince them
	    		50 = {
	    			compare_modifier = {
	    				value = scope:duel_value
	    				multiplier = 3.5
	    				min = -49
	    			}
	    			desc = tour_general.4004.a_diplomacy_convinced.desc
    				send_interface_toast = {
    					type = event_toast_text_and_effect_good
    					left_icon = root
    					right_icon = scope:stop_host_scope
    					title = tour_general.4004.a_diplomacy_convinced.t
    					desc = tour_general.4004.a_diplomacy_convinced.desc
						add_character_modifier = {
					    	modifier = tour_smooth_talker_modifier
					    	years = 10
					    }		
    				}
	    		}
	    		#They are _not_ convinced
	    		50 = {
	    			compare_modifier = {
	    				value = scope:duel_value
	    				multiplier = -3.5
	    				min = -49
	    			}
	    			desc = tour_general.4004.a_diplomacy_nonconvinced.desc
    				send_interface_toast = {
    					type = event_toast_effect_bad
    					left_icon = root
    					right_icon = scope:stop_host_scope
    					title = tour_general.4004.a_diplomacy_nonconvinced.t
						add_character_modifier = {
					    	modifier = tour_snooping_liege_modifier
					    	years = 10
					    }
    					scope:stop_host_scope = {
						    add_opinion = {
    							modifier = spied_on_me_opinion
    							target = root
    							opinion = -20
    						}
    						if = {
    							limit = { is_ai = no }
    							#Caught your liege snooping
    							send_interface_toast = {
    								type = event_toast_text_neutral
    								left_icon = scope:stop_host_scope
    								right_icon = scope:visiting_liege
    								title = tour_general.4004.a_diplomacy_snooping.t
    								desc = tour_general.4004.a_diplomacy_snooping.desc
    							}
    						}
    					}
    				}
	    		}
	    	}
		}
		else = {
			add_character_modifier = {
		    	modifier = tour_snooping_liege_modifier
		    	years = 10
		    }
			scope:stop_host_scope = {
			    add_opinion = {
					modifier = spied_on_me_opinion
					target = root
					opinion = -20
				}
				if = {
					limit = { is_ai = no }
					#Caught your liege snooping
					send_interface_toast = {
						type = event_toast_text_neutral
						left_icon = scope:stop_host_scope
						right_icon = scope:visiting_liege
						title = tour_general.4004.a_diplomacy_snooping.t
						desc = tour_general.4004.a_diplomacy_snooping.desc
					}
				}
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				OR = {
					has_relation_potential_lover = scope:stop_host_scope
					has_relation_lover = scope:stop_host_scope
					has_relation_soulmate = scope:stop_host_scope
				}
				factor = 0
			}
		}
	}
	#Quick, seduce them!
	option = { 
		name = tour_general.4004.b
		trigger = {
			OR = {
				#Don't need the AI acting on every potential lover out there
				AND = {
					is_ai = yes
					OR = {
						has_relation_lover = scope:stop_host_scope
						has_relation_soulmate = scope:stop_host_scope
					}
				}
				OR = {
					has_relation_potential_lover = scope:stop_host_scope
					has_relation_lover = scope:stop_host_scope
					has_relation_soulmate = scope:stop_host_scope
				}
			}
		}
		had_sex_with_effect = { 
			CHARACTER = scope:stop_host_scope 
			PREGNANCY_CHANCE = pregnancy_chance 
		}
		progress_towards_lover_effect = {
			CHARACTER = scope:stop_host_scope
			REASON = lover_distracting_sex
			OPINION = default_lover_opinion
		}
		stress_impact = {
			chaste = medium_stress_impact_gain
			celibate = major_stress_impact_gain
		}
		#'tis the smart thing to do
		ai_chance = {
			base = 200
		}
	}
	after = {
		#Cleanup time!
		trigger_event = tour_general.4005
	}
}

#Clean up event
tour_general.4005 = { 
    type = character_event
   	hidden = yes
	immediate = {
		if = {
			limit = {
				exists = var:4001_room
			}
			remove_variable = 4001_room
		}
		remove_character_flag = room_bedchamber
		remove_character_flag = room_faux_bedchamber
		remove_character_flag = room_council_chamber
		remove_character_flag = room_faux_council_chamber
		remove_character_flag = room_shrine
		remove_character_flag = room_faux_shrine
		remove_character_flag = room_kitchen
		remove_character_flag = room_faux_kitchen
		remove_character_flag = 4001_got_caught
    }
}

scripted_trigger 4006_vassal_target_scheme_trigger = {
	is_scheme_exposed = no
	scheme_target_character = scope:stop_host_scope
	scheme_owner = root
}

scripted_trigger 4006_courtier_target_scheme_trigger = {
	is_scheme_exposed = no
	scheme_owner = root
}

#Come across a drunk vassal servant, gain scheme buff/s
tour_general.4006 = {
	type = activity_event
	title = tour_general.4006.t
	desc = tour_general.4006.desc
	theme = tour_stop
	override_background = { reference = tavern }
	left_portrait = {
		character = root
		animation = personality_compassionate
	}
	right_portrait = {
		character = scope:servant_character
		animation = toast
	}
	#If we're not already displaying the scheme target
	lower_center_portrait = {
		trigger = {
			scope:4006_scheme_target != scope:stop_host_scope
		}
		character = scope:4006_scheme_target
	}
	lower_right_portrait = {
		character = scope:stop_host_scope
	}
	cooldown = { years = 10 }
	trigger = {
		#Only player characters
		is_ai = no
		is_available_travelling_adult = yes
		OR = {
			#Do we have a scheme against the vassal
			any_scheme = { 4006_vassal_target_scheme_trigger = yes }
			#Or a scheme against someone in the vassal's court
			scope:stop_host_scope = {
				any_courtier_or_guest = {
					any_targeting_scheme = { 4006_courtier_target_scheme_trigger = yes }
				}
			}
		}
	}
	weight_multiplier = {
		base = 1
		modifier = {
			has_activity_intent = reduce_stress_intent
			add = 100
		}
	}
	immediate = {
		play_music_cue = "mx_cue_in_taberna_instrumental"
		#Find a suitable drunkard servant
    	if = {
    		limit = {
    			any_pool_character = {
    				province = root.location
    				is_available_healthy_adult = yes
    				has_trait = drunkard
    				tour_general_lowborn_pool_character_trigger = yes
    			}
    		}
    		random_pool_character = {
    			province = root.location
    			limit = {
    				is_available_healthy_adult = yes
    				has_trait = drunkard
    				tour_general_lowborn_pool_character_trigger = yes
    			}
    			save_scope_as = servant_character
    		}	
    	}
    	#Otherwise create someone
    	else = {
    		create_character = {
    			template = servant_character
    			culture = scope:stop_host_scope.culture
    			faith = scope:stop_host_scope.faith
    			trait = drunkard
    			location = root.location
    			save_scope_as = servant_character
    		}
    		scope:servant_character = { add_character_flag = created_servant_character }	
    	}
    	#Find our scheme to buff
		if = {
			limit = {
				any_scheme = { 4006_vassal_target_scheme_trigger = yes }
			}
			random_scheme = {
				limit = { 4006_vassal_target_scheme_trigger = yes }
				save_scope_as = 4006_scheme_to_buff
			}
		}
		else_if = {
			limit = {
				scope:stop_host_scope = {
					any_courtier_or_guest = {
						any_targeting_scheme = { 4006_courtier_target_scheme_trigger = yes }
					}
				}
			}
			random_scheme = {
				limit = {
					scope:stop_host_scope = {
						any_courtier_or_guest = {
							any_targeting_scheme = { 4006_courtier_target_scheme_trigger = yes }
						}
					}
				}
				save_scope_as = 4006_scheme_to_buff
			}
		}
		scope:4006_scheme_to_buff = {
			scheme_target_character = { save_scope_as = 4006_scheme_target }
		}
	}
	#Tell me more!
	option = { 
		name = tour_general.4006.a
		random_list = {
			#Success
			1 = {
				desc = tour_general.4006.a_success.desc
		    	send_interface_toast = {
					left_icon = root
					right_icon = scope:4006_scheme_target
					title = tour_general.4006.a_success.t
					scope:4006_scheme_to_buff = {
						add_scheme_modifier = { type = tour_scheme_success_modifier }
					}
				}
			}
			#Secrecy
			1 = {
				trigger = {
					#Only if the scheme is considered secret
					scope:4006_scheme_to_buff = { is_type_secret = yes }
				}
				desc = tour_general.4006.a_secrecy.desc
		    	send_interface_toast = {
					left_icon = root
					right_icon = scope:4006_scheme_target
					title = tour_general.4006.a_secrecy.t
					scope:4006_scheme_to_buff = {
						add_scheme_modifier = { type = tour_scheme_secrecy_modifier }
					}
				}
			}
		}
		stress_impact = {
			ambitious = minor_stress_impact_gain
			craven = minor_stress_impact_loss
		}
		ai_chance = {
			base = 50
			modifier = {
				OR = {
					has_trait = ambitious
					has_trait = deceitful
					has_trait = greedy
				}
				add = 50
			}
			ai_value_modifier = {
				ai_greed = 1
			}
		}
	}
	#Get them _more_ drunk!
	option = { 
		name = tour_general.4006.b
		remove_short_term_gold = minor_gold_value
		random_list = {
			#Super success
			35 = {
				desc = tour_general.4006.b_super_success.desc
		    	send_interface_toast = {
					left_icon = root
					right_icon = scope:4006_scheme_target
					title = tour_general.4006.b_super_success.t
					scope:4006_scheme_to_buff = {
						add_scheme_modifier = { type = tour_scheme_excellent_success_modifier }
					}
				}
			}
			#Super secrecy
			35 = {
				trigger = {
					#Only if the scheme is considered secret
					scope:4006_scheme_to_buff = { is_type_secret = yes }
				}
				desc = tour_general.4006.b_super_secrecy.desc
		    	send_interface_toast = {
					left_icon = root
					right_icon = scope:4006_scheme_target
					title = tour_general.4006.b_super_secrecy.t
					scope:4006_scheme_to_buff = {
						add_scheme_modifier = { type = tour_scheme_excellent_secrecy_modifier }
					}
				}
			}
			#OR they get knocked out
			30 = {
				desc = tour_general.4006.b_passout.desc
				#If we're a scholar and/or whole of body, less chance for them to get knocked out
				modifier = {
					OR = {
						has_trait = scholar
						has_trait = drunkard
						has_trait = whole_of_body
					}
					add = -10
				}
				modifier = {
					scope:servant_character = {
						prowess > medium_skill_rating
					}
					add = -10
				}
				#Remove additional chance if we only have the success option
				modifier = {
					scope:4006_scheme_to_buff = { is_type_secret = no }
					add = -20
				}
				custom_tooltip = tour_general.4006.b_passout_tt
		    	send_interface_toast = {
		    		type = event_toast_text_bad
		    		left_icon = root
					title = tour_general.4006.b_passout.t
					desc = tour_general.4006.b_passout_tt
				}
			}
		}
		stress_impact = {
			compassionate = minor_stress_impact_gain
			temperate = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50 
			modifier = {
				short_term_gold <= minor_gold_value
				factor = 0
			}
			ai_value_modifier = {
				ai_greed = -1
			}
		}
	}
	after = {
		scope:servant_character = {
			if = {
				limit = { has_character_flag = created_servant_character }
				silent_disappearance_effect = yes
			}
		}
	}
}

scripted_effect 4007_intrigue_or_prowess_skill_duel_effect = {
	duel = {
		skill = $SKILL$
		value = medium_skill_rating
		#Learn their secret
		50 = {
			compare_modifier = {
				value = scope:duel_value
				multiplier = 3.5
				min = -49
			}
			desc = tour_general.4007.a_secret.desc
			custom_tooltip = tour_general.4007.a_secret.tt
			hidden_effect = {
				send_interface_toast = {
					type = event_toast_effect_good
					left_icon = root
					right_icon = scope:4007_secret_holder
					title = tour_general.4007.a_secret.t
					scope:4007_secret_to_learn = { reveal_to = root }	
				}
			}
		}
		#They notice you
		50 = {
			compare_modifier = {
				value = scope:duel_value
				multiplier = -3.5
				min = -49
			}
			desc = tour_general.4007.a_detected.desc
			send_interface_toast = {
				type = event_toast_effect_bad
				left_icon = root
				right_icon = scope:4007_secret_holder
				title = tour_general.4007.a_detected.t
				add_character_modifier = {
			    	modifier = tour_snooping_liege_modifier
			    	years = 10
			    }
			    reverse_add_opinion = {
			    	target = scope:4007_secret_holder
			    	modifier = spied_on_me_opinion
			    	opinion = -20
			    }
			}
		}
	}
}

#Gain a hook on one of the vassal's close characters
tour_general.4007 = {
	type = activity_event
	title = tour_general.4007.t
	desc = tour_general.4007.desc
	theme = tour_stop
	override_background = { reference = alley_night }
	left_portrait = {
		character = root
		animation = personality_dishonorable
	}
	right_portrait = {
		character = scope:4007_secret_holder
		animation = paranoia
	}
	lower_right_portrait = {
		character = scope:stop_host_scope
	}
	cooldown = { years = 10 }
	trigger = {
		is_available_travelling_adult = yes
		#Any tasty secrets?
		scope:stop_host_scope = {
			OR = {
				AND = {
					exists = cp:councillor_spymaster
					cp:councillor_spymaster = { tour_general_is_available_councillor_with_secret_trigger = yes }
				}
				AND = {
					exists = cp:councillor_court_chaplain
					cp:councillor_court_chaplain = { tour_general_is_available_councillor_with_secret_trigger = yes }
				}
				AND = {
					exists = cp:councillor_marshal
					cp:councillor_marshal = { tour_general_is_available_councillor_with_secret_trigger = yes }
				}
				AND = {
					exists = cp:councillor_steward
					cp:councillor_steward = { tour_general_is_available_councillor_with_secret_trigger = yes }
				}
				AND = {
					exists = cp:councillor_chancellor
					cp:councillor_chancellor = { tour_general_is_available_councillor_with_secret_trigger = yes }
				}
				any_close_or_extended_family_member = {
					this != scope:stop_host_scope
					is_in_the_same_court_as = scope:stop_host_scope
					root = {
						can_add_hook = {
							target = prev #The family member
							type = suspicious_activity_hook
						}
					}
					any_secret = {
						NOT = { is_known_by = root }
					}
				}
				any_court_position_holder = {
					location = root.location
					this != scope:stop_host_scope
					root = {
						can_add_hook = {
							target = prev #The court position holder
							type = suspicious_activity_hook
						}
					}
					any_secret = {
						NOT = { is_known_by = root }
					}
				}
			}
		}
	}
	weight_multiplier = {
		base = 1
		modifier = {
			has_activity_intent = reduce_stress_intent
			add = 1
		}
	}
	immediate = {
		scope:stop_host_scope = {
			if = {
				limit = {
					exists = cp:councillor_spymaster
					cp:councillor_spymaster = { tour_general_is_available_councillor_with_secret_trigger = yes }
				}
				cp:councillor_spymaster = { save_scope_as = 4007_secret_holder }
			}
			else_if = {
				limit = {
					exists = cp:councillor_court_chaplain
					cp:councillor_court_chaplain = { tour_general_is_available_councillor_with_secret_trigger = yes }
					NOT = { exists = scope:4007_secret_holder }
				}
				cp:councillor_court_chaplain = { save_scope_as = 4007_secret_holder }
			}
			else_if = {
				limit = {
					exists = cp:councillor_marshal
					cp:councillor_marshal = { tour_general_is_available_councillor_with_secret_trigger = yes }
					NOT = { exists = scope:4007_secret_holder }
				}
				cp:councillor_marshal = { save_scope_as = 4007_secret_holder }
			}
			else_if = {
				limit = {
					exists = cp:councillor_steward
					cp:councillor_steward = { tour_general_is_available_councillor_with_secret_trigger = yes }
					NOT = { exists = scope:4007_secret_holder }
				}
				cp:councillor_steward = { save_scope_as = 4007_secret_holder }
			}
			else_if = {
				limit = {
					exists = cp:councillor_chancellor
					cp:councillor_chancellor = { tour_general_is_available_councillor_with_secret_trigger = yes }
					NOT = { exists = scope:4007_secret_holder }
				}
				cp:councillor_chancellor = { save_scope_as = 4007_secret_holder }
			}
			else_if = {
				limit = {
					any_close_or_extended_family_member = {
						this != scope:stop_host_scope
						is_in_the_same_court_as = scope:stop_host_scope
						root = {
							can_add_hook = {
								target = prev #The family member
								type = suspicious_activity_hook
							}
						}
						any_secret = {
							NOT = { is_known_by = root }
						}
					}
					NOT = { exists = scope:4007_secret_holder }
				}
				random_close_or_extended_family_member = {
					limit = {
						this != scope:stop_host_scope
						is_in_the_same_court_as = scope:stop_host_scope
						root = {
							can_add_hook = {
								target = prev #The family member
								type = suspicious_activity_hook
							}
						}
						any_secret = {
							NOT = { is_known_by = root }
						}
					}
					save_scope_as = 4007_secret_holder
				}
			}
			else_if = {
				limit = {
					any_court_position_holder = {
						location = root.location
						this != scope:stop_host_scope
						root = {
							can_add_hook = {
								target = prev #The court position holder
								type = suspicious_activity_hook
							}
						}
						any_secret = {
							NOT = { is_known_by = root }
						}
					}
					NOT = { exists = scope:4007_secret_holder }
				}
				random_court_position_holder = {
					limit = {
						location = root.location
						this != scope:stop_host_scope
						root = {
							can_add_hook = {
								target = prev #The courtier
								type = suspicious_activity_hook
							}
						}
						any_secret = {
							NOT = { is_known_by = root }
						}
					}
					save_scope_as = 4007_secret_holder
				}
			}
		}
		scope:4007_secret_holder = {
			random_secret = {
				limit = {
					NOT = { is_known_by = root }
				}
				save_scope_as = 4007_secret_to_learn
			}
		}
		#Set up duel
		if = {
			limit = { intrigue > prowess }
			add_character_flag = 4007_highest_intrigue
		}
		else_if = {
			limit = { prowess > intrigue }
			add_character_flag = 4007_highest_prowess
		}
		else = {
			#If intrigue and prowess are equal
			random_list = {
				1 = {
					add_character_flag = 4007_highest_intrigue
				}
				1 = {
					add_character_flag = 4007_highest_prowess
				}
			}
		}
	}
	#Push further
	option = { 
		name = tour_general.4007.a
		if = {
			limit = { has_character_flag = 4007_highest_intrigue }
			4007_intrigue_or_prowess_skill_duel_effect = { SKILL = intrigue }
		}
		else_if = {
			limit = { has_character_flag = 4007_highest_prowess }
			4007_intrigue_or_prowess_skill_duel_effect = { SKILL = prowess }
		}
		stress_impact = {
			honest = minor_stress_impact_gain
			craven = minor_stress_impact_gain
			paranoid = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				OR = {
					has_trait = ambitious
					has_trait = brave
				}
				add = 50
			}
			ai_value_modifier = {
				ai_boldness = 2
				ai_energy = 1
				ai_honor = -1
			}
		}
	}
	#Settle for a weak hook
	option = { 
		name = tour_general.4007.b
		add_hook = {
			target = scope:4007_secret_holder
			type = suspicious_activity_hook
		}
		stress_impact = {
			ambitious = minor_stress_impact_gain
			brave = minor_stress_impact_gain
			deceitful = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50 
			modifier = {
				OR = {
					has_trait = paranoid
					has_trait = craven
				}
				add = 50
			}
			ai_value_modifier = {
				ai_honor = 1
				ai_energy = -1
				ai_boldness = -2
			}
		}
	}
	after = {
		remove_character_flag = 4007_highest_prowess
		remove_character_flag = 4007_highest_intrigue
	}
}
