﻿### EK NOTE: Plugged in our own character creation effects, additions to animals
# Events for handling the Hunt activity

namespace = hunt

## Hunt events
## by Linnéa Thimrén, Petter Vilberg, Bianca Savazzi, and Joe Parkin

############################
## Setup and maintenance events
## 0000-0999
############################

############################
## Random event chains
## 1000-3999
## by Linnéa Thimrén and Petter Vilberg
############################
#hunt.1001 - Generic hunt, chase the animal!
#hunt.1011 - A vassal rival, or a vassal that doesn't like you, is being an ass
#hunt.1021 - Beautiful Peasant Chain: Meet a beautiful peasant in the forest
#hunt.1023 - You have a dog that helps you to fell an animal

############################
## Random pulse
## 4000-4999
## by Linnéa Thimrén and Petter Vilberg
############################
#hunt.4003 - Run into poachers
#hunt.4005 - You bring down a particularly large animal - II
#hunt.4006 - Poor Peasants are foraging in the forest
#hunt.4007 - Run into a rampaging animal
#hunt.4008 - Hunt with your heir
#hunt.4009 - Someone has a murder/abduct scheme against you
#hunt.4010 - Someone has a murder/abduct scheme against a close family member
#hunt.4011 - Your lover has come with, sneak away together
#hunt.4012 - See glimpse of mystical animal
#hunt.4014 - A courtier is injured
#hunt.4015 - You walk in (out?) on lovers
#hunt.4016 - You fake a catch
#hunt.4018 - You get another glimpse of the mystical white animal
#hunt.4020 - Rally your clan to fell a large beast
#hunt.5001 - You get the urge to pick herbs and flowers
#hunt.5002 - Someone in your hunting party gets the urge to pick herbs and
#hunt.5060 - Find an eyas
#hunt.7001 - Meet local madman
#hunt.7020 - Boulder jumping
#hunt.7100 - Seduce intent convo

############################
## Choose your artifact events 
## 8001 - 8999	 
## by Bianca Savazzi
############################
#hunt.8001 - Hide or Skull?

############################
## Complication events
############################
#hunt.1002 - Chase goes well
#hunt.1012 - Do you shoot your murder target or not? - Ambush
#hunt.1080 - EP2: Party murders you
#hunt.3020 - EP2: Tracks skill check
#hunt.4009 - Participant has murder/abduct scheme against you (or you heir dislikes you)
#hunt.4010 - Participant has murder/abduct scheme against close family
#hunt.4910 - A guest is injured
#hunt.5010 - EP2: Fawning doe
#hunt.7011 - EP2: Trapped guest
#hunt_mystical_animal.1007 # Alice in Wonderland trip
#hunt.4018 - You get the mystical white animal!
#hunt.5050 - EP2: Falcon snatched

############################
## Outcome events
############################
#hunt.1003 # Chase success
#hunt.1004 # Chase failure
#hunt.1032 # Ambush success
#hunt.1033 # Ambush failure
#hunt.4001 # Stealth success
#hunt.1043 # Stealth failure
#hunt.1062 # Falconry success
#hunt.1063 # Falconry failure
#hunt.1052 # Captive success
#hunt.1053 # Captive failure
#hunt.4017 # Legendary animal found and killed 
#hunt.4019 # Substitute animal found
#hunt_mystical_animal.9001 # Legendary animal found and killed
#hunt_mystical_animal.1005 # Legendary animal found but escaped
#hunt.1090 # Legendary animal escaped
		
############################
## End-events
## 9000-9999
############################
#hunt.9001 - Hunt has ended in success
#hunt.9002 - Hunt has ended in failure
#hunt.4004 - You bring down a particularly large animal - I

#Things to use in hunt-events:
	# hunt_activity_standard_game_effect - find a game animal
	# hunt_activity_dangerous_game_effect - find a dangerous animal
	# hunt_activity_falconry_game_effect - find a falcon prey
	# hunt_activity_random_subordinate_participant_effect - save a subordinate on the hunt
	# hunt_activity_random_interest_participant_effect - save a notable guest
	# hunt_animal_melee_kill_effect - fight animal alone
	# hunt_animal_melee_kill_group_effect - fight animal with all hunters
	# hunt_animal_bow_kill_effect - try to shoot animal


#####################################
#	SETUP AND MAINTENANCE EVENTS	#
#	0000 - 0099						#
#####################################

#######################
#	Hunt invalidated
#	by Joe Parkin
#######################

# Death
hunt.0080 = {
	type = character_event
	title = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOR = {
						this = scope:host
						is_in_list = attendees
					}
				}
				desc = hunt.0080.t.inheritor
			}
			desc = hunt.0080.t
		}
	}
	desc = {
		first_valid = { # Summary
			# Dead Host
			triggered_desc = {
				trigger = {
					NOR = {
						this = scope:host
						is_in_list = attendees
					}
				}
				desc = hunt.0080.death_inheritor
			}
			triggered_desc = {
				trigger = {
					exists = scope:host.killer
					this = scope:killer
					NOR = {
						this = scope:host
						is_in_list = attendees
					}
				}
				desc = hunt.0080.death_inheritor_killer
			}
			# Dead Guest
			triggered_desc = {
				trigger = {
					exists = scope:host.killer
					this = scope:killer
					NOR = {
						this = scope:host
						is_in_list = attendees
					}
				}
				desc = hunt.0080.death_inheritor_killer
			}
			desc = hunt.0080.death
		}
		first_valid = {			
			triggered_desc = {
				trigger = {
					OR = {
						is_in_list = attendees
						this = scope:host
					}
					NAND = {
						has_character_flag = hunt_heir
						exists = scope:death_invalidation
						scope:invalidated_flavor ?= scope:host
					}
				}
				desc = hunt.0080.desc
			}
			desc = hunt.0080.desc_inheritor
		}
	}
	left_portrait = {
		character = root
		animation = worry
		trigger = { 
			OR = {
				is_in_list = attendees 
				this = scope:host
			}
		}
	}
	right_portrait = {
		character = scope:host
		trigger = {
			NOR = {
				this = root
				scope:invalidated_culprit ?= this 
			}
		}
		triggered_animation = {
			trigger = { is_alive = no }
			animation = loss_1
		}
		animation = stress
	}
	center_portrait = {
		character = scope:invalidated_flavor
		trigger = {
			exists = scope:invalidated_flavor
			NOR = {
				scope:invalidated_flavor ?= root
				scope:invalidated_flavor ?= scope:host
			}
		}
	}
	artifact = {
		position = lower_left_portrait
		target = scope:newly_created_artifact
		trigger = { exists = scope:newly_created_artifact }
	}
	theme = hunt_activity
	override_background = {
		trigger = { is_participant_in_activity = scope:activity }
		reference = wilderness
	}
	override_background = {
		trigger = {
			NOT = { is_participant_in_activity = scope:activity }
		}
		reference = relaxing_room
	}
	cooldown = { weeks = 1 }

	immediate = {
		if = {
			limit = {
				NOT = { this = scope:host }
			}
			hunt_invalidation_event_effect = yes
		}
		if = {
			limit = {
				NOR = {
					this = scope:host
					is_in_list = attendees
					exists = scope:legendary_invalidation
				}
				scope:host = { hunt_killed_by_animal_trigger = yes }
			}
			hunt_animal_from_death_effect = { DEAD = scope:host TARGET = root }
			hidden_effect = {
				save_scope_as = revenge_artifact
				create_artifact_wall_skull_effect = {
					OWNER = root
					HUNTER = root
					LEGENDARY = no
					ANIMAL = root.var:animal_type
				}
				if = {
					limit = { exists = scope:newly_created_artifact }
					scope:newly_created_artifact = {
						random_list = {
							1 = { set_artifact_name = hunt_revenge_skull_name_1 }
							1 = { set_artifact_name = hunt_revenge_skull_name_2 }
							1 = { set_artifact_name = hunt_revenge_skull_name_3 }
						}
						set_artifact_description = hunt_revenge_skull_desc
					}
				}
			}
		}
	}

	option = {
		name = hunt.0080.a
		if = {
			limit = { exists = scope:newly_created_artifact }
			hidden_effect = { destroy_artifact = scope:newly_created_artifact }
		}
		ai_chance = {
			base = 100
		}
	}

	option = {
		name = hunt.0080.b
		trigger = { exists = scope:revenge_artifact }
		scope:revenge_artifact = { save_scope_as = this_artifact }
		remove_short_term_gold = medium_gold_value
		send_interface_toast = {
			title = artifact.0012.t
			right_icon = scope:newly_created_artifact
			show_as_tooltip = {
				scope:newly_created_artifact = { set_owner = root }
			}
		}
		ai_chance = {
			base = 25
		}
	}

	option = {
		name = hunt.1013.a
		trigger = { this = scope:host }
		scope:activity = {
			set_variable = {
				name = hunt_invalidated
				value = flag:death
			}
			set_variable = {
				name = hunt_invalidated_flavor
				value = scope:invalidated_flavor
			}
			if = {
				limit = { exists = scope:invalidated_culprit }
				set_variable = {
					name = hunt_invalidated_culprit
					value = scope:invalidated_culprit
				}
			}
		}
		hunt_invalidation_event_effect = yes
		if = {
			limit = { exists = scope:newly_created_artifact }
			hidden_effect = { destroy_artifact = scope:newly_created_artifact }
		}
		ai_chance = {
			base = 25
		}
	}

	after = { remove_variable = animal_type }
}

# Wound Decision
hunt.0081 = {
	type = activity_event
	title = hunt.0081.t
	desc = {
		first_valid = { # Summary
			triggered_desc = {
				trigger = {
					NOR = {
						has_trait = wounded
						has_trait = maimed
					}
				}
				desc = hunt.0081.sick
			}
			desc = hunt.0081.wounded
		}
		first_valid = {
			triggered_desc = {
				trigger = { this = scope:host }
				desc = hunt.0081.host
			}
			desc = hunt.0081.guest
		}
	}
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				NOR = {
					has_trait = wounded
					has_trait = maimed
				}
			}
			animation = pain
		}
		triggered_animation = {
			trigger = {
				OR = {
					has_trait = wounded
					has_trait = maimed
				}
			}
			animation = sick
		}
	}
	right_portrait = {
		character = scope:host
		trigger = {
			NOT = { this = scope:host }
		}
		animation = worry
	}
	theme = hunt_activity

	trigger = {
		is_healthy = no
		OR = {
			has_trait = wounded
			has_character_flag = recent_hunt_wound
		}
		NOT = { has_character_flag = hunt_wound_ignored }
		NOT = { exists = scope:activity.var:hunt_success }
	}

	option = {
		name = hunt.0081.a
		if = {
			limit = { this = scope:host }
			scope:activity = {
				set_variable = {
					name = hunt_invalidated
					value = flag:wound
				}
				set_variable = {
					name = hunt_invalidated_flavor
					value = scope:host
				}
			}
			hunt_invalidation_event_effect = yes
		}
		else = {
			scope:host = {
				send_interface_toast = {
					title = hunt_wounded_guest_leaves_toast
					left_icon = root
					root = { remove_from_activity = scope:activity }
				}
			}
		}
		stress_impact = {
			brave = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
		}
	}

	option = {
		name = hunt.0081.b
		add_character_flag = hunt_wound_ignored
		stress_impact = {
			craven = minor_stress_impact_gain
			humble = minor_stress_impact_gain
		}
	}
}

# Host Imprisoned
hunt.0082 = {
	type = character_event
	title = hunt.0080.t
	desc = {
		first_valid = { # Summary
			# Host Imprisoned
			triggered_desc = {
				trigger = {
					scope:host = {
						is_alive = yes
						is_imprisoned = yes
					}
					this = scope:host
				}
				desc = hunt.0080.imprisoned_self
			}
			triggered_desc = {
				trigger = {
					scope:host = {
						is_alive = yes
						is_imprisoned = yes
					}
				}
				desc = hunt.0080.imprisoned
			}
		}
	}
	left_portrait = {
		character = root
		animation = worry
	}
	right_portrait = {
		character = scope:host
		animation = prisonhouse
	}
	lower_left_portrait = scope:host.imprisoner
	theme = hunt_activity
	cooldown = { weeks = 1 }

	immediate = {
		hunt_invalidation_event_effect = yes
		show_as_tooltip = {
			scope:host.imprisoner = {
				imprison = {
					target = scope:host
					type = house_arrest
				}
			}
		}
	}

	option = {
		name = hunt.0080.a
		custom_tooltip = hunt_ends_tt
	}
}

# Assassination Attempt
hunt.0083 = {
	type = character_event
	title = hunt.0082.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:invalidated_culprit }
				desc = hunt.0080.assassination_culprit
			}
			desc = hunt.0080.assassination
		}
	}
	left_portrait = {
		character = root
		animation = worry
		trigger = { is_in_list = attendees }
	}
	right_portrait = {
		character = scope:host
		trigger = {
			NOR = {
				this = root
				this = scope:invalidated_culprit
			}
		}
		animation = stress
	}
	lower_right_portrait = {
		character = scope:invalidated_flavor
		trigger = {
			exists = scope:invalidated_flavor
			NOR = {
				scope:invalidated_flavor = root
				scope:invalidated_flavor = scope:host
			}
		}
	}
	lower_center_portrait = {
		character = scope:invalidated_culprit
		trigger = {
			exists = scope:invalidated_culprit
			NOT = { scope:invalidated_culprit = root }
		}
	}
	theme = hunt_activity
	cooldown = { weeks = 1 }
	
	trigger = {
		# No need for invalidation ping for botched scheme targets
		NOR = {
			scope:invalidated_flavor ?= root
			scope:invalidated_culprit ?= root
		}
	}

	immediate = {
		if = {
			limit = {
				NOT = { this = scope:host }
			}
			hunt_invalidation_event_effect = yes
		}
		show_as_tooltip = {
			if = {
				limit = {
					exists = scope:invalidated_culprit
				}
				scope:invalidated_flavor = {
					add_opinion = {
						target = scope:invalidated_culprit
						modifier = attempted_murder_me_crime
					}
				}
			}
		}
	}

	option = {
		name = hunt.0082.a
		ai_chance = {
			base = 100
		}
	}

	option = {
		name = hunt.1013.a
		trigger = { this = scope:host }
		scope:activity = {
			set_variable = {
				name = hunt_invalidated
				value = flag:assassination_attempt
			}
			set_variable = {
				name = hunt_invalidated_flavor
				value = scope:invalidated_flavor
			}
			set_variable = {
				name = hunt_invalidated_culprit
				value = scope:invalidated_culprit
			}
		}
		hunt_invalidation_event_effect = yes
		ai_chance = {
			base = 25
		}
	}
}

# Abduction Attempt
hunt.0084 = {
	type = character_event
	title = hunt.0082.t
	desc = {
		desc = hunt.0080.abduction_attempt
		triggered_desc = {
			trigger = { exists = scope:invalidated_culprit }
			desc = hunt.0080.assassination_culprit
		}
	}
	left_portrait = {
		character = root
		animation = worry
		trigger = { is_in_list = attendees }
	}
	right_portrait = {
		character = scope:host
		trigger = {
			NOR = {
				this = root
				this = scope:invalidated_culprit
			}
		}
		animation = stress
	}
	lower_right_portrait = {
		character = scope:invalidated_flavor
		trigger = {
			exists = scope:invalidated_flavor
			NOR = {
				scope:invalidated_flavor = root
				scope:invalidated_flavor = scope:host
			}
		}
	}
	lower_center_portrait = {
		character = scope:invalidated_culprit
		trigger = {
			exists = scope:invalidated_culprit
			NOT = { scope:invalidated_culprit = root }
		}
	}
	theme = hunt_activity
	cooldown = { weeks = 1 }
	
	trigger = {
		# No need for invalidation ping for botched scheme targets
		NOR = {
			scope:invalidated_flavor ?= this
			scope:invalidated_culprit ?= this
		}
	}

	immediate = {
		if = {
			limit = {
				NOT = { this = scope:host }
			}
			hunt_invalidation_event_effect = yes
		}
		show_as_tooltip = {
			scope:invalidated_flavor = {
				add_opinion = {
					target = scope:invalidated_culprit
					modifier = attempted_abduct_me_crime
				}
			}
		}
	}

	option = {
		name = hunt.0082.a
		ai_chance = {
			base = 100
		}
	}

	option = {
		name = hunt.1013.a
		trigger = { this = scope:host }
		scope:activity = {
			set_variable = {
				name = hunt_invalidated
				value = flag:abduction_attempt
			}
			set_variable = {
				name = hunt_invalidated_flavor
				value = scope:invalidated_flavor
			}
			set_variable = {
				name = hunt_invalidated_culprit
				value = scope:invalidated_culprit
			}
		}
		hunt_invalidation_event_effect = yes
		ai_chance = {
			base = 25
		}
	}
}

# Abduction
hunt.0085 = {
	type = character_event
	title = hunt.0082.t
	desc = {
		desc = hunt.0080.abduction
		triggered_desc = {
			trigger = { exists = scope:invalidated_culprit }
			desc = hunt.0080.abduction_culprit
		}
	}
	left_portrait = {
		character = root
		animation = worry
		trigger = { is_in_list = attendees }
	}
	right_portrait = {
		character = scope:host
		trigger = {
			NOR = {
				this = root
				this = scope:invalidated_culprit
			}
		}
		animation = stress
	}
	lower_right_portrait = {
		character = scope:invalidated_flavor
		trigger = {
			exists = scope:invalidated_flavor
			NOR = {
				scope:invalidated_flavor = root
				scope:invalidated_flavor = scope:host
			}
		}
	}
	lower_center_portrait = {
		character = scope:invalidated_culprit
		trigger = {
			exists = scope:invalidated_culprit
			NOT = { scope:invalidated_culprit = root }
		}
	}
	theme = hunt_activity
	cooldown = { weeks = 1 }
	
	trigger = {
		# No need for invalidation ping for botched scheme targets
		NOR = {
			scope:abduct_target ?= this
			scope:invalidated_culprit ?= this
		}
	}

	immediate = {
		if = {
			limit = {
				NOT = { this = scope:host }
			}
			hunt_invalidation_event_effect = yes
		}
		show_as_tooltip = {
			hard_imprison_character_effect = {
				TARGET = scope:invalidated_flavor
				IMPRISONER = scope:invalidated_culprit
			}
			scope:invalidated_flavor = {
				add_opinion = {
					target = scope:invalidated_culprit
					modifier = abducted_me_opinion
				}
			}
		}
	}

	option = {
		name = hunt.0082.a
		ai_chance = {
			base = 100
		}
	}

	option = {
		name = hunt.1013.a
		trigger = { this = scope:host }
		scope:activity = {
			set_variable = {
				name = hunt_invalidated
				value = flag:abduction
			}
			set_variable = {
				name = hunt_invalidated_flavor
				value = scope:invalidated_flavor
			}
			set_variable = {
				name = hunt_invalidated_culprit
				value = scope:invalidated_culprit
			}
		}
		hunt_invalidation_event_effect = yes
		ai_chance = {
			base = 25
		}
	}
}

# Wound
hunt.0086 = {
	type = character_event
	title = hunt.0080.t
	desc = {
		first_valid = { # Summary
			# Wounded Guest
			triggered_desc = {
				trigger = { scope:invalidated_flavor ?= root }
				desc = hunt.0080.wounded_self
			}
			desc = hunt.0080.wounded
		}
	}
	left_portrait = {
		character = root
		animation = worry
		trigger = { is_in_list = attendees }
	}
	right_portrait = {
		character = scope:host
		trigger = {
			NOT = { this = root }
		}
		triggered_animation = {
			trigger = { is_alive = no }
			animation = loss_1
		}
		animation = stress
	}
	lower_right_portrait = {
		character = scope:invalidated_flavor
		trigger = {
			exists = scope:invalidated_flavor
			NOR = {
				scope:invalidated_flavor = root
				scope:invalidated_flavor = scope:host
			}
		}
	}
	theme = hunt_activity
	cooldown = { weeks = 1 }

	immediate = {
		hunt_invalidation_event_effect = yes
	}

	option = {
		name = hunt.0080.a
		custom_tooltip = hunt_ends_tt
	}
}

######################
# INVITATION EVENTS
# 0100 - 0199
# by Petter Vilberg
######################

# HOST: No guests showed up
# You're so alone.
# by Petter Vilberg
###
hunt.0110 = {
	type = activity_event
	title = hunt.0110.t
	desc = hunt.0110.desc
	theme = hunt_activity
	left_portrait = {
		character = scope:host
		animation = sadness
	}

	trigger = {
		scope:activity = {
			any_invited_character = {
				count > 1
				NOT = { this = root }
			}
			any_attending_character = {
				count < 1
				NOT = { this = root }
			}
		}
	}

	option = {
		name = feast.2003.a
		stress_impact = {
			base = minor_stress_impact_gain
			gregarious = minor_stress_impact_gain
		}
	}

	option = {
		name = feast.2003.b
		trigger = { has_trait = shy }
		exclusive = yes
		trait = shy
		stress_impact = {
			base = minor_stress_impact_loss
		}
	}
}

#####################
# Double booked - cancellation event
# by Linnéa Thimrén
#####################

hunt.0120 = {
	type = letter_event
	opening = { desc = feast.1501.opening }
	desc = hunt.0120.desc
	sender = scope:activity.activity_host
	orphan = yes

	immediate = {
		var:booked_for_a_party = { save_scope_as = other_host }
		decline_activity_invite = scope:activity
		scope:activity.activity_host = {
			add_opinion = {
				target = root
				modifier = insult_opinion
				opinion = -10
			}
		}
	}

	option = { name = feast.0010.a }
}

#########################
#	START EVENTS		#
#	0500-0999			#
#########################

scripted_effect hunt_activity_select_courtier_effect = {
	scope:activity = {
		random_attending_character = {
			limit = {
				OR = {
					has_court_position = master_of_hunt_court_position
					has_court_position = huntperson_camp_officer
				}
			}
			alternative_limit = { is_powerful_vassal_of = root }
			alternative_limit = {
				NOT = { this = root }
			}
			weight = {
				base = 1
				modifier = {
					add = 2
					has_trait = lifestyle_hunter
				}
			}
			save_scope_as = hunt_participant
		}
		set_variable = {
			name = participant_to_use
			value = scope:hunt_participant
			years = 1
		}
	}
}

scripted_effect hunt_activity_random_hunter_effect = {
	scope:activity = {
		if = {
			limit = {
				any_attending_character = {
					NOT = { this = root }
				}
			}
			random_attending_character = {
				limit = {
					OR = {
						has_court_position = master_of_hunt_court_position
						has_court_position = huntperson_camp_officer
						has_trait = lifestyle_hunter
					}
					OR = {
						has_trait = brave
						NOT = { has_trait = craven }
					}
					NOT = { this = root }
				}
				alternative_limit = {
					OR = {
						has_court_position = master_of_hunt_court_position
						has_court_position = huntperson_camp_officer
						has_trait = lifestyle_hunter
					}
					NOT = { this = root }
				}
				alternative_limit = {
					NOT = { this = root }
				}
				save_scope_as = hunt_participant
			}
		}
	}
}

scripted_effect hunt_activity_random_attending_character_effect = {
	scope:activity = {
		if = {
			limit = {
				any_attending_character = {
					NOT = { this = root }
				}
			}
			random_attending_character = {
				limit = {
					NOT = { this = root }
				}
				save_scope_as = hunt_participant
			}
		}
	}
}

################
#	Standard start
#	by Joe Parkin
################

hunt.0500 = {
	type = activity_event
	title = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity.activity_location.county = { has_county_modifier = hunt_sighting_standard_modifier }
				}
				desc = hunt.0500.t.sighting
			}
			triggered_desc = {
				trigger = {
					scope:activity.activity_location.county = { has_county_modifier = hunt_sighting_dangerous_modifier }
				}
				desc = hunt.0520.t.sighting
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:boar }
				desc = hunt.0500.t.boar
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:hart }
				desc = hunt.0500.t.hart
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:tiger }
				desc = hunt.0520.t.tiger
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:lion }
				desc = hunt.0520.t.lion
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:leopard }
				desc = hunt.0520.t.leopard
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:bear }
				desc = hunt.0520.t.bear
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:lynx }
				desc = hunt.0520.t.lynx
			}			
			triggered_desc = {
				trigger = {
					OR = {
						scope:activity.var:animal_type = flag:hyena
						scope:activity.var:animal_type = flag:wolf
					}
				}
				desc = hunt.0520.t.wolf
			}
			#EK ADDITION
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:alit }
				desc = hunt.0520.t.alit
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:cliff_strider }
				desc = hunt.0520.t.cliff_strider
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:senche_cougar }
				desc = hunt.0520.t.senche_cougar
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:assassin_beetle }
				desc = hunt.0520.t.assassin_beetle
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:nix_hound }
				desc = hunt.0520.t.nix_hound
			}
			# EK ADDITION END
			triggered_desc = {
				trigger = {
					scope:activity = {
						OR = {
							hunt_activity_deer_antelope_game_trigger = { VAR = var:animal_type }
							NOT = {
								activity_location = { hunt_animal_deer_antelope_trigger = yes }
							}
							var:animal_type = flag:bison
							var:animal_type = flag:aurochs
							# EK ADDITION
							var:animal_type = flag:bull_netch
							var:animal_type = flag:mammoth
							# EK ADDITION END
						}
					}
				}
				desc = hunt.0500.t.large
			}
			desc = hunt.0500.t.small
		}
	}
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:hunt_participant
					scope:hunt_participant = {
						OR = {
							has_court_position = master_of_hunt_court_position
							has_court_position = huntperson_camp_officer
						}
					}
				}
				desc = hunt_opening_master_of_hunt
			}
			triggered_desc = {
				trigger = { exists = scope:hunt_participant }
				desc = hunt_opening_hunt_leader
			}
			desc = hunt_opening
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity.activity_location = { has_building_or_higher = royal_forest_01 }
				}
				desc = hunt_opening_royal_reserves
			}
			triggered_desc = {
				trigger = {
					scope:activity.activity_location = { has_building_or_higher = hunting_grounds_01 }
				}
				desc = hunt_opening_hunting_grounds
			}
			desc = hunt_opening_rural
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity.activity_location.county = { has_county_modifier = hunt_sighting_standard_modifier }
				}
				desc = hunt_opening_standard_sighting
			}
			triggered_desc = {
				trigger = {
					scope:activity.activity_location.county = { has_county_modifier = hunt_sighting_dangerous_modifier }
				}
				desc = hunt_opening_dangerous_sighting
			}
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity = {
						activity_location.county = { has_county_modifier = hunt_sighting_dangerous_modifier }
						has_activity_option = { category = hunt_option_attendants option = hunt_attendants_few }
					}
				}
				desc = hunt_opening_entourage_few_dangerous
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						activity_location.county = { has_county_modifier = hunt_sighting_dangerous_modifier }
						has_activity_option = { category = hunt_option_attendants option = hunt_attendants_normal }
					}
				}
				desc = hunt_opening_entourage_normal_dangerous
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						activity_location.county = { has_county_modifier = hunt_sighting_dangerous_modifier }
						OR = {
							has_activity_option = { category = hunt_option_attendants option = hunt_attendants_many }
							government_has_flag = government_is_nomadic
						}
					}
				}
				desc = hunt_opening_entourage_many_dangerous
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = { category = hunt_option_attendants option = hunt_attendants_few }
					}
				}
				desc = hunt_opening_entourage_few
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = { category = hunt_option_attendants option = hunt_attendants_normal }
					}
				}
				desc = hunt_opening_entourage_normal
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						OR = {
							has_activity_option = { category = hunt_option_attendants option = hunt_attendants_many }
							government_has_flag = government_is_nomadic
						}
					}
				}
				desc = hunt_opening_entourage_many
			}
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						scope:activity.var:animal_type = flag:leopard
						scope:activity.var:animal_type = flag:lion
						scope:activity.var:animal_type = flag:tiger
					}
				}
				desc = hunt.0520.cat
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:bear }
				desc = hunt.0520.bear
			}
			triggered_desc = {
				trigger = {
					OR = {
						scope:activity.var:animal_type = flag:wolf
						scope:activity.var:animal_type = flag:hyena
						scope:activity.var:animal_type = flag:lynx
					}
				}
				desc = hunt.0520.wolf
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:boar }
				desc = hunt.0500.boar
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:hart }
				desc = hunt.0500.hart
			}			
			triggered_desc = {
				trigger = {
					OR = {
						scope:activity.var:animal_type = flag:antelope
						scope:activity.var:animal_type = flag:stag
					}
				}
				desc = hunt.0500.buck
			}
			triggered_desc = {
				trigger = {
					OR = {
						scope:activity.var:animal_type = flag:gazelle
						scope:activity.var:animal_type = flag:roe
					}
				}
				desc = hunt.0500.roe
			}
			triggered_desc = {
				trigger = {
					OR = {
						scope:activity.var:animal_type = flag:aurochs
						scope:activity.var:animal_type = flag:bison
						#EK ADDITION
						scope:activity.var:animal_type = flag:mammoth
						# EK ADDITION END
					}
				}
				desc = hunt.0500.bison
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						activity_location = { hunt_animal_bison_trigger = yes }
						NOT = { var:animal_type ?= flag:bison }
					}
				}
				desc = hunt.0500.no_bison
			}
			#EK ADDITION
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:alit }
				desc = hunt.0520.alit
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:cliff_strider }
				desc = hunt.0520.cliff_strider
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:senche_cougar }
				desc = hunt.0520.senche_cougar
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:assassin_beetle }
				desc = hunt.0520.assassin_beetle
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:ash_hopper }
				desc = hunt.0520.ash_hopper
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:nix_hound }
				desc = hunt.0520.nix_hound
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:bull_netch}
				desc = hunt.0520.bull_netch
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						activity_location = { geographical_region = mundus_tamriel_skyrim_solstheim }
						NOT = { var:animal_type ?= flag:tusked_bristleback }
					}
				}
				desc = hunt.0500.no_tusked_bristleback
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						activity_location = { 
							OR = {
								geographical_region = mundus_tamriel_elsweyr
								geographical_region = mundus_tamriel_valenwood
								geographical_region = mundus_tamriel_cyrodiil_gold_coast
							}
						}
						NOT = { var:animal_type ?= flag:antelope }
					}
				}
				desc = hunt.0500.no_antelope
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						activity_location = { 
							NOR = {
								geographical_region = mundus_tamriel_black_marsh
								geographical_region = mundus_tamriel_morrowind
							}
							hunt_animal_tropical_terrain_trigger = yes
						}
						NOT = { var:animal_type ?= flag:gazelle }
					}
				}
				desc = hunt.0500.no_gazelle
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						activity_location = { 
							OR = {
								geographical_region = mundus_tamriel_high_rock_greater_wrothgar
								geographical_region = mundus_tamriel_hammerfell_craglorn
								geographical_region = mundus_tamriel_high_rock_stormhaven
								geographical_region = mundus_tamriel_skyrim
							}
						}
						NOT = { var:animal_type ?= flag:elk }
					}
				}
				desc = hunt.0500.no_elk
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						activity_location = { 
							OR = {
								geographical_region = mundus_tamriel_summerset_isles
							}
						}
						NOT = { var:animal_type ?= flag:springbok }
					}
				}
				desc = hunt.0500.no_springbok
			}
			# EK ADDITION END
			desc = hunt.0500.no_deer
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					this = scope:host
					scope:activity.activity_location.county = {
						OR = {
							has_county_modifier = hunt_sighting_standard_modifier
							has_county_modifier = hunt_sighting_dangerous_modifier
						}
					}
				}
				desc = hunt_opening_sighting
			}
			triggered_desc = {
				trigger = {
					NOT = { this = scope:host }
				}
				desc = hunt.0500.guest
			}
			triggered_desc = {
				trigger = {
					exists = scope:hunt_participant
					#EK EDIT
					OR = {
						scope:activity.var:animal_type ?= flag:hart
						scope:activity.var:animal_type ?= flag:senche_lion
						scope:activity.var:animal_type ?= flag:senche_leopard
						scope:activity.var:animal_type ?= flag:alit
						scope:activity.var:animal_type ?= flag:senche_cougar
					}
					#scope:activity.var:animal_type ?= flag:hart
				}
				desc = hunt.0500.desc_prestigious
			}
			triggered_desc = {
				trigger = {
					exists = scope:hunt_participant
					hunt_activity_large_game_trigger = { VAR = scope:activity.var:animal_type }
				}
				desc = hunt.0500.desc_large
			}
			triggered_desc = {
				trigger = {
					exists = scope:hunt_participant
					scope:activity.activity_location = {
						OR = {
							hunt_animal_deer_antelope_trigger = yes
							hunt_animal_bison_trigger = yes
						}
					}
				}
				desc = hunt.0500.desc_small
			}
		}
	}
	theme = hunt_activity_camp
	left_portrait = {
		character = scope:host
		animation = thinking
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = hunting_knife_start
	}

	trigger = {
		scope:activity = {
			has_activity_option = { category = special_type option = hunt_type_standard }
		}
	}

	immediate = {
		if = {
			limit = { this = scope:host }
			scope:activity = {
				if = {
					limit = {
						exists = activity_location.county.var:animal_type
						OR = {
							activity_location.county = { has_county_modifier = hunt_sighting_standard_modifier }
							activity_location.county = { has_county_modifier = hunt_sighting_dangerous_modifier }
						}
					}
					set_variable = {
						name = animal_type
						value = scope:activity.activity_location.county.var:animal_type
					}
				}
				else = {
					hidden_effect = {
						#EK DISABLED: Events below are changed to not use this variable.
						#random = {
						#	chance = 50
						#	set_variable = backup_hare
						#}
						random_list = {
							4 = {
								hunt_activity_standard_game_effect = { PROVINCE = scope:activity.activity_location HUNTER = scope:host }
							}
							1 = {
								hunt_activity_dangerous_game_effect = { PROVINCE = scope:activity.activity_location }
							}
						}
					}
				}
			}
			hunt_activity_random_subordinate_participant_effect = {
				ARCHETYPE = hunter
				COMBATANT = yes
				SCOPE = hunt_participant
			}
		}
		else_if = {
			limit = { exists = scope:chose_smaller_game }
			show_as_tooltip = { hunt_activity_chose_smaller_game_effect = yes }
		}
		#EK ADDITION
		if = {
			limit = {
				this = scope:host
			}
			random_list = { # safe (vanilla fox and hare)
				10 = { # Fox
						trigger = {
							scope:activity = {
							NOT = { var:animal_type ?= flag:fox }
							activity_location = {
								hunt_animal_fox_trigger = yes
							}
							activity_location.county = {
								trigger_if = {
									limit = { exists = var:sighting_owner }
									NAND = {
										var:sighting_owner = root
										county = {
											OR = {
												has_county_modifier = hunt_sighting_standard_modifier
												has_county_modifier = hunt_sighting_dangerous_modifier
											}
										}
									}
								}
							}
						}
					}
					set_variable = {
						name = animal_option_safe
						value = flag:fox
					}
				}

				1 = { # Hare
					trigger = {
						this = scope:host
						scope:activity = {
							NOT = { var:animal_type ?= flag:hare }
							activity_location = {
								NOT = {
									county = {
										var:sighting_owner ?= root
										OR = {
											has_county_modifier = hunt_sighting_standard_modifier
											has_county_modifier = hunt_sighting_dangerous_modifier
										}
									}
								}
							}
						}
					}
					modifier = {
						add = 10 #A really poor hunter or a child has a higher chance of focusing on hunting a hare
						OR = {
							is_adult = no
							adventure_inspiration_average_skill_value < 2
						}
					}
					set_variable = {
						name = animal_option_safe
						value = flag:hare
					}
				}

				1 = { # Ringtail
					trigger = {
						this = scope:host
						scope:activity = {
							NOT = { var:animal_type ?= flag:ringtail }
							activity_location = {
								geographical_region = mundus_tamriel_summerset_isles
								NOT = {
									county = {
										var:sighting_owner ?= root
										OR = {
											has_county_modifier = hunt_sighting_standard_modifier
											has_county_modifier = hunt_sighting_dangerous_modifier
										}
									}
								}
							}
						}
					}
					modifier = {
						add = 10 #A really poor hunter or a child has a higher chance of focusing on hunting a ringtail
						OR = {
							is_adult = no
							adventure_inspiration_average_skill_value < 2
						}
					}
					set_variable = {
						name = animal_option_safe
						value = flag:ringtail
					}
				}

				1 = { # Badger
					trigger = {
						this = scope:host
						scope:activity = {
							NOT = { var:animal_type ?= flag:badger }
							activity_location = {
								OR = {
									geographical_region = mundus_tamriel_cyrodiil
									geographical_region = mundus_tamriel_elsweyr
								}
								NOT = {
									county = {
										var:sighting_owner ?= root
										OR = {
											has_county_modifier = hunt_sighting_standard_modifier
											has_county_modifier = hunt_sighting_dangerous_modifier
										}
									}
								}
							}
						}
					}
					modifier = {
						add = 10 #A really poor hunter or a child has a higher chance of focusing on hunting a badger
						OR = {
							is_adult = no
							adventure_inspiration_average_skill_value < 2
						}
					}
					set_variable = {
						name = animal_option_safe
						value = flag:badger
					}
				}

				1 = { # Ash Hopper
					trigger = {
						this = scope:host
						scope:activity = {
							NOT = { var:animal_type ?= flag:ash_hopper }
							activity_location = {
								geographical_region = mundus_tamriel_morrowind
								NOT = {
									county = {
										var:sighting_owner ?= root
										OR = {
											has_county_modifier = hunt_sighting_standard_modifier
											has_county_modifier = hunt_sighting_dangerous_modifier
										}
									}
								}
							}
						}
					}
					modifier = {
						add = 10 #A really poor hunter or a child has a higher chance of focusing on hunting an ash hopper
						OR = {
							is_adult = no
							adventure_inspiration_average_skill_value < 2
						}
					}
					set_variable = {
						name = animal_option_safe
						value = flag:ash_hopper
					}
				}

				1 = { # Rabbit
					trigger = {
						this = scope:host
						scope:activity = {
							NOT = { var:animal_type ?= flag:rabbit }
							activity_location = {
								NOT = {
									county = {
										var:sighting_owner ?= root
										OR = {
											has_county_modifier = hunt_sighting_standard_modifier
											has_county_modifier = hunt_sighting_dangerous_modifier
										}
									}
								}
							}
						}
					}
					modifier = {
						add = 10 #A really poor hunter or a child has a higher chance of focusing on hunting a rabbit
						OR = {
							is_adult = no
							adventure_inspiration_average_skill_value < 2
						}
					}
					set_variable = {
						name = animal_option_safe
						value = flag:rabbit
					}
				}

				1 = { # Scrib
					trigger = {
						this = scope:host
						scope:activity = {
							NOT = { scope:activity.var:animal_type ?= flag:scrib }
							activity_location = {
								OR = {
									geographical_region = mundus_tamriel_morrowind
									geographical_region = mundus_tamriel_black_marsh
								}
								NOT = {
									county = {
										var:sighting_owner ?= root
										OR = {
											has_county_modifier = hunt_sighting_standard_modifier
											has_county_modifier = hunt_sighting_dangerous_modifier
										}
									}
								}
							}
						}
					}
					modifier = {
						add = 10 #A really poor hunter or a child has a higher chance of focusing on hunting a scrib
						OR = {
							is_adult = no
							adventure_inspiration_average_skill_value < 2
						}
					}
					set_variable = {
						name = animal_option_safe
						value = flag:scrib
					}
				}
			}
			random_list = { # vim (vanilla wolf and hyena)
				20 = { # Hyena
					trigger = {
						NOT = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						location = { hunt_animal_hyena_trigger = yes }
					}
					set_variable = {
						name = animal_option_vim
						value = flag:hyena
					}
				}
				10 = { # Duneracer
					trigger = {
						NOT = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						location = { geographical_region = mundus_tamriel_hammerfell_craglorn }
					}
					set_variable = {
						name = animal_option_vim
						value = flag:duneracer
					}
				}
				10 = { # Crocodile
					trigger = {
						NOT = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						location = { geographical_region = mundus_tamriel_black_marsh }
					}
					set_variable = {
						name = animal_option_vim
						value = flag:crocodile
					}
				}
				10 = { # Wolf
					trigger = {
						NOT = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						location = {
							NOR = {
								geographical_region = mundus_tamriel_black_marsh
								geographical_region = mundus_tamriel_morrowind
								terrain = hills
								terrain = forest
								terrain = jungle
								terrain = mountains
							}
						}
					}
					set_variable = {
						name = animal_option_vim
						value = flag:wolf
					}
				}
				5 = { # Nix-Hound
					trigger = {
						NOT = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						location = {
							OR = {
								geographical_region = mundus_tamriel_morrowind 
							}
						}
					}
					set_variable = {
						name = animal_option_vim
						value = flag:nix_hound
					}
				}
				10 = { # Assassin Beetle
					trigger = {
						NOT = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						location = {
							geographical_region = mundus_tamriel_hammerfell
						}
					}
					set_variable = {
						name = animal_option_vim
						value = flag:assassin_beetle
					}
				}
				20 = { # Boar
					trigger = {
						scope:activity = {
							NOT = { var:animal_type ?= flag:boar }
						}
						location = {
							hunt_animal_boar_trigger = yes
							NOR = {
								geographical_region = mundus_tamriel_black_marsh
								geographical_region = mundus_tamriel_morrowind
								terrain = hills
								terrain = forest
								terrain = jungle
								terrain = mountains
							}
						}
					}
					set_variable = {
						name = animal_option_vim
						value = flag:boar
					}
				}
				5 = { # Lynx
					trigger = {
						NOT = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						location = {
							hunt_animal_lynx_trigger = yes
						}
					}
					set_variable = {
						name = animal_option_vim
						value = flag:lynx
					}
				}

				5 = { # Bear
					trigger = {
						NOT = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						location = {
							NOR = {
								geographical_region = mundus_tamriel_morrowind
								geographical_region = mundus_tamriel_black_marsh
							}
						}
					}
					set_variable = {
						name = animal_option_vim
						value = flag:bear
					}
				}

				5 = { # Lion
					trigger = {
						NOT = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						location = {
							hunt_animal_big_cat_trigger = yes
							hunt_animal_lion_trigger = yes
						}
					}
					modifier = {
						factor = 5							
						location = {
							OR = {
								terrain = desert
								terrain = forest
							}
						}
					}
					set_variable = {
						name = animal_option_vim
						value = flag:lion
					}
				}

				5 = { # Tiger
					trigger = {
						NOT = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						location = {
							hunt_animal_big_cat_trigger = yes
							hunt_animal_tiger_trigger = yes
						}
					}
					modifier = {
						factor = 5							
						location = { terrain = jungle }
					}
					set_variable = {
						name = animal_option_vim
						value = flag:tiger
					}
				}

				5 = { # Alit
					trigger = {
						NOT = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						location = {
							OR = {
								geographical_region = mundus_tamriel_morrowind 
								geographical_region = mundus_tamriel_black_marsh
								geographical_region = mundus_tamriel_elsweyr
							}
						}
					}
					set_variable = {
						name = animal_option_vim
						value = flag:alit
					}
				}

				5 = { # Cliff Strider
					trigger = {
						NOT = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						location = {
							OR = {
								geographical_region = mundus_tamriel_morrowind 
							}
						}
					}
					set_variable = {
						name = animal_option_vim
						value = flag:cliff_strider
					}
				}

				5 = { # Leopard
					trigger = {
						NOT = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						location = {
							hunt_animal_big_cat_trigger = yes
							hunt_animal_leopard_trigger = yes
						}
					}
					modifier = {
						factor = 0.5							
						location = {
							OR = {
								terrain = desert
								terrain = mountains
							}
						}
					}
					set_variable = {
						name = animal_option_vim
						value = flag:leopard
					}
				}

				5 = { # Senche-Cougar
					trigger = {
						NOT = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						location = {
							hunt_animal_big_cat_trigger = yes
							OR = {
								geographical_region = mundus_tamriel_elsweyr
								geographical_region = mundus_tamriel_valenwood
							}
						}
					}
					set_variable = {
						name = animal_option_vim
						value = flag:senche_cougar
					}
				}

				5 = { # Senche-Lion
					trigger = {
						NOT = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						location = {
							hunt_animal_big_cat_trigger = yes
							OR = {
								geographical_region = mundus_tamriel_elsweyr
								geographical_region = mundus_tamriel_valenwood
							}
						}
					}
					set_variable = {
						name = animal_option_vim
						value = flag:senche_lion
					}
				}

				5 = { # Senche-Lion
					trigger = {
						NOT = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						location = {
							hunt_animal_big_cat_trigger = yes
							OR = {
								geographical_region = mundus_tamriel_elsweyr
								geographical_region = mundus_tamriel_valenwood
							}
						}
					}
					set_variable = {
						name = animal_option_vim
						value = flag:senche_leopard
					}
				}
			}
		}
		scope:activity = {
			set_variable = {
				name = hunt_success_chance
				value = hunt_success_chance_value
			}
		}
	}

	option = { # We'll chase it!
		name = hunt.0500.a
		custom_tooltip = hunt_seek_current_tt
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 1
			}
		}
	}

	# EK EDIT: Vim options

	option = { # I want a hyena!
		name = hunt.0500.f
		trigger = {
			this = scope:host
			exists = var:animal_option_vim
			var:animal_option_vim = flag:hyena
		}
		custom_tooltip = hunt_seek_hyena_tt
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:hyena
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:hyena
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_medium }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want a duneracer!
		name = hunt.0500.f
		trigger = {
			this = scope:host
			exists = var:animal_option_vim
			var:animal_option_vim = flag:duneracer
		}
		custom_tooltip = hunt_seek_duneracer_tt
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:duneracer
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:duneracer
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_major }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want a crocodile!
		name = hunt.0500.f
		trigger = {
			this = scope:host
			exists = var:animal_option_vim
			var:animal_option_vim = flag:crocodile
		}
		custom_tooltip = hunt_seek_crocodile_tt
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:crocodile
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:crocodile
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_major }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want a wolf!
		name = hunt.0500.f
		trigger = {
			this = scope:host
			exists = var:animal_option_vim
			var:animal_option_vim = flag:wolf
		}
		custom_tooltip = hunt_seek_wolf_tt
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:wolf
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:wolf
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_medium }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want a nix-hound!
		name = hunt.0500.f
		trigger = {
			this = scope:host
			exists = var:animal_option_vim
			var:animal_option_vim = flag:nix_hound
		}
		custom_tooltip = hunt_seek_nix_hound_tt
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:nix_hound
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:nix_hound
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_medium }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want an assassin beetle!
		name = hunt.0500.f
		trigger = {
			this = scope:host
			exists = var:animal_option_vim
			var:animal_option_vim = flag:assassin_beetle
		}
		custom_tooltip = hunt_seek_assassin_beetle_tt
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:assassin_beetle
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:assassin_beetle
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_medium }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want a boar!
		name = hunt.0500.f
		trigger = {
			this = scope:host
			exists = var:animal_option_vim
			var:animal_option_vim = flag:boar
		}
		custom_tooltip = hunt_seek_boar_tt
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:boar
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:boar
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_medium }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want a lynx!
		name = hunt.0500.f
		trigger = {
			this = scope:host
			exists = var:animal_option_vim
			var:animal_option_vim = flag:lynx
		}
		custom_tooltip = hunt_seek_lynx_tt
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:lynx
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:lynx
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_medium }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want a bear!
		name = hunt.0500.f
		trigger = {
			this = scope:host
			exists = var:animal_option_vim
			var:animal_option_vim = flag:bear
		}
		custom_tooltip = hunt_seek_bear_tt
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:bear
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:bear
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_major }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want a lion!
		name = hunt.0500.f
		trigger = {
			this = scope:host
			exists = var:animal_option_vim
			var:animal_option_vim = flag:lion
		}
		custom_tooltip = hunt_seek_lion_tt
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:lion
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:lion
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_major }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want a tiger!
		name = hunt.0500.f
		trigger = {
			this = scope:host
			exists = var:animal_option_vim
			var:animal_option_vim = flag:tiger
		}
		custom_tooltip = hunt_seek_tiger_tt
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:tiger
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:tiger
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_major }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want an alit!
		name = hunt.0500.f
		trigger = {
			this = scope:host
			exists = var:animal_option_vim
			var:animal_option_vim = flag:alit
		}
		custom_tooltip = hunt_seek_alit_tt
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:alit
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:alit
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_major }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want a cliff strider!
		name = hunt.0500.f
		trigger = {
			this = scope:host
			exists = var:animal_option_vim
			var:animal_option_vim = flag:cliff_strider
		}
		custom_tooltip = hunt_seek_cliff_strider_tt
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:cliff_strider
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:cliff_strider
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_major }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want a leopard!
		name = hunt.0500.f
		trigger = {
			this = scope:host
			exists = var:animal_option_vim
			var:animal_option_vim = flag:leopard
		}
		custom_tooltip = hunt_seek_leopard_tt
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:leopard
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:leopard
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_major }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want a senche-cougar!
		name = hunt.0500.f
		trigger = {
			this = scope:host
			exists = var:animal_option_vim
			var:animal_option_vim = flag:senche_cougar
		}
		custom_tooltip = hunt_seek_senche_cougar_tt
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:senche_cougar
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:senche_cougar
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_major }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want a senche-lion!
		name = hunt.0500.f
		trigger = {
			this = scope:host
			exists = var:animal_option_vim
			var:animal_option_vim = flag:senche_lion
		}
		custom_tooltip = hunt_seek_senche_lion_tt
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:senche_lion
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:senche_lion
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_major }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want a senche-leopard!
		name = hunt.0500.f
		trigger = {
			this = scope:host
			exists = var:animal_option_vim
			var:animal_option_vim = flag:senche_leopard
		}
		custom_tooltip = hunt_seek_senche_leopard_tt
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:senche_leopard
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:senche_leopard
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_major }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	# EK EDIT: Safe options

	option = { # I want to hunt a fox!
		name = hunt.0500.b
		trigger = {
			this = scope:host
			scope:activity = {
				NOT = { var:animal_type ?= flag:fox }
				activity_location = {
					hunt_animal_fox_trigger = yes
				}
				activity_location.county = {
					trigger_if = {
						limit = { exists = var:sighting_owner }
						NAND = {
							var:sighting_owner = root
							county = {
								OR = {
									has_county_modifier = hunt_sighting_standard_modifier
									has_county_modifier = hunt_sighting_dangerous_modifier
								}
							}
						}
					}
				}
				NOT = { has_variable = backup_hare }
			}
		}
		custom_tooltip = hunt_seek_fox_tt
		if = {
			limit = {
				hunt_activity_large_game_trigger = { VAR = scope:activity.var:animal_type }
			}
			hunt_activity_chose_smaller_game_effect = yes
		}
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:fox
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:fox
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_medium }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want to hunt a badger!
		name = hunt.0500.badger
		trigger = {
			this = scope:host
			exists = var:animal_option_safe
			var:animal_option_safe = flag:badger
		}
		custom_tooltip = hunt_seek_fox_tt
		if = {
			limit = {
				hunt_activity_large_game_trigger = { VAR = scope:activity.var:animal_type }
			}
			hunt_activity_chose_smaller_game_effect = yes
		}
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:badger
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:badger
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_medium }
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want to hunt a hare!
		name = hunt.0500.c
		trigger = {
			this = scope:host
			scope:activity = {
				NOT = { var:animal_type ?= flag:hare }
				activity_location = {
					NOT = {
						county = {
							var:sighting_owner ?= root
							OR = {
								has_county_modifier = hunt_sighting_standard_modifier
								has_county_modifier = hunt_sighting_dangerous_modifier
							}
						}
					}
				}
				has_variable = backup_hare
			}
		}
		custom_tooltip = hunt_seek_hare_tt
		if = {
			limit = {
				hunt_activity_large_game_trigger = { VAR = scope:activity.var:animal_type }
			}
			hunt_activity_chose_smaller_game_effect = yes
		}
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:hare
			}
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want to hunt an ash hopper!
		name = hunt.0500.ash_hopper
		trigger = {
			this = scope:host
			exists = var:animal_option_safe
			var:animal_option_safe = flag:ash_hopper
		}
		custom_tooltip = hunt_seek_ash_hopper_tt
		if = {
			limit = {
				hunt_activity_large_game_trigger = { VAR = scope:activity.var:animal_type }
			}
			hunt_activity_chose_smaller_game_effect = yes
		}
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:ash_hopper
			}
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want to hunt a ringtail!
		name = hunt.0500.ringtail
		trigger = {
			this = scope:host
			exists = var:animal_option_safe
			var:animal_option_safe = flag:ringtail
		}
		custom_tooltip = hunt_seek_ringtail_tt
		if = {
			limit = {
				hunt_activity_large_game_trigger = { VAR = scope:activity.var:animal_type }
			}
			hunt_activity_chose_smaller_game_effect = yes
		}
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:ringtail
			}
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want to hunt a rabbit!
		name = hunt.0500.rabbit
		trigger = {
			this = scope:host
			exists = var:animal_option_safe
			var:animal_option_safe = flag:rabbit
		}
		custom_tooltip = hunt_seek_rabbit_tt
		if = {
			limit = {
				hunt_activity_large_game_trigger = { VAR = scope:activity.var:animal_type }
			}
			hunt_activity_chose_smaller_game_effect = yes
		}
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:rabbit
			}
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want to hunt a scrib!
		name = hunt.0500.scrib
		trigger = {
			this = scope:host
			exists = var:animal_option_safe
			var:animal_option_safe = flag:scrib
		}
		custom_tooltip = hunt_seek_scrib_tt
		if = {
			limit = {
				hunt_activity_large_game_trigger = { VAR = scope:activity.var:animal_type }
			}
			hunt_activity_chose_smaller_game_effect = yes
		}
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:scrib
			}
		}
		ai_chance = {
			base = 5
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # I want to hunt a deer!
		name = hunt.0500.d
		trigger = {
			this = scope:host
			scope:activity = {
				activity_location = {
					NOT = {
						county = { has_county_modifier = hunt_sighting_standard_modifier } # TODO_CD_EP2 check known for player
						county = { has_county_modifier = hunt_sighting_dangerous_modifier } # TODO_CD_EP2 check known for player
					}
					hunt_animal_deer_antelope_trigger = yes
				}
				NOR = {
					var:animal_type ?= flag:stag
					var:animal_type ?= flag:hart
					var:animal_type ?= flag:antelope
					var:animal_type ?= flag:reindeer
					var:animal_type ?= flag:elk
					#EK ADDITION
					var:animal_type ?= flag:springbok
					var:animal_type ?= flag:addax
					#EK DISABLED
					#var:animal_type ?= flag:saiga
				}
			}
		}
		scope:activity = {
			hidden_effect = {
				hunt_activity_deer_game_effect = { PROVINCE = activity_location }
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:deer
			}
		}
		custom_tooltip = hunt_seek_buck_tt
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_major }
		}
		stress_impact = {
			calm = minor_stress_impact_gain
			humble = minor_stress_impact_gain
			patient = minor_stress_impact_gain
			content = minor_stress_impact_gain
		}
		ai_chance = {
			base = 1
			ai_value_modifier = {
				ai_boldness = 0.25
				ai_energy = 0.25
				ai_greed = 0.25
				ai_rationality = -0.25
			}
		}
	}

	option = { # Hunt captive
		name = hunt.0520.b
		trigger = {
			this = scope:host
			has_character_modifier = hunt_captive_beast_modifier
			has_variable = captive_animal_type
		}
		scope:activity = {
			set_variable = {
				name = animal_type
				value = scope:host.var:captive_animal_type
			}
			set_variable = captive_release
		}
		remove_character_modifier = hunt_captive_beast_modifier
		custom_tooltip = hunt_captive_animal_tt
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = increase_major }
		}
		ai_chance = {
			base = 10
		}
	}

	after = {
		if = {
			limit = { this = scope:host }
			scope:activity = {
				every_attending_character = {
					limit = {
						NOT = { this = scope:host }
					}
					trigger_event = hunt.0500
				}
				set_variable = hunt_started
				add_activity_log_entry = {
					key = hunt_quarry_selected_log
					score = 25
					tags = { quarry }
					character = scope:host
				}
				set_variable = {
					name = hunt_success_chance
					value = hunt_success_chance_value
				}
			}
		}
	}
}

################
#	Adventurer Purchases Hunting Rights
################

hunt.1337 = {
	type = activity_event
	title = hunt.1337.t
	desc = hunt.1337.desc
	theme = hunt_activity_camp
	left_portrait = {
		character = scope:host
		animation = betting
	}
	center_portrait = {
		character = scope:center_portrait
		animation = survey
		camera = camera_event_right
	}
	right_portrait = {
		character = scope:barony_holder
		animation = chancellor
	}

	trigger = {
	}

	immediate = {
		capital_province = {
			save_scope_as = home
		}
		if = {
			limit = {
				has_variable_list = allowed_hunting_baronies
				any_in_list = {
					variable = allowed_hunting_baronies
					this = root.location
				}
			}
			save_scope_as = allowed_to_hunt
		}
		if = {
			limit = { 
				exists = scope:activity.activity_location.barony.holder
			}
			scope:activity.activity_location.barony.holder = {
				save_scope_as = barony_holder
			}
		}
		else = {
			scope:activity.activity_location.county.holder = {
				save_scope_as = barony_holder
			}
		}
		if = {
			limit = {
				scope:activity.activity_location.county.empire = {
					any_in_de_jure_hierarchy = {
						holder ?= {
							top_liege = scope:activity.activity_location.county.holder.top_liege
							any_sub_realm_county = {
								this = scope:activity.activity_location.county
							}
							OR = {
								has_relation_friend = root
								has_relation_lover = root
								root = { has_hook = prev }
								opinion = {
									target = root
									value >= 50
								}
							}
						}
					}
				}
			}
			scope:activity.activity_location.county.empire = {
				random_in_de_jure_hierarchy = {
					limit = {
						holder ?= {
							top_liege = scope:activity.activity_location.county.holder.top_liege
							any_sub_realm_county = {
								this = scope:activity.activity_location.county
							}
							OR = {
								has_relation_friend = root
								has_relation_lover = root
								root = { has_hook = prev }
								opinion = {
									target = root
									value >= 50
								}
							}
						}
					}
					holder = {
						save_scope_as = favor_to_call_in
					}
				}
			}
			if = {
				limit = {
					exists = scope:favor_to_call_in
					NOT = { scope:favor_to_call_in = scope:barony_holder }
				}
				scope:favor_to_call_in = { save_scope_as = center_portrait }
			}
		}
	}

	option = { # Call in favor
		name = hunt.1337.a
		trigger = {
			exists = scope:favor_to_call_in
			NOT = { exists = scope:allowed_to_hunt }
		}
		if = {
			limit = {
				has_usable_hook = scope:favor_to_call_in
				NOR = {
					has_relation_friend = scope:favor_to_call_in
					has_relation_lover = scope:favor_to_call_in
					reverse_opinion = {
						target = scope:favor_to_call_in
						value >= 50
					}
				}
			}
			use_hook = scope:favor_to_call_in
		}
		add_prestige = minor_prestige_gain
		hunt_activity_success_change_effect = { CHANGE = increase_adventurer_initial_medium }
		add_to_variable_list = {
			name = allowed_hunting_baronies
			target = root.location
		}
		ai_chance = {
			base = 10
		}
	}

	option = { # Poach
		name = hunt.1337.b
		trigger = {
			NOT = { exists = scope:allowed_to_hunt }
		}
		hunt_activity_success_change_effect = { CHANGE = increase_adventurer_initial_high }
		reverse_add_opinion = {
			target = scope:barony_holder
			modifier = poacher_opinion
		}
		if = {
			limit = {
				NOT = { has_trait = gallowsbait }
			}
			add_trait = gallowsbait
		}
		add_trait_xp = {
			trait = gallowsbait
			track = poacher
			value = 15
		}
		stress_impact = {
			greedy = minor_stress_impact_loss
			arrogant = minor_stress_impact_loss
			sadistic = minor_stress_impact_loss
			compassionate = minor_stress_impact_gain
			generous = minor_stress_impact_gain
			just = minor_stress_impact_gain
		}
		ai_chance = {
			base = 10
		}
	}

	option = { # Pay fee
		name = hunt.1337.c
		trigger = {
			NOT = { exists = scope:allowed_to_hunt }
		}
		hunt_activity_success_change_effect = { CHANGE = increase_adventurer_initial_medium }
		pay_short_term_gold = {
			target = scope:barony_holder
			gold = scope:barony_holder.minor_gold_value
		}
		add_to_variable_list = {
			name = allowed_hunting_baronies
			target = root.location
		}
		stress_impact = {
			compassionate = minor_stress_impact_loss
			generous = minor_stress_impact_loss
			just = minor_stress_impact_loss
			greedy = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
			sadistic = minor_stress_impact_gain
		}
		ai_chance = {
			base = 10
		}
	}

	option = { # Already payed!
		name = hunt.1337.e
		trigger = {
			exists = scope:allowed_to_hunt
		}
		hunt_activity_success_change_effect = { CHANGE = increase_adventurer_initial_medium }
		ai_chance = {
			base = 10
		}
	}

	option = { # Back out
		name = hunt.1337.d

		add_character_flag = no_claims_to_land
		scope:activity = {
			set_variable = {
				name = hunt_invalidated
				value = flag:landless
			}
			set_variable = {
				name = hunt_invalidated_flavor
				value = root
			}
			set_variable = {
				name = hunt_invalidated_culprit
				value = scope:barony_holder
			}
		}
		hunt_invalidation_event_effect = yes

		#custom_tooltip = hunt_ends_tt
		ai_chance = {
			base = 10
		}
	}
}

################
#	Legendary start
#	by Joe Parkin
################

hunt.0510 = {
	type = activity_event
	title = hunt.0510.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:hunt_participant
					scope:hunt_participant = {
						OR = {
							has_court_position = master_of_hunt_court_position
							has_court_position = huntperson_camp_officer
						}
					}
				}
				desc = hunt_opening_master_of_hunt
			}
			triggered_desc = {
				trigger = { exists = scope:hunt_participant  }
				desc = hunt_opening_hunt_leader
			}
			desc = hunt_opening
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity.activity_location = { has_building_or_higher = royal_forest_01 }
				}
				desc = hunt_opening_royal_reserves
			}
			triggered_desc = {
				trigger = {
					scope:activity.activity_location = { has_building_or_higher = hunting_grounds_01 }
				}
				desc = hunt_opening_hunting_grounds
			}
			desc = hunt_opening_rural
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = { category = hunt_option_attendants option = hunt_attendants_few }
					}
				}
				desc = hunt_opening_entourage_few
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = { category = hunt_option_attendants option = hunt_attendants_normal }
					}
				}
				desc = hunt_opening_entourage_normal
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						OR = {
							has_activity_option = { category = hunt_option_attendants option = hunt_attendants_many }
							government_has_flag = government_is_nomadic
						}
					}
				}
				desc = hunt_opening_entourage_many
			}
		}
		desc = hunt.0510.desc
	}
	theme = hunt_activity_camp
	left_portrait = {
		character = scope:host
		animation = thinking
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = admiration
	}

	trigger = {
		scope:activity = {
			has_activity_option = { category = special_type option = hunt_type_legendary }
		}
	}

	immediate = {
		if = {
			limit = { this = scope:host }
			scope:activity = {
				set_variable = {
					name = animal_type
					value = scope:activity.activity_location.county.var:animal_type
				}
			}
			hunt_activity_random_subordinate_participant_effect = {
				ARCHETYPE = hunter
				COMBATANT = yes
				SCOPE = hunt_participant
			}
		}
	}

	option = { # We'll chase it!
		name = hunt.0510.a
		custom_tooltip = hunt_seek_current_legendary_tt
		ai_chance = {
			base = 10
		}
	}

	after = {
		if = {
			limit = { this = scope:host }
			scope:activity = {
				every_attending_character = {
					limit = {
						NOT = { this = scope:host }
					}
					trigger_event = hunt.0510
				}
				set_variable = hunt_started
				add_activity_log_entry = {
					key = hunt_quarry_legendary_log
					score = 50
					tags = { quarry }
					character = scope:host
				}
				set_variable = {
					name = hunt_success_chance
					value = hunt_success_chance_value
				}
			}
		}
	}
}

################
#	Falconry start
#	by Joe Parkin
################

hunt.0530 = {
	type = activity_event
	title = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity.activity_location.county = { has_county_modifier = hunt_sighting_dangerous_modifier }
				}
				desc = hunt.0530.t.sighting
			}
			
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:lion }
				desc = hunt.0530.t.rare
			}
			desc = hunt.0530.t.common
		}
	}
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:hunt_participant
					scope:hunt_participant = {
						OR = {
							has_court_position = master_of_hunt_court_position
							has_court_position = huntperson_camp_officer
						}
					}
				}
				desc = hunt_opening_master_of_hunt
			}
			triggered_desc = {
				trigger = { exists = scope:hunt_participant }
				desc = hunt_opening_hunt_leader
			}
			desc = hunt_opening
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity.activity_location = { has_building_or_higher = royal_forest_01 }
				}
				desc = hunt_opening_royal_reserves
			}
			triggered_desc = {
				trigger = {
					scope:activity.activity_location = { has_building_or_higher = hunting_grounds_01 }
				}
				desc = hunt_opening_hunting_grounds
			}
			desc = hunt_opening_rural
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity.activity_location.county = { has_county_modifier = hunt_sighting_dangerous_modifier }
				}
				desc = hunt_opening_falconry_sighting
			}
			desc = hunt_opening_falconry
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = { category = hunt_option_attendants option = hunt_attendants_few }
					}
				}
				desc = hunt_opening_entourage_few_falconry
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = { category = hunt_option_attendants option = hunt_attendants_normal }
					}
				}
				desc = hunt_opening_entourage_normal_falconry
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						OR = {
							has_activity_option = { category = hunt_option_attendants option = hunt_attendants_many }
							government_has_flag = government_is_nomadic
						}
					}
				}
				desc = hunt_opening_entourage_many_falconry
			}
		}
	}
	theme = hunt_activity_camp
	left_portrait = {
		character = scope:host
		animation = hunting_falcon
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = admiration
	}

	trigger = {
		has_dlc_feature = tours_and_tournaments
		scope:activity = {
			has_activity_option = { category = special_type option = hunt_type_falconry }
		}
	}

	immediate = {
		if = {
			limit = { this = scope:host }
			scope:activity = {
				hidden_effect = {
					random_list = {
						2 = {
							set_variable = {
								name = raptor_type
								value = flag:hawk
							}
						}
						2 = {
							set_variable = {
								name = raptor_type
								value = flag:falcon
							}
						}
					}
				}
				if = {
					limit = {
						exists = activity_location.county.var:animal_type
						activity_location.county = { has_county_modifier = hunt_sighting_falconry_modifier }
					}
					set_variable = {
						name = animal_type
						value = scope:activity.activity_location.county.var:animal_type
					}
				}
				hidden_effect = {
					hunt_activity_falconry_game_effect = { PROVINCE = scope:activity.activity_location }
				}
			}
			hunt_activity_random_subordinate_participant_effect = {
				ARCHETYPE = hunter
				COMBATANT = yes
				SCOPE = hunt_participant
			}
		}		
		hidden_effect = {
			if = {
				limit = {
					NOR = {
						AND = {
							exists = scope:activity.var:animal_type
							OR = {
								scope:activity.var:animal_type = flag:swan
								scope:activity.var:animal_type = flag:duck
								scope:activity.var:animal_type = flag:goose
							}
						}
						location = {
							OR = {
								terrain = desert
								terrain = desert_mountains
								terrain = jungle
								terrain = drylands
							}
						}
					}
				}
				scope:activity = {
					hunt_falconry_select_waterfowl_effect = { VAR = waterfowl_type PROVINCE = activity_location }
				}
			}
			if = {
				limit = {
					exists = scope:activity.var:animal_type
					NOR = {
						scope:activity.var:animal_type = flag:grouse
						scope:activity.var:animal_type = flag:bustard
						scope:activity.var:animal_type = flag:pheasant
						scope:activity.var:animal_type = flag:quail
					}
				}
				scope:activity = {
					hunt_falconry_select_gamebird_effect = { VAR = gamebird_type PROVINCE = activity_location }
				}
			}
		}
	}

	option = { # We'll chase it!
		name = hunt.0500.a
		custom_tooltip = hunt_seek_current_falconry_tt
		ai_chance = {
			base = 10
		}
	}

	option = { # Waterfowl
		name = hunt.0530.b
		trigger = {
			this = scope:host
			exists = scope:activity.var:waterfowl_type
		}
		custom_tooltip = hunt_seek_waterfowl_falconry_tt
		if = {
			limit = {
				hunt_activity_exotic_bird_trigger = { VAR = scope:activity.var:animal_type }
			}
			hunt_activity_chose_smaller_game_effect = yes
		}
		scope:activity = {
			set_variable = {
				name = animal_type
				value = scope:activity.var:waterfowl_type
			}
		}
		ai_chance = {
			base = 10
		}
	}

	option = { # Game
		name = hunt.0530.c
		trigger = {
			this = scope:host
			exists = scope:activity.var:gamebird_type
		}
		custom_tooltip = hunt_seek_gamebird_falconry_tt
		if = {
			limit = {
				hunt_activity_exotic_bird_trigger = { VAR = scope:activity.var:animal_type }
			}
			hunt_activity_chose_smaller_game_effect = yes
		}
		scope:activity = {
			set_variable = {
				name = animal_type
				value = scope:activity.var:gamebird_type
			}
		}
		ai_chance = {
			base = 10
		}
	}

	option = { # Hare
		name = hunt.0530.d
		trigger = { this = scope:host }
		custom_tooltip = hunt_seek_hare_falconry_tt
		if = {
			limit = {
				hunt_activity_large_game_trigger = { VAR = scope:activity.var:animal_type }
			}
			hunt_activity_chose_smaller_game_effect = yes
		}
		scope:activity = {
			set_variable = {
				name = animal_type
				value = flag:hare
			}
			set_variable = {
				name = hunt_forced_type
				value = flag:hare
			}
		}
		show_as_tooltip = {
			hunt_activity_success_change_effect = { CHANGE = decrease_medium }
		}
		ai_chance = {
			base = 10
		}
	}

	after = {
		if = {
			limit = { this = scope:host }
			scope:activity = {
				every_attending_character = {
					limit = {
						NOT = { this = scope:host }
					}
					trigger_event = hunt.0530
				}
				set_variable = hunt_started
				set_variable = {
					name = hunt_activity_story
					value = flag:falconry
				}
				add_activity_log_entry = {
					key = hunt_quarry_falconry_log
					score = 50
					tags = { quarry }	
					character = scope:host
				}
				set_variable = {
					name = hunt_success_chance
					value = hunt_success_chance_value
				}
				remove_variable = waterfowl_type
				remove_variable = gamebird_type
			}
		}
	}
}

# Select a Master of Hunt #
# By James Beaumont #
hunt.0540 = {
	type = activity_event
	title = hunt.0540.t
	desc = {
		desc = hunt.0540.desc.intro
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						has_relation_rival = scope:moh_candidate_1
						opinion = {
							value <= low_negative_opinion
							target = scope:moh_candidate_1
						}
					}
				}
				desc = hunt.0540.desc.hates_candidate_a
			}
			desc = hunt.0540.desc.candidate_a
		}
		triggered_desc = {
			trigger = { exists = scope:moh_candidate_2 }
			desc = hunt.0540.desc.nepotism
		}
		triggered_desc = {
			trigger = { exists = scope:moh_candidate_3 }
			desc = hunt.0540.desc.enthusiasm
		}
		desc = hunt.0540.desc.outro
	}
	theme = hunt_activity_camp
	left_portrait = {
		character = scope:host
		animation = thinking
	}
	center_portrait = {
		character = scope:moh_candidate_2
		animation = war_over_win
	}
	right_portrait = {
		character = scope:moh_candidate_1
		animation = admiration
	}
	lower_right_portrait = scope:moh_candidate_3

	trigger = { #This is a delayed event so it is possible you have picked out a master of hunt after it was set to trigger
		NOR = {
			employs_court_position = master_of_hunt_court_position
			employs_court_position = huntperson_camp_officer
		}
		exists = scope:activity #As it is delayed, the activity might have invalidated in the meanwhile
		scope:activity = {
			any_attending_character = {
				location = root.location
				save_temporary_scope_as = potential_moh
			}
		}
		OR = {
			can_appoint_char_to_court_position = { CHAR = scope:potential_moh COURT_POS = master_of_hunt_court_position }
			AND = {
				is_landless_adventurer = yes
				scope:potential_moh = {
					would_be_valid_for_court_position = {
						employer = root
						court_position = huntperson_camp_officer
					}
				}
			}
		}
	}

	immediate = {
		if = {
			limit = {
				is_landless_adventurer = yes
			}
			scope:activity = {
				ordered_attending_character = { # The best guy for the job
					limit = {
						OR = {
							is_vassal_of = root
							is_courtier_of = root
						}
						root = {
							can_appoint_char_to_court_position = {
								CHAR = prev
								COURT_POS = huntperson_camp_officer
							}
						}
					}
					order_by = aptitude:huntperson_camp_officer
					save_scope_as = moh_candidate_1
				}
				if = {
					limit = {
						NOT = { exists = scope:moh_candidate_1 }
					}
					if = {
						limit = {
							any_pool_character = {
								province = scope:activity.activity_location
								is_physically_able_ai_adult = yes
								can_be_knight_trigger = { ARMY_OWNER = scope:host }
							}
						}
						random_pool_character = {
							province = scope:activity.activity_location
							limit = {
								is_physically_able_ai_adult = yes
								can_be_knight_trigger = { ARMY_OWNER = scope:host }
							}
							save_scope_as = moh_candidate_1
						}
					}
					else = {
						hidden_effect = {
							create_character = {
								template = generic_peasant_character
								gender_female_chance = root_soldier_female_chance
								location = scope:activity.activity_location
								culture = scope:host.culture
								faith = scope:host.faith
								dynasty = none
								save_scope_as = moh_candidate_1
							}
						}
					}
				}
				if = {
					limit = {
						any_attending_character = {
							OR = {
								is_vassal_of = root
								is_courtier_of = root
							}
							OR = {
								is_close_or_extended_family_of = root
								has_relation_friend = root
								has_relation_lover = root
							}
							NOT = { has_relation_rival = root }
							root = {
								can_appoint_char_to_court_position = {
									CHAR = prev
									COURT_POS = huntperson_camp_officer
								}
							}
							NOT = { this = scope:moh_candidate_1 }
						}
					}
					random_attending_character = { # The nepotism pick
						limit = {
							OR = {
								is_vassal_of = root
								is_courtier_of = root
							}
							OR = {
								is_close_or_extended_family_of = root
								has_relation_friend = root
								has_relation_lover = root
							}
							NOT = { has_relation_rival = root }
							root = {
								can_appoint_char_to_court_position = {
									CHAR = prev
									COURT_POS = huntperson_camp_officer
								}
							}
							NOT = { this = scope:moh_candidate_1 }
						}
						save_scope_as = moh_candidate_2
					}
				}
				if = {
					limit = {
						any_attending_character = {
							OR = {
								is_vassal_of = root
								is_courtier_of = root
							}
							root = {
								can_appoint_char_to_court_position = {
									CHAR = prev
									COURT_POS = huntperson_camp_officer
								}
							}
							NOT = { this = scope:moh_candidate_1 }
							trigger_if = {
								limit = {
									exists = scope:moh_candidate_2
								}
								NOT = { this = scope:moh_candidate_2 }
							}
						}
					}
					ordered_attending_character = { # Second best guy for the job
						limit = {
							OR = {
								is_vassal_of = root
								is_courtier_of = root
							}
							root = {
								can_appoint_char_to_court_position = {
									CHAR = prev
									COURT_POS = master_of_hunt_court_position
								}
							}
							NOT = { this = scope:moh_candidate_1 }
							trigger_if = {
								limit = {
									exists = scope:moh_candidate_2
								}
								NOT = { this = scope:moh_candidate_2 }
							}
						}
						order_by = {
							value = aptitude:master_of_hunt_court_position
							add = ai_energy
						}
						save_scope_as = moh_candidate_3
					}
				}
			}
		}
		else = {
			scope:activity = {
				ordered_attending_character = { # The best guy for the job
					limit = {
						OR = {
							is_vassal_of = root
							is_courtier_of = root
						}
						root = {
							can_appoint_char_to_court_position = {
								CHAR = prev
								COURT_POS = master_of_hunt_court_position
							}
						}
					}
					order_by = aptitude:master_of_hunt_court_position
					save_scope_as = moh_candidate_1
				}
				if = {
					limit = {
						NOT = { exists = scope:moh_candidate_1 }
					}
					if = {
						limit = {
							any_pool_character = {
								province = scope:activity.activity_location
								is_physically_able_ai_adult = yes
								can_be_knight_trigger = { ARMY_OWNER = scope:host }
							}
						}
						random_pool_character = {
							province = scope:activity.activity_location
							limit = {
								is_physically_able_ai_adult = yes
								can_be_knight_trigger = { ARMY_OWNER = scope:host }
							}
							save_scope_as = moh_candidate_1
						}
					}
					else = {
						hidden_effect = {
							create_character = {
								template = generic_peasant_character
								gender_female_chance = root_soldier_female_chance
								location = scope:activity.activity_location
								culture = scope:host.culture
								faith = scope:host.faith
								dynasty = none
								save_scope_as = moh_candidate_1
							}
						}
					}
				}
				if = {
					limit = {
						any_attending_character = {
							OR = {
								is_vassal_of = root
								is_courtier_of = root
							}
							OR = {
								is_close_or_extended_family_of = root
								has_relation_friend = root
								has_relation_lover = root
							}
							NOT = { has_relation_rival = root }
							root = {
								can_appoint_char_to_court_position = {
									CHAR = prev
									COURT_POS = master_of_hunt_court_position
								}
							}
							NOT = { this = scope:moh_candidate_1 }
						}
					}
					random_attending_character = { # The nepotism pick
						limit = {
							OR = {
								is_vassal_of = root
								is_courtier_of = root
							}
							OR = {
								is_close_or_extended_family_of = root
								has_relation_friend = root
								has_relation_lover = root
							}
							NOT = { has_relation_rival = root }
							root = {
								can_appoint_char_to_court_position = {
									CHAR = prev
									COURT_POS = master_of_hunt_court_position
								}
							}
							NOT = { this = scope:moh_candidate_1 }
						}
						save_scope_as = moh_candidate_2
					}
				}
				if = {
					limit = {
						any_attending_character = {
							OR = {
								is_vassal_of = root
								is_courtier_of = root
							}
							root = {
								can_appoint_char_to_court_position = {
									CHAR = prev
									COURT_POS = master_of_hunt_court_position
								}
							}
							NOT = { this = scope:moh_candidate_1 }
							trigger_if = {
								limit = {
									exists = scope:moh_candidate_2
								}
								NOT = { this = scope:moh_candidate_2 }
							}
						}
					}
					random = {
						chance = 25
						ordered_attending_character = { # Second best guy for the job
							limit = {
								OR = {
									is_vassal_of = root
									is_courtier_of = root
								}
								root = {
									can_appoint_char_to_court_position = {
										CHAR = prev
										COURT_POS = master_of_hunt_court_position
									}
								}
								NOT = { this = scope:moh_candidate_1 }
								trigger_if = {
									limit = {
										exists = scope:moh_candidate_2
									}
									NOT = { this = scope:moh_candidate_2 }
								}
							}
							order_by = {
								value = aptitude:master_of_hunt_court_position
								add = ai_energy
							}
							save_scope_as = moh_candidate_3
						}
					}
				}
			}
		}
	}

	option = { # Pick the best guy
		name = hunt.0540.a
		if = {
			limit = {
				is_landless_adventurer = yes
			}
			camp_officer_grant_effect = {
				CANDIDATE = scope:moh_candidate_1
				POS = huntperson
				EMPLOYER = root
			}
		}
		else = {
			court_position_grant_effect = {
				CANDIDATE = scope:moh_candidate_1
				POS = master_of_hunt
				EMPLOYER = root
			}
			add_prestige = minor_prestige_gain
		}
		ai_chance = {
			base = 10
			opinion_modifier = {
				who = root
				opinion_target = scope:moh_candidate_1
				min = 0
				max = 10
				multiplier = 0.5
			}
			modifier = {
				factor = 0.5
				has_trait = family_first
			}
			modifier = {
				factor = 0.5
				has_relation_rival = scope:moh_candidate_1
				NOT = { has_trait = forgiving }
			}
		}
	}

	option = { # Pick the nepotism target
		name = hunt.0540.b
		trigger = {
			exists = scope:moh_candidate_2
		}
		if = {
			limit = {
				is_landless_adventurer = yes
			}
			camp_officer_grant_effect = {
				CANDIDATE = scope:moh_candidate_2
				POS = huntperson
				EMPLOYER = root
			}
			reverse_add_opinion = {
				target = scope:moh_candidate_2
				modifier = grateful_opinion
				opinion = 15
			}
		}
		else = {
			court_position_grant_effect = {
				CANDIDATE = scope:moh_candidate_2
				POS = master_of_hunt
				EMPLOYER = root
			}
			reverse_add_opinion = {
				target = scope:moh_candidate_2
				modifier = grateful_opinion
				opinion = 15
			}
		}
		ai_chance = {
			base = 10
			opinion_modifier = {
				who = root
				opinion_target = scope:moh_candidate_2
				min = 0
				max = 10
				multiplier = 0.5
			}
			modifier = {
				factor = 2
				has_trait = family_first
			}
		}
	}

	option = { # Pick the third target
		name = hunt.0540.c
		trigger = {
			exists = scope:moh_candidate_3
		}
		if = {
			limit = {
				is_landless_adventurer = yes
			}
			camp_officer_grant_effect = {
				CANDIDATE = scope:moh_candidate_3
				POS = huntperson
				EMPLOYER = root
			}
			random = {
				chance = 50
				set_relation_friend = {
					target = scope:moh_candidate_3
					reason = friend_made_me_moh
				}
			}
		}
		else = {
			court_position_grant_effect = {
				CANDIDATE = scope:moh_candidate_3
				POS = master_of_hunt
				EMPLOYER = root
			}
			random = {
				chance = 50
				set_relation_friend = {
					target = scope:moh_candidate_3
					reason = friend_made_me_moh
				}
			}
		}
		ai_chance = {
			base = 5
			opinion_modifier = {
				who = root
				opinion_target = scope:moh_candidate_3
				min = 0
				max = 10
				multiplier = 0.5
			}
			modifier = {
				factor = 0.5
				has_trait = family_first
			}
			modifier = {
				factor = 0.5
				has_relation_rival = scope:moh_candidate_3
				NOT = { has_trait = forgiving }
			}
		}
	}

	option = { # Pick nobody
		name = hunt.0540.d
		ai_chance = { # The AI should always pick someone, unless they're bankrupt
			base = 0
			modifier = {
				add = 100
				gold < tiny_gold_value
			}
		}
	}

	after = {
		# Update success chance
		scope:activity = {
			set_variable = {
				name = hunt_success_chance
				value = hunt_success_chance_value
			}
		}
	}
}

# Welcome event #
# By Joe Parkin #
hunt.0550 = {
	type = activity_event
	title = hunt.0550.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity ?= { hunt_is_nerge_type = yes }
					this = scope:host
				}
				desc = hunt.0550.nerge.host.desc
			}
			triggered_desc = {
				trigger = {
					scope:activity ?= { hunt_is_nerge_type = yes }
					NOT = { this = scope:host }
				}
				desc = hunt.0550.nerge.guest.desc
			}
			triggered_desc = {
				trigger = { this = scope:host }
				desc = hunt.0550.host
			}
			desc = hunt.0550.guest
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity.activity_location.county = {
						OR = {
							has_county_modifier = hunt_sighting_standard_modifier
							has_county_modifier = hunt_sighting_dangerous_modifier
							has_county_modifier = hunt_sighting_falconry_modifier	
						}
					}
				}
				desc = hunt.0550.sighting
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = { category = special_type option = hunt_type_falconry }
					}
				}
				desc = hunt.0550.falconry
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = { category = special_type option = hunt_type_legendary }
					}
				}
				desc = hunt.0550.legendary
			}
			#EK ADDITION
			triggered_desc = {
				trigger = { 
					location = {
						geographical_region = mundus_tamriel_morrowind
					}
				}
				desc = hunt.0550.morrowind
			}
			# EK ADDITION END
			desc = hunt.0550.standard
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					intent_target.location ?= root.location
				}
				desc = hunt.0550.intent_arrived
			}
			triggered_desc = {
				trigger = { exists = intent_target }
				desc = hunt.0550.intent
			}
		}
	}
	theme = hunt_activity_camp
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				scope:activity = {
					hunt_is_nerge_type = yes
				}
			}
			animation = hunting_shortbow_aim_arrow_default
		}
		animation = hunting_knife_start
	}
	right_portrait = {
		character = scope:host
		trigger = {
			NOT = { root = scope:host }
		}
		animation = admiration
	}
	lower_right_portrait = intent_target

	trigger = { is_ai = no }

	option = { # Pick the best guy
		name = hunt.0550.a
	}
}

#########################
#	STORY EVENT CHAINS	#
#	1000 - 1999			#
#########################

################
#	Generic hunt, chase the animal!
#	by Linnéa Thimrén
#	1001-1003
################

#Corner start
hunt.1001 = {
	type = activity_event
	title = hunt.1001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						scope:activity.var:animal_type = flag:aurochs
						scope:activity.var:animal_type = flag:bison
						# EK ADDITION
						scope:activity.var:animal_type = flag:mammoth
						# EK ADDITION
					}
				}
				desc = {
					first_valid = {
						triggered_desc = {
							trigger = { exists = scope:hunt_participant }
							desc = hunt.1001.desc_opening_courtier_plural
						}
						desc = hunt.1001.desc_opening_plural
					}
					desc = hunt.1001.bison
				}
			}
			# EK ADDITION
			triggered_desc = {
				trigger = {
					OR = {
						scope:activity.var:animal_type = flag:bull_netch
					}
				}
				desc = {
					first_valid = {
						triggered_desc = {
							trigger = { exists = scope:hunt_participant }
							desc = hunt.1001.desc_opening_courtier_plural
						}
						desc = hunt.1001.desc_opening_plural
					}
					desc = hunt.1001.bull_netch
				}
			}
			triggered_desc = {
				trigger = {
					OR = {
						scope:activity.var:animal_type = flag:assassin_beetle
					}
				}
				desc = {
					first_valid = {
						triggered_desc = {
							trigger = { exists = scope:hunt_participant }
							desc = hunt.1001.desc_opening_courtier_plural
						}
						desc = hunt.1001.desc_opening_plural
					}
					desc = hunt.1001.assassin_beetle
				}
			}
			# EK ADDITION END
			triggered_desc = {
				trigger = {
					OR = {
						scope:activity.var:animal_type = flag:wolf
						scope:activity.var:animal_type = flag:hyena
					}
				}
				desc = {
					first_valid = {
						triggered_desc = {
							trigger = { exists = scope:hunt_participant }
							desc = hunt.1001.desc_opening_courtier_plural_dangerous
						}
						desc = hunt.1001.desc_opening_plural_dangerous
					}
					desc = hunt.1001.wolf
				}
			}
			triggered_desc = {
				trigger = {
					hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
				}
				desc = {
					first_valid = {
						triggered_desc = {
							trigger = { exists = scope:hunt_participant }
							desc = hunt.1001.desc_opening_courtier_dangerous
						}
						desc = hunt.1001.desc_opening_dangerous
					}
					#EK ADDITION
					first_valid = {
						triggered_desc = {
							trigger = { 
								location = {
									geographical_region = mundus_tamriel_morrowind
								}
							}
							desc = hunt.1001.desc_dangerous_morrowind
						}
						desc = hunt.1001.desc_dangerous
					}
					# EK ADDITION END
					#desc = hunt.1001.desc_dangerous
				}	
			}	
			desc = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:hunt_participant }
						desc = hunt.1001.desc_opening_courtier
					}
					desc = hunt.1001.desc_opening
				}
				desc = hunt.1001.desc
			}	
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { this = scope:host }
					hunt_story_trigger = { STORY = chase }
				}
				desc = hunt.1001.closing_chase
			}
			triggered_desc = {
				trigger = {
					NOT = { this = scope:host }
					hunt_story_trigger = { STORY = ambush }
				}
				desc = hunt.1001.closing_ambush
			}
			triggered_desc = {
				trigger = {
					hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
				}
				desc = {
					first_valid = {
						triggered_desc = {
							trigger = {
								OR = {
									scope:activity.var:animal_type = flag:wolf
									scope:activity.var:animal_type = flag:hyena
								}
							}
							desc = hunt.1001.closing_plural_dangerous
						}
						#EK ADDITION
						triggered_desc = {
							trigger = {
								OR = {
									scope:activity.var:animal_type = flag:mudcrab
									scope:activity.var:animal_type = flag:assassin_beetle
									scope:activity.var:animal_type = flag:dreugh
									scope:activity.var:animal_type = flag:alit
									scope:activity.var:animal_type = flag:cliff_strider
									scope:activity.var:animal_type = flag:ash_hopper
									scope:activity.var:animal_type = flag:nix_hound
								}
							}
							desc = hunt.1001.closing_no_fur
						}
						# EK ADDITION END
						desc = hunt.1001.closing_dangerous
					}
				}
			}
			desc = {
				first_valid = {
					triggered_desc = {
						trigger = {
							OR = {
								scope:activity.var:animal_type = flag:aurochs
								scope:activity.var:animal_type = flag:bison
								# EK ADDITION
								scope:activity.var:animal_type = flag:mammoth
								scope:activity.var:animal_type = flag:bull_netch
								# EK ADDITION END
							}
						}
						desc = hunt.1001.closing_herd
					}
					#EK ADDITION
					triggered_desc = {
						trigger = {
							OR = {
								scope:activity.var:animal_type = flag:mudcrab
								scope:activity.var:animal_type = flag:dreugh
								scope:activity.var:animal_type = flag:ash_hopper
							}
						}
						desc = hunt.1001.closing_no_fur
					}		
					# EK ADDITION END
					desc = hunt.1001.closing
				}
			}
		}	
	}
	theme = hunt_activity
	left_portrait = {
		character = scope:host
		animation = shock
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = hunting_horn
	}
	center_portrait = {
		character = root
		trigger = {
			NOR = {
				scope:hunt_participant ?= this
				this = scope:host
			}
		}
	}
	cooldown = { weeks = 1 }

	trigger = {
		trigger_if = {
			limit = {
				NOT = { this = scope:host }
			}
			is_ai = no
		}
		scope:activity = {
			OR = {
				has_activity_option = { category = special_type option = hunt_type_standard }
				AND = {
					scope:host = { has_character_flag = had_mystical_animal_story }
					has_activity_option = { category = special_type option = hunt_type_legendary }
				}
			}
		}
	}

	immediate = {
		if = {
			limit = { this = scope:host }
			hunt_activity_random_subordinate_participant_effect = {
				ARCHETYPE = hunter
				COMBATANT = yes
				SCOPE = hunt_participant
			}
			if = {
				limit = { exists = scope:hunt_participant }
				scope:activity = {
					set_variable = {
						name = participant_to_use
						value = scope:hunt_participant
						years = 1
					}
				}
			}
		}
		else = { hunt_story_tooltip_effect = yes }
	}

	option = { # Chase
		name = hunt.1001.a
		flavor = {
			random_valid = {
				desc = hunt.1001.a.flavor_1
				desc = hunt.1001.a.flavor_2
				desc = hunt.1001.a.flavor_3
				desc = hunt.1001.a.flavor_4
			}
		}
		trigger = { this = scope:host }
		if = {
			limit = {
				is_landless_adventurer = yes
			}
			add_prestige = miniscule_prestige_gain
		}
		else = {
			add_prestige = minor_prestige_gain
		}
		hunt_activity_method_effect = { STORY = chase }
		hunt_activity_success_change_effect = { CHANGE = increase_medium }
		custom_tooltip = hunt.1001.a.tt
		add_character_flag = {
			flag = dangerous_road
			months = 3
		}
		stress_impact = {
			patient = minor_stress_impact_gain
			craven = minor_stress_impact_gain
			lazy = minor_stress_impact_gain
			content = minor_stress_impact_gain
			calm = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = arrogant
					has_trait = brave
					has_trait = impatient
				}
			}
		}
	}

	option = { # Careful chase
		name = hunt.1001.b
		flavor = hunt.1001.b.flavor
		trigger = { this = scope:host }
		hunt_activity_method_effect = { STORY = chase }
		stress_impact = {
			impatient = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
			brave = minor_stress_impact_gain
			ambitious = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = craven
					has_trait = lazy
					has_trait = patient
				}
			}
		}
	}

	option = { # Ambush
		name = hunt.1001.c
		flavor = hunt.1001.c.flavor
		trigger = { this = scope:host }
		hunt_activity_method_effect = { STORY = ambush }
		stress_impact = {
			lazy = medium_stress_impact_gain
			brave = medium_stress_impact_gain
			wrathful = minor_stress_impact_gain
			impatient = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = ambitious
					has_trait = schemer
					has_trait = deceitful
				}
			}
		}
	}

	option = { # Guest acknowledgement
		name = hunt.1001.d
		trigger = {
			NOT = { this = scope:host }
		}
	}

	after = {
		if = {
			limit = { this = scope:host }
			scope:activity = {
				every_attending_character = { trigger_event = hunt.1001 }
			}
		}
	}
}

#Corner safe road
hunt.1002 = {
	type = activity_event
	title = hunt.1001.t
	desc = {
		desc = hunt.1002.desc
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:hunt_participant }
				desc = hunt.1002.courtier
			}
			desc = hunt.1002.alone
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = jockey_gallop
		camera = camera_event_horse_left
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = jockey_gallop
		camera = camera_event_horse_right
	}

	trigger = {
		hunt_story_trigger = { STORY = chase }
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 0.5
			has_character_flag = dangerous_road
		}
		modifier = {
			factor = 0.5
			scope:activity.activity_location = {
				OR = {
					terrain = mountains
					terrain = desert_mountains
					terrain = taiga
					terrain = forest
				}
			}
		}
	}

	immediate = {
		hunt_activity_success_change_effect = { CHANGE = increase_medium }
	}

	option = { #Onwards
		name = {
			text = hunt.1002.a
			trigger = { exists = scope:hunt_participant }
		}
		name = {
			text = hunt.1002.a.alone
			trigger = {
				NOT = { exists = scope:hunt_participant }
			}
		}
		ai_chance = {
			base = 50
		}
	}
}

#Corner success
hunt.1003 = {
	type = activity_event
	title = hunt.1001.t
	desc = {
		desc = hunt.1003.desc
		first_valid = {
			triggered_desc = {
				trigger = {
					hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
				}
				desc = hunt.1003.dangerous
			}
			triggered_desc = {
				trigger = {
					# EK EDIT
					NOT = { 
						scope:activity.var:animal_type = flag:hare 
						scope:activity.var:animal_type = flag:ringtail
					}
					#NOT = { scope:activity.var:animal_type = flag:hare }
				}
				desc = hunt.1003.bay
			}
			desc = hunt.1003.dogs
		}
		first_valid = {
			triggered_desc = {
				trigger = {	
					OR = {
						scope:activity.var:animal_type = flag:bison
						scope:activity.var:animal_type = flag:aurochs
						#EK ADDITION 
						scope:activity.var:animal_type = flag:mammoth
						# EK ADDITION END
					}
				}
				desc = hunt.1003.bison
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:boar }
				desc = hunt.1003.boar
			}
			triggered_desc = {
				trigger = {
					OR = {
						scope:activity.var:animal_type = flag:hart
						scope:activity.var:animal_type = flag:elk
					}
				}
				desc = hunt.1003.hart
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						OR = {
							var:animal_type = flag:antelope
							var:animal_type = flag:stag
							var:animal_type = flag:roe
							var:animal_type = flag:gazelle
							#var:animal_type = flag:saiga EK DISABLED
							var:animal_type = flag:reindeer
						}
					}
				}
				desc = hunt.1003.deer
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:fox }
				desc = hunt.1003.fox
			}
			triggered_desc = {
				trigger = {
					OR = {
						scope:activity.var:animal_type = flag:tiger
						scope:activity.var:animal_type = flag:leopard
						scope:activity.var:animal_type = flag:lion
						scope:activity.var:animal_type = flag:bear
						# EK ADDITION
						scope:activity.var:animal_type = flag:senche_cougar
						scope:activity.var:animal_type = flag:cliff_strider
						scope:activity.var:animal_type = flag:nix_hound
						# EK ADDITION END
					}
				}
				desc = hunt.1003.claws
			}
			triggered_desc = {
				trigger = {
					OR = {
						scope:activity.var:animal_type = flag:hyena
						scope:activity.var:animal_type = flag:wolf
						scope:activity.var:animal_type = flag:lynx
						# EK ADDITION
						scope:activity.var:animal_type = flag:alit
						# EK ADDITION END
					}
				}
				desc = hunt.1003.fangs
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:hare }
				desc = hunt.1003.hare
			}
			# EK ADDITION
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:badger }
				desc = hunt.1003.badger
			}
			triggered_desc = {
				trigger = {	scope:activity.var:animal_type = flag:bull_netch }
				desc = hunt.1003.bull_netch
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:ringtail }
				desc = hunt.1003.ringtail
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:ash_hopper }
				desc = hunt.1003.ash_hopper
			}
			triggered_desc = {
				trigger = { scope:activity.var:animal_type = flag:assassin_beetle }
				desc = hunt.1003.assassin_beetle
			}
			# EK ADDITION END
		}
		triggered_desc = {
			trigger = {
				exists = scope:wounded_courtier
				scope:wounded_courtier = {
					NOT = { is_participant_in_activity = scope:activity }
				}
			}
			desc = hunt.1003.injured
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = scope:host
		triggered_animation = {
			trigger = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			}
			animation = throne_room_two_handed_passive_1
		}
		triggered_animation = {
			trigger = {
				NOT = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				}
			}
			animation = shock
		}
	}
	right_portrait = {
		trigger = { exists = scope:hunt_participant }
		character = scope:hunt_participant
		triggered_animation = {
			trigger = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			}
			animation = marshal
		}
		triggered_animation = {
			trigger = {
				NOT = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				}
			}
			animation = admiration
		}
	}
	lower_right_portrait = {
		trigger = {
			exists = scope:intentee
			NOT = { scope:hunt_participant ?= scope:intentee }
		}
		character = scope:intentee
	}
	cooldown = { weeks = 1 }

	trigger = {		
		hunt_story_trigger = { STORY = chase }
	}

	weight_multiplier = {
		base = 1
		modifier = { add = involved_activity.var:hunt_success_chance }
	}

	immediate = {
		if = {
			limit = {
				hunt_animal_type_herbivore_trigger = { VAR = scope:activity.var:animal_type }
			}
			play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_beast_struggle"
		}
		else = { play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_beast_roar" }
		scope:activity = {
			set_variable = {
				name = hunt_success
				value = flag:yes
			}
			if = {
				limit = { exists = var:tame_animal_type } # to stop errors
				save_scope_as = small_local_game
			}
		}
		scope:activity = {
			random_attending_character = {
				limit = {
					NOT = { this = scope:host }
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				}
				save_scope_as = hunt_participant
			}
		}
		save_scope_as = hunt_ending
		hunt_outcome_scope_effect = yes
		hunt_all_attendee_xp_effect = { CHANGE = 2 RANDOM = 1 } # Guest XP gain for success
		if = {
			limit = { hunt_murder_target_trigger = yes }
			hidden_effect = { hunt_save_murder_target_effect = yes }
		}
	}

	option = { #Take the shot
		name = {
			trigger = {
				# EK EDIT
				NOT = {	
					scope:activity.var:animal_type = flag:hare 
					scope:activity.var:animal_type = flag:ringtail
					scope:activity.var:animal_type = flag:ash_hopper
				}
				#NOT = {	scope:activity.var:animal_type = flag:hare }
			}
			text = hunt.1003.a
		}
		name = {
			# EK EDIT
			trigger = { 
				OR = {
					scope:activity.var:animal_type = flag:hare 
					scope:activity.var:animal_type = flag:ringtail
					scope:activity.var:animal_type = flag:ash_hopper
				}
			}
			#trigger = { scope:activity.var:animal_type = flag:hare }
			text = hunt.1003.a.small
		}
		flavor = hunt.1003.a.flavor
		trigger = {
			can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			NOR = {
				scope:activity.var:animal_type = flag:boar
				scope:activity.var:animal_type = flag:bison
				# EK ADDITION
				scope:activity.var:animal_type = flag:bull_netch
				scope:activity.var:animal_type = flag:mammoth
				# EK ADDITION END
			}
		}		
		# Duel
		hunt_animal_bow_kill_effect = { DEATH = no VAR = scope:activity.var:animal_type }
		# Opinion
		hunt_dharmic_pacificism_effect = yes
		# Stress
		hunt_humble_hunter_stress_effect = yes
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_boldness = 0.5
				ai_energy = 0.5
				ai_greed = 0.5
			}
		}
	}

	option = { #The kill is mine!
		name = {
			trigger = {
				# EK EDIT
				NOT = {	
					scope:activity.var:animal_type = flag:fox 
					scope:activity.var:animal_type = flag:badger
				}
				#NOT = {	scope:activity.var:animal_type = flag:fox }
			}
			text = hunt.1003.b
		}
		name = {
			# EK EDIT
			trigger = { 
				OR = {
					scope:activity.var:animal_type = flag:fox 
					scope:activity.var:animal_type = flag:badger
				}
			}
			#trigger = { scope:activity.var:animal_type = flag:fox }
			text = hunt.1003.b.small
		}
		flavor = hunt.1003.b.flavor
		trigger = {
			# EK EDIT
			NOT = { 
				scope:activity.var:animal_type = flag:hare 
				scope:activity.var:animal_type = flag:ringtail
				scope:activity.var:animal_type = flag:ash_hopper
			}
			#NOT = { scope:activity.var:animal_type = flag:hare }
			can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
		}		
		# Duel
		hunt_animal_melee_kill_effect = { DEATH = yes VAR = scope:activity.var:animal_type }
		# Opinion
		hunt_dharmic_pacificism_effect = yes
		# Stress
		hunt_humble_hunter_stress_effect = yes
		if = {
			limit = { is_alive = yes }
			stress_impact = {
				craven = minor_stress_impact_gain
				arrogant = minor_stress_impact_loss
				ambitious = minor_stress_impact_loss
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_boldness = 0.5
				ai_energy = 0.5
				ai_greed = 0.5
			}
		}
	}

	option = { #Give shot
		name = hunt.1003.c
		trigger = {
			exists = scope:pertinent
			NOT = { this = scope:pertinent }
			NAND = {
				has_activity_intent = murder_attendee_intent
				intent_target = scope:pertinent
			}
			NOR = {
				scope:activity.var:animal_type = flag:boar
				scope:activity.var:animal_type = flag:bison
				# EK ADDITION
				scope:activity.var:animal_type = flag:bull_netch
				scope:activity.var:animal_type = flag:mammoth
				# EK ADDITION
			}
		}
		flavor = hunt.1003.a.flavor	
		scope:pertinent = {
			# Opinion/intent progress
			hunt_animal_slayer_bow_opinion_effect = { VAR = scope:activity.var:animal_type }
			# Kill outcome, prestige, injuries, etc.
			hunt_animal_bow_kill_effect = { DEATH = no VAR = scope:activity.var:animal_type }
			# Stress
			hunt_dharmic_pacificism_stress_effect = yes
		}
		scope:activity = {
			set_variable = {
				name = hunt_credit_taker
				value = scope:pertinent
			}
		}
		# Opinion and Stress for Dharmic Pacificism
		hunt_dharmic_pacificism_effect = yes
		# Stress
		hunt_jealous_hunter_stress_effect = yes
		ai_chance = {
			base = 50
			opinion_modifier = {
				opinion_target = scope:pertinent
				multiplier = 0.25
			}
			modifier = {
				factor = 0.25
				has_activity_intent = murder_attendee_intent
				intent_target = scope:pertinent
			}
			modifier = {
				factor = 2
				OR = {
					has_activity_intent = woo_attendee_intent
					has_activity_intent = befriend_attendee_intent
				}
				intent_target = {
					this = scope:pertinent
					hunt_dharmic_pacificist_trigger = no
				}
			}
			ai_value_modifier = {
				ai_boldness = 0.5
				ai_energy = 0.5
				ai_greed = 0.5
			}
		}
	}

	option = { #You take it Jim!
		name = {
			trigger = {
				hunt_small_game_trigger = { VAR = scope:activity.var:animal_type }
				hunt_pertinent_friendly_trigger = no
			}
			text = hunt.1003.d
		}
		name = {
			trigger = {
				hunt_pertinent_friendly_trigger = yes
				NOT = {
					hunt_small_game_trigger = { VAR = scope:activity.var:animal_type }
				}
			}
			text = hunt.1003.d.good
		}
		name = {
			trigger = {
				hunt_pertinent_hostile_trigger = yes
				NOT = {
					hunt_small_game_trigger = { VAR = scope:activity.var:animal_type }
				}
			}
			text = hunt.1003.d.bad
		}
		name = {
			trigger = {
				hunt_small_game_trigger = { VAR = scope:activity.var:animal_type }
			}
			text = hunt.1003.d.small
		}
		trigger = {
			exists = scope:pertinent
			trigger_if = {
				limit = { exists = scope:murder_target }
				NOT = { scope:murder_target = scope:pertinent }
			}
			OR = {
				AND = {
					has_activity_intent = murder_attendee_intent
					intent_target = scope:pertinent
				}
				AND = {
					exists = scope:activity.var:animal_type
					scope:activity.var:animal_type = flag:boar
					scope:activity.var:animal_type = flag:bison
					# EK ADDITION
					scope:activity.var:animal_type = flag:bull_netch
					scope:activity.var:animal_type = flag:mammoth
					# EK ADDITION
				}
			}
		}
		if = {
			limit = {
				has_activity_intent = murder_attendee_intent
				intent_target = scope:pertinent
			}
			custom_tooltip = available_because_intent_tt
		}
		scope:pertinent = {
			# Opinion/intent progress
			hunt_animal_slayer_melee_opinion_effect = yes
			# Kill outcome, prestige, injuries, etc.
			hunt_animal_melee_kill_effect = { DEATH = yes VAR = scope:activity.var:animal_type }
			# Opinion and Stress for Dharmic Pacificism
			hunt_dharmic_pacificism_stress_effect = yes
		}
		scope:activity = {
			set_variable = {
				name = hunt_credit_taker
				value = scope:pertinent
			}
		}
		# Opinion and Stress for Dharmic Pacificism
		hunt_dharmic_pacificism_effect = yes
		# Stress
		hunt_jealous_hunter_stress_effect = yes
		ai_chance = {
			base = 25
			opinion_modifier = {
				opinion_target = scope:pertinent
				multiplier = 0.25
			}
			modifier = {
				factor = 2
				has_activity_intent = murder_attendee_intent
				intent_target = scope:pertinent
				hunt_melee_kill_prowess_value >= 15
			}
			modifier = {
				factor = 0.5
				has_activity_intent = murder_attendee_intent
				intent_target = scope:pertinent
				hunt_melee_kill_prowess_value < 15
			}
			modifier = {
				factor = 2
				OR = {
					has_activity_intent = woo_attendee_intent
					has_activity_intent = befriend_attendee_intent
				}
				intent_target = {
					this = scope:pertinent
					hunt_dharmic_pacificist_trigger = no
				}
				hunt_melee_kill_prowess_value < 15
			}
			modifier = {
				factor = 0.5
				OR = {
					has_activity_intent = woo_attendee_intent
					has_activity_intent = befriend_attendee_intent
				}
				intent_target = scope:pertinent
				hunt_melee_kill_prowess_value >= 15
			}
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_greed = -1
			}
		}
	}

	option = { #Murder attempt
		name = hunt.1003.i
		trigger = {
			exists = scope:murder_target
			NOR = {
				scope:activity.var:animal_type = flag:fox
				scope:activity.var:animal_type = flag:hare
				# EK ADDITION
				scope:activity.var:animal_type = flag:ringtail
				scope:activity.var:animal_type = flag:ash_hopper
				scope:activity.var:animal_type = flag:badger
				# EK ADDITION END
			}
			OR = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				AND = {
					exists = scope:accomplice
					scope:accomplice = {
						can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
					}
				}
			}
		}
		flavor = hunt.1003.i.flavor
		add_internal_flag = special
		save_scope_as = animal_slayer
		save_scope_as = group_murder
		set_variable = {
			name = hunt_murder_attempt
			value = scope:murder_target
		}
		hunt_increment_murder_accident_attempt = yes #So it doesn't get silly, we track attempts and make chance to succeed lower for each recent one
		# Kill outcome, prestige, injuries, etc.
		hunt_all_attendee_xp_effect = { CHANGE = 1 RANDOM = 1 }
		scope:murder_target = {
			save_scope_as = injury_target
			hunt_wound_select_effect = yes
		}
		save_scope_as = group_kill
		# Outcome
		duel = {
			skills = { intrigue prowess }
			target = scope:murder_target
			10 = { # Animal is slain
				desc = hunt_kill_murder_missed
				compare_modifier = {
					value = scope:duel_value
					multiplier = -0.5
				}
				trigger_event = {
					id = hunt.1008
					days = 1
				}
				save_scope_as = group_success
				show_as_tooltip = {
					every_in_list = {
						list = animal_slayers
						custom = hunt_every_hunter_tt
						add_prestige = hunt_prestige_melee_group_value
					}
				}
			}
			10 = { # ...but target is injured
				desc = hunt_kill_murder_injured
				trigger = {
					NOT = {
						scope:murder_target = {
							has_trait_rank = {
								trait = wounded
								rank = 3
							}
						}
					}
				}
				compare_modifier = {
					value = scope:duel_value
					multiplier = 0.5
				}
				modifier = { add = hunt_melee_kill_prowess_value }
				modifier = { add = hunt_melee_danger_value }
				custom_tooltip = hunt_target_attendee_injured_tt
				hidden_effect = {
					random_list = {
						50 = {
							modifier = { add = root.intrigue }						
							trigger_event = {
								id = hunt.1006
								days = 1
							}
						}
						50 = {
							modifier = { add = scope:murder_target.intrigue }
							trigger_event = {
								id = hunt.1007
								days = 1
							}
						}					
					}
				}
				save_scope_as = group_failure
				show_as_tooltip = {
					every_in_list = {
						list = animal_slayers
						custom = hunt_every_hunter_tt
						add_prestige = hunt_prestige_melee_wound_group_value
					}
				}
				custom_tooltip = hunt_murder_involvement_discovered_tt
			}
			10 = { # ...but target is killed
				desc = hunt_kill_murder_killed
				compare_modifier = {
					value = scope:duel_value
					multiplier = 0.5
				}
				modifier = { add = hunt_melee_kill_prowess_value }
				modifier = {
					OR = {
						has_trait = one_legged
						ek_human_age_equivalent >= 50 # EK EDIT: lifespan
						health < fine_health
						prowess < mediocre_skill_rating
					}
					factor = 0.5
				}
				save_scope_as = group_critical
				custom_tooltip = hunt_target_attendee_killed_tt
				trigger_event = {
					id = hunt.1005
					days = 1
				}
			}
		}
		# Chance for no pelt reward
		show_as_tooltip = { hunt_chance_for_no_pelt_effect = yes } # Chance for no pelt reward 
		# Opinion and Stress for Dharmic Pacificism
		hunt_dharmic_pacificism_effect = yes
		scope:activity = {
			every_attending_character = {
				limit = { is_ai = no }
				trigger_event = hunt.1202
			}
		}
		# Stress
		stress_impact = {
			ambitious = miniscule_stress_impact_gain
			arrogant = miniscule_stress_impact_gain
			greedy = miniscule_stress_impact_gain
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = -1
				ai_energy = -1
				ai_greed = -1
				ai_compassion = 0.5
				ai_rationality = 0.5
			}
		}
	}

	option = { #Group kill
		name = hunt.1003.e
		trigger = {
			scope:activity = {
				NOR = {
					var:animal_type = flag:fox
					var:animal_type = flag:hare
					# EK ADDITION
					var:animal_type = flag:ringtail
					var:animal_type = flag:ash_hopper
					var:animal_type = flag:badger
					# EK ADDITION END
				}
			}
			NOT = { has_trait = craven }
		}
		flavor = hunt.1003.e.flavor
		save_scope_as = animal_slayer
		if = {
			limit = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			}
			add_internal_flag = dangerous
		}
		hunt_chance_for_no_pelt_effect = yes # Chance for no pelt reward
		# Kill outcome, prestige, injuries, etc.
		hunt_animal_melee_kill_group_effect = { DEATH = yes VAR = scope:activity.var:animal_type }
		# Opinion and Stress for Dharmic Pacificism
		hunt_dharmic_pacificism_effect = yes
		# Stress
		stress_impact = {
			ambitious = miniscule_stress_impact_gain
			arrogant = miniscule_stress_impact_gain
			greedy = miniscule_stress_impact_gain
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = -1
				ai_energy = -1
				ai_greed = -1
				ai_compassion = 0.5
				ai_rationality = 0.5
			}
		}
	}

	option = { #Dogs
		name = hunt.1003.f
		trigger = {
			OR = {
				NOT = { exists = scope:pertinent }
				scope:pertinent = root
				NOT = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				}
			}
			NOT = { exists = scope:murder_target }
		}
		flavor = hunt.1003.f.flavor
		save_scope_as = animal_slayer
		save_scope_as = dogs_kill
		play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_dogs_bark"
		hunt_no_pelt_effect = yes # No pelt trophies
		if = {
			limit = {
				hunt_small_game_trigger = { VAR = scope:activity.var:animal_type }
			}
			add_character_modifier = {
				modifier = hunt_happy_hounds_modifier
				years = 5
			}
			save_scope_as = dogs_success
		}
		else = {
			random_list = {
				20 = {
					desc = hunt.1003.f.success
					modifier = {
						trigger = {
							exists = scope:hunt_participant
							scope:hunt_participant = { has_court_position = huntperson_camp_officer }
						}
						add = {
							value = scope:hunt_participant.aptitude:huntperson_camp_officer
							divide = 10
						}
					}
					modifier = {
						trigger = {
							exists = scope:hunt_participant
							scope:hunt_participant = { has_court_position = master_of_hunt_court_position }
						}
						add = {
							value = scope:hunt_participant.aptitude:master_of_hunt_court_position
							divide = 10
						}
					}
					modifier = {
						trigger = {
							any_owned_story = { story_type = story_cycle_pet_dog }
						}
						factor = 1.5
					}					
					send_interface_toast = {
						title = hunt.1003.f.success
						add_character_modifier = {
							modifier = hunt_savage_hounds_modifier
							years = 5
						}
					}
					save_scope_as = dogs_success
				}
				10 = {
					desc = hunt.1003.f.killed
					modifier = { add = hunt_melee_danger_value }
					trigger = {
						NOT = {
							hunt_small_game_trigger = { VAR = scope:activity.var:animal_type }
						}
					}
					send_interface_toast = {
						title = hunt.1003.f.killed
						if = {
							limit = {
								any_owned_story = { story_type = story_cycle_pet_dog }
							}
							random = {
								chance = hunt_melee_danger_value
								random_owned_story = {
									limit = { story_type = story_cycle_pet_dog }
									save_scope_as = story
								}
								show_as_tooltip = { remove_dog_story_modifiers_effect = yes }
								scope:story = {
									save_scope_value_as = {
										name = dead_dog_name
										value = scope:story.var:story_cycle_dog_name
									}
									hidden_effect = { end_story = yes }
								}
								save_scope_as = dogs_critical
							}
						}
						add_character_modifier = {
							modifier = hunt_savaged_hounds_modifier
							years = 5
						}
					}
					save_scope_as = dogs_failure
				}
			}
		}
		# Opinion and Stress for Dharmic Pacificism
		hunt_dharmic_pacificism_effect = yes
		# Stress
		stress_impact = {
			compassionate = miniscule_stress_impact_gain
			callous = miniscule_stress_impact_gain
			arrogant = miniscule_stress_impact_gain
			greedy = miniscule_stress_impact_gain
		}
		scope:activity = {
			every_attending_character = {
				limit = { is_ai = no }
				trigger_event = hunt.1201
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = -1
				ai_energy = -1
				ai_greed = -1
				ai_compassion = 0.5
				ai_rationality = 0.5
			}
		}
	}

	option = { #Let it go
		name = hunt.1003.g
		trigger = {
			OR = {
				has_trait = compassionate
				scope:activity = {
					any_attending_character = { hunt_dharmic_pacificist_trigger = yes }
				}
			}
		}
		save_scope_as = animal_slayer
		add_internal_flag = special
		flavor = hunt.1003.g.flavor
		trait = compassionate
		# No artifact explanation
		custom_tooltip = hunt_no_artifact_tt
		# Upset/please attendees based on faith tenets
		scope:activity = {
			every_attending_character = {
				limit = {
					hunt_dharmic_pacificist_trigger = yes
					NOT = { this = root }
				}
				custom = every_non_cynical_dharmic_attendee_tt
				add_opinion = {
					target = root
					modifier = hunt_dharmic_mercy_opinion
					opinion = 10
				}
			}
			every_attending_character = {
				limit = {
					NOT = { this = scope:host }
					hunt_dharmic_pacificist_trigger = no
				}
				custom = every_non_cynical_dharmic_attendee_reverse_tt
				add_opinion = {
					target = root
					modifier = hunt_dharmic_mercy_opinion
					opinion = -10
				}
			}
		}
		# Stress
		if = {
			limit = { hunt_dharmic_pacificist_trigger = yes }
			stress_impact = {
				base = minor_stress_impact_loss
				compassionate = minor_stress_impact_loss
				lifestyle_hunter = miniscule_stress_impact_gain
				brave = miniscule_stress_impact_gain
				sadistic = miniscule_stress_impact_gain
				greedy = miniscule_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				lifestyle_hunter = miniscule_stress_impact_gain
				brave = miniscule_stress_impact_gain
				sadistic = miniscule_stress_impact_gain
				greedy = miniscule_stress_impact_gain
			}
		}
		save_scope_as = animal_spared
		scope:activity = {
			set_variable = animal_spared
			every_attending_character = {
				limit = { is_ai = no }
				trigger_event = hunt.1201
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = -1
				ai_energy = -1
				ai_greed = -0.5
				ai_zeal = 0.5
				ai_compassion = 1
			}
		}
	}

	option = { #Kill it!
		name = hunt.1003.h
		flavor = hunt.1003.h.flavor
		trigger = { has_trait = craven }
		save_scope_as = animal_slayer
		# Penalties for not living up to role
		if = {
			limit = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			}
			add_prestige = minor_prestige_loss
			stress_impact = {
				brave = miniscule_stress_impact_gain
				lifestyle_hunter = minor_stress_impact_gain
			}
		}
		# Exclude character from kill risks/rewards
		add_character_flag = {
			flag = not_slaying
			weeks = 1
		}
		save_scope_as = group_craven
		# Chance for no pelt reward
		hunt_chance_for_no_pelt_effect = yes
		# Kill outcome, prestige, injuries, etc.
		hunt_animal_melee_kill_group_effect = { DEATH = yes VAR = scope:activity.var:animal_type }
		# Opinion and Stress for Dharmic Pacificism
		hunt_dharmic_pacificism_effect = yes
		
		scope:activity = {
			every_attending_character = {
				limit = { is_ai = no }
				trigger_event = hunt.1202
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = -1
				ai_energy = -1
				ai_greed = -0.5
				ai_compassion = -1
			}
		}
	}

	option = { #Capture
		name = hunt.1003.j
		trigger = {
			hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
			NOR = {
				has_character_modifier = hunt_captive_beast_modifier
				exists = var:captive_animal_type
				exists = scope:murder_target
			}
			NOR = {
				scope:activity.var:animal_type ?= flag:hyena
				scope:activity.var:animal_type ?= flag:wolf
				# EK ADDITION
				scope:activity.var:animal_type ?= flag:assassin_beetle
				scope:activity.var:animal_type ?= flag:nix_hound
				# EK ADDITION END
			}
			NOT = {
				scope:activity = {
					has_activity_option = {
						category = special_type
						option = hunt_type_legendary
					}
				}
			}
		}
		save_scope_as = animal_slayer
		save_scope_as = group_capture
		hunt_no_skull_effect = yes # No skull trophies
		hunt_no_pelt_effect = yes # No pelt trophies
		set_variable = {
			name = captive_animal_type
			value = scope:activity.var:animal_type
			years = 5
		}
		scope:activity = { set_variable = captive_animal }
		add_character_modifier = {
			modifier = hunt_captive_beast_modifier
			years = 5
			desc = hunt_captive_beast_modifier_custom_desc
		}
		if = {
			limit = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			}
			add_internal_flag = dangerous
		}
		hunt_animal_melee_kill_group_effect = { DEATH = yes VAR = scope:activity.var:animal_type }
		# Stress
		if = {
			limit = { is_alive = yes }
			stress_impact = {
				ambitious = miniscule_stress_impact_gain
				arrogant = miniscule_stress_impact_gain
				greedy = miniscule_stress_impact_gain
			}
		}
		if = {
			limit = { hunt_dharmic_pacificist_trigger = yes }
			stress_impact = { base = minor_stress_impact_gain }
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = -1
				ai_energy = -1
				ai_greed = -1
				ai_compassion = 0.5
				ai_rationality = 0.5
			}
		}
	}
}

#Corner escape
hunt.1004 = {
	type = activity_event
	title = hunt.1001.t
	desc = {
		first_valid = {
			desc = hunt.1004.desc
			triggered_desc = {
				trigger = { exists = scope:wounded_guest }
				desc = hunt.1004.wounded
			}
			triggered_desc = {
				trigger = { exists = scope:wounded_host }
				desc = hunt.1004.wounded_host
			}
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = scope:host
		animation = disapproval
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = stress
	}
	center_portrait = {
		character = root
		animation = worry
		trigger = {
			NOR = {
				scope:host ?= this
				scope:hunt_participant ?= this
			}
		}
	}
	cooldown = { weeks = 1 }

	trigger = {
		hunt_story_trigger = { STORY = chase }
	}

	weight_multiplier = {
		base = 1
		modifier = {
			add = {
				value = 100
				subtract = involved_activity.var:hunt_success_chance
			}
		}
	}

	immediate = {
		play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_dogs_bark"
		if = {
			limit = { this = scope:host }
			save_scope_as = hunt_ending
			scope:activity = {
				set_variable = {
					name = hunt_success
					value = flag:no
				}
			}
			if = {
				limit = { exists = scope:activity.var:accident_target }
				if = {
					limit = { scope:activity.var:accident_target = scope:host }
					scope:activity.var:accident_target = { save_scope_as = wounded_host }
				}
				else = {
					scope:activity.var:accident_target = { save_scope_as = wounded_guest }
				}
			}
			if = {
				limit = { exists = scope:activity.var:participant_to_use }
				scope:activity.var:participant_to_use = { save_scope_as = hunt_participant }
			}
			else = {
				hunt_activity_random_subordinate_participant_effect = {
					ARCHETYPE = hunter
					COMBATANT = yes
					SCOPE = hunt_participant
				}
			}
			hunt_all_attendee_xp_effect = { CHANGE = 1 RANDOM = 1 } # Guest XP gain for success
		}
		custom_tooltip = hunt_fails_tt
	}

	option = { #Drat!
		name = hunt.1004.a
		ai_chance = {
			base = 25
		}
	}

	option = { #You slowed us down!
		name = hunt.1004.b
		trigger = {
			this = scope:host
			exists = scope:wounded_guest
		}
		reverse_add_opinion = {
			target = scope:wounded_guest			
			modifier = insulted_opinion
			opinion = -10
		}
		stress_impact = {
			wrathful = minor_stress_impact_loss
			arrogant = minor_stress_impact_loss
			ambitious = minor_stress_impact_loss
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 0.5
				exists = intent_target
				OR = {
					has_activity_intent = woo_attendee_intent
					has_activity_intent = befriend_attendee_intent
				}
				intent_target = scope:wounded_guest
			}
			ai_value_modifier = {
				ai_honor = -0.5
				ai_compassion = -0.5
				ai_boldness = 1
			}
		}
	}

	after = {
		if = {
			limit = {
				this = scope:host
			}
			scope:activity = {
				remove_variable = participant_to_use
				every_attending_character = {
					limit = {
						is_ai = no
						NOT = { this = scope:host }
					}
					trigger_event = hunt.1004
				}
			}
			remove_character_flag = dangerous_road
		}
	}
}

#You stab your hunting guest and kill them!
hunt.1005 = {
	type = activity_event
	title = hunt.1005.t
	desc = {
		desc = hunt.1005.opening
		desc = hunt.1005.opportunity
		desc = hunt.1005.desc
	}
	theme = hunt_activity
	left_portrait = {
		character = scope:murder_target
		animation = loss_1
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = shock
	}

	trigger = {

	}

	immediate = {
		play_music_cue = "mx_cue_stress"
		unknown_murder_effect = {
			VICTIM = scope:murder_target
			MURDERER = root
			REASON = death_hunting_mistakenly_stabbed
		}
		hunt_activity_random_interest_participant_effect = {
			ARCHETYPE = hunter
			COMBATANT = no
			SCOPE = hunt_participant
		}
		if = {
			limit = {
				exists = intent_target
				has_activity_intent = murder_attendee_intent
				intent_target = scope:murder_target
			}
			custom_tooltip = intent_murder_success_tt
		}
		# Chance for no pelt reward
		hunt_chance_for_no_pelt_effect = yes
	}

	option = {
		name = hunt.1005.a
		scope:murder_target = {
			every_close_or_extended_family_member = {
				limit = {
					NOR = {
						this = root
						this = scope:accomplice
						this = scope:accomplice_2
					}
				}
				custom = hunter_accident_victim_family_tt
				add_opinion = {
					modifier = accidentally_killed_family_opinion
					target = root
				}
			}
		}
		stress_impact = {
			base = medium_stress_impact_loss
		}
	}
}

#You stab your hunting guest and wound them (undiscovered)
hunt.1006 = {
	type = activity_event
	title = hunt.1005.t
	desc = hunt.1006.desc
	theme = hunt_activity
	left_portrait = {
		character = scope:murder_target
		animation = pain
	}
	right_portrait = scope:participant_to_blame
	
	immediate = {
		hunt_participant_to_blame_effect = yes
		scope:murder_target = {
			hunt_wound_select_effect = yes
			hunt_wound_apply_effect = { SEVERE = no }
		}
		add_secret = {
			type = secret_murder_attempt
			target = scope:murder_target
		}
		every_in_list = {
			list = animal_slayers
			custom = hunt_every_hunter_tt
			send_interface_toast = {
				title = hunter_prestige_gain_message
				add_prestige = hunt_prestige_melee_wound_group_value
			}
		}
		hunt_chance_for_no_pelt_effect = yes # Chance for no pelt reward
	}

	option = { #It was I!
		name = hunt.1006.a
		random_secret = {
			limit = {
				secret_type = secret_murder_attempt
				secret_target = scope:murder_target
			}
			expose_secret = root
		}
		hunt_murder_confession_opinion_effect = yes
	}

	option = { #It was them!!
		name = hunt.1006.b
		trigger = { exists = scope:participant_to_blame }
		scope:murder_target = {
			add_opinion = {
				target = scope:participant_to_blame
				modifier = cruelty_opinion
				opinion = -20
			}
		}
		reverse_add_opinion = {
			target = scope:participant_to_blame
			modifier = blamed_me_unjustly
		}
	}

	option = { #You clumsy fool!
		name = hunt.1006.c
		scope:murder_target = {
			add_opinion = {
				modifier = publicly_ridiculed
				target = root
			}
			add_dread = medium_dread_loss
			add_prestige = medium_prestige_loss
		}
	}
}

#You stab your hunting guest and wound them (discovered)
hunt.1007 = {
	type = activity_event
	title = hunt.1005.t
	desc = {
		desc = hunt.1005.opening
		desc = hunt.1005.opportunity
		desc = hunt.1007.desc
	}
	theme = hunt_activity
	left_portrait = {
		character = scope:murder_target
		animation = pain
	}
	right_portrait = {
		character = scope:hunt_participant
		trigger = {
			NOT = { scope:hunt_participant = scope:murder_target }
		}
		animation = shock
	}

	immediate = {
		scope:murder_target = {
			hunt_wound_select_effect = yes
			hunt_wound_apply_effect = { SEVERE = no }
		}
		add_secret = {
			type = secret_murder_attempt
			target = scope:murder_target
		}
		every_in_list = {
			list = animal_slayers
			custom = hunt_every_hunter_tt
			send_interface_toast = {
				title = hunter_prestige_gain_message
				add_prestige = hunt_prestige_melee_wound_group_value
			}
		}
		hunt_chance_for_no_pelt_effect = yes # Chance for no pelt reward
	}

	option = { #Do nothing
		name = hunt.1007.a
		duel = {
			skill = intrigue
			target = scope:murder_target
			10 = {
				desc = hunt.1007.a.success
				compare_modifier = {
					value = scope:duel_value
					multiplier = 1
					min = 5
				}
				modifier = {
					factor = 1.5
					scope:murder_target = { has_trait = paranoid }
				}
				send_interface_toast = {
					title = hunt.1007.a.success
					left_icon = scope:murder_target
					random_secret = { #They know that you tried killing them
						limit = {
							secret_type = secret_murder_attempt
							secret_target = scope:murder_target
						}
						reveal_to = scope:murder_target
					}
				}
			}
			10 = {
				desc = hunt.1007.a.failure
				modifier = {
					factor = 1.5
					scope:murder_target = { has_trait = trusting }
				}
				compare_modifier = {
					value = scope:duel_value
					multiplier = -1
					min = 5
				}
			}
		}
		stress_impact = {
			diligent = minor_stress_impact_gain
			sadistic = minor_stress_impact_gain
			honest = minor_stress_impact_gain
			wrathful = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 20
				OR = {
					has_trait = content
					has_trait = calm
					has_trait = lazy
					has_trait = honest
				}
			}
		}
	}

	option = { #Threaten
		name = hunt.1007.b
		trigger = {
			NOT = { has_usable_hook = scope:murder_target }
		}
		random_secret = { #They know that you tried killing them
			limit = {
				secret_type = secret_murder_attempt
				secret_target = scope:murder_target
			}
			reveal_to = scope:murder_target
		}
		reverse_add_opinion = {
			target = scope:murder_target
			opinion = -20
			modifier = threatened_opinion
		}
		add_dread = medium_dread_gain
		stress_impact = {
			calm = minor_stress_impact_gain
			shy = minor_stress_impact_gain
			craven = minor_stress_impact_gain
			deceitful = minor_stress_impact_gain
			diligent = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 20
				OR = {
					has_trait = brave
					has_trait = wrathful
					has_trait = deceitful
					has_trait = callous
				}
			}
		}
	}

	option = { #Finish them!!
		name = hunt.1007.c
		trigger = {
			OR = {
				has_trait = sadistic
				has_trait = diligent
			}
		}
		trait = diligent
		trait = sadistic
		hidden_effect = {
			random_secret = { #Remove the secret
				limit = {
					secret_type = secret_murder_attempt
					secret_target = scope:murder_target
				}
				remove_secret = yes
			}
		}
		known_murder_effect = { #You kill them
			VICTIM = scope:murder_target
			MURDERER = root
			EXPOSER = root
		}
		stress_impact = {
			calm = medium_stress_impact_gain
			lazy = medium_stress_impact_gain
			craven = medium_stress_impact_gain
			honest = medium_stress_impact_gain
			compassionate = medium_stress_impact_gain
			wrathful = minor_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				add = 40
				OR = {
					has_trait = sadistic
					has_trait = diligent
				}
			}
			modifier = {
				add = 20
				OR = {
					has_trait = wrathful
					has_trait = callous
				}
			}
		}
	}

	option = { #Talk yourself out of it
		name = hunt.1007.d
		trigger = { diplomacy >= high_skill_rating }
		skill = diplomacy
		duel = {
			skill = diplomacy
			target = scope:murder_target
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 1
					min = 5
				}
				random_secret = { #Remove the secret
					limit = {
						secret_type = secret_murder_attempt
						secret_target = scope:murder_target
					}
					remove_secret = yes
				}
			}
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -1
					min = 5
				}
				random_secret = { #They know that you tried killing them
					limit = {
						secret_type = secret_murder_attempt
						secret_target = scope:murder_target
					}
					reveal_to = scope:murder_target
				}
			}
		}
		stress_impact = {
			sadistic = medium_stress_impact_gain
			wrathful = medium_stress_impact_gain
			shy = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
		}
	}

	option = { #You have a Hook on them?
		name = hunt.1007.e
		trigger = { has_usable_hook = scope:murder_target }
		use_hook = scope:murder_target
		random_secret = { #Remove the secret
			limit = {
				secret_type = secret_murder_attempt
				secret_target = scope:murder_target
			}
			remove_secret = yes
		}
		stress_impact = {
			wrathful = medium_stress_impact_gain
			callous = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
			shy = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
		}
	}
}

#You stab your hunting guest and miss!
hunt.1008 = {
	type = activity_event
	title = hunt.1005.t
	desc = {
		desc = hunt.1005.opening
		desc = hunt.1005.opportunity
		desc = hunt.1008.desc
	}
	theme = hunt_activity
	left_portrait = {
		character = scope:murder_target
		animation = happiness
	}

	immediate = {
		every_in_list = {
			list = animal_slayers
			custom = hunt_every_hunter_tt
			send_interface_toast = {
				title = hunter_prestige_gain_message
				add_prestige = hunt_prestige_melee_group_value
			}
		}
		hunt_chance_for_no_pelt_effect = yes # Chance for no pelt reward
	}

	option = {
		name = hunt.1008.a
		stress_impact = {
			base = minor_stress_impact_gain
		}
	}
}

#########################
#	A vassal rival, or a powerful vassal that doesn't like you, is being an ass
#	by Linnéa Thimrén
#	1011-1016
#########################

scripted_trigger hunt_1011_nasty_guest_trigger = {
	NOT = { this = root }
	is_vassal_of = root
	OR = {
		has_relation_rival = root
		has_relation_potential_rival = root
		is_a_faction_leader = yes
		opinion = {
			target = root
			value <= -30
		}
	}
}

scripted_trigger hunt_1011_nice_guest_trigger = {
	NOT = { this = root }
	trigger_if = {
		limit = { exists = scope:murder_target }
		NOR = {
			this = scope:murder_target
			has_relation_friend = scope:murder_target
			has_relation_lover = scope:murder_target
		}
	}
	trigger_else = {
		NOR = {
			has_relation_rival = root
			has_relation_potential_rival = root
			is_a_faction_leader = yes
			opinion = {
				target = root
				value <= -30
			}
		}
	}
	OR = {
		is_spouse_of = root
		has_relation_lover = root
		has_relation_potential_lover = root
		has_relation_friend = root
		has_relation_potential_friend = root
		root = {
			opinion = {
				target = prev
				value >= 0
			}
		}
	}
}

hunt.1011 = {
	type = activity_event
	title = hunt.1011.t
	desc = {
		random_valid = {
			desc = hunt.1011.desc_horse
			desc = hunt.1011.desc_talk
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = scope:murder_target
		animation = schadenfreude
	}
	right_portrait = {
		character = scope:nice_courtier
		animation = shame
	}
	
	trigger = {
		scope:activity = {
			any_attending_character = { hunt_1011_nasty_guest_trigger = yes }
			any_attending_character = { hunt_1011_nice_guest_trigger = yes }
		}
	}

	weight_multiplier = {
		base = 0.8
		modifier = { #More likely to fire if you have a rival joining
			add = 0.2
			scope:activity = {
				any_attending_character = {
					is_vassal_of = root
					OR = {
						has_relation_rival = root
						has_relation_potential_rival = root
					}
				}
			}
		}
		modifier = { #More likely to fire if you have a powerful vassal rival joining
			add = 0.3
			scope:activity = {
				any_attending_character = {
					is_powerful_vassal_of = root
					OR = {
						has_relation_rival = root
						has_relation_potential_rival = root
					}
				}
			}
		}
	}

	immediate = {
		scope:activity = {
			random_attending_character = {
				limit = { hunt_1011_nasty_guest_trigger = yes }
				save_scope_as = murder_target
			}
			random_attending_character = {
				limit = { hunt_1011_nice_guest_trigger = yes }
				save_scope_as = nice_courtier
			}
		}
		set_variable = {
			name = participant_to_use_1011
			value = scope:murder_target
			days = 300
		}
	}

	option = { #call them out
		name = hunt.1011.a
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_belted_guest_log
				score = 25
				tags = { neutral random social }
				character = root
				target = scope:murder_target

				# Effect
				root = {
					scope:murder_target = {
						add_character_modifier = {
							modifier = hunt_tasted_the_belt_modifier
							years = 5
						}
					}
					reverse_add_opinion = {
						target = scope:murder_target
						modifier = rude_opinion
					}
				}
				hunt_activity_success_change_effect = { CHANGE = decrease_medium }
				stress_impact = {
					sadistic = minor_stress_impact_loss
					compassionate = medium_stress_impact_gain
					forgiving = minor_stress_impact_gain
					calm = medium_stress_impact_gain
				}
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 20
				OR = {
					has_trait = sadistic
					has_trait = callous
				}
			}
		}
	}

	option = { #Intervene!
		name = hunt.1011.b
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_mediated_fight_log
				score = 25
				tags = { random neutral social }
				character = scope:nice_courtier
				target = scope:murder_target

				# Effect
				root = {
					add_character_modifier = {
						modifier = hunt_mediated_fight_modifier
						years = 5
					}
					reverse_add_opinion = {
						target = scope:murder_target
						modifier = rude_opinion
					}
					reverse_add_opinion = {
						target = scope:nice_courtier
						modifier = kindness_opinion
						opinion = 30
					}
				}
			}
		}
		stress_impact = {
			shy = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
			callous = medium_stress_impact_gain
			craven = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 20
				OR = {
					has_trait = compassionate
					has_trait = just
					has_trait = wrathful
				}
			}
		}
	}

	option = { #Join in!
		name = hunt.1011.c
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_insulted_guest_log
				score = 25
				tags = { random neutral social }
				character = root
				target = scope:nice_courtier

				# Effect
				root = {
					reverse_add_opinion = {
						target = scope:murder_target
						modifier = friendliness_opinion
						opinion = 20
					}
					reverse_add_opinion = {
						target = scope:nice_courtier
						modifier = rude_opinion
					}
					stress_impact = {
						base = minor_stress_impact_gain
						callous = minor_stress_impact_loss
						sadistic = medium_stress_impact_loss
						compassionate = medium_stress_impact_gain
					}
				}
			}
		}
		save_scope_value_as = { #Don't trigger the follow-up
			name = no_follow_up
			value = yes
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 20
				OR = {
					has_trait = sadistic
					opinion = {
						target = scope:nice_courtier
						value <= 10
					}
				}
			}
		}
	}
}

#Do you shoot your bothersome hunting guest or not?
hunt.1012 = {
	type = activity_event
	title = hunt.1012.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					hunt_story_trigger = { STORY = stealth }
				}
				desc = hunt.1012.opening
			}
		}
		desc = hunt.1012.desc
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:accomplice }
				desc = hunt.1012.accomplice
			}
			desc = hunt.1012.alone
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			}
			scripted_animation = bow_drawn
		}
		triggered_animation = {
			trigger = {
				NOT = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				}
			}
			animation = schadenfreude
		}
	}
	right_portrait = {
		character = scope:accomplice
		trigger = { exists = scope:accomplice }
		triggered_animation = {
			trigger = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			}
			scripted_animation = bow_drawn
		}
		triggered_animation = {
			trigger = {
				NOT = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				}
			}
			animation = worry
		}
	}
	center_portrait = {
		character = scope:murder_target
		animation = thinking
	}
	
	trigger = { #Either a continuation from 1011 or someone you have a murder scheme against
		NOT = {
			hunt_story_trigger = { STORY = chase }
		}
		OR = {
			hunt_1012_hated_participant_trigger = yes
			hunt_murder_intent_target_trigger = yes
			hunt_murder_target_trigger = yes
		}
		OR = {
			can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			AND = {
				scope:activity = {
					any_attending_character = {
						any_targeting_scheme = {
							hunt_murder_scheme_target_trigger = yes
							OR = {
								scheme_owner = { hunt_valid_murder_accomplice_trigger = yes }
								any_scheme_agent_character = { hunt_valid_murder_accomplice_trigger = yes }
							}
						}
					}
				}
			}
		}
	}

	immediate = {
		hidden_effect = { hunt_save_murder_target_effect = yes }
	}

	option = { #Take the shot!
		name = {
			trigger = { exists = scope:accomplice }
			text = hunt.1012.a.accomplice
		}
		name = {
			trigger = {
				NOT = { exists = scope:accomplice }
			}
			text = hunt.1012.a
		}
		flavor = hunt.1012.a.tt
		set_variable = {
			name = hunt_murder_attempt
			value = scope:murder_target
		}
		hunt_increment_murder_accident_attempt = yes #So it doesn't get silly, we track attempts and make chance to succeed lower for each recent one
		duel = {
			skills = { intrigue prowess }
			target = scope:murder_target
			10 = { # ...but target is killed
				desc = hunt_kill_murder_killed
				compare_modifier = {
					value = scope:duel_value
					multiplier = 0.5
				}
				modifier = { add = hunt_melee_kill_prowess_value }
				custom_tooltip = hunt_target_attendee_killed_tt
				custom_tooltip = hunt_ends_tt
				trigger_event = {
					id = hunt.1013
					days = 1
				}
			}
			10 = { # ...but target is injured
				desc = hunt_kill_murder_injured
				compare_modifier = {
					value = scope:duel_value
					multiplier = 0.5
				}
				modifier = { add = hunt_melee_kill_prowess_value }
				modifier = { add = hunt_melee_danger_value }
				custom_tooltip = hunt_target_attendee_injured_tt
				custom_tooltip = hunt_murder_involvement_discovered_tt
				hidden_effect = {
					random_list = {
						10 = {
							modifier = { add = intrigue }
							trigger_event = {
								id = hunt.1014
								days = 1
							}
						}
						10 = {
							modifier = { add = scope:murder_target.intrigue }
							trigger_event = {
								id = hunt.1015
								days = 1
							}
						}
					}
				}
			}
			10 = { # Miss
				desc = hunt_kill_murder_missed
				compare_modifier = {
					value = scope:duel_value
					multiplier = -0.5
				}
				modifier = {
					exists = var:hunt_murder_accident_attempt
					factor = {
						value = var:hunt_murder_accident_attempt
						multiply = 10
					}
				}
				trigger_event = {
					id = hunt.1016
					days = 1
				}
			}
		}
		hunt_activity_success_change_effect = { CHANGE = decrease_major }
		stress_impact = {
			compassionate = major_stress_impact_gain
			humble = medium_stress_impact_gain
			honest = medium_stress_impact_gain
			just = medium_stress_impact_gain
			forgiving = medium_stress_impact_gain
			vengeful = medium_stress_impact_loss
			sadistic = medium_stress_impact_loss
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_vengefulness = 0.5
				ai_energy = 0.5
				ai_boldness = 0.25
				ai_honor = -0.25
				ai_compassion = -0.25
			}
		}
	}

	option = { #Restrain yourself
		name = hunt.1012.b
		flavor = hunt.1012.b.flavor
		if = {
			limit = {
				exists = var:participant_to_use_1011
				var:participant_to_use_1011 = scope:murder_target
				NOT = {
					faith = { has_doctrine_parameter = piety_gain_from_successful_intrigue_schemes }
				}
			}
			add_piety = medium_piety_gain
		}
		if = {
			limit = { exists = scope:accomplice }
			reverse_add_opinion = {
				target = scope:accomplice
				modifier = hunt_did_not_shoot_opinion
				opinion = -10
			}
		}
		stress_impact = {
			base = minor_stress_gain
			sadistic = minor_stress_impact_gain
			wrathful = minor_stress_impact_gain
			vengeful = minor_stress_impact_gain
			impatient = minor_stress_impact_gain
			compassionate = medium_stress_impact_loss
			forgiving = medium_stress_impact_loss
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_honor = 0.75
				ai_rationality = 0.25
				ai_compassion = 0.25
				ai_vengefulness = -0.25
			}
		}
	}
}

#You shoot at your hunting guest and kill them!
hunt.1013 = {
	type = activity_event
	title = hunt.1012.t
	desc = hunt.1013.desc
	theme = hunt_activity
	left_portrait = {
		character = scope:murder_target
		animation = loss_1
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = shock
	}

	immediate = {
		play_music_cue = "mx_cue_stress"
		unknown_murder_effect = {
			VICTIM = scope:murder_target
			MURDERER = root
			REASON = death_hunting_mistakenly_shot
		}
		hunt_activity_random_interest_participant_effect = {
			ARCHETYPE = hunter
			COMBATANT = no
			SCOPE = hunt_participant
		}
		if = {
			limit = {
				exists = intent_target
				has_activity_intent = murder_attendee_intent
				intent_target = scope:murder_target
			}
			custom_tooltip = intent_murder_success_tt
		}
		stress_impact = {
			base = medium_stress_impact_loss
		}
	}

	option = {
		name = hunt.1013.a
		scope:activity = {
			set_variable = {
				name = hunt_invalidated
				value = flag:death
			}
			set_variable = {
				name = hunt_invalidated_flavor
				value = scope:murder_target
			}
		}
		custom_tooltip = hunt_ends_tt
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_rationality = 1
				ai_compassion = 0.5
				ai_honor = 0.5
			}
		}
	}

	option = {
		name = hunt.1013.b
		scope:activity = {
			every_attending_character = {
				limit = {
					NOT = { this = root }
					is_alive = yes
				}
				custom = all_hunt_participants
				add_opinion = {
					modifier = opinion_acting_strange
					target = root
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_rationality = -1
				ai_compassion = -0.5
				ai_honor = -0.5
			}
		}
	}
}

#You shoot at your hunting guest and wound them (undiscovered)
hunt.1014 = {
	type = activity_event
	title = hunt.1012.t
	desc = hunt.1014.desc
	theme = hunt_activity
	left_portrait = {
		character = scope:murder_target
		animation = pain
	}
	right_portrait = {
		character = scope:participant_to_blame
		animation = shock
	}
	
	immediate = {
		hunt_participant_to_blame_effect = yes
		scope:murder_target = {
			increase_wounds_effect = { REASON = hunting_mistakenly_shot }
		}
		add_secret = {
			type = secret_murder_attempt
			target = scope:murder_target
		}
	}

	option = { #It was I!
		name = hunt.1014.a
		scope:murder_target = {
			add_opinion = {
				target = root
				modifier = cruelty_opinion
				opinion = -20
			}
		}
		hunt_murder_confession_opinion_effect = yes
	}

	option = { #It was them!!
		name = hunt.1014.b
		trigger = {
			exists = scope:participant_to_blame
		}
		scope:murder_target = {
			add_opinion = {
				target = scope:participant_to_blame
				modifier = cruelty_opinion
				opinion = -20
			}
		}
		scope:participant_to_blame = {
			add_opinion = {
				target = root
				modifier = blamed_me_unjustly
			}
		}
	}

	option = { #You clumsy fool!
		name = hunt.1014.c
		scope:murder_target = {
			add_opinion = {
				modifier = publicly_ridiculed
				target = root
			}
			add_dread = medium_dread_loss
			add_prestige = medium_prestige_loss
		}
	}
}

#You shoot at your hunting guest and wound them (discovered)
hunt.1015 = {
	type = activity_event
	title = hunt.1012.t
	desc = hunt.1015.desc
	theme = hunt_activity
	left_portrait = {
		character = scope:murder_target
		animation = pain
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = shock
	}

	immediate = {
		scope:murder_target = {
			increase_wounds_effect = { REASON = hunting_mistakenly_shot }
		}
		hunt_activity_random_interest_participant_effect = {
			ARCHETYPE = hunter
			COMBATANT = no
			SCOPE = hunt_participant
		}
		add_secret = {
			type = secret_murder_attempt
			target = scope:murder_target
		}
	}

	option = { #Do nothing
		name = hunt.1015.a
		duel = {
			skill = intrigue
			target = scope:murder_target
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 1
					min = 5
				}
				modifier = {
					factor = 1.5
					scope:murder_target = { has_trait = paranoid }
				}
				random_secret = { #They know that you tried killing them
					limit = {
						secret_type = secret_murder_attempt
						secret_target = scope:murder_target
					}
					reveal_to = scope:murder_target
				}
			}
			10 = {
				modifier = {
					factor = 1.5
					scope:murder_target = { has_trait = trusting }
				}
				compare_modifier = {
					value = scope:duel_value
					multiplier = -1
					min = 5
				}
			}
		}
		stress_impact = {
			diligent = medium_stress_impact_gain
			gregarious = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
			honest = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 20
				OR = {
					has_trait = content
					has_trait = calm
					has_trait = lazy
					has_trait = honest
				}
			}
		}
	}

	option = { #Threaten
		name = hunt.1015.b
		trigger = {
			NOT = { has_usable_hook = scope:murder_target }
		}
		random_secret = { #They know that you tried killing them
			limit = {
				secret_type = secret_murder_attempt
				secret_target = scope:murder_target
			}
			reveal_to = scope:murder_target
		}
		reverse_add_opinion = {
			target = scope:murder_target
			opinion = -10
			modifier = threatened_opinion
		}
		add_dread = medium_dread_gain
		stress_impact = {
			calm = minor_stress_impact_gain
			shy = minor_stress_impact_gain
			craven = minor_stress_impact_gain
			deceitful = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 20
				OR = {
					has_trait = brave
					has_trait = wrathful
					has_trait = deceitful
					has_trait = callous
				}
			}
		}
	}

	option = { #Finish them!!
		name = hunt.1015.c
		trigger = {
			OR = {
				has_trait = sadistic
				has_trait = diligent
			}
		}
		trait = diligent
		trait = sadistic
		random_secret = { #Remove the secret
			limit = {
				secret_type = secret_murder_attempt
				secret_target = scope:murder_target
			}
			remove_secret = yes
		}
		unknown_murder_effect = { #You kill them
			VICTIM = scope:murder_target
			MURDERER = root
			REASON = death_hunting_mistakenly_shot
		}
		stress_impact = {
			calm = medium_stress_impact_gain
			lazy = medium_stress_impact_gain
			craven = medium_stress_impact_gain
			honest = medium_stress_impact_gain
			compassionate = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				add = 40
				OR = {
					has_trait = sadistic
					has_trait = diligent
				}
			}
			modifier = {
				add = 20
				OR = {
					has_trait = wrathful
					has_trait = callous
				}
			}
		}
	}

	option = { #Talk yourself out of it
		name = hunt.1015.d
		trigger = { diplomacy >= high_skill_rating }
		skill = diplomacy
		duel = {
			skill = diplomacy
			target = scope:murder_target
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 1
					min = 5
				}
				random_secret = { #Remove the secret
					limit = {
						secret_type = secret_murder_attempt
						secret_target = scope:murder_target
					}
					remove_secret = yes
				}
			}
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -1
					min = 5
				}
				random_secret = { #They know that you tried killing them
					limit = {
						secret_type = secret_murder_attempt
						secret_target = scope:murder_target
					}
					reveal_to = scope:murder_target
				}
			}
		}
		stress_impact = {
			sadistic = medium_stress_impact_gain
			wrathful = medium_stress_impact_gain
			shy = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
		}
	}

	option = { #You have a Hook on them?
		name = hunt.1015.e
		trigger = { has_usable_hook = scope:murder_target }
		use_hook = scope:murder_target
		random_secret = { #Remove the secret
			limit = {
				secret_type = secret_murder_attempt
				secret_target = scope:murder_target
			}
			remove_secret = yes
		}
		stress_impact = {
			wrathful = medium_stress_impact_gain
			callous = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
			shy = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
		}
	}
}

#You shoot at your hunting guest and miss!
hunt.1016 = {
	type = activity_event
	title = hunt.1012.t
	desc = hunt.1016.desc
	theme = hunt_activity
	left_portrait = {
		character = scope:murder_target
		animation = paranoia
	}

	option = {
		name = hunt.1016.a
		stress_impact = {
			base = minor_stress_impact_gain
		}
	}
}

#######################
#	Beautiful Peasant Chain: Meet a beautiful peasant in the forest
#	by Petter Vilberg
#	1021-1022
#######################

hunt.1021 = {
	type = activity_event
	title = hunt.1021.t
	desc = hunt.1021.desc
	theme = hunt_activity
	override_background = {
		trigger = {
			scope:activity.activity_location = {
				NOR = { # Only Forests
					graphical_wilderness_desert_trigger = yes
					hunt_snowy_forest_trigger = yes
					graphical_wilderness_mountains_trigger = yes
					graphical_wilderness_steppe_trigger = yes
					graphical_drylands_trigger = yes
					graphical_wilderness_wetlands_trigger = yes
					graphical_wilderness_jungle_trigger = yes
				}
			}
		}
		reference = ep2_hunt_forest_hut
	}
	right_portrait = {
		character = scope:beautiful_peasant
		animation = flirtation_left
	}
	left_portrait = {
		character = root
		animation = flirtation
	}
	
	trigger = {
		NOT = { has_character_flag = ran_into_beautiful_peasant_in_forest }
		is_adult = yes
		NOR = {
			has_sexuality = asexual
			has_trait = celibate
		}
		scope:activity.activity_location.county = {
			NOT = {
				any_county_province = { # Doesn't make narrative sense
					OR = {
						has_holding_type = nomad_holding
						has_holding_type = herder_holding
					}
				}
			}
		}
	}

	weight_multiplier = {
		base = 1
		modifier = { #Since it creates a GOOD character we don't want the ai to get it too often
			add = -0.9
			is_ai = yes
		}
		modifier = {
			add = 0.5
			is_ai = no
			has_trait = lustful
		}
		compare_modifier = { #Less likely to happen the older you are
			trigger = {
				ek_human_age_equivalent >= 30 # EK EDIT: lifespan
			}
			value = ek_human_age_equivalent # EK EDIT: lifespan
			multiplier = -0.01
		}
	}

	immediate = {
		play_music_cue = "mx_cue_seduction"
		add_character_flag = {
			flag = ran_into_beautiful_peasant_in_forest
			days = 3650
		}
		hidden_effect = {
			create_character = {
				location = scope:activity.activity_location
				template = beautiful_peasant_character
				gender_female_chance = root_attraction_based_female_chance
				faith = scope:activity.activity_location.county.faith
				culture = scope:activity.activity_location.county.culture
				dynasty = none
				save_scope_as = beautiful_peasant
				#EK ADDITION
				after_creation = {
					ek_character_setup_effect = yes
				}
			}
			if = {
				limit = { exists = scope:beautiful_peasant }
				random_list = {
					25 = {
						trigger = { sex_same_as = scope:beautiful_peasant }
						scope:beautiful_peasant = { set_sexuality = homosexual }
					}
					100 = {
						trigger = { sex_opposite_of = scope:beautiful_peasant }
						scope:beautiful_peasant = { set_sexuality = heterosexual }
					}
					25 = {
						scope:beautiful_peasant = { set_sexuality = bisexual }
					}
				}
			}
		}
	}

	option = { #Oh, hello you
		name = hunt.1021.a
		trigger = { might_cheat_on_every_partner_trigger = yes }
		hunt_activity_success_change_effect = { CHANGE = decrease_medium }
		trigger_event = {
			id = hunt.1022
			days = { 3 7 }
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_laid_peasant_log
				character = root
				target = scope:beautiful_peasant

				# Effect
				root = {
					show_as_tooltip = {
						had_sex_with_effect = {
							CHARACTER = scope:beautiful_peasant
							PREGNANCY_CHANCE = pregnancy_chance
						}
					}
					stress_impact = {
						base = medium_stress_impact_loss
						lustful = minor_stress_impact_loss
						rakish = minor_stress_impact_loss
						chaste = major_stress_impact_gain
						shy = medium_stress_impact_gain
						impatient = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness = 1
				ai_greed = 0.25
				ai_honor = -0.5
			}
			opinion_modifier = {
				trigger = { is_married = yes }
				multiplier = -0.5
				opinion_target = primary_spouse
			}
		}
	}

	option = { #I have animals to hunt!
		name = {
			trigger = {
				OR = {
					has_trait = lifestyle_hunter
					has_trait = brave
				}
			}
			text = hunt.1021.b.thrill
		}
		name = {
			trigger = {
				OR = {
					has_trait = zealous
					piety_level >= high_piety_level
				}
			}
			text = hunt.1021.b.appropriate
		}
		name = {
			trigger = {
				OR = {
					has_trait = sadistic
					has_trait = callous
					has_trait = arrogant
				}
			}
			text = hunt.1021.b.cruel
		}
		name = hunt.1021.b.purpose
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_resisted_advances_log
				character = root
				target = scope:beautiful_peasant

				# Effect
				root = {
					if = {
						limit = {
							faith = {
								NOT = { has_doctrine = tenet_carnal_exaltation }
							}
						}
						add_character_modifier = {
							modifier = modifier_hunt_resisted_advances
							days = 1825
						}
						add_piety = minor_piety_gain
					}
					stress_impact = {
						lazy = minor_stress_impact_gain
						lustful = medium_stress_impact_gain
						diligent = minor_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 0.25
				ai_rationality = 0.5
			}
		}
	}
	
	option = { #You deserve a life at court
		name = hunt.1021.d
		trait = chaste
		trigger = { has_trait = chaste }
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_hosted_peasant_log
				character = root
				target = scope:beautiful_peasant

				# Effect
				root = {
					remove_short_term_gold = activity_minor_gold_value
					add_courtier = scope:beautiful_peasant
					set_relation_friend = { reason = friend_invited_to_court target = scope:beautiful_peasant }
				}
			}
		}
		ai_chance = {
			base = 300
			ai_value_modifier = {
				ai_compassion = 0.5
			}
		}
	}
}

#You spent some time in their cabin
hunt.1022 = {
	type = activity_event
	title = hunt.1022.t
	desc = hunt.1022.desc
	theme = hunt_activity
	override_background = {
		trigger = {
			scope:activity.activity_location = {
				NOR = { # Only Forests
					graphical_wilderness_desert_trigger = yes
					hunt_snowy_forest_trigger = yes
					graphical_wilderness_mountains_trigger = yes
					graphical_wilderness_steppe_trigger = yes
					graphical_drylands_trigger = yes
					graphical_wilderness_wetlands_trigger = yes
					graphical_wilderness_jungle_trigger = yes
				}
			}
		}
		reference = ep2_hunt_forest_hut
	}
	right_portrait = {
		character = scope:beautiful_peasant
		animation = ecstasy
	}
	left_portrait = {
		character = root
		animation = flirtation
	}

	immediate = {
		had_sex_with_effect = {
			CHARACTER = scope:beautiful_peasant
			PREGNANCY_CHANCE = pregnancy_chance
		}
	}

	option = { #Let's not meet again
		name = hunt.1022.a
		flavor = hunt.1022.a.tt
		hidden_effect = {
			scope:beautiful_peasant = {
				if = {
					limit = {
						is_female = yes
					}
					save_scope_as = peasant_woman
				}
			}
		}
		stress_impact = {
			lustful = minor_stress_impact_gain
			fickle = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
		}
	}

	option = { #Let me set you up at court
		name = hunt.1022.b		
		trigger = {
			NOT = { has_trait = chaste }
		}
		every_spouse = { add_to_list = consorts_n_lovers }
		every_relation = {
			type = lover
			add_to_list = consorts_n_lovers
		}
		duel = {
			skill = diplomacy
			value = average_skill_rating
			10 = {
				compare_modifier = {
					value = scope:duel_value
				}
				desc = hunt.1021.c.success
				send_interface_toast = {
					title = hunt.1021.c.success
					left_icon = scope:beautiful_peasant
					if = {
						limit = {
							is_landless_adventurer = yes
						}
						domicile = {
							change_provisions = microscopic_provisions_loss
						}
					}
					else = {
						remove_short_term_gold = activity_minor_gold_value
					}
					add_courtier = scope:beautiful_peasant
					set_relation_lover = { reason = lover_hunt_peasant target = scope:beautiful_peasant province = scope:activity.activity_location }	
					every_in_list = {
						list = consorts_n_lovers
						custom = every_consort_tt
						add_opinion = {
							target = root
							modifier = suspicious_addition_opinion
							opinion = -5
						}
						add_opinion = {
							target = scope:beautiful_peasant
							modifier = suspicious_addition_opinion
							opinion = -20
						}
					}
				}
			}
			10 = {
				desc = hunt.1021.c.failure
				send_interface_toast = {
					title = hunt.1021.c.failure
					left_icon = scope:beautiful_peasant
					custom_tooltip = hunt.1021.c.failure_tt
				}
			}
		}
		stress_impact = {
			callous = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
			paranoid = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_honor = 0.5
				ai_compassion = 0.5
			}
		}
	}
}

#######################
#	You have a dog that helps you to fell an animal
#	by Linnéa Thimrén
#######################

hunt.1023 = {
	type = activity_event
	title = hunt.1023.t
	desc = hunt.1023.desc
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = shock
	}

	trigger = {
		any_owned_story = { story_type = story_cycle_pet_dog }
	}

	weight_multiplier = {
		base = 0.5
		modifier = { # more likely to fire if no cool characters have joined
			add = 0.5
			scope:activity = {
				NOT = {
					any_attending_character = {
						NOT = { this = root }
						is_ai = yes
						is_adult = yes
						is_powerful_vassal_of = root
					}
				}
			}
		}
	}

	immediate = {
		random_owned_story = {
			limit = { story_type = story_cycle_pet_dog }
			save_scope_as = story
		}
		hunt_activity_dangerous_game_effect = { PROVINCE = activity_location }
		hunt_activity_success_change_effect = { CHANGE = increase_minor  }
		if = {
			limit = {
				exists = court_position:akolouthos_court_position
				court_position:akolouthos_court_position = { is_participant_in_activity = scope:activity }
			}
			court_position:akolouthos_court_position = { save_scope_as = bodyguard }
		}
		else_if = {
			limit = {
				exists = court_position:bodyguard_court_position
				court_position:bodyguard_court_position = { is_participant_in_activity = scope:activity }
			}
			court_position:bodyguard_court_position = { save_scope_as = bodyguard }
		}
		hunter_progress_point_gain_effect = { CHANGE = 1 RANDOM_CHANGE = 1 } #Gives points towards ranking up the Hunter Lifestyle
	}

	option = { #Sic the dog on the animal!
		name = hunt.1023.a
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_sicced_dog_log
				score = 25
				tags = { random neutral }
				character = root

				# Effect
				root = {
					add_character_modifier = {
						modifier = modifier_hunt_dog_trophy_modifier
						years = 10
					}
					random_list = {
						80 = {
							desc = hunt.1023.a.good
							modifier = {
								add = 20
								has_character_modifier = dog_story_beasthound_modifier
							}
							send_interface_toast = {
								title = hunt.1023.a.good
								left_icon = root
								scope:activity = {
									every_attending_character = {
										limit = {
											NOT = { this = root }
										}
										custom = all_hunt_participants
										add_opinion = {
											modifier = respect_opinion
											target = root
											opinion = 15
										}
									}
								}
								hunt_activity_success_change_effect = { CHANGE = increase_major }
							}
						}
						20 = { #Dog dies
							desc = hunt.1023.a.bad
							modifier = { #How old is the dog?
								add = 20
								scope:story.var:dog_age_variable > 10
							}
							modifier = { #How old is the dog?
								add = 20
								scope:story.var:dog_age_variable < 2
							}
							modifier = {#What animal is it?
								add = 20
								hunt_activity_large_game_trigger = { VAR = scope:activity.var:animal_type }
							}
							send_interface_toast = {
								title = hunt.1023.a.bad
								left_icon = root
								show_as_tooltip = {
									remove_dog_story_modifiers_effect = yes
								}
								scope:story = {
									hidden_effect = { end_story = yes }
								}
								hunt_activity_success_change_effect = { CHANGE = decrease_major }
							}
							stress_impact = {
								brave = minor_stress_impact_gain
								compassionate = minor_stress_impact_gain
								diligent = minor_stress_impact_gain
								arrogant = minor_stress_impact_gain
								craven = medium_stress_impact_loss
							}
						}
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_energy = 0.5
			}
		}
	}

	option = { #Nah
		name = hunt.1023.b
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_fighting_dog_log
				score = 25
				tags = { random neutral }
				character = root
				
				#Effect
				root = {
					add_character_modifier = {
						modifier = modifier_hunt_dog_fighting_modifier
						years = 5
					}
					hunt_activity_success_change_effect = { CHANGE = increase_medium }
					stress_impact = {
						craven = medium_stress_impact_gain
						brave = minor_stress_impact_loss
						compassionate = minor_stress_impact_loss
						diligent = minor_stress_impact_loss
						arrogant = minor_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_boldness = 0.75
				ai_energy = 0.5
			}
		}
	}
}

#######################
#	Ambush method
#	by Joe Parkin
#######################

#Ambush start
hunt.1030 = {
	type = activity_event
	title = hunt.1030.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = { this = scope:host }
				desc = hunt.1030.desc
			}
			desc = {
				desc = hunt.1030.guest
				first_valid = {
					triggered_desc = {
						trigger = {
							hunt_story_trigger = { STORY = chase }
						}
						desc = hunt.1040.chase
					}
					desc = hunt.1030.ambush
				}
			}
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = scope:host
		animation = thinking
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = hunting_horn
	}
	center_portrait = {
		character = root
		trigger = {
			NOR = {
				this = scope:hunt_participant
				this = scope:host
			}
		}
	}
	cooldown = { weeks = 1 }

	trigger = {
		trigger_if = {
			limit = {
				NOT = { this = scope:host }
			}
			is_ai = no
		}
		scope:activity = {
			OR = {
				has_activity_option = { category = special_type option = hunt_type_standard }
				has_activity_option = { category = special_type option = hunt_type_legendary }
			}
			NOT = {
				has_activity_option = { category = hunt_option_attendants option = hunt_attendants_few }
			}
			hunt_activity_deer_antelope_game_trigger = { VAR = var:animal_type }
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			has_trait = tourney_participant
			has_trait_xp = {
				trait = tourney_participant
				track = bow
				value >= 25
			}
		}
		modifier = {
			factor = 2
			court_position:master_of_hunt_court_position ?= {
				is_participant_in_activity = scope:activity
				has_trait = tourney_participant
				has_trait_xp = {
					trait = tourney_participant
					track = bow
					value >= 25
				}
			}
		}
		modifier = {
			factor = 2
			court_position:huntperson_camp_officer ?= {
				is_participant_in_activity = scope:activity
				has_trait = tourney_participant
				has_trait_xp = {
					trait = tourney_participant
					track = bow
					value >= 25
				}
			}
		}
		modifier = {
			factor = 2
			scope:activity = {
				OR = {
					has_activity_option = { category = hunt_option_attendants option = hunt_attendants_many }
					activity_host = { government_has_flag = government_is_nomadic }
				}
			}
		}
		modifier = {
			factor = 0.25
			government_has_flag = government_is_tribal
		}
	}

	immediate = {
		if = {
			limit = { this = scope:host }
			hunt_activity_random_subordinate_participant_effect = {
				ARCHETYPE = hunter
				COMBATANT = yes
				SCOPE = hunt_participant
			}
			if = {
				limit = { exists = scope:hunt_participant }
				scope:activity = {
					set_variable = {
						name = participant_to_use
						value = scope:hunt_participant
						years = 1
					}
				}
			}
		}
		else = { hunt_story_tooltip_effect = yes }
	}

	option = {
		name = hunt.1030.a
		trigger = { this = scope:host }
		hunt_activity_method_effect = { STORY = ambush }
		stress_impact = {
			impatient = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
			brave = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = arrogant
					has_trait = brave
					has_trait = impatient
				}
			}
		}
	}

	option = {
		name = hunt.1030.b
		trigger = { this = scope:host }
		add_prestige = minor_prestige_gain
		hunt_activity_method_effect = { STORY = chase }
		hunt_activity_success_change_effect = { CHANGE = decrease_medium }
		stress_impact = {
			athletic = minor_stress_impact_loss
			patient = minor_stress_impact_gain
			craven = minor_stress_impact_gain
			lazy = minor_stress_impact_gain
			content = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = craven
					has_trait = lazy
					has_trait = patient
				}
			}
		}
	}

	option = {
		name = hunt.1030.c
		trigger = {
			NOT = { this = scope:host }
		}
	}

	after = {
		if = {
			limit = { this = scope:host }
			scope:activity = {
				every_attending_character = {
					limit = {
						NOT = { this = scope:host }
					}
					trigger_event = hunt.1030
				}
			}
		}
	}
}

#Ambush success
hunt.1032 = {
	type = activity_event
	title = hunt.1030.t
	desc = {
		desc = hunt.1032.opening
		desc = hunt.1032.desc
	}
	theme = hunt_activity
	left_portrait = {
		character = scope:host
		triggered_animation = {
			trigger = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				scope:activity.var:animal_type = flag:hare
			}
			scripted_animation = bow_drawn_blunt
		}
		triggered_animation = {
			trigger = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			}
			scripted_animation = bow_drawn
		}
		animation = worry
	}
	right_portrait = {
		character = scope:hunt_participant
		trigger = {
			can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			root = {
				NOT = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				}
			}
		}
		triggered_animation = {
			trigger = {
				scope:activity.var:animal_type = flag:hare
			}
			scripted_animation = bow_drawn_blunt
		}
		triggered_animation = {
			trigger = {
				NOT = { scope:activity.var:animal_type = flag:hare }
			}
			scripted_animation = bow_drawn
		}
	}
	lower_right_portrait = {
		character = scope:hunt_participant
		trigger = {
			NAND = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				root = {
					NOT = {
						can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
					}
				}
			}
		}
	}
	lower_center_portrait = scope:intentee
	cooldown = { weeks = 1 }

	trigger = {		
		hunt_story_trigger = { STORY = ambush }
	}

	weight_multiplier = {
		base = 1
		modifier = { add = involved_activity.var:hunt_success_chance }
	}

	immediate = {
		scope:activity = {
			set_variable = {
				name = hunt_success
				value = flag:yes
			}
		}
		save_scope_as = hunt_ending
		hunt_outcome_scope_effect = yes
		hunt_all_attendee_xp_effect = { CHANGE = 2 RANDOM = 1 } # Guest XP gain for success
	}

	option = { #Shoot!
		name = hunt.1032.a
		trigger = {
			can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
		}
		hunt_animal_bow_kill_effect = { DEATH = yes VAR = scope:activity.var:animal_type }
		if = {
			limit = { is_alive = yes }
			stress_impact = {
				compassionate = medium_stress_impact_gain
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = impatient
					has_trait = callous
					has_trait = sadistic
				}
			}
		}
	}

	option = { #Give shot
		name = hunt.1032.b
		trigger = { exists = scope:hunt_participant }
		scope:hunt_participant = {
			hunt_animal_slayer_bow_opinion_effect = { VAR = scope:activity.var:animal_type }
			hunt_animal_bow_kill_effect = { DEATH = yes VAR = scope:activity.var:animal_type }
		}
		scope:activity = {
			set_variable = {
				name = hunt_credit_taker
				value = scope:hunt_participant
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_boldness = 0.5
				ai_energy = 0.5
				ai_greed = 0.5
			}
		}
	}

	option = { #Take it down!
		name = hunt.1032.e
		save_scope_as = animal_slayer
		custom_tooltip = hunt.1032.e.tt
		hunt_no_pelt_effect = yes # No pelt trophies
		save_scope_as = bow_hail
		stress_impact = {
			greedy = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
			brave = minor_stress_impact_gain
			diligent = minor_stress_impact_gain
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_compassion = -0.5
				ai_greed = -1
			}
		}
	}

	option = { #Run away!
		name = hunt.1032.f
		trigger = {
			exists = scope:activity.var:animal_type
			NOR = {
				scope:activity.var:animal_type = flag:fox
				scope:activity.var:animal_type = flag:hare
				#EK ADDITION
				scope:activity.var:animal_type = flag:ringtail
				scope:activity.var:animal_type = flag:ash_hopper
				scope:activity.var:animal_type = flag:badger
				# EK ADDITION END
			}
		}
		save_scope_as = bow_fled
		save_scope_as = animal_slayer
		if = {
			limit = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			}
			if = {
				limit = {
					exists = scope:activity.var:animal_type
					OR = {
						scope:activity.var:animal_type = flag:boar
						scope:activity.var:animal_type = flag:hart
					}
				}
				add_prestige = minor_prestige_loss
			}
			else = { add_prestige = medium_prestige_loss }
		}
		stress_impact = {
			brave = minor_stress_impact_gain
			lifestyle_hunter = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
			calm = minor_stress_impact_gain
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = -1
				ai_energy = -1
			}
		}
	}

	after = {
		scope:activity = {
			every_attending_character = {
				limit = { is_ai = no }
				trigger_event = hunt.1200
			}
		}
	}
}

#Ambush escape
hunt.1033 = {
	type = activity_event
	title = hunt.1030.t
	desc = hunt.1033.desc
	theme = hunt_activity
	left_portrait = {
		character = scope:host
		triggered_animation = {
			trigger = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				scope:activity.var:animal_type = flag:hare
			}
			scripted_animation = bow_closed_blunt
		}
		triggered_animation = {
			trigger = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			}
			scripted_animation = bow_closed
		}
		animation = sadness
	}
	right_portrait = {
		character = scope:hunt_participant
		triggered_animation = {
			trigger = {
				NOT = {
					root = {
						can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
					}
				}
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				scope:activity.var:animal_type = flag:hare
			}
			scripted_animation = bow_closed_blunt
		}
		triggered_animation = {
			trigger = {
				NOT = {
					root = {
						can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
					}
				}
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			}
			scripted_animation = bow_closed
		}
		animation = stress
	}
	center_portrait = {
		character = root
		trigger = {
			NOR = {
				scope:host ?= this
				scope:hunt_participant ?= this
			}
		}
	}
	cooldown = { weeks = 1 }

	trigger = {		
		hunt_story_trigger = { STORY = ambush }
	}

	weight_multiplier = {
		base = 1
		modifier = {
			add = {
				value = 100
				subtract = involved_activity.var:hunt_success_chance
			}
		}
	}

	immediate = {
		if = {
			limit = { this = scope:host }
			save_scope_as = hunt_ending
			scope:activity = {
				set_variable = {
					name = hunt_success
					value = flag:no
				}
			}
			if = {
				limit = { exists = scope:activity.var:participant_to_use }
				scope:activity.var:participant_to_use = { save_scope_as = hunt_participant }
			}
			else = {
				hunt_activity_random_subordinate_participant_effect = {
					ARCHETYPE = hunter
					COMBATANT = yes
					SCOPE = hunt_participant
				}
			}
			hunt_all_attendee_xp_effect = { CHANGE = 1 RANDOM = 1 } # Guest XP gain for success
		}
		custom_tooltip = hunt_fails_tt
	}

	option = { #Drat!
		name = hunt.1033.a
		ai_chance = {
			base = 25
		}
	}

	option = { #You slowed us down!
		name = hunt.1033.b
		trigger = {
			this = scope:host
			exists = scope:wounded_guest
		}
		stress_impact = {
			wrathful = minor_stress_impact_loss
			arrogant = minor_stress_impact_loss
			ambitious = minor_stress_impact_loss
			just = minor_stress_impact_gain
			compassionate = minor_stress_impact_gain
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 0.5
				exists = intent_target
				OR = {
					has_activity_intent = woo_attendee_intent
					has_activity_intent = befriend_attendee_intent
				}
				intent_target = scope:wounded_guest
			}
			ai_value_modifier = {
				ai_honor = -0.5
				ai_compassion = -0.5
				ai_boldness = 1
			}
		}
	}

	after = {
		if = {
			limit = {
				this = scope:host
			}
			scope:activity = {
				every_attending_character = {
					limit = {
						is_ai = no
						NOT = { this = scope:host }
					}
					trigger_event = hunt.1033
				}
			}
		}
	}
}

#######################
#	Stealth method
#	by Joe Parkin
#######################

#Stealth start
hunt.1040 = {
	type = activity_event
	title = hunt.1040.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = { this = scope:host }
				desc = hunt.1040.desc
			}
			desc = {
				desc = hunt.1040.guest
				first_valid = {
					triggered_desc = {
						trigger = {
							hunt_story_trigger = { STORY = chase }
						}
						desc = hunt.1040.chase
					}
					desc = hunt.1040.stealth
				}
			}
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = scope:host
		animation = thinking
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = hunting_horn
	}
	center_portrait = {
		character = root
		trigger = {
			NOR = {
				this = scope:host
				this = scope:hunt_participant
			}
		}
	}
	cooldown = { weeks = 1 }

	trigger = {
		trigger_if = {
			limit = {
				NOT = { this = scope:host }
			}
			is_ai = no
		}
		scope:activity = {
			OR = {
				has_activity_option = { category = special_type option = hunt_type_standard }
				has_activity_option = { category = special_type option = hunt_type_legendary }
			}
			hunt_activity_deer_antelope_game_trigger = { VAR = var:animal_type }
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			has_lifestyle = intrigue_lifestyle
		}
		modifier = {
			factor = 2
			exists = court_position:master_of_hunt_court_position
			court_position:master_of_hunt_court_position = { has_lifestyle = intrigue_lifestyle }
		}
		modifier = {
			factor = 2
			exists = court_position:huntperson_camp_officer
			court_position:huntperson_camp_officer = { has_lifestyle = intrigue_lifestyle }
		}
		modifier = {
			factor = 2
			scope:activity  = {
				has_activity_option = { category = hunt_option_attendants option = hunt_attendants_few }
			}
		}
		modifier = {
			factor = 0.25
			government_has_flag = government_is_tribal
		}
	}

	immediate = {
		if = {
			limit = { this = scope:host }
			hunt_activity_random_subordinate_participant_effect = {
				ARCHETYPE = hunter
				COMBATANT = yes
				SCOPE = hunt_participant
			}
			hunt_all_attendee_xp_effect = { CHANGE = 1 RANDOM = 1 }
			if = {
				limit = { exists = scope:hunt_participant }
				scope:activity = {
					set_variable = {
						name = participant_to_use
						value = scope:hunt_participant
						years = 1
					}
				}
			}
		}
		else = { hunt_story_tooltip_effect = yes }
	}

	option = {
		name = hunt.1040.a
		trigger = { this = scope:host }
		flavor = hunt.1040.a.flavor
		hunt_activity_method_effect = { STORY = stealth }
		stress_impact = {
			impatient = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
			brave = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = arrogant
					has_trait = brave
					has_trait = impatient
				}
			}
		}
	}

	option = {
		name = hunt.1040.b
		trigger = { this = scope:host }
		flavor = hunt.1040.b.flavor
		if = {
			limit = {
				is_landless_adventurer = yes
			}
			add_prestige = miniscule_prestige_gain
		}
		else = {
			add_prestige = minor_prestige_gain
		}
		hunt_activity_method_effect = { STORY = chase }
		hunt_activity_success_change_effect = { CHANGE = decrease_medium }
		stress_impact = {
			athletic = minor_stress_impact_loss
			patient = minor_stress_impact_gain
			craven = minor_stress_impact_gain
			lazy = minor_stress_impact_gain
			content = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = craven
					has_trait = lazy
					has_trait = patient
				}
			}
		}
	}

	option = {
		name = hunt.1040.c
		trigger = {
			NOT = { this = scope:host }
		}
	}

	after = {
		if = {
			limit = { this = scope:host }
			scope:activity = {
				every_attending_character = {
					limit = {
						NOT = { this = scope:host }
					}
					trigger_event = hunt.1040
				}
			}
		}
	}
}

#Stealth escape
hunt.1043 = {
	type = activity_event
	title = hunt.1040.t
	desc = hunt.1043.desc
	theme = hunt_activity
	cooldown = { weeks = 1 }
	left_portrait = {
		character = scope:host
		triggered_animation = {
			trigger = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				scope:activity.var:animal_type = flag:hare
			}
			scripted_animation = bow_closed_blunt
		}
		triggered_animation = {
			trigger = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				NOT = { scope:activity.var:animal_type = flag:hare }
			}
			scripted_animation = bow_closed
		}
		triggered_animation = {
			trigger = {
				NOT = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				}
			}
			animation = sadness
		}
	}
	right_portrait = {
		character = scope:hunt_participant
		triggered_animation = {
			trigger = {
				NOT = {
					root = {
						can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
					}
				}
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				scope:activity.var:animal_type = flag:hare
			}
			scripted_animation = bow_closed_blunt
		}
		triggered_animation = {
			trigger = {
				NOT = {
					root = {
						can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
					}
				}
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			}
			scripted_animation = bow_closed
		}
		triggered_animation = {
			trigger = {
				OR = {
					root = {
						can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
					}
					NOT = {
						can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
					}
				}
			}
			animation = stress
		}
	}
	center_portrait = {
		character = root
		trigger = {
			NOR = {
				scope:host ?= this
				scope:hunt_participant ?= this
			}
		}
	}

	trigger = {
		hunt_story_trigger = { STORY = stealth }
	}

	weight_multiplier = {
		base = 1
		modifier = {
			add = {
				value = 100
				subtract = involved_activity.var:hunt_success_chance
			}
		}
	}

	immediate = {
		if = {
			limit = { this = scope:host }
			scope:activity = {
				set_variable = {
					name = hunt_success
					value = flag:no
				}
			}
			save_scope_as = hunt_ending
			if = {
				limit = { exists = scope:activity.var:participant_to_use }
				scope:activity.var:participant_to_use = { save_scope_as = hunt_participant }
			}
			else = {
				hunt_activity_random_subordinate_participant_effect = {
					ARCHETYPE = hunter
					COMBATANT = yes
					SCOPE = hunt_participant
				}
			}
			hunt_all_attendee_xp_effect = { CHANGE = 1 RANDOM = 1 } # Guest XP gain for success
		}
		custom_tooltip = hunt_fails_tt
	}

	option = { #Drat!
		name = hunt.1043.a
		ai_chance = {
			base = 25
		}
	}

	option = { #You slowed us down!
		name = hunt.1043.b
		trigger = { exists = scope:wounded_guest }
		stress_impact = {
			wrathful = minor_stress_impact_loss
			arrogant = minor_stress_impact_loss
			ambitious = minor_stress_impact_loss
			just = minor_stress_impact_gain
			compassionate = minor_stress_impact_gain
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 0.5
				exists = intent_target
				OR = {
					has_activity_intent = woo_attendee_intent
					has_activity_intent = befriend_attendee_intent
				}
				intent_target = scope:wounded_guest
			}
			ai_value_modifier = {
				ai_honor = -0.5
				ai_compassion = -0.5
				ai_boldness = 1
			}
		}
	}

	after = {
		if = {
			limit = {
				this = scope:host
			}
			scope:activity = {
				every_attending_character = {
					limit = {
						is_ai = no
						NOT = { this = scope:host }
					}
					trigger_event = hunt.1043
				}
			}
		}
	}
}

#######################
#	Falconry release
#	by Joe Parkin
#######################

hunt.1060 = {
	type = activity_event
	title = hunt.1060.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					this = scope:host
					exists = scope:hunt_participant
				}
				desc = hunt.1060.desc_opening_courtier
			}
			triggered_desc = {
				trigger = { this = scope:host }
				desc = hunt.1060.desc_opening
			}
			desc = hunt.1060.desc_guest
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					hunt_activity_exotic_bird_trigger = { VAR = scope:activity.var:animal_type }
				}
				desc = hunt.1060.exotic
			}
			triggered_desc = {
				trigger = {
					hunt_activity_ground_bird_trigger = { VAR = scope:activity.var:animal_type }
				}
				desc = hunt.1060.ground
			}			
			triggered_desc = {
				trigger = {
					hunt_activity_bird_trigger = { VAR = scope:activity.var:animal_type }
				}
				desc = hunt.1060.water
			}
			desc = hunt.1060.hare
		}
		triggered_desc = {
			trigger = {
				hunt_activity_bird_trigger = { VAR = scope:activity.var:animal_type }
				NOT = {
					hunt_activity_exotic_bird_trigger = { VAR = scope:activity.var:animal_type }
				}
			}
			desc = hunt.1060.beaters
		}
		desc = hunt.1060.closing		
	}
	theme = hunt_activity
	left_portrait = {
		character = scope:host
		animation = hunting_falcon
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = admiration
	}
	center_portrait = {
		character = root
		trigger = {
			NOR = {
				this = scope:hunt_participant
				this = root
			}
		}
	}
	cooldown = { weeks = 1 }

	trigger = {
		trigger_if = {
			limit = {
				NOT = { this = scope:host }
			}
			is_ai = no
		}
		scope:activity = {
			has_activity_option = { category = special_type option = hunt_type_falconry }
		}
	}

	immediate = {
		if = {
			limit = { this = scope:host }
			hunt_activity_random_subordinate_participant_effect = {
				ARCHETYPE = hunter
				COMBATANT = yes
				SCOPE = hunt_participant
			}
			if = {
				limit = { exists = scope:hunt_participant }
				scope:activity = {
					set_variable = {
						name = participant_to_use
						value = scope:hunt_participant
						years = 1
					}
				}
			}
		}
	}

	option = { # 
		name = hunt.1060.a
		trigger = { this = scope:host }
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = arrogant
					has_trait = brave
					has_trait = impatient
				}
			}
		}
	}

	option = { # Guest acknowledgement
		name = hunt.1060.d
		trigger = {
			NOT = { this = scope:host }
		}
		hunt_story_tooltip_effect = yes
	}

	after = {
		if = {
			limit = { this = scope:host }
			scope:activity = {
				every_attending_character = {
					limit = {
						NOT = { this = scope:host }
					}
					trigger_event = hunt.1060
				}
			}
		}
	}
}

hunt.1062 = { # Falconry success
	type = activity_event
	title = {
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = { scope:activity.var:animal_type = flag:hare }
					desc = hunt.1062.t.hare
				}
				#EK ADDITION
				triggered_desc = {
					trigger = { scope:activity.var:animal_type = flag:ringtail }
					desc = hunt.1062.t.ringtail
				}
				triggered_desc = {
					trigger = { scope:activity.var:animal_type = flag:ash_hopper }
					desc = hunt.1062.t.ash_hopper
				}
				# EK ADDITION END
				desc = hunt.1062.t
			}
		}
	}
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = { this = scope:host }
				desc = hunt.1062.desc
			}
			desc = hunt.1062.guest
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					hunt_activity_exotic_bird_trigger = { VAR = scope:activity.var:animal_type }
				}
				desc = hunt.1062.exotic
			}
			triggered_desc = {
				trigger = {
					OR = {
						hunt_activity_ground_bird_trigger = { VAR = scope:activity.var:animal_type }
						scope:activity.var:animal_type ?= flag:hare
						#EK ADDITION
						scope:activity.var:animal_type ?= flag:ringtail
						scope:activity.var:animal_type ?= flag:ash_hopper
						# EK ADDITION END
					}
				}
				desc = hunt.1062.ground
			}			
			desc = hunt.1062.water
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						hunt_activity_ground_bird_trigger = { VAR = scope:activity.var:animal_type }
						scope:activity.var:animal_type = flag:hare
						#EK ADDITION
						scope:activity.var:animal_type ?= flag:ringtail
						scope:activity.var:animal_type ?= flag:ash_hopper
						# EK ADDITION END
					}
				}
				desc = hunt.1062.floor
			}
			desc = hunt.1062.sky
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = happiness
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = admiration
	}
	cooldown = { weeks = 1 }

	trigger = {
		has_dlc_feature = tours_and_tournaments
		hunt_story_trigger = { STORY = falconry }
	}

	weight_multiplier = {
		base = 1
		modifier = { add = involved_activity.var:hunt_success_chance }
	}

	immediate = {
		play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ep2_event_grand_hunt_falconry/ep2_event_grand_hunt_falconry_success"
		if = {
			limit = {
				this = scope:host
			}
			scope:activity = {
				set_variable = {
					name = hunt_success
					value = flag:yes
				}
			}
			save_scope_as = hunt_ending
			# Scopes
			hunt_outcome_scope_effect = yes	
			hunt_all_attendee_xp_effect = { CHANGE = 2 RANDOM = 1 } # Guest XP gain for success
			if = {
				limit = { hunt_murder_target_trigger = yes }
				hidden_effect = { hunt_save_murder_target_effect = yes }
			}
		}
	}

	option = { # Success
		name = hunt.1062.a
		flavor = hunt.1062.a.flavor
		trigger = { this = scope:host }
		add_prestige = medium_prestige_gain
		if = {
			limit = { has_activity_intent = slay_beast_intent }
			show_as_tooltip = { complete_activity_intent = yes }
		}
		hunt_complete_slay_beast_intent_effect = yes
	}

	option = { # Success
		name = hunt.1062.b
		trigger = {
			NOT = { this = scope:host }
		}
	}

	after = {
		if = {
			limit = { this = scope:host }
			scope:activity = {
				every_attending_character = {
					limit = {
						NOT = { this = scope:host }
					}
					trigger_event = hunt.1062
				}
			}
		}
	}
}

hunt.1063 = { # Falconry fails
	type = activity_event
	title = hunt.1063.t
	desc = {
		desc = hunt.1062.desc
		first_valid = {
			triggered_desc = {
				trigger = {
					hunt_activity_exotic_bird_trigger = { VAR = scope:activity.var:animal_type }
				}
				desc = hunt.1062.exotic
			}
			triggered_desc = {
				trigger = {
					OR = {
						hunt_activity_ground_bird_trigger = { VAR = scope:activity.var:animal_type }
						scope:activity.var:animal_type = flag:hare
						#EK ADDITION
						scope:activity.var:animal_type = flag:ringtail
						scope:activity.var:animal_type = flag:ash_hopper
						# EK ADDITION END
					}
				}
				desc = hunt.1062.ground
			}			
			desc = hunt.1062.water
		}
		desc = hunt.1063.desc
		desc = hunt.1063.closing
	}
	theme = hunt_activity
	left_portrait = {
		character = scope:host
		animation = sadness
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = worry
	}
	cooldown = { weeks = 1 }

	trigger = {		
		has_dlc_feature = tours_and_tournaments
		hunt_story_trigger = { STORY = falconry }
	}

	weight_multiplier = {
		base = 1
		modifier = {
			add = {
				value = 100
				subtract = involved_activity.var:hunt_success_chance
			}
		}
	}

	immediate = {
		play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ep2_event_grand_hunt_falconry/ep2_event_grand_hunt_falconry_fail"
		scope:activity = {
			set_variable = {
				name = hunt_success
				value = flag:no
			}
		}
		save_scope_as = hunt_ending
		if = {
			limit = { this = scope:host }
			hunt_activity_random_subordinate_participant_effect = {
				ARCHETYPE = falconer
				COMBATANT = no
				SCOPE = hunt_participant
			}
			if = {
				limit = { exists = scope:hunt_participant }
				scope:activity = {
					set_variable = {
						name = participant_to_use
						value = scope:hunt_participant
						years = 1
					}
				}
			}
		}
		custom_tooltip = hunt_fails_tt
	}

	option = {
		name = hunt.1063.a
		trigger = { this = scope:host }
		stress_impact = {
			patient = minor_stress_impact_gain
			craven = minor_stress_impact_gain
			lazy = minor_stress_impact_gain
			content = minor_stress_impact_gain
			calm = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = arrogant
					has_trait = brave
					has_trait = impatient
				}
			}
		}
	}

	option = { # Guest acknowledgement
		name = hunt.1063.d
		trigger = {
			NOT = { this = scope:host }
		}
		hunt_story_tooltip_effect = yes
	}

	after = {
		if = {
			limit = { this = scope:host }
			scope:activity = {
				every_attending_character = {
					limit = {
						NOT = { this = scope:host }
					}
					trigger_event = hunt.1063
				}
			}
		}
	}
}

#######################
#	Murdered by hunting party
#	by Joe Parkin
#######################

hunt.1080 = {
	type = activity_event
	title = {
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						OR = {
							exists = scope:bodyguard_appears
							exists = scope:dog_appears
						}						
					}
					desc = hunt.1080.t.bodyguard
				}
				desc = hunt.1080.t
			}
		}
	}
	desc = {
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = { exists = scope:accomplice }
					desc = hunt.1080.opening_accomplice
				}
				desc = hunt.1080.opening_lone
			}
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						hunt_story_trigger = { STORY = ambush }
						hunt_story_trigger = { STORY = stealth }
					}
				}
				desc = hunt.1080.bow
			}
			triggered_desc = {
				trigger = {
					hunt_story_trigger = { STORY = falconry }
				}
				desc = hunt.1080.falconry
			}
			desc = hunt.1080.chase
		}
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = { exists = scope:accomplice }
					desc = hunt.1080.closing_accomplice
				}
				desc = hunt.1080.closing_lone
			}
		}
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:bodyguard_betray }
				desc = hunt.1080.bodyguard_betray
			}
			triggered_desc = {
				trigger = { exists = scope:bodyguard_appears }
				desc = hunt.1080.bodyguard_appears
			}
			triggered_desc = {
				trigger = { exists = scope:dog_appears }
				desc = hunt.1080.dog_appears
			}
			triggered_desc = {
				trigger = { exists = scope:bodyguard }
				desc = hunt.1080.bodyguard
			}
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = fear
	}
	right_portrait = {
		character = scope:murderer
		animation = assassin
	}
	center_portrait = {
		character = scope:central_portrait
		animation = aggressive_dagger
	}
	lower_right_portrait = scope:bodyguard

	trigger = {
		scope:activity = {
			any_attending_character = {
				OR = {
					hunt_murder_risk_trigger = yes
					hunt_potential_murder_risk_trigger = yes
				}
			}
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 0.25
			NOT = {
				scope:activity = {
					any_attending_character = { hunt_murder_risk_trigger = yes }
				}
			}
		}
		modifier = {
			factor = 2
			exists = root.court_position:master_of_hunt_court_position
			court_position:master_of_hunt_court_position = { hunt_murder_risk_trigger = yes }
		}
		modifier = {
			factor = 2
			exists = root.court_position:huntperson_camp_officer
			court_position:huntperson_camp_officer = { hunt_murder_risk_trigger = yes }
		}
		modifier = {
			factor = 1.5
			intrigue < decent_skill_rating
		}
		modifier = {
			has_trait = trusting
			factor = 1.5
		}
		modifier = {
			any_targeting_scheme = {
				scheme_type = murder
				OR = {
					scheme_owner = { is_participant_in_activity = scope:activity }
					any_scheme_agent_character = { is_participant_in_activity = scope:activity }
				}
				scheme_phase_duration >= 50
			}
			factor = 1.5
		}
	}

	immediate = {
		play_music_cue = "mx_cue_murder"
		scope:activity = {
			if = {
				limit = {
					any_attending_character = { hunt_murder_risk_trigger = yes }
				}
				random_attending_character = {
					limit = {
						hunt_murder_risk_trigger = yes
						save_temporary_scope_as = murderer_temp
					}
					weight = {
						base = 1
						hunt_murderer_modifier = { MURDERER = scope:murderer_temp TARGET = root }
					}
					save_scope_as = murderer
					add_to_list = murderer_list
					add_to_list = murder_participants
				}
			}
			else = {
				random_attending_character = {
					limit = {
						hunt_potential_murder_risk_trigger = yes
						save_temporary_scope_as = murderer_temp
					}
					weight = {
						base = 1
						hunt_murderer_modifier = { MURDERER = scope:murderer_temp TARGET = root }
					}
					save_scope_as = murderer
					if = {
						limit = {
							is_court_position_employer = {
								court_position = bodyguard_court_position
								who = root
							}
						}
						save_scope_as = bodyguard_betray
					}
					else_if = {
						limit = {
							is_court_position_employer = {
								court_position = akolouthos_court_position
								who = root
							}
						}
						save_scope_as = bodyguard_betray
					}
					add_to_list = murderer_list
					add_to_list = murder_participants
				}
			}
			if = {
				limit = {
					any_attending_character = {
						hunt_murder_risk_trigger = yes
						hunt_accomplice_general_trigger = {
							MURDERER = scope:murderer
							TARGET = root
						}
					}
				}
				random_attending_character = {
					limit = {
						hunt_murder_risk_trigger = yes
						hunt_accomplice_general_trigger = {
							MURDERER = scope:murderer
							TARGET = root
						}
						save_temporary_scope_as = murderer_temp
					}
					weight = {
						base = 1
						hunt_murderer_modifier = { MURDERER = scope:murderer_temp TARGET = root }
						modifier = {
							factor = 2
							# Scheme
							is_scheming_against = {
								target = root
								type = murder
							}
						}
						modifier = {
							factor = 2
							# Intent
							AND = {
								hunt_murder_intent_target_trigger = yes
								intent_target = root
							}
						}
						modifier = {
							factor = 2
							# Feud
							AND = {
								exists = house.house_head
								NOT = { house = root.house }
								house.house_head = {
									any_owned_story = {
										story_type = story_cycle_house_feud
										var:house_feud_house = root.house
									}
								}
							}
						}
					}
					save_scope_as = accomplice
					if = {
						limit = {
							is_court_position_employer = {
								court_position = bodyguard_court_position
								who = root
							}
						}
						save_scope_as = bodyguard_betray
					}
					else_if = {
						limit = {
							is_court_position_employer = {
								court_position = akolouthos_court_position
								who = root
							}
						}
						save_scope_as = bodyguard_betray
					}
					add_to_list = murderer_list
					add_to_list = murder_participants
				}
			}
		}
		if = {
			limit = {
				any_court_position_holder = { hunt_murder_bodyguard_appears_trigger = yes }
			}
			random_court_position_holder = {
				limit = { hunt_murder_bodyguard_appears_trigger = yes }
				save_scope_as = bodyguard
				random = { 
					chance = 25
					modifier = { add = intrigue }
					modifier = {
						add = 5
						aptitude = {
							court_position = master_of_hunt_court_position
							value >= 1
						}
					}
					modifier = {
						add = 5
						aptitude = {
							court_position = master_of_hunt_court_position
							value >= 2
						}
					}
					modifier = {
						add = 5
						aptitude = {
							court_position = master_of_hunt_court_position
							value >= 3
						}
					}
					modifier = {
						add = 5
						aptitude = {
							court_position = master_of_hunt_court_position
							value >= 4
						}
					}
					save_scope_as = bodyguard_appears
					add_to_list = murder_participants
				}
			}
		}
		if = {
			limit = { exists = scope:accomplice }
			scope:accomplice = { save_scope_as = central_portrait }
		}
		else_if = {
			limit = { exists = scope:bodyguard }
			scope:bodyguard = { save_scope_as = central_portrait }
		}
		hidden_effect = {
			if = {
				limit = {
					any_owned_story = { story_type = story_cycle_pet_dog }
				}
				random = {
					chance = 25
					modifier = {
						exists = scope:bodyguard_appears
						factor = 0
					}
					modifier = {
						add = 25
						has_character_modifier = dog_story_scenthound_modifier
					}
					modifier = {
						add = 25
						has_character_modifier = dog_story_beasthound_modifier
					}
					save_scope_as = dog_appears
				}
			}
		}
	}

	option = {
		name = {
			trigger = { exists = scope:bodyguard_appears }
			text = hunt.1080.a.bodyguard
		}
		name = {
			trigger = { exists = scope:dog_appears }
			text = hunt.1080.a.dog
		}
		name = {
			trigger = {
				exists = scope:accomplice
				NOR = {
					exists = scope:bodyguard_appears
					exists = scope:dog_appears
				}
			}
			text = hunt.1080.a.accomplice
		}
		name = {
			trigger = {
				NOR = {
					exists = scope:accomplice
					exists = scope:bodyguard_appears
					exists = scope:dog_appears
				}
			}
			text = hunt.1080.a
		}
		if = {
			limit = { exists = scope:accomplice }
			duel = {
				skill = prowess
				value = hunt_murder_accomplice_prowess_value
				1 = {
					desc = hunt.1080.a.duel_success_accomplice
					compare_modifier = {
						value = scope:duel_value
						multiplier = 1
						min = 1
					}
					modifier = {
						exists = scope:bodyguard_appears
						add = {
							value = scope:bodyguard.prowess
							multiply = 1.5
						}
					}
					modifier = {
						exists = scope:dog_appears
						add = 10
					}
					min = 5
					custom_tooltip = hunt.1080.a.success_tt
					if = {
						limit = { exists = scope:accomplice }
						custom_tooltip = hunt.1080.a.success_accomplice_tt
					}
				}
				1 = {
					desc = hunt.1080.a.duel_failure_accomplice
					compare_modifier = {
						value = scope:duel_value
						multiplier = -1
						min = 1
					}
					min = 5
					show_as_tooltip = {
						death = {
							death_reason = death_hunting_mysterious
							killer = scope:murderer
						}
						if = {
							limit = { exists = scope:bodyguard_appears }
							scope:bodyguard = {
								death = {
									death_reason = death_hunting_mysterious
									killer = scope:murderer
								}
							}
						}
					}
				}
			}
		}
		else = {
			duel = {
				skill = prowess
				target = scope:murderer
				desc = hunt.1080.a.duel_success
				1 = {
					compare_modifier = {
						value = scope:duel_value
						multiplier = 1
						min = 1
					}
					modifier = {
						exists = scope:bodyguard_appears
						add = {
							value = scope:bodyguard.prowess
							multiply = 1.5
						}
					}
					min = 5
					custom_tooltip = hunt.1080.a.success_tt
					if = {
						limit = { exists = scope:accomplice }
						custom_tooltip = hunt.1080.a.success_accomplice_tt
					}
				}
				1 = {
					desc = hunt.1080.a.duel_failure
					compare_modifier = {
						value = scope:duel_value
						multiplier = -1
						min = 1
					}
					min = 5
					show_as_tooltip = {
						death = {
							death_reason = death_hunting_mysterious
							killer = scope:murderer
						}
						if = {
							limit = { exists = scope:bodyguard_appears }
							scope:bodyguard = {
								death = {
									death_reason = death_hunting_mysterious
									killer = scope:murderer
								}
							}
						}
					}
				}
			}
		}
	}

	after = { trigger_event = hunt.1081 }
}

hunt.1081 = {
	type = activity_event
	title = {
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						OR = {
							exists = scope:bodyguard_appears
							exists = scope:dog_appears
						}						
					}
					desc = hunt.1080.t.bodyguard
				}
				desc = hunt.1080.t
			}
		}
	}
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {					
					hunt_story_trigger = { STORY = chase }
					exists = scope:accomplice
				}
				desc = hunt.1081.desc_accomplice
			}
			desc = hunt.1081.desc
		}
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:murder_success }
				desc = hunt.1081.killed
			}
			triggered_desc = {
				trigger = {
					exists = scope:accomplice
					is_in_list = wounded_list
				}
				desc = hunt.1081.wounded_accomplice
			}
			triggered_desc = {
				trigger = { is_in_list = wounded_list }
				desc = hunt.1081.wounded
			}			
			triggered_desc = {
				trigger = { exists = scope:accomplice }
				desc = hunt.1081.escaped_accomplice
			}
			desc = hunt.1081.escaped
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:murderer = { is_in_list = killed_list }
				}
				desc = hunt.1081.murderer_killed
			}
			triggered_desc = {
				trigger = {
					scope:murderer = { is_in_list = wounded_list }
				}
				desc = hunt.1081.murderer_wounded
			}
			triggered_desc = {
				trigger = {
					NOT = { exists = scope:murder_success }
				}
				desc = hunt.1081.murderer_arrested
			}
			desc = hunt.1081.murderer
		}
		triggered_desc = {
			trigger = { exists = scope:accomplice }
			desc = {
				first_valid = {
					triggered_desc = {
						trigger = {
							scope:accomplice = { is_in_list = killed_list }
						}
						desc = hunt.1081.accomplice_killed
					}
					triggered_desc = {
						trigger = {
							scope:accomplice = { is_in_list = wounded_list }
						}
						desc = hunt.1081.accomplice_wounded
					}
					triggered_desc = {
						trigger = {
							NOT = { exists = scope:murder_success }
						}
						desc = hunt.1081.accomplice_arrested
					}
					desc = hunt.1081.accomplice
				}
			}
		}
		triggered_desc = {
			trigger = { exists = scope:bodyguard }
			desc = {				
				first_valid = {
					triggered_desc = {
						trigger = {
							scope:bodyguard = { is_in_list = wounded_list }
						}
						desc = hunt.1081.bodyguard_wounded
					}
					triggered_desc = {
						trigger = {
							scope:bodyguard = { is_in_list = killed_list }
						}
						desc = hunt.1081.bodyguard_killed
					}
					triggered_desc = {
						trigger = { exists = scope:bodyguard_appears }
						desc = hunt.1081.bodyguard_saved
					}
				}
			}
		}
		triggered_desc = {
			trigger = { exists = scope:dog_appears }
			desc = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:dog_killed }
						desc = hunt.1081.dog_killed
					}
					desc = hunt.1081.dog
				}
			}
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					any_in_list = {
						list = murderer_list
						count = all
						is_in_list = killed_list
					}
					is_in_list = killed_list
					trigger_if = {
						limit = { exists = scope:bodyguard_appears }
						scope:bodyguard = { is_in_list = killed_list }
					}
				}
				desc = hunt.1081.closing_massacre
			}
			triggered_desc = {
				trigger = {
					exists = scope:bodyguard_appears
					exists = scope:murder_success
					scope:bodyguard = { is_in_list = killed_list }
				}
				desc = hunt.1081.closing_success_bodyguard_dead
			}
			triggered_desc = {
				trigger = {
					exists = scope:bodyguard_appears
					exists = scope:murder_success
				}
				desc = hunt.1081.closing_success_bodyguard_apology
			}
			triggered_desc = {
				trigger = { exists = scope:murder_success }
				desc = hunt.1081.closing_success
			}
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {	
				OR = {
					is_alive = no
					is_in_list = wounded_list
					exists = scope:murder_success
				}				
			}
			animation = pain
		}
		triggered_animation = {
			trigger = {	
				NOR = {
					is_alive = no
					is_in_list = wounded_list
					exists = scope:murder_success
				}
			}
			animation = shock
		}
	}
	right_portrait = {
		character = scope:murderer
		triggered_animation = {
			trigger = {	
				OR = {
					is_alive = no
					is_in_list = wounded_list
					NOT = { exists = scope:murder_success }
				}
			}
			animation = pain
		}
		triggered_animation = {
			trigger = {	
				NOR = {
					is_alive = no
					is_in_list = wounded_list
					NOT = { exists = scope:murder_success }
				}
			}
			animation = schadenfreude
		}
	}
	lower_left_portrait = scope:bodyguard
	center_portrait = {
		character = scope:central_portrait
		animation = aggressive_dagger
	}

	immediate = {
		play_music_cue = "mx_cue_murder"
		hidden_effect = {
			every_in_list = {
				list = murderer_list
				hidden_effect = {
					random_list = {
						10 = { add_to_list = killed_list }
						10 = { add_to_list = wounded_list }
						10 = {
							modifier = { add = prowess }
							modifier = { factor = health }
						}
					}
				}
			}
			if = {
				limit = { exists = scope:bodyguard }
				scope:bodyguard = {
					hidden_effect = {
						random_list = {
							10 = { add_to_list = killed_list }
							10 = { add_to_list = wounded_list }
							10 = {
								modifier = { add = prowess }
								modifier = { factor = health }
							}
						}
					}
				}
			}
			random_list = {
				1 = {
					modifier = { add = prowess }
					modifier = {
						exists = scope:bodyguard_appears
						add = scope:bodyguard.prowess
					}
					random_list = {
						10 = { add_to_list = wounded_list }
						10 = {
							modifier = { add = prowess }
							modifier = { factor = health }
						}
					}
				}
				1 = {
					modifier = {
						exists = scope:bodyguard_appears
						add = scope:murderer.prowess
					}
					modifier = {
						exists = scope:accomplice
						add = {
							value = scope:accomplice.prowess
							multiply = 0.5
						}
					}
					save_scope_as = murder_success
				}
			}
		}
		every_in_list = {
			list = killed_list
			save_scope_as = killed_character
			if = {
				limit = { is_in_list = murderer_list }
				hidden_effect = {
					random_list = {
						10 = {							
							root = { save_scope_as = killing_character }
						}
						10 = {
							trigger = { exists = scope:bodyguard }
							scope:bodyguard = { save_scope_as = killing_character }
						}
					}
				}
			}
			else = {
				hidden_effect = {
					random_list = {
						10 = {							
							scope:murderer = { save_scope_as = killing_character }
						}
						10 = {
							trigger = { exists = scope:accomplice }
							scope:accomplice = { save_scope_as = killing_character }
						}
					}
				}
			}
			unknown_murder_effect = { VICTIM = scope:killed_character MURDERER = scope:killing_character REASON = death_hunting_mysterious }
		}
		every_in_list = {
			list = wounded_list
			save_scope_as = wounded_character
			hunt_wound_select_effect = yes
			hunt_wound_apply_effect = { SEVERE = no }
			hunt_wound_tooltip_effect = yes
		}
		if = {
			limit = {
				NOT = { exists = scope:murder_success }
			}
			if = {
				limit = {
					scope:murderer = { is_alive = no }
					trigger_if = {
						limit = { exists = scope:accomplice }
						scope:accomplice = { is_alive = yes }
					}
				}
				scope:accomplice = {
					hunt_murder_add_and_reveal_attempted_murder = yes
					if = {
						limit = { is_alive = yes }
						attempted_murder_opinion_effect = { VICTIM = root MURDERER = scope:accomplice }
						if = {
							limit = { this = scope:host }
							rightfully_imprison_character_effect = { TARGET = scope:accomplice IMPRISONER = root }
						}
					}
				}
			}
			else_if = {
				limit = {
					scope:murderer = { is_alive = yes }
					trigger_if = {
						limit = { exists = scope:accomplice }
						scope:accomplice = { is_alive = no }
					}
				}
				scope:murderer = {
					hunt_murder_add_and_reveal_attempted_murder = yes
					if = {
						limit = { is_alive = yes }
						attempted_murder_opinion_effect = { VICTIM = root MURDERER = scope:murderer }
						if = {
							limit = { this = scope:host }
							rightfully_imprison_character_effect = { TARGET = scope:murderer IMPRISONER = root }
						}
					}
				}
			}
			else_if = {
				limit = {
					exists = scope:murder_success
					scope:murderer = { is_alive = yes }
					exists = scope:accomplice
					scope:accomplice = { is_alive = yes }
				}
				every_in_list = {
					list = murderer_list
					limit = { is_alive = yes }
					custom = hunt_every_attempted_murderer_tt
					save_scope_as = murderer_outcome
					hunt_murder_add_and_reveal_attempted_murder = yes
					if = {
						limit = { is_alive = yes }
						attempted_murder_opinion_effect = { VICTIM = root MURDERER = scope:murderer }
						if = {
							limit = { this = scope:host }
							rightfully_imprison_character_effect = { TARGET = scope:murderer IMPRISONER = root }
						}
					}
				}
			}		
		}
		if = {
			limit = { exists = scope:accomplice }
			scope:accomplice = { save_scope_as = central_portrait }
		}
		else_if = {
			limit = { exists = scope:bodyguard }
			scope:bodyguard = { save_scope_as = central_portrait }
		}
		hidden_effect = {
			if = {
				limit = { exists = scope:dog_appears }
				random = {
					chance = 33
					save_scope_as = dog_killed
				}
			}
		}
	}

	option = { # Kill
		name = hunt.1081.a
		trigger = {
			NOT = { exists = scope:murder_success }
			OR = {
				scope:murderer = { is_alive = yes }
				AND = {
					exists = scope:accomplice
					scope:accomplice = { is_alive = yes }
				}
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_murderer_murder_log
				score = 25
				tags = { random bad scheme intent }
				character = root
				target = scope:murderer

				#Effect
				root = {
					if = {
						limit = {
							scope:murderer = { is_alive = yes }
						}
						unknown_murder_effect = {
							VICTIM = scope:murderer
							MURDERER = root
							REASON = death_hunting_mysterious
						}
					}
					if = {
						limit = {
							exists = scope:accomplice
							scope:accomplice = { is_alive = yes }
						}
						unknown_murder_effect = {
							VICTIM = scope:accomplice
							MURDERER = root
							REASON = death_hunting_mysterious
						}
					}
					if = {
						limit = {
							NOR = {
								has_relation_rival = scope:murderer
								AND = {
									exists = scope:accomplice
									has_relation_rival = scope:accomplice
								}
							}
						}
						stress_impact = {
							just = minor_stress_impact_gain
							forgiving = minor_stress_impact_gain
						}
					}
					else = {
						stress_impact = { base = minor_stress_impact_loss }
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_vengefulness = 1
				ai_boldness = 1
				ai_honor = -1
			}
		}
	}

	option = { # Imprison
		name = {
			trigger = {
				scope:murderer = { is_alive = yes }
				trigger_if = {
					limit = { exists = scope:accomplice }
					scope:accomplice = { is_alive = no }
				}
			}
			text = hunt.1081.b
		}
		name = {
			trigger = {
				scope:murderer = { is_alive = yes }
				AND = {
					exists = scope:accomplice
					scope:accomplice = { is_alive = yes}
				}
			}
			text = hunt.1081.b.pair
		}
		name = {
			trigger = {
				scope:murderer = { is_alive = no }
				AND = {
					exists = scope:accomplice
					scope:accomplice = { is_alive = yes}
				}
			}
			text = hunt.1081.b.accomplice
		}
		trigger = {
			NOT = { exists = scope:murder_success }
			OR = {
				scope:murderer = { is_alive = yes }
				AND = {
					exists = scope:accomplice
					scope:accomplice = { is_alive = yes }
				}
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_murderer_imprison_log
				score = 25
				tags = { random bad scheme intent }
				character = root
				target = scope:murderer

				#Effect
				root = {
					if = {
						limit = {
							scope:murderer = { is_alive = yes }
						}
						rightfully_imprison_character_effect = {
							TARGET = scope:murderer
							IMPRISONER = root
						}
					}
					if = {
						limit = {
							exists = scope:accomplice
							scope:accomplice = { is_alive = yes }
						}
						rightfully_imprison_character_effect = {
							TARGET = scope:accomplice
							IMPRISONER = root
						}
					}
					stress_impact = {
						wrathful = minor_stress_impact_gain
						vengeful = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_vengefulness = -0.5
				ai_boldness = -0.5
				ai_honor = 0.5
			}
		}
	}

	option = { # Dead
		name = {
			trigger = { has_relation_rival = scope:murderer }
			text = hunt.1081.c.rival
		}
		name = {
			trigger = { is_close_family_of = scope:murderer }
			text = hunt.1081.c.family
		}
		name = {
			trigger = {
				NOR = {
					has_relation_rival = scope:murderer
					is_close_family_of = scope:murderer
				}
			}
			text = hunt.1081.c
		}
		trigger = { exists = scope:murder_success }
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_murderer_murdered_log
				score = 25
				tags = { random bad scheme intent }
				character = root
				target = scope:murderer

				#Effect
				root = {
					unknown_murder_effect = { VICTIM = root MURDERER = scope:murderer REASON = death_hunting_mysterious }
					scope:murderer = {
						random_secret = {
							limit = {
								secret_type = secret_murder
								secret_target = root
							}
							if = {
								limit = { exists = scope:accomplice }
								reveal_to = scope:accomplice
							}
						}
					}
				}
			}
		}
		scope:activity = {
			set_variable = {
				name = hunt_invalidated
				value = flag:death
			}
			set_variable = {
				name = hunt_invalidated_flavor
				value = root
			}
		}
	}

	option = { # What...
		name = hunt.1081.d
		trigger = {
			NOR = {
				exists = scope:murder_success
				scope:murderer = { is_alive = yes }
				AND = {
					exists = scope:accomplice
					scope:accomplice = { is_alive = yes }
				}
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_murderer_lucky_log
				score = 25
				tags = { random bad scheme intent }
				character = root
				target = scope:murderer

				#Effect
				root = {
					stress_impact = {
						paranoid = minor_stress_impact_gain
						craven = minor_stress_impact_gain
					}
				}
			}
		}
	}

	after = {
		if = {
			limit = {
				is_alive = yes
				exists = scope:dog_killed
			}
			show_as_tooltip = { remove_dog_story_modifiers_effect = yes }
			random_owned_story = {
				limit = { story_type = story_cycle_pet_dog }
				hidden_effect = { end_story = yes }
			}
		}
		if = {
			limit = {
				NOT = { exists = scope:murder_success }
			}
			scope:activity = {
				set_variable = {
					name = hunt_invalidated
					value = flag:assassination_attempt
				}
				set_variable = {
					name = hunt_invalidated_flavor
					value = root
				}
				set_variable = {
					name = hunt_invalidated_culprit
					value = scope:murderer
				}
			}
		}
		custom_tooltip = hunt_ends_tt
	}
}

#######################
#	Legendary escape
#	by Joe Parkin
#######################

hunt.1090 = {
	type = activity_event
	title = hunt.0510.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = { this = scope:host }
				desc = hunt.1090.desc
			}
			desc = hunt.1090.guest
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = stress
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = worry
	}
	cooldown = { weeks = 1 }

	trigger = {		
		scope:activity = {
			has_activity_option = { category = special_type option = hunt_type_legendary }
			NOT = {
				exists = var:hunt_4019
			}
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			add = {
				value = 100
				subtract = involved_activity.var:hunt_success_chance
			}
		}
	}

	immediate = {
		if = {
			limit = { this = scope:host }
			scope:activity = {
				set_variable = {
					name = hunt_success
					value = flag:no
				}
			}
			if = {
				limit = { exists = scope:activity.var:participant_to_use }
				scope:activity.var:participant_to_use = { save_scope_as = hunt_participant }
			}
			else = {
				hunt_activity_random_subordinate_participant_effect = {
					ARCHETYPE = hunter
					COMBATANT = yes
					SCOPE = hunt_participant
				}
			}
			hunt_all_attendee_xp_effect = { CHANGE = 1 RANDOM = 1 } # Guest XP gain for success
		}
		custom_tooltip = hunt_fails_tt
	}

	option = { #Drat!
		name = hunt.1090.a
		trigger = {
			this = scope:host
		}
	}

	option = { #Drat!
		name = hunt.1090.b
		trigger = {
			NOT = { this = scope:host }
		}
	}

	after = {
		scope:activity = { remove_variable = participant_to_use }
	}
}

#######################
#	Guest outcome info
#	by Joe Parkin
#######################

scripted_effect hunt_save_outcome_summary_scope_effect = {
	if = {
		limit = {
			exists = scope:animal_slayer
			NOT = { scope:animal_slayer = scope:host }
		}
		scope:animal_slayer = { save_scope_as = hunt_summary_scope }
	}
	else_if = {
		limit = { this = scope:host }
		hunt_activity_random_subordinate_participant_effect = { ARCHETYPE = hunter COMBATANT = yes SCOPE = hunt_summary_scope }
	}
	else = { save_scope_as = hunt_summary_scope }
}

# Bow
hunt.1200 = {
	type = activity_event
	title = hunt.1200.t
	desc = {
		triggered_desc = {
			trigger = {
				NOT = { this = scope:host }
			}
			# Guest lead up context
			desc = {
				first_valid = {
					triggered_desc = {
						trigger = {
							hunt_story_trigger = { STORY = chase }
						}
						desc = {
							first_valid = {
								triggered_desc = {
									trigger = {
										hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
									}
									desc = hunt.1003.dangerous
								}
								triggered_desc = {
									trigger = {
										# EK EDIT
										NOT = { 
											scope:activity.var:animal_type ?= flag:hare 
											scope:activity.var:animal_type ?= flag:ringtail
										}
										#NOT = { scope:activity.var:animal_type ?= flag:hare }
									}
									desc = hunt.1003.bay
								}
								desc = hunt.1003.dogs
							}
							desc = double_line_break
						}
					}
					triggered_desc = {
						trigger = {
							hunt_story_trigger = { STORY = stealth }
						}
						desc = hunt.4001.opening
					}
					desc = hunt.1032.opening
				}
				# Guest animal slayer context
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:bow_fled }
						desc = hunt.1200.slayer_fled
					}
					triggered_desc = {
						trigger = { exists = scope:bow_group }
						desc = hunt.1200.slayer_group
					}
					triggered_desc = {
						trigger = {
							scope:animal_slayer ?= this
							hunt_story_trigger = { STORY = stealth }
							scope:host = {
								can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
							}
						}
						desc = hunt.1200.slayer_self_stealth
					}
					triggered_desc = {
						trigger = {
							scope:animal_slayer ?= this
							scope:host = {
								can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
							}
						}
						desc = hunt.1200.slayer_self
					}
					triggered_desc = {
						trigger = {
							hunt_story_trigger = { STORY = stealth }
							scope:host = {
								can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
							}
							NOT = { scope:animal_slayer ?= scope:host }
						}
						desc = hunt.1200.slayer_stealth
					}
					triggered_desc = {
						trigger = {
							scope:host = {
								can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
							}
							NOT = { scope:animal_slayer ?= scope:host }
						}
						desc = hunt.1200.slayer
					}
				}
			}
		}
		# Story context
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:animal_slayer ?= this
					hunt_story_trigger = { STORY = chase }
				}
				desc = hunt.1200.chase_self
			}
			triggered_desc = {
				trigger = {
					hunt_story_trigger = { STORY = chase }
				}
				desc = hunt.1200.chase
			}
			triggered_desc = {
				trigger = {
					scope:animal_slayer ?= this
					hunt_story_trigger = { STORY = stealth }
				}
				desc = hunt.1200.stealth_self
			}
			triggered_desc = {
				trigger = {
					hunt_story_trigger = { STORY = stealth }
				}
				desc = hunt.1200.stealth
			}
			triggered_desc = {
				trigger = { scope:animal_slayer ?= this }
				desc = hunt.1200.ambush_self
			}
			desc = hunt.1200.ambush
		}
		# Outcome
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:bow_success }
				desc = hunt.1200.success
			}
			triggered_desc = {
				trigger = { exists = scope:bow_failure }
				desc = hunt.1200.failure
			}
			triggered_desc = {
				trigger = { exists = scope:bow_critical }
				desc = hunt.1200.critical
			}
			triggered_desc = {
				trigger = { exists = scope:bow_group }
				desc = hunt.1200.group
			}
			desc = hunt.1200.fled
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = scope:host
		triggered_animation = {
			trigger = {
				OR = {
					AND = {
						exists = scope:bow_success
						scope:animal_slayer ?= this
					}
					AND = {
						can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
						exists = scope:bow_group
					}
				}
			}
			scripted_animation = bow_drawn
		}
		triggered_animation = {
			trigger = {
				exists = scope:bow_kill
				scope:animal_slayer ?= this
				scope:activity.var:animal_type ?= flag:hare
			}
			scripted_animation = bow_drawn_blunt
		}
		triggered_animation = {
			trigger = {
				exists = scope:bow_kill
				scope:animal_slayer ?= this
			}
			scripted_animation = bow_closed
		}
		triggered_animation = {
			trigger = {
				OR = {
					exists = scope:bow_success
					exists = scope:bow_group
				}
			}
			animation = throne_room_applaud_1
		}
		triggered_animation = {
			trigger = { exists = scope:bow_fled }
			animation = fear
		}
		animation = stress
	}
	right_portrait = {
		character = scope:hunt_summary_scope
		triggered_animation = {
			trigger = {
				exists = scope:bow_success
				scope:animal_slayer ?= this
				scope:activity.var:animal_type = flag:hare
			}
			scripted_animation = bow_drawn_blunt
		}
		triggered_animation = {
			trigger = {
				OR = {
					AND = {
						exists = scope:bow_success
						scope:animal_slayer ?= this
					}
					AND = {
						can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
						exists = scope:bow_group
					}
				}
			}
			scripted_animation = bow_drawn
		}
		triggered_animation = {
			trigger = {
				scope:animal_slayer ?= this
				scope:activity.var:animal_type ?= flag:hare
			}
			scripted_animation = bow_closed_blunt
		}
		triggered_animation = {
			trigger = { scope:animal_slayer ?= this }
			scripted_animation = bow_closed
		}
		triggered_animation = {
			trigger = {
				OR = {
					exists = scope:bow_success
					exists = scope:bow_group
				}
			}
			animation = throne_room_applaud_1
		}
		animation = worry
	}
	center_portrait = {
		character = scope:animal_slayer
		animation = war_over_win
		trigger = {
			NOR = {
				scope:host ?= this
				scope:hunt_participant ?= this
			}
		}
	}
	lower_right_portrait = {
		character = scope:injury_target
		trigger = {
			NOR = {
				scope:host ?= this
				scope:hunt_summary_scope ?= this
				scope:animal_slayer ?= this
				exists = scope:bow_success
			}
		}
	}
	cooldown = { weeks = 1 }

	immediate = {
		if = {
			limit = {
				hunt_animal_type_herbivore_trigger = { VAR = scope:activity.var:animal_type }
			}
			play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_beast_struggle"
		}
		else = { play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_beast_roar" }
		play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_arrow_impact_hit"
		hunt_save_outcome_summary_scope_effect = yes
		show_as_tooltip = {
			scope:animal_slayer = {
				if = {
					limit = { has_trait = tourney_participant }
					add_trait_xp = {
						trait = tourney_participant
						track = bow
						value = { 1 3 }
					}
					hunter_progress_point_gain_effect = { CHANGE = 1 RANDOM_CHANGE = 1 } #Gives Hunter Lifestyle XP
				}
				else = {
					hunter_progress_point_gain_effect = { CHANGE = 2 RANDOM_CHANGE = 1 } #Gives Hunter Lifestyle XP
				}
			}
			switch = {
				trigger = exists
				scope:bow_success = {
					scope:animal_slayer = {
						add_prestige = hunt_prestige_bow_value
						if = {
							limit = { has_activity_intent = slay_beast_intent }
							show_as_tooltip = { complete_activity_intent = yes }
						}
						hunt_complete_slay_beast_intent_effect = yes
					}
				}
				scope:bow_failure = {
					scope:animal_slayer = { custom_tooltip = hunt_kill_failure_bow }
					if = {
						limit = { exists = scope:injury_target }
						scope:injury_target = {
							hunt_wound_apply_effect = { SEVERE = no }
						}
					}
				}
				scope:bow_critical = { custom_tooltip = hunt_kill_critical_failure_bow_tt }
				scope:bow_group = {
					custom_tooltip = hunt.1032.e.tt
					hunt_no_pelt_effect = yes # No pelt trophies
				}
			}
		}
	}

	option = { # Success
		name = {
			trigger = { this = scope:animal_slayer }
			text = hunt.1200.a.self
		}
		name = {
			trigger = {
				NOT = { this = scope:animal_slayer }
			}
			text = hunt.1200.a
		}
		trigger = { exists = scope:bow_success }
	}

	option = { # Failure
		name = {
			trigger = { this = scope:animal_slayer }
			text = hunt.1200.b.self
		}
		name = {
			trigger = {
				NOT = { this = scope:animal_slayer }
			}
			text = hunt.1200.b
		}
		trigger = { exists = scope:bow_failure }
	}

	option = { # Critical failure
		name = {
			trigger = { this = scope:animal_slayer }
			text = hunt.1200.c.self
		}
		name = {
			trigger = {
				NOT = { this = scope:animal_slayer }
			}
			text = hunt.1200.c
		}
		trigger = { exists = scope:bow_critical }
	}

	option = { # Group
		name = hunt.1200.d
		trigger = { exists = scope:bow_group }
	}

	option = { # Fled
		name = hunt.1200.e
		trigger = { exists = scope:bow_fled }
	}
}

# Melee
hunt.1201 = {
	type = activity_event
	title = hunt.1200.t
	desc = {
		triggered_desc = {
			trigger = {
				NOT = { this = scope:host }
			}
			# Guest lead up context
			desc = {
				first_valid = {
					triggered_desc = {
						trigger = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						desc = hunt.1003.dangerous
					}
					triggered_desc = {
						trigger = {
							# EK EDIT
							NOT = { 
								scope:activity.var:animal_type = flag:hare 
								scope:activity.var:animal_type = flag:ringtail
								scope:activity.var:animal_type = flag:ash_hopper
							}
							#NOT = { scope:activity.var:animal_type = flag:hare }
						}
						desc = hunt.1003.bay
					}
					desc = hunt.1003.dogs
				}
				desc = double_line_break
				# Guest animal slayer context
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:dogs_kill }
						desc = hunt.1201.slayer_dogs
					}
					triggered_desc = {
						trigger = {
							scope:animal_slayer ?= root
							scope:host = {
								can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
							}
						}
						desc = hunt.1201.slayer_self
					}
					triggered_desc = {
						trigger = {
							scope:host = {
								can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
							}
							NOT = { scope:animal_slayer ?= scope:host }
						}
						desc = hunt.1201.slayer
					}
				}
			}
		}
		# Story context
		first_valid = {
			triggered_desc = {
				trigger = { scope:animal_slayer ?= root }
				desc = hunt.1201.self
			}
			desc = hunt.1201
		}
		# Outcome
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:melee_success
					scope:animal_slayer ?= root
				}
				desc = hunt.1201.success_self
			}
			triggered_desc = {
				trigger = { exists = scope:melee_success }
				desc = hunt.1201.success
			}
			triggered_desc = {
				trigger = {
					exists = scope:melee_failure
					scope:animal_slayer ?= root
				}
				desc = hunt.1201.failure_self
			}
			triggered_desc = {
				trigger = { exists = scope:melee_failure }
				desc = hunt.1201.failure
			}
			triggered_desc = {
				trigger = { exists = scope:melee_critical }
				desc = hunt.1201.critical
			}
			triggered_desc = {
				trigger = { exists = scope:dogs_success }
				desc = hunt.1201.dogs_success
			}
			triggered_desc = {
				trigger = { exists = scope:dogs_failure }
				desc = hunt.1201.dogs_failure
			}
			triggered_desc = {
				trigger = {
					scope:host = { hunt_dharmic_pacificist_trigger = yes }
				}
				desc = hunt.1201.animal_spared_dharmic
			}
			desc = hunt.1201.animal_spared
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = scope:host
		# SPEAR
		triggered_animation = {
			trigger = {
				scope:animal_slayer = this
				exists = scope:melee_success
			}
			animation = aggressive_spear
		}
		triggered_animation = {
			trigger = {
				scope:animal_slayer = this
				exists = scope:melee_failure
			}
			animation = pain
		}
		triggered_animation = {
			trigger = {
				scope:animal_slayer = this
				exists = scope:melee_kill
			}
			animation = throne_room_two_handed_passive_1
		}
		triggered_animation = {
			trigger = {
				OR = {
					exists = scope:melee_success
					exists = scope:dogs_success
				}
			}
			animation = happiness
		}
		triggered_animation = {
			trigger = { exists = scope:animal_spared }
			animation = dismissal
		}
		animation = stress
	}
	right_portrait = {
		character = scope:hunt_summary_scope
		triggered_animation = {
			trigger = {
				scope:animal_slayer = this
				exists = scope:melee_success
			}
			animation = aggressive_spear
		}
		triggered_animation = {
			trigger = { scope:animal_slayer = this }
			animation = throne_room_two_handed_passive_1
		}
		triggered_animation = {
			trigger = {
				OR = {
					exists = scope:melee_success
					exists = scope:dogs_success
				}
			}
			animation = throne_room_applaud_1
		}
		triggered_animation = {
			trigger = {
				exists = scope:animal_spared
				OR = {
					has_trait = compassionate
					hunt_dharmic_pacificist_trigger = yes
				}
			}
			animation = admiration
		}
		triggered_animation = {
			trigger = { exists = scope:animal_spared }
			animation = disapproval
		}
		animation = worry
	}
	center_portrait = {
		character = scope:animal_slayer
		animation = war_over_win
		trigger = {
			NOR = {
				scope:host ?= this
				scope:hunt_summary_scope ?= this
			}
		}
	}
	lower_right_portrait = {
		character = scope:injury_target
		trigger = {
			NOR = {
				scope:host ?= this
				scope:hunt_summary_scope ?= this
				scope:animal_slayer ?= this
				exists = scope:melee_kill
			}
		}
	}
	cooldown = { weeks = 1 }

	trigger = {
		trigger_if = {
			limit = { this = scope:host }
			NOT = {
				exists = scope:animal_spared
			}
		}
	}

	immediate = {
		if = {
			limit = {
				hunt_animal_type_herbivore_trigger = { VAR = scope:activity.var:animal_type }
			}
			play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_beast_struggle"
		}
		else = { play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_beast_roar" }
		hunt_save_outcome_summary_scope_effect = yes
		show_as_tooltip = {
			switch = {
				trigger = exists
				scope:melee_success = {
					scope:animal_slayer = {
						add_prestige = hunt_prestige_melee_value
						if = {
							limit = { has_activity_intent = slay_beast_intent }
							show_as_tooltip = { complete_activity_intent = yes }
						}
						hunt_complete_slay_beast_intent_effect = yes
					}
				}
				scope:melee_failure = {
					add_prestige = hunt_prestige_melee_wound_value
					scope:injury_target = { hunt_wound_tooltip_effect = yes }
					if = {
						limit = { has_activity_intent = slay_beast_intent }
						show_as_tooltip = { complete_activity_intent = yes }
					}
					hunt_complete_slay_beast_intent_effect = yes
				}
				scope:melee_critical = {
					scope:animal_slayer = {
						hunt_animal_death_effect = { VAR = var:animal_type }
					}
				}
				scope:dogs_success = {
					scope:host = {
						if = {
							limit = { has_character_modifier = hunt_happy_hounds_modifier }
							add_character_modifier = {
								modifier = hunt_happy_hounds_modifier
								years = 5
							}
						}
						else_if = {
							limit = { has_character_modifier = hunt_savage_hounds_modifier }
							add_character_modifier = {
								modifier = hunt_savage_hounds_modifier
								years = 5
							}
						}
					}
				}
				scope:dogs_failure = {
					scope:host = {
						if = {
							limit = { has_character_modifier = hunt_savaged_hounds_modifier }
							add_character_modifier = {
								modifier = hunt_savaged_hounds_modifier
								years = 5
							}
						}
					}
				}
				scope:animal_spared = {
					# No artifact explanation
					custom_tooltip = hunt_no_artifact_tt
					# Upset/please attendees based on faith tenets
					scope:activity = {
						every_attending_character = {
							limit = { hunt_dharmic_pacificist_trigger = yes }
							custom = every_non_cynical_dharmic_attendee_tt
							add_opinion = {
								target = root
								modifier = hunt_dharmic_mercy_opinion
								opinion = 10
							}
						}
						every_attending_character = {
							limit = {
								NOT = { this = scope:host }
								hunt_dharmic_pacificist_trigger = no
							}
							custom = every_non_cynical_dharmic_attendee_reverse_tt
							add_opinion = {
								target = root
								modifier = hunt_dharmic_mercy_opinion
								opinion = -10
							}
						}
					}
					# Stress
					if = {
						limit = { hunt_dharmic_pacificist_trigger = yes }
						stress_impact = {
							base = minor_stress_impact_loss
							compassionate = minor_stress_impact_loss
							lifestyle_hunter = miniscule_stress_impact_gain
							brave = miniscule_stress_impact_gain
							sadistic = miniscule_stress_impact_gain
							greedy = miniscule_stress_impact_gain
						}
					}
					else = {
						stress_impact = {
							lifestyle_hunter = miniscule_stress_impact_gain
							brave = miniscule_stress_impact_gain
							sadistic = miniscule_stress_impact_gain
							greedy = miniscule_stress_impact_gain
						}
					}
				}
			}
		}
	}

	option = { # 
		name = {
			trigger = { this = scope:animal_slayer }
			text = hunt.1201.a.self
		}
		name = {
			trigger = {
				NOT = { this = scope:animal_slayer }
			}
			text = hunt.1201.a
		}
		trigger = { exists = scope:melee_success }
	}

	option = { # Failure
		name = {
			trigger = { this = scope:animal_slayer }
			text = hunt.1201.b.self
		}
		name = {
			trigger = {
				NOT = { this = scope:animal_slayer }
			}
			text = hunt.1201.b
		}
		trigger = { exists = scope:melee_failure }
	}

	option = { # Critical failure
		name = hunt.1201.c
		trigger = { exists = scope:melee_critical }
	}

	option = { # Dogs success
		name = {
			trigger = { this = scope:host }
			text = hunt.1201.d.self
		}
		name = {
			trigger = {
				NOT = { this = scope:host }
			}
			text = hunt.1201.d
		}
		trigger = { exists = scope:dogs_success }
	}

	option = { # Dogs failure
		name = {
			trigger = {
				this = scope:host
				exists = scope:dogs_critical
			}
			text = hunt.1201.e.critical
		}
		name = {
			trigger = { this = scope:host }
			text = hunt.1201.e.self
		}
		name = {
			trigger = {
				NOT = { this = scope:host }
			}
			text = hunt.1201.e
		}
		trigger = { exists = scope:dogs_failure }
	}

	option = { # Animal spared
		name = {
			trigger = { hunt_dharmic_pacificist_trigger = yes }
			text = hunt.1201.f.dharmic
		}
		name = {
			trigger = { has_trait = compassionate }
			text = hunt.1201.f.compassionate
		}
		name = {
			trigger = {
				hunt_dharmic_pacificist_trigger = no
				NOT = { has_trait = compassionate }
			}
			text = hunt.1201.f
		}
		trigger = { exists = scope:animal_spared }
	}
}

# Group
hunt.1202 = {
	type = activity_event
	title = hunt.1001.t
	desc = {
		# Introduction
		triggered_desc = {
			trigger = {
				NOT = { this = scope:host }
			}
			# Guest lead up context
			desc = {
				first_valid = {
					triggered_desc = {
						trigger = {
							hunt_animal_type_predator_trigger = { VAR = scope:activity.var:animal_type }
						}
						desc = hunt.1003.dangerous
					}
					triggered_desc = {
						trigger = {
							# EK EDIT
							NOT = { 
								scope:activity.var:animal_type = flag:hare 
								scope:activity.var:animal_type = flag:ringtail
								scope:activity.var:animal_type = flag:ash_hopper
							}
							#NOT = { scope:activity.var:animal_type = flag:hare }
						}
						desc = hunt.1003.bay
					}
					desc = hunt.1003.dogs
				}
				desc = double_line_break
				# Guest context
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:group_capture }
						desc = hunt.1202.capture
					}
					triggered_desc = {
						trigger = { exists = scope:group_craven }
						desc = hunt.1202.craven
					}
					desc = hunt.1202.slayer
				}
			}
		}
		# Host context
		triggered_desc = {
			trigger = { this = scope:host }
			desc = {
				first_valid = {
					triggered_desc = {
						trigger = { exists = scope:group_capture }
						desc = hunt.1202.capture_self
					}
					triggered_desc = {
						trigger = { exists = scope:group_craven }
						desc = hunt.1202.craven_self
					}
					desc = hunt.1202.slayer_self
				}
			}
		}
		# Standard options
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:group_success
					exists = scope:group_capture
				}
				desc = hunt.1202.capture_success
			}
			triggered_desc = {
				trigger = {
					exists = scope:group_failure
					exists = scope:group_capture
					scope:injury_target ?= root
				}
				desc = hunt.1202.capture_injury
			}
			triggered_desc = {
				trigger = {
					exists = scope:group_failure
					exists = scope:group_capture
				}
				desc = hunt.1202.capture_failure
			}
			triggered_desc = {
				trigger = {
					exists = scope:group_critical
					exists = scope:group_capture
				}
				desc = hunt.1202.capture_critical
			}
			triggered_desc = {
				trigger = {
					exists = scope:group_success
					is_in_list = animal_slayers
				}
				desc = hunt.1202.success_self
			}
			triggered_desc = {
				trigger = { exists = scope:group_success }
				desc = hunt.1202.success
			}
			triggered_desc = {
				trigger = {
					exists = scope:group_failure
					is_in_list = animal_slayers
					scope:injury_target ?= this
				}
				desc = hunt.1202.failure_injury
			}
			triggered_desc = {
				trigger = {
					exists = scope:group_failure
					is_in_list = animal_slayers
				}
				desc = hunt.1202.failure_self
			}
			triggered_desc = {
				trigger = { exists = scope:group_failure }
				desc = hunt.1202.failure
			}
			triggered_desc = {
				trigger = {
					exists = scope:group_critical
					is_in_list = animal_slayers
				}
				desc = hunt.1202.critical_self
			}
			triggered_desc = {
				trigger = { exists = scope:group_critical }
				desc = hunt.1202.critical
			}
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = scope:host
		triggered_animation = {
			trigger = {
				exists = scope:group_success
				is_in_list = animal_slayers
			}
			animation = aggressive_spear
		}
		triggered_animation = {
			trigger = { is_in_list = animal_slayers }
			animation = throne_room_two_handed_passive_1
		}
		triggered_animation = {
			trigger = { exists = scope:group_success }
			animation = throne_room_applaud_1
		}
		animation = stress
	}
	right_portrait = {
		character = scope:hunt_summary_scope
		triggered_animation = {
			trigger = {
				NOT = { exists = scope:group_success }
				this = scope:injury_target
			}
			animation = loss_1
		}
		triggered_animation = {
			trigger = {
				exists = scope:group_success
				is_in_list = animal_slayers
			}
			animation = aggressive_spear
		}
		triggered_animation = {
			trigger = { is_in_list = animal_slayers }
			animation = throne_room_two_handed_passive_1
		}
		triggered_animation = {
			trigger = { exists = scope:group_success }
			animation = throne_room_applaud_1
		}
		animation = worry
	}
	center_portrait = {
		character = scope:animal_slayer
		animation = war_over_win
		trigger = {
			NOR = {
				scope:host ?= this
				scope:hunt_summary_scope ?= this
			}
		}
	}
	lower_left_portrait = {
		character = scope:injury_target
		trigger = {
			NOR = {
				scope:host ?= this
				scope:hunt_summary_scope ?= this
				scope:animal_slayer ?= this
				exists = scope:group_kill
			}
		}
	}
	cooldown = { weeks = 1 }

	trigger = {
		trigger_if = {
			limit = { this = scope:host }
			NOT = { exists = scope:group_murder }
		}
	}

	immediate = {
		if = {
			limit = {
				hunt_animal_type_herbivore_trigger = { VAR = scope:activity.var:animal_type }
			}
			play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_beast_struggle"
		}
		else = { play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_beast_roar" }
		hunt_save_outcome_summary_scope_effect = yes
		show_as_tooltip = {
			scope:host = {
				if = {
					limit = {	
						is_alive = yes
						exists = scope:group_capture
					}
					add_character_modifier = {
						modifier = hunt_captive_beast_modifier
						years = 5
						desc = hunt_captive_beast_modifier_custom_desc
					}
				}
			}
			switch = {
				trigger = exists
				scope:group_kill = {
					every_in_list = {
						list = animal_slayers
						custom = hunt_every_hunter_tt
						add_prestige = hunt_prestige_melee_group_value
					}
				}
				scope:group_failure = {
					every_in_list = {
						list = animal_slayers
						custom = hunt_every_hunter_tt
						add_prestige = hunt_prestige_melee_wound_group_value
					}
					scope:injury_target = {
						if = { # Big animal injure big
							limit = {
								hunt_animal_type_dangerous_trigger = { VAR = scope:activity.var:animal_type }
							}
							hunt_wound_apply_effect = { SEVERE = yes }
						}
						else = { # Smol animal injure smol
							hunt_wound_apply_effect = { SEVERE = no }
						}
					}
				}
				scope:group_critical = {
					scope:animal_slayer = {
						hunt_animal_death_effect = { VAR = var:animal_type }
					}
				}
			}
		}
	}

	option = { # 
		name = {
			trigger = { is_in_list = animal_slayers }
			text = hunt.1202.a.self
		}
		name = {
			trigger = {
				NOT = { is_in_list = animal_slayers }
			}
			text = hunt.1202.a
		}
		trigger = { exists = scope:group_success }
	}

	option = { # 
		name = {
			trigger = { this = scope:injury_target }
			text = hunt.1202.b.self
		}
		name = {
			trigger = {
				NOT = { this = scope:injury_target }
			}
			text = hunt.1202.b
		}
		trigger = { exists = scope:group_failure }
	}

	option = { # 
		name = hunt.1202.c
		trigger = { exists = scope:group_critical }
	}
}

#########################
#	YEARLY EVENTS 		#
#	2000 - 2999			#
#########################

#######################
#   Dog salesman
#	by Joe Parkin
#######################

hunt.2000 = {
	type = character_event
	title = hunt.2000.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:m_hunt
					scope:m_hunt = { has_court_position = master_of_hunt_court_position }
				}
				desc = hunt.2000.opening_master
			}
			triggered_desc = {
				trigger = { exists = scope:m_hunt }
				desc = hunt.2000.opening_hunter
			}
			desc = hunt.2000.opening
		}
		desc = hunt.2000.desc
	}
	theme = hunting
	override_background = { reference = ep2_dog_kennels }
	left_portrait = {
		character = scope:dog_salesman
		animation = admiration
	}
	right_portrait = {
		character = scope:m_hunt
		animation = thinking
	}
	cooldown = { years = 25 }

	trigger = {
		has_dlc_feature = tours_and_tournaments
		is_landed_or_landless_administrative = yes
		is_available_adult = yes
		NOT = {
			any_owned_story = { story_type = story_cycle_pet_dog }
		}
	}

	weight_multiplier = {
		base = 1
		# More likely for non-tribal and Master of Hunt employers
		hunt_activity_organization_modifier = yes
		# More likely for Hunters
		modifier = {
			has_trait = lifestyle_hunter
			factor = 2
		}
		modifier = {
			has_trait = lifestyle_hunter
			has_trait_xp = {
				trait = lifestyle_hunter
				track = hunter
				value >= 10
			}
			factor = 1.5
		}
		# Less likely if poor
		modifier = {
			factor = 0.5
			gold < medium_gold_value
		}
		# More likely if someone relveant is around
		modifier = {
			factor = 2
			any_pool_guest = {
				is_lowborn = yes
				has_trait = lifestyle_hunter
			}
		}
	}

	immediate = {
		hidden_effect = {
			random_list = {
				10 = {
					add_to_list = realm_list
					every_neighboring_and_across_water_top_liege_realm_owner = { add_to_list = realm_list }
					random_in_list = {
						list = realm_list
						random_realm_county = {
							culture = { save_scope_as = merchant_culture }
							faith = { save_scope_as = merchant_faith }
						}
					}
					create_character = {
						template = hunter_template
						location = root.capital_province
						dynasty = none
						culture = scope:merchant_culture
						faith = scope:merchant_faith
						save_scope_as = dog_salesman
					}
				}
				10 = {
					trigger = {
						any_pool_guest = {
							is_lowborn = yes
							has_trait = lifestyle_hunter
						}
					}
					random_pool_guest = {
						limit = { 
							is_lowborn = yes
							has_trait = lifestyle_hunter
						}
						weight = {
							base = 1
							modifier = {
								factor = 2
								has_trait_xp = {
									trait = lifestyle_hunter
									track = hunter
									value >= 25
								}
							}
						}
						save_scope_as = dog_salesman
					}
				}
			}
		}
		hunt_save_master_or_hunter_courtier_effect = yes		
	}

	option = { # Scent hound
		name = hunt.2000.a
		pay_short_term_gold = {
			target = scope:dog_salesman
			gold = {
				value = minor_gold_value
				max = 25
			}
		}
		hidden_effect = { start_dog_story_cycle_effect = yes }
		add_character_modifier = { modifier = dog_story_scenthound_modifier }
		random_owned_story = {
			limit = { story_type = story_cycle_pet_dog }
			change_variable = {
				name = dog_age_variable
				add = 3
			}
		}
		hidden_effect = {
			if = {
				limit = { has_character_modifier = dog_story_modifier }
				remove_character_modifier = dog_story_modifier
			}
			scope:dog_salesman = { move_to_pool = yes }
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = arrogant
					has_trait = brave
					has_trait = impatient
				}
			}
		}
	}

	option = { # Beasthound
		name = hunt.2000.b
		pay_short_term_gold = {
			target = scope:dog_salesman
			gold = {
				value = minor_gold_value
				max = 25
			}
		}
		hidden_effect = { start_dog_story_cycle_effect = yes }
		add_character_modifier = { modifier = dog_story_beasthound_modifier }
		random_owned_story = {
			limit = { story_type = story_cycle_pet_dog }
			change_variable = {
				name = dog_age_variable
				add = 3
			}
		}
		hidden_effect = {
			if = {
				limit = { has_character_modifier = dog_story_modifier }
				remove_character_modifier = dog_story_modifier
			}
			scope:dog_salesman = { move_to_pool = yes }
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = arrogant
					has_trait = brave
					has_trait = impatient
				}
			}
		}
	}

	option = { # Recruit merchant
		name = hunt.2000.c
		pay_short_term_gold = {
			target = scope:dog_salesman
			gold = {
				value = minor_gold_value
				max = 25
			}
		}
		add_courtier = scope:dog_salesman
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = arrogant
					has_trait = brave
					has_trait = impatient
				}
			}
		}
	}

	option = { # Send away
		name = hunt.2000.d
		hidden_effect = {
			scope:dog_salesman = { select_and_move_to_pool_effect = yes }
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = craven
					has_trait = lazy
					has_trait = patient
				}
			}
		}
	}
}

#######################
#   Falcon salesman
#	by Joe Parkin
#######################

hunt.2001 = {
	type = character_event
	title = hunt.2001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:m_hunt
					scope:m_hunt = { has_court_position = master_of_hunt_court_position }
				}
				desc = hunt.2001.opening_master
			}
			triggered_desc = {
				trigger = { exists = scope:m_hunt }
				desc = hunt.2001.opening_hunter
			}
			desc = hunt.2001.opening
		}
		desc = hunt.2001.desc
	}
	theme = hunting
	override_background = { reference = ep2_hunt_falconry_mews }
	left_portrait = {
		character = scope:falcon_salesman
		animation = hunting_falcon
	}
	right_portrait = {
		character = scope:m_hunt
		animation = thinking
	}
	cooldown = { years = 25 }

	trigger = {
		# Falconry DLC feature
		has_dlc_feature = tours_and_tournaments
		is_landed_or_landless_administrative = yes
		is_available_adult = yes
		NOT = { has_character_modifier = peregrine_falcon }
	}

	weight_multiplier = {
		base = 1
		# More likely for non-tribal and Master of Hunt employers
		hunt_activity_organization_modifier = yes
		modifier = {
			has_trait = lifestyle_hunter
			factor = 2
		}
		modifier = {
			has_trait = lifestyle_hunter
			has_trait_xp = {
				trait = lifestyle_hunter
				track = falconer
				value >= 10
			}
			factor = 1.5
		}
		# Less likely if poor
		modifier = {
			factor = 0.5
			gold < medium_gold_value
		}
		# More likely if someone relveant is around
		modifier = {
			factor = 2
			any_pool_guest = {
				is_lowborn = yes
				has_trait = lifestyle_hunter
				has_trait_xp = {
					trait = lifestyle_hunter
					track = falconer
					value >= 25
				}
			}
		}
	}

	immediate = {
		hidden_effect = {
			random_list = {
				10 = {
					add_to_list = realm_list
					every_neighboring_and_across_water_top_liege_realm_owner = { add_to_list = realm_list }
					random_in_list = {
						list = realm_list
						random_realm_county = {
							culture = { save_scope_as = merchant_culture }
							faith = { save_scope_as = merchant_faith }
						}
					}
					create_character = {
						template = falconer_template
						location = root.capital_province
						dynasty = none
						culture = scope:merchant_culture
						faith = scope:merchant_faith
						save_scope_as = falcon_salesman
					}
				}
				10 = {
					trigger = {
						any_pool_guest = {
							is_lowborn = yes
							has_trait = lifestyle_hunter
						}
					}
					random_pool_guest = {
						limit = { 
							is_lowborn = yes
							has_trait = lifestyle_hunter
						}
						weight = {
							base = 1
							modifier = {
								factor = 2
								has_trait_xp = {
									trait = lifestyle_hunter
									track = falconer
									value >= 25
								}
							}
						}
						save_scope_as = falcon_salesman
					}
				}
			}
		}
		hunt_save_master_or_hunter_courtier_effect = yes
		if = {
			limit = { employs_court_position = master_of_hunt_court_position }
			court_position:master_of_hunt_court_position = { save_scope_as = master_falconer }
		}
	}

	option = { # Buy Falcon
		name = hunt.2001.a
		flavor = hunt.2001.a.flavor
		pay_short_term_gold = {
			target = scope:falcon_salesman
			gold = minor_gold_value
		}
		add_character_modifier = {
			modifier = peregrine_falcon
			years = 7
		}		
		scope:falcon_salesman = { move_to_pool = yes }
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = arrogant
					has_trait = brave
					has_trait = impatient
				}
			}
		}
	}

	option = { # Hire Falconer
		name = hunt.2001.c
		pay_short_term_gold = {
			target = scope:falcon_salesman
			gold = {
				value = medium_gold_value
				max = 50
			}
		}
		add_courtier = scope:falcon_salesman
		court_position_grant_effect = {
			POS = master_of_hunt
			EMPLOYER = root
			CANDIDATE = scope:falcon_salesman
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = arrogant
					has_trait = brave
					has_trait = impatient
				}
			}
		}
	}

	option = { # Send away
		name = hunt.2001.d
		scope:falcon_salesman = { move_to_pool = yes }
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = craven
					has_trait = lazy
					has_trait = patient
				}
			}
		}
	}
}

#######################
#	Standard Sighting
#	by Joe Parkin
#######################

scripted_effect hunt_sighting_county_province_effect = {
	if = {
		limit = { is_landed = no }
		domicile.domicile_location.county ?= {
			if = {
				limit = { hunt_activity_recent_hunt_sighting_trigger = no }
				add_to_list = sighting_counties
			}
			if = { # Estate owners cannot move to hunt
				limit = { root = { is_landless_adventurer = yes } }
				every_neighboring_county = {
					limit = { hunt_activity_recent_hunt_sighting_trigger = no }
					add_to_list = sighting_counties
				}
			}
		}
	}
	else = {
		every_sub_realm_county = {
			limit = { hunt_activity_recent_hunt_sighting_trigger = no }
			add_to_list = sighting_counties
		}
	}
	random_in_list = {
		list = sighting_counties
		limit = { hunt_activity_recent_hunt_sighting_trigger = no }
		weight = {
			base = 1
			hunt_activity_sighting_county_modifier = yes
		}
		save_scope_as = sighting_county
		random_county_province = {
			weight = {
				base = 1
				hunt_activity_sighting_terrain_modifier = yes
				hunt_activity_sighting_building_modifier = { PROVINCE = this }
				hunt_activity_game_building_modifier = { PROVINCE = this }
			}
			save_scope_as = sighting_province
		}
	}
}

hunt.2500 = {
	type = character_event
	title = hunt.2500.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						AND = {
							exists = court_position:master_of_hunt_court_position
							scope:sighting_character = court_position:master_of_hunt_court_position
						}
						AND = {
							exists = court_position:huntperson_camp_officer
							scope:sighting_character = court_position:huntperson_camp_officer
						}
					}
				}
				desc = hunt.2500.opening_master
			}
			triggered_desc = {
				trigger = {
					scope:sighting_character ?= { has_trait = lifestyle_hunter }
				}
				desc = hunt.2500.opening_hunter
			}
			triggered_desc = {
				trigger = {
					NOT = { exists = scope:sighting_character }
				}
				desc = hunt.2500.opening_fallback
			}
			desc = hunt.2500.opening
		}
		desc = hunt.2500.desc
	}
	theme = hunt_activity
	override_background = {
		trigger = { is_landed = yes }
		reference = relaxing_room
	}
	override_background = {
		trigger = { is_landed = no }
		reference = terrain_travel
	}
	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:portrait_character
		animation = hunting_knife_start
	}

	trigger = {
		trigger_if = {
			limit = {
				exists = scope:master_of_the_hunt_from_task
			}
			scope:master_of_the_hunt_from_task = {
				has_court_position = master_of_hunt_court_position
			}
		}
		# Must be available, and a hunter/employ one
		hunt_sighting_event_trigger = yes
		# Must be a valid place for a new sighting
		hunt_new_sighting_event_trigger = { TYPE = standard }
	}

	weight_multiplier = {
		base = 1
		hunt_activity_master_aptitude_positive_modifier = { LIEGE = root } # Aptitude affects frequency
		hunt_activity_lifestyle_modifier = { TRACK = hunter } # Lifestyle affects frequency
		hunt_activity_realm_size_modifier = yes
	}

	immediate = {
		# Save courtier
		hunt_activity_sighting_master_effect = { TYPE = hunter }
		# Save county
		hunt_sighting_county_province_effect = yes
		# Save sighting
		scope:sighting_county = {
			hunt_activity_standard_game_effect = { PROVINCE = scope:sighting_province HUNTER = root }
			# Create new sighting
			hunt_create_sighting_effect = {
				TYPE = standard
				ANIMAL = flag:deer
				OWNER = root
			}
		}
	}

	option = { # Interesting
		name = hunt.2500.a
		ai_chance = {
			base = 25
		}
	}

	option = { # Hire
		name = hunt.2500.c
		trigger = { exists = scope:new_hunter }
		remove_short_term_gold = medium_gold_value
		add_courtier = scope:new_hunter
		ai_chance = {
			base = 0
		}
	}

	option = { # Bother me not
		name = hunt.2500.b
		trigger = {
			NOT = { exists = scope:master_of_the_hunt_from_task }
		}
		add_character_flag = disabled_hunt_sightings_flag
		custom_tooltip = hunt.2000.b.tt
		stress_impact = {
			lifestyle_hunter = minor_stress_impact_gain
		}
		ai_chance = {
			base = 0
		}
	}

	after = {
		scope:new_hunter ?= {
			if = {
				limit = {
					NOT = { is_courtier_of = root }
				}
 				silent_disappearance_effect = yes
			}
		}
	}
}

#######################
#	Legendary Sighting
#	by Joe Parkin
#######################

hunt.2510 = {
	type = character_event
	title = hunt.2510.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						AND = {
							exists = court_position:master_of_hunt_court_position
							scope:sighting_character = court_position:master_of_hunt_court_position
						}
						AND = {
							exists = court_position:huntperson_camp_officer
							scope:sighting_character = court_position:huntperson_camp_officer
						}
					}
				}
				desc = hunt.2510.opening_master
			}
			triggered_desc = {
				trigger = {
					scope:sighting_character ?= { has_trait = lifestyle_hunter }
				}
				desc = hunt.2510.opening_hunter
			}
			triggered_desc = {
				trigger = {
					NOT = { exists = scope:sighting_character }
				}
				desc = hunt.2500.opening_fallback
			}
			desc = hunt.2510.opening
		}
		first_valid = {
			triggered_desc = {
				trigger = { is_landed = no }
				desc = hunt.2510.desc.knight_errant
			}
			triggered_desc = {
				trigger = {
					any_owned_story = { story_type = story_cycle_hunt_mystical_animal }
				}
				desc = hunt.2510.story
			}
			desc = hunt.2510.desc
		}
		first_valid = {
			triggered_desc = {
				trigger = { scope:sighting_county.var:animal_type = flag:leopard }
				desc = hunt.2510.black
			}
			desc = hunt.2510.white
		}
		first_valid = {
			triggered_desc = {
				trigger = { has_trait = knight_errant }
				desc = hunt.2510.knight_errant_closing
			}
			desc = hunt.2510.closing
		}
	}
	theme = hunt_activity
	override_background = {
		trigger = { is_landed = yes }
		reference = relaxing_room
	}
	override_background = {
		trigger = { is_landed = no }
		reference = terrain_travel
	}
	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:portrait_character
		animation = happiness
	}

	trigger = {
		trigger_if = {
			limit = {
				exists = scope:master_of_the_hunt_from_task
			}
			scope:master_of_the_hunt_from_task = {
				has_court_position = master_of_hunt_court_position
			}
		}
		# Must be available, and a hunter/employ one
		hunt_sighting_event_trigger = yes
		# Must be a valid place for a new sighting
		hunt_new_sighting_event_trigger = { TYPE = legendary }
		# Must be a hunter to start Legendary hunts
		has_trait = lifestyle_hunter
		# Must still be looking for animal if already started
		trigger_if = {
			limit = { has_character_flag = had_mystical_animal_story }
			any_owned_story = { story_type = story_cycle_hunt_mystical_animal }
		}
	}

	weight_multiplier = {
		base = 1
		hunt_activity_master_aptitude_positive_modifier = { LIEGE = root } # Aptitude affects frequency
		hunt_activity_lifestyle_modifier = { TRACK = hunter } # Lifestyle affects frequency
		hunt_activity_realm_size_modifier = yes
		modifier = {
			add = 5
			dynasty ?= { has_dynasty_perk = ep2_activities_legacy_4 }
		}
		modifier = {
			add = 5
			any_held_county ?= {
				any_county_province = { has_building_or_higher = legendary_hunting_lodge }
			}
		}
		modifier = {
			add = 75
			has_character_flag = had_mystical_animal_story
			any_owned_story = { story_type = story_cycle_hunt_mystical_animal }
		}
		modifier = {
			add = 50
			has_trait = knight_errant
		}
	}

	immediate = {
		# Save courtier
		hunt_activity_sighting_master_effect = { TYPE = hunter }
		# Save story
		if = {
			limit = {
				has_character_flag = had_mystical_animal_story
				any_owned_story = { story_type = story_cycle_hunt_mystical_animal }
			}
			random_owned_story = {
				limit = { story_type = story_cycle_hunt_mystical_animal }
				save_scope_as = story
			}
		}
		# Save sighting county
		if = {
			limit = { exists = scope:story.var:legendary_county }
			var:legendary_county = { save_scope_as = sighting_county }
		}
		else = { hunt_sighting_county_province_effect = yes }
		# Save sighting
		scope:sighting_county = {
			if = {
				limit = { exists = scope:story }
				set_variable = {
					name = animal_type
					value = scope:story.var:animal_type
				}
			}
			else = {
				save_scope_as = big_local_game
				random_list = {
					2 = {
						hunt_activity_standard_game_effect = { PROVINCE = scope:sighting_province HUNTER = root }
					}
					2 = {
						hunt_activity_dangerous_game_effect = { PROVINCE = scope:sighting_province }
					}
				}
			}
			hunt_create_sighting_effect = {
				TYPE = legendary
				ANIMAL = var:animal_type
				OWNER = root
			}
		}
	}

	option = { # Interesting
		name = {
			trigger = {
				NOT = {
					any_owned_story = { story_type = story_cycle_hunt_mystical_animal }
				}
			}
			text = hunt.2510.a
		}
		name = {
			trigger = {
				any_owned_story = { story_type = story_cycle_hunt_mystical_animal }
			}
			text = hunt.2510.a.existing
		}		
		ai_chance = {
			base = 25
		}
	}

	option = { # Hire
		name = hunt.2500.c
		trigger = { exists = scope:new_hunter }
		remove_short_term_gold = medium_gold_value
		add_courtier = scope:new_hunter
		ai_chance = {
			base = 0
		}
	}

	option = { # Bother me not
		name = hunt.2510.b
		trigger = {
			NOT = { exists = scope:master_of_the_hunt_from_task }
		}
		add_character_flag = disabled_hunt_sightings_flag
		custom_tooltip = hunt.2000.b.tt
		stress_impact = {
			lifestyle_hunter = minor_stress_impact_gain
		}
		ai_chance = {
			base = 0
		}
	}

	after = {
		scope:new_hunter ?= {
			if = {
				limit = {
					NOT = { is_courtier_of = root }
				}
 				silent_disappearance_effect = yes
			}
		}
	}
}

#######################
#	Dangerous Sighting
#	by Joe Parkin
#######################

hunt.2520 = {
	type = character_event
	title = hunt.2520.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						AND = {
							exists = court_position:master_of_hunt_court_position
							scope:sighting_character = court_position:master_of_hunt_court_position
						}
						AND = {
							exists = court_position:huntperson_camp_officer
							scope:sighting_character = court_position:huntperson_camp_officer
						}
					}
				}
				desc = hunt.2500.opening_master
			}
			triggered_desc = {
				trigger = {
					scope:sighting_character ?= { has_trait = lifestyle_hunter }
				}
				desc = hunt.2500.opening_hunter
			}
			triggered_desc = {
				trigger = {
					NOT = { exists = scope:sighting_character }
				}
				desc = hunt.2500.opening_fallback
			}
			desc = hunt.2500.opening
		}
		desc = hunt.2520.desc
	}
	theme = hunt_activity
	override_background = {
		trigger = { is_landed = yes }
		reference = relaxing_room
	}
	override_background = {
		trigger = { is_landed = no }
		reference = terrain_travel
	}
	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:portrait_character
		animation = hunting_knife_start
	}

	trigger = {
		trigger_if = {
			limit = {
				exists = scope:master_of_the_hunt_from_task
			}
			scope:master_of_the_hunt_from_task = {
				has_court_position = master_of_hunt_court_position
			}
		}
		# Must be available, and a hunter/employ one
		hunt_sighting_event_trigger = yes
		# Must be a valid place for a new sighting
		hunt_new_sighting_event_trigger = { TYPE = dangerous }
	}

	weight_multiplier = {
		base = 1
		hunt_activity_master_aptitude_positive_modifier = { LIEGE = root } # Aptitude affects frequency
		hunt_activity_lifestyle_modifier = { TRACK = hunter } # Lifestyle affects frequency
		hunt_activity_realm_size_modifier = yes
	}

	immediate = {
		hunt_activity_sighting_master_effect = { TYPE = hunter }
		# Save county
		hunt_sighting_county_province_effect = yes
		# Save sighting
		scope:sighting_county = {
			hunt_activity_dangerous_game_effect = { PROVINCE = scope:sighting_province }
			# Create new sighting
			hunt_create_sighting_effect = {
				TYPE = dangerous
				ANIMAL = var:animal_type
				OWNER = root
			}
		}
	}

	option = { # Interesting
		name = hunt.2500.a
		ai_chance = {
			base = 25
		}
	}

	option = { # Hire
		name = hunt.2500.c
		trigger = { exists = scope:new_hunter }
		remove_short_term_gold = medium_gold_value
		add_courtier = scope:new_hunter
		ai_chance = {
			base = 0
		}
	}

	option = { # Bother me not
		name = hunt.2500.b
		trigger = {
			NOT = { exists = scope:master_of_the_hunt_from_task }
		}
		add_character_flag = disabled_hunt_sightings_flag
		custom_tooltip = hunt.2000.b.tt
		stress_impact = {
			lifestyle_hunter = minor_stress_impact_gain
		}
		ai_chance = {
			base = 0
		}
	}

	after = {
		scope:new_hunter ?= {
			if = {
				limit = {
					NOT = { is_courtier_of = root }
				}
 				silent_disappearance_effect = yes
			}
		}
	}
}

#######################
#	Falconry Sighting
#	by Joe Parkin
#######################

hunt.2530 = {
	type = character_event
	title = hunt.2530.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						AND = {
							exists = court_position:master_of_hunt_court_position
							scope:sighting_character = court_position:master_of_hunt_court_position
						}
						AND = {
							exists = court_position:huntperson_camp_officer
							scope:sighting_character = court_position:huntperson_camp_officer
						}
					}
				}
				desc = hunt.2500.opening_master
			}
			triggered_desc = {
				trigger = {
					scope:sighting_character ?= {
						has_trait = lifestyle_hunter
						has_trait_xp = {
							trait = lifestyle_hunter
							track = falconer
							value >= 25
						}
					}
				}
				desc = hunt.2530.opening_falconer
			}
			triggered_desc = {
				trigger = {
					NOT = { exists = scope:sighting_character }
				}
				desc = hunt.2500.opening_fallback
			}
			desc = hunt.2500.opening
		}
		desc = hunt.2530.desc
	}
	theme = hunt_activity
	override_background = {
		trigger = { is_landed = yes }
		reference = ep2_hunt_falconry_mews
	}
	override_background = {
		trigger = { is_landed = no }
		reference = terrain_travel
	}
	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:portrait_character
		animation = admiration
	}

	trigger = {
		trigger_if = {
			limit = {
				exists = scope:master_of_the_hunt_from_task
			}
			scope:master_of_the_hunt_from_task = {
				has_court_position = master_of_hunt_court_position
			}
		}
		# Falconry DLC feature
		has_dlc_feature = tours_and_tournaments
		# Must be available, and a hunter/employ one
		hunt_sighting_event_trigger = yes
		# Must be a valid place for a new sighting
		hunt_new_sighting_event_trigger = { TYPE = falconry }
	}

	weight_multiplier = {
		base = 1
		hunt_activity_master_aptitude_positive_modifier = { LIEGE = root } # Aptitude affects frequency
		hunt_activity_lifestyle_modifier = { TRACK = falconer } # Lifestyle affects frequency
		hunt_activity_realm_size_modifier = yes
	}

	immediate = {
		# Save courtier
		hunt_activity_sighting_master_effect = { TYPE = falconer }
		# Save county
		hunt_sighting_county_province_effect = yes
		# Save sighting
		scope:sighting_county = {
			hunt_activity_falconry_game_effect = { PROVINCE = scope:sighting_province }
			# Create new sighting
			hunt_create_sighting_effect = {
				TYPE = falconry
				ANIMAL = var:animal_type
				OWNER = root
			}
		}
	}

	option = { # Interesting
		name = hunt.2500.a
		ai_chance = {
			base = 25
		}
	}

	option = { # Hire
		name = hunt.2500.c
		trigger = { exists = scope:new_hunter }
		remove_short_term_gold = medium_gold_value
		add_courtier = scope:new_hunter
		ai_chance = {
			base = 0
		}
	}

	option = { # Bother me not
		name = hunt.2500.b
		trigger = {
			NOT = { exists = scope:master_of_the_hunt_from_task }
		}
		add_character_flag = disabled_hunt_sightings_flag
		custom_tooltip = hunt.2000.b.tt
		stress_impact = {
			lifestyle_hunter = minor_stress_impact_gain
		}
		ai_chance = {
			base = 0
		}
	}

	after = {
		scope:new_hunter ?= {
			if = {
				limit = {
					NOT = { is_courtier_of = root }
				}
 				silent_disappearance_effect = yes
			}
		}
	}
}

#######################
#	Sighting Moves
#	by Joe Parkin
#######################

hunt.2540 = {
	type = character_event
	title = hunt.2540.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						AND = {
							exists = court_position:master_of_hunt_court_position
							scope:sighting_character = court_position:master_of_hunt_court_position
						}
						AND = {
							exists = court_position:huntperson_camp_officer
							scope:sighting_character = court_position:huntperson_camp_officer
						}
					}
				}
				desc = hunt.2500.opening_master
			}
			triggered_desc = {
				trigger = {
					scope:sighting_character = { has_trait = lifestyle_hunter }
				}
				desc = hunt.2500.opening_hunter
			}
			desc = hunt.2500.opening
		}
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						scope:sighting_county = { has_county_modifier = hunt_sighting_legendary_modifier }
					}
					desc = {
						desc = hunt.2540.legendary
						first_valid = {
							triggered_desc = {
								trigger = { scope:sighting_county.var:animal_type = flag:leopard }
								desc = hunt.2540.black
							}
							desc = hunt.2540.white
						}
					}
				}
				desc = hunt.2540.desc
			}
		}
		desc = hunt.2540.closing
	}
	theme = hunt_activity
	override_background = {
		trigger = { is_landed = yes }
		reference = ep2_hunt_falconry_mews
	}
	override_background = {
		trigger = { is_landed = no }
		reference = terrain_travel
	}
	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:sighting_character
		animation = happiness
	}
	cooldown = { years = 5 }

	trigger = {
		trigger_if = {
			limit = {
				exists = scope:master_of_the_hunt_from_task
			}
			scope:master_of_the_hunt_from_task = {
				has_court_position = master_of_hunt_court_position
			}
		}
		hunt_sighting_event_trigger = yes
		trigger_if = {
			limit = { is_landed = no }
			domicile.domicile_location.county = {
				OR = {
					hunt_ongoing_sighting_trigger = yes
					any_neighboring_county = { hunt_ongoing_sighting_trigger = yes }
				}
			}
		}
		trigger_else = {
			any_sub_realm_county = { hunt_ongoing_sighting_trigger = yes }
		}
		trigger_if = { # Must still be looking for animal
			limit = {
				any_realm_county = { has_county_modifier = hunt_sighting_legendary_modifier }
			}
			has_character_flag = had_mystical_animal_story
			any_owned_story = { story_type = story_cycle_hunt_mystical_animal }
		}
	}

	weight_multiplier = {
		base = 1
		hunt_activity_master_aptitude_positive_modifier = { LIEGE = root } # Aptitude affects frequency
		hunt_activity_lifestyle_modifier = { TRACK = hunter } # Lifestyle affects frequency
	}

	immediate = {
		# Save courtier
		hunt_activity_sighting_master_effect = { TYPE = hunter }
		# Save county
		random_sub_realm_county = {
			limit = {
				OR = {
					has_county_modifier = hunt_sighting_standard_modifier
					has_county_modifier = hunt_sighting_dangerous_modifier
					has_county_modifier = hunt_sighting_legendary_modifier
				}
				var:sighting_owner ?= root
				any_neighboring_county = {
					holder.top_liege = root.top_liege
					hunt_activity_recent_hunt_sighting_trigger = no
				}
			}
			weight = {
				base = 1
				modifier = {
					factor = 2
					holder = root
				}
			}
			save_scope_as = old_sighting_county
			# Save new sighting county
			random_neighboring_county = {
				limit = {
					holder.top_liege = root.top_liege
					hunt_activity_recent_hunt_sighting_trigger = no
				}
				save_scope_as = sighting_county
			}
			# Save and update story if relevant
			if = {
				limit = {
					has_county_modifier = hunt_sighting_legendary_modifier
					root = {
						any_owned_story = { story_type = story_cycle_hunt_mystical_animal }
					}
				}
				root = {
					random_owned_story = {
						limit = { story_type = story_cycle_hunt_mystical_animal }
						save_scope_as = story
			            # Remove old sighting
			            var:legendary_county = { hunt_remove_sighting_effect = yes }
			            # Update legendary location
			            set_variable = {
			                name = legendary_county
			                value = scope:sighting_county
			            }
			        }
				}
			}
			# Add relevant sighting modifiers and trackers
			switch = {
				trigger = has_county_modifier
				hunt_sighting_standard_modifier = {
					# Create new sighting
					scope:sighting_county = {
						hunt_create_sighting_effect = {
							TYPE = standard
							ANIMAL = scope:old_sighting_county.var:animal_type
							OWNER = root
						}
					}
				}
				hunt_sighting_dangerous_modifier = {
					# Create new sighting
					scope:sighting_county = {
						hunt_create_sighting_effect = {
							TYPE = dangerous
							ANIMAL = scope:old_sighting_county.var:animal_type
							OWNER = root
						}
					}
				}
				hunt_sighting_legendary_modifier = {
					# Create new sighting
					scope:sighting_county = {
						hunt_create_sighting_effect = {
							TYPE = legendary
							ANIMAL = scope:old_sighting_county.var:animal_type
							OWNER = root
						}
					}
				}
			}
			# Clean up old location variables
			hunt_remove_sighting_effect = yes
		}
	}

	option = { # Interesting
		name = {
			trigger = {
				NOT = {
					scope:sighting_county = { has_county_modifier = hunt_sighting_legendary_modifier }
				}
			}
			text = hunt.2540.a
		}
		name = {
			trigger = {
				scope:sighting_county = { has_county_modifier = hunt_sighting_legendary_modifier }
			}
			text = hunt.2540.a.legendary
		}		
		ai_chance = {
			base = 25
		}
	}

	option = { # Bother me not
		name = hunt.2540.b
		trigger = {
			NOT = { exists = scope:master_of_the_hunt_from_task }
		}
		add_character_flag = disabled_hunt_sightings_flag
		custom_tooltip = hunt.2000.b.tt
		stress_impact = {
			lifestyle_hunter = minor_stress_impact_gain
		}
		ai_chance = {
			base = 0
		}
	}
}

#########################
#	COMPLICATION EVENTS #
#	3000 - 3999			#
#########################

#######################
#	Tracking skill check
#	by Joe Parkin
#######################

hunt.3020 = {
	type = activity_event
	title = {
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						hunt_activity_deer_game_trigger = { VAR = scope:activity.var:animal_type }
					}
					desc = hunt.3020.t.deer
				}
				desc = hunt.3020.t
			}
		}
	}
	desc = {
		desc = hunt.3020.opening
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:hunt_participant }
				desc = hunt.3020.desc_courtier
			}
			desc = hunt.3020.desc_fallback
		}
		random_valid = {
			triggered_desc = {
				trigger = {
					hunt_activity_deer_antelope_game_trigger = { VAR = var:animal_type }
				}
				desc = hunt.3020.beating
			}
			triggered_desc = {
				trigger = {
					hunt_small_game_trigger = { VAR = scope:activity.var:animal_type }
				}
				desc = hunt.3020.rusing
			}
			desc = hunt.3020.squatting
			desc = hunt.3020.doubling
		}		
		desc = hunt.3020.closing
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = worry
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = thinking
	}

	trigger = {
		has_dlc_feature = tours_and_tournaments
		scope:activity = {
			NOR = {
				has_activity_option = { category = special_type option = hunt_type_falconry }
				exists = var:hunt_4013
			}
		}
	}

	weight_multiplier = {
		base = 1
		# More likely for non-tribal and Master of Hunt employers
		hunt_activity_organization_modifier = yes
	}

	immediate = {
		play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_dogs_bark"
		hunt_activity_random_subordinate_participant_effect = {
			ARCHETYPE = hunter
			COMBATANT = yes
			SCOPE = hunt_participant
		}
		save_scope_value_as = {
			name = integer_range_value
			value = {
				integer_range = { min = -3 max = 3 }
			}
		}
		hunter_progress_point_gain_effect = { CHANGE = 1 RANDOM_CHANGE = 1 }
	}

	option = { # Hunter
		name = hunt.3020.a
		trigger = { has_trait = lifestyle_hunter }
		trait = lifestyle_hunter
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_track_self_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					random_list = {
						25 = {
							modifier = {
								hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 100 }
								factor = 1.5
							}
							desc = hunt.3020.a.perfect
							send_interface_toast = {
								title = hunt.3020.a.perfect
								left_icon = root
								hunt_activity_success_change_effect = { CHANGE = increase_major }
							}
						}
						25 = {
							modifier = {
								hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 50 }
								factor = 1.5
							}
							desc = hunt.3020.a.success
							send_interface_toast = {
								title = hunt.3020.a.success
								left_icon = root
								hunt_activity_success_change_effect = { CHANGE = increase_medium }
							}
						}
						10 = {
							desc = hunt.3020.a.failure
							send_interface_toast = {
								title = hunt.3020.a.failure
								left_icon = root
								hunt_activity_success_change_effect = { CHANGE = decrease_medium }
							}
						}
					}
				}
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_rationality = 0.5
				ai_boldness = 1
				ai_energy = 1
			}
		}
	}

	option = { # Learning
		name = hunt.3020.b
		trigger = {
			OR = {
				learning >= decent_skill_rating
				has_trait = scholar
			}
			NOT = { has_trait = lifestyle_hunter }
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_track_self_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					duel = {
						skill = learning
						value = decent_skill_rating
						70 = {
							compare_modifier = {
								value = scope:duel_value
								multiplier = 3.5
								min = -25
							}
							modifier = {
								has_trait = lifestyle_hunter
								factor = 1.5
							}
							send_interface_toast = {
								title = hunt.3020.b.success
								left_icon = scope:hunt_participant
								hunt_activity_success_change_effect = { CHANGE = increase_major }
								scope:activity = {
									every_attending_character = {
										limit = {
											NOT = { this = root }
											is_alive = yes
										}
										custom = all_hunt_participants
										add_opinion = {
											target = root
											modifier = hunt_impressive_learning_opinion
											opinion = 5
										}
									}
								}
							}
						}
						30 = {
							compare_modifier = {
								value = scope:duel_value
								multiplier = -3.5
								min = -25
							}
							send_interface_toast = {
								title = hunt.3020.b.failure
								left_icon = root
								hunt_activity_success_change_effect = { CHANGE = decrease_medium }
							}
						}
					}
					stress_impact = {
						arrogant = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_rationality = 1
				ai_boldness = 0.5
				ai_energy = 0.5
			}
		}
	}

	option = { # Courtier
		name = hunt.3020.c
		trigger = { exists = scope:hunt_participant }
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_track_courtier_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:hunt_participant

				#Effect
				root = {
					reverse_add_opinion = {
						target = scope:hunt_participant
						modifier = hunt_trusted_opinion
						opinion = 10
					}
					scope:hunt_participant = {
						if = {
							limit = { has_trait = lifestyle_hunter }
							random_list = {
								25 = {
									modifier = {
										hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 100 }
										factor = 1.5
									}
									desc = hunt.3020.c.perfect
									send_interface_toast = {
										title = hunt.3020.c.perfect
										left_icon = root
										hunt_activity_success_change_effect = { CHANGE = increase_major }
									}
								}
								25 = {
									modifier = {
										hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 50 }
										factor = 1.5
									}
									desc = hunt.3020.c.success
									send_interface_toast = {
										title = hunt.3020.c.success
										left_icon = root
										hunt_activity_success_change_effect = { CHANGE = increase_medium }
									}
								}
								10 = {
									desc = hunt.3020.c.failure
									send_interface_toast = {
										title = hunt.3020.c.failure
										left_icon = root
										hunt_activity_success_change_effect = { CHANGE = decrease_medium }
									}
								}
							}
						}
						else = {
							duel = {
								skill = learning
								value = high_skill_rating
								66 = {
									compare_modifier = {
										value = scope:duel_value
										multiplier = 0.25
									}
									modifier = {
										has_trait = lifestyle_hunter
										factor = 1.5
									}
									desc = hunt.3020.c.success
									root = {
										send_interface_toast = {
											title = hunt.3020.c.success
											left_icon = scope:hunt_participant
											hunt_activity_success_change_effect = { CHANGE = increase_medium }
										}
									}
								}
								33 = {
									compare_modifier = {
										value = scope:duel_value
										multiplier = -0.25
									}
									desc = hunt.3020.c.failure
									root = {
										send_interface_toast = {
											title = hunt.3020.c.failure
											left_icon = scope:hunt_participant
											hunt_activity_success_change_effect = { CHANGE = decrease_medium }
										}
									}
								}
							}
						}
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_rationality = 0.5
				ai_boldness = -0.5
				ai_energy = -0.5
			}
		}
	}

	option = { # Terrain expert
		name = hunt.3020.d
		trigger = {
			trigger_if = {
				limit = { has_trait = open_terrain_expert }
				scope:activity.activity_location = {
					OR = {
						terrain = farmlands
						terrain = plains
						terrain = steppe
					}
				}
			}
			trigger_else_if = {
				limit = { has_trait = rough_terrain_expert }
				scope:activity.activity_location = {
					OR = {
						terrain = hills
						terrain = mountains
						terrain = wetlands
					}
				}
			}
			trigger_else_if = {
				limit = { has_trait = forest_fighter }
				scope:activity.activity_location = {
					OR = {
						terrain = taiga
						terrain = forest
					}
				}
			}
			trigger_else_if = {
				limit = { has_trait = desert_warrior }
				scope:activity.activity_location = {
					OR = {
						terrain = drylands
						terrain = oasis
					}
				}
			}
			trigger_else = {
				has_trait = jungle_stalker
				scope:activity.activity_location = { terrain = jungle }
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_track_self_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					random_list = {
						66 = {
							hunt_activity_success_change_effect = { CHANGE = increase_medium }
							scope:activity = {
								every_attending_character = {
									limit = {
										NOT = { this = root }
									}
									custom = all_hunt_participants
									add_opinion = {
										target = root
										modifier = hunt_impressive_learning_opinion
										opinion = 5
									}
								}
							}
						}
						33 = {
							send_interface_toast = {
								title = hunt.3020.b.failure
								left_icon = root
							}
						}
					}
					hunt_activity_success_change_effect = { CHANGE = increase_medium }
				}
			}
		}
	}

	option = { # Consult gamekeepers
		name = hunt.3020.f
		flavor = hunt.3020.f.flavor
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_track_gamekeepers_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					add_prestige = miniscule_prestige_loss
					hunt_activity_success_change_effect = { CHANGE = increase_minor }
					if = {
						limit = {
							exists = court_position:master_of_hunt_court_position
							is_participant_in_activity = scope:activity
						}
						reverse_add_opinion = {
							target = court_position:master_of_hunt_court_position
							modifier = hunt_snubbed_leader_opinion
						}
					}
					if = {
						limit = {
							exists = court_position:huntperson_camp_officer
							is_participant_in_activity = scope:activity
						}
						reverse_add_opinion = {
							target = court_position:huntperson_camp_officer
							modifier = hunt_snubbed_leader_opinion
						}
					}
					stress_impact = {
						arrogant = minor_stress_impact_gain
						lifestyle_hunter = minor_stress_impact_gain			
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_rationality = 1
				ai_boldness = -0.5
			}
		}
	}

	option = { # This way!
		name = hunt.3020.e
		trigger = {
			NOR = {
				has_trait = lifestyle_hunter
				learning >= decent_skill_rating
				has_trait = scholar
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_track_self_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					random_list = {
						50 = {
							desc = hunt.3020.e.success
							modifier = { add = scope:integer_range_value }
							modifier = {
								scope:activity = {
									OR = {
										has_activity_option = { category = hunt_option_attendants option = hunt_attendants_many }
										government_has_flag = government_is_nomadic
									}
								}
								factor = 2
							}
							send_interface_toast = {
								title = hunt.3020.e.success
								left_icon = root
								hunt_activity_success_change_effect = { CHANGE = increase_medium }
							}
						}
						50 = {
							desc = hunt.3020.e.failure
							modifier = {
								add = { value = scope:integer_range_value multiply = 2 }
							}
							modifier = {
								scope:activity = {
									has_activity_option = { category = hunt_option_attendants option = hunt_attendants_few }
								}
								factor = 2
							}
							send_interface_toast = {
								title = hunt.3020.e.failure
								left_icon = root
								hunt_activity_success_change_effect = { CHANGE = decrease_medium }
							}
						}
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_rationality = -1
				ai_boldness = 0.5
				ai_honor = -0.5
			}
		}
	}
}

##########################
#	RANDOM PULSE EVENTS  #
#	4000 - 4999			 #
##########################

#######################
#	Chance to fell a beautiful animal
#	by Petter Vilberg
#######################

hunt.4001 = {
	type = activity_event
	title = hunt.4001.t
	desc = {
		desc = hunt.4001.opening
		random_valid = {
			triggered_desc = {
				trigger = { exists = scope:hunt_participant }
				desc = hunt.4001.desc_1
			}
			triggered_desc = {
				trigger = {
					NOT = { exists = scope:hunt_participant }
				}
				desc = hunt.4001.desc_3
			}
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				NOT = { scope:activity.var:animal_type = flag:hare }
			}
			scripted_animation = bow_drawn
		}
		triggered_animation = {
			trigger = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				scope:activity.var:animal_type = flag:hare
			}
			scripted_animation = bow_drawn_blunt
		}
		triggered_animation = {
			trigger = {
				NOT = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				}
			}
			animation = sadness
		}
	}
	right_portrait = {
		character = scope:hunt_participant
		triggered_animation = {
			trigger = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				NOT = { scope:activity.var:animal_type = flag:hare }
			}
			scripted_animation = bow_drawn
		}
		triggered_animation = {
			trigger = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				scope:activity.var:animal_type = flag:hare
			}
			scripted_animation = bow_drawn_blunt
		}
		triggered_animation = {
			trigger = {
				NOT = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				}
			}
			animation = stress
		}
	}

	trigger = {		
		OR = {
			hunt_story_trigger = { STORY = stealth }
			exists = scope:activity.var:hunt_4019
		}
	}

	weight_multiplier = {
		base = 1
		modifier = { add = involved_activity.var:hunt_success_chance }
	}

	immediate = {
		save_scope_as = hunt_ending
		scope:activity = {
			set_variable = {
				name = hunt_success
				value = flag:yes
			}
			if = {
				limit = {
					any_attending_character = {
						NOT = { this = root }
						opinion = {
							target = root
							value < 25
						}
					}
				}
				random_attending_character = {
					limit = {
						NOT = { this = root }
						opinion = {
							target = root
							value < 25
						}
					}
					weight = {
						base = 10
						modifier = {
							has_trait = lifestyle_hunter
							add = 10
						}
						modifier = {
							has_trait = tourney_participant
							has_trait_xp = {
								trait = tourney_participant
								track = bow
								value >= 25
							}
							add = 10
						}
						modifier = {
							has_relation_rival = root
							add = 25
						}
						opinion_modifier = {
							opinion_target = root
							multiplier = -0.25
						}
					}
					save_scope_as = hunt_participant
				}
			}
			else = {
				hunt_activity_random_subordinate_participant_effect = {
					ARCHETYPE = hunter
					COMBATANT = yes
					SCOPE = hunt_participant
				}
			}
		}
		hunt_all_attendee_xp_effect = { CHANGE = 2 RANDOM = 2 }
	}

	option = { #Shoot!
		name = hunt.4001.d
		trigger = {
			can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			trigger_if = {
				limit = { exists = scope:hunt_participant }
				NOT = {
					has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:hunt_participant }
				}
			}
		}
		hunt_animal_bow_kill_effect = { DEATH = no VAR = scope:activity.var:animal_type }
		if = {
			limit = { is_alive = yes }
			stress_impact = {
				compassionate = medium_stress_impact_gain
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 40
				OR = {
					has_trait = impatient
					has_trait = callous
					has_trait = sadistic
					trigger_if = {
						limit = { exists = scope:hunt_participant }
						opinion = {
							target = scope:hunt_participant
							value <= -10
						}
					}
				}
			}
		}
	}

	option = { # hunt_guest gets to take the shot
		name = hunt.4001.b
		trigger = { exists = scope:hunt_participant }
		activity_improve_relations_intent_effect = {
			CHARACTER = scope:hunt_participant
			REASON = friend_gave_hunt_kill_reason
			OPINION = 15
			MODIFIER = opinion_hunt_got_to_take_shot
		}
		scope:hunt_participant = {
			hunt_animal_bow_kill_effect = { DEATH = no VAR = scope:activity.var:animal_type }	
		}		
		if = {
			limit = { is_alive = yes }
			stress_impact = {
				arrogant = medium_stress_impact_gain
				ambitious = minor_stress_impact_gain
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 1
			}
		}
	}
	
	option = { #Take it down!
		name = hunt.1032.e
		save_scope_as = animal_slayer
		custom_tooltip = hunt.1032.e.tt
		hunt_no_pelt_effect = yes # No pelt trophies
		save_scope_as = bow_group
		stress_impact = {
			greedy = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
			brave = minor_stress_impact_gain
			diligent = minor_stress_impact_gain
		}
		ai_chance = {
			base = 25
			modifier = {
				has_activity_intent = murder_attendee_intent
				scope:hunt_participant ?= intent_target
				hunt_melee_kill_prowess_value >= 15
			}
			modifier = {
				has_activity_intent = murder_attendee_intent
				scope:hunt_participant ?= intent_target
				hunt_melee_kill_prowess_value < 15
			}
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_greed = -1
			}
		}
	}

	option = { #Let it go
		name = hunt.1003.g
		trigger = {
			OR = {
				has_trait = compassionate
				scope:activity = {
					any_attending_character = { hunt_dharmic_pacificist_trigger = yes }
				}
			}
		}
		add_internal_flag = special
		save_scope_as = animal_slayer
		flavor = hunt.1003.g.flavor
		trait = compassionate
		# No artifact explanation
		custom_tooltip = hunt_no_artifact_tt
		# Upset/please attendees based on faith tenets
		scope:activity = {
			every_attending_character = {
				limit = {
					hunt_dharmic_pacificist_trigger = yes
					NOT = { this = root }
				}
				custom = every_non_cynical_dharmic_attendee_tt
				add_opinion = {
					target = root
					modifier = hunt_dharmic_mercy_opinion
					opinion = 10
				}
			}
			every_attending_character = {
				limit = {
					NOT = { this = root }
					hunt_dharmic_pacificist_trigger = no
				}
				custom = every_non_cynical_dharmic_attendee_reverse_tt
				add_opinion = {
					target = root
					modifier = hunt_dharmic_mercy_opinion
					opinion = -10
				}
			}
		}
		# Stress
		if = {
			limit = { hunt_dharmic_pacificist_trigger = yes }
			stress_impact = {
				base = minor_stress_impact_loss
				compassionate = minor_stress_impact_loss
				lifestyle_hunter = miniscule_stress_impact_gain
				brave = miniscule_stress_impact_gain
				sadistic = miniscule_stress_impact_gain
				greedy = miniscule_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				lifestyle_hunter = miniscule_stress_impact_gain
				brave = miniscule_stress_impact_gain
				sadistic = miniscule_stress_impact_gain
				greedy = miniscule_stress_impact_gain
			}
		}
		save_scope_as = animal_spared
		scope:activity = {
			set_variable = animal_spared
			every_attending_character = {
				limit = {
					
					is_ai = no
				}
				trigger_event = hunt.1201
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = -1
				ai_energy = -1
				ai_greed = -0.5
				ai_zeal = 0.5
				ai_compassion = 1
			}
		}
	}

	after = {
		scope:activity = {
			every_attending_character = {
				limit = { is_ai = no }
				trigger_event = hunt.1200
			}
		}
	}
}

#######################
#	A hunt guest is about to share a secret about someone when they are interrupted
#	by Petter Vilberg
#######################

scripted_trigger hunt_4002_secret_knower_trigger = {
	NOT = { this = root }
	opinion = {
		target = root
		value > 0
	}
	save_temporary_scope_as = secret_knower_temp
	any_known_secret = {
		NOR = {
			secret_owner ?= scope:secret_knower_temp
			is_known_by = root
			secret_owner ?= root
		}
		secret_owner ?= {
			OR = {
				is_of_major_interest_trigger = { CHARACTER = root }
				is_of_minor_interest_trigger = { CHARACTER = root }
			}
		}
	}
}

hunt.4002 = {
	type = activity_event
	title = hunt.4002.t
	desc = hunt.4002.desc
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = eavesdrop
	}
	right_portrait = {
		character = scope:secret_sharer
		animation = paranoia
	}
	lower_right_portrait = scope:secret_owner
	cooldown = { years = 2 }
	
	trigger = {
		scope:activity = {
			any_attending_character = { hunt_4002_secret_knower_trigger = yes }
		}
	}

	immediate = {
		scope:activity = {
			random_attending_character = {
				limit = { hunt_4002_secret_knower_trigger = yes }
				save_scope_as = secret_sharer
				random_known_secret = {
					limit = { #Prefer a secret about someone highly relevant to activity_host
						NOR = {
							secret_owner = scope:secret_sharer
							is_known_by = root
							secret_owner = root
						}
						secret_owner ?= {
							is_of_major_interest_trigger = { CHARACTER = root }
						}
					}
					alternative_limit = { #Fallback to minor interest characters
						NOR = {
							secret_owner = scope:secret_sharer
							is_known_by = root
							secret_target = root
						}
						secret_owner ?= {
							is_of_minor_interest_trigger = { CHARACTER = root }
						}
					}
					save_scope_as = secret_to_share
					secret_owner ?= {
						save_scope_as = secret_owner
					}
				}
			}
		}
	}

	option = { #Truly interesting, but get that animal!
		name = hunt.4002.a
		flavor = hunt.4002.a.flavor
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_secret_animal_log
				score = 25
				tags = { random neutral social }
				character = root
				target = scope:secret_owner

				# Effect
				root = {
					add_prestige = minor_prestige_gain
					hunt_activity_success_change_effect = { CHANGE = increase_medium }
					stress_impact = {
						paranoid = minor_stress_impact_gain
						trusting = minor_stress_impact_loss
						diligent = minor_stress_impact_loss
						arrogant = minor_stress_impact_loss
						impatient = minor_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_boldness = 0.5
				ai_compassion = -0.25
				ai_honor = 0.25
			}
		}
	}

	option = { #No wait, tell me!
		name = hunt.4002.b
		flavor = hunt.4002.b.tt
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_secret_learned_log
				score = 25
				tags = { random neutral social }
				character = root
				target = scope:secret_owner

				# Effect
				root = {
					custom_tooltip = hunt.4002.b.reveal
					hunt_activity_success_change_effect = { CHANGE = decrease_minor }
					add_prestige = minor_prestige_loss
					hidden_effect = {
						scope:secret_to_share = { reveal_to = root }
					}
					stress_impact = {
						arrogant = minor_stress_impact_gain
						impatient = minor_stress_impact_gain
						trusting = minor_stress_impact_gain
						diligent = minor_stress_impact_gain
						paranoid = minor_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_rationality = 0.5
				ai_greed = 0.25
			}
		}
	}
}

#######################
#	Run into poachers
#	by Petter Vilberg
#######################

hunt.4003 = {
	type = activity_event
	title = hunt.4003.t
	desc = hunt.4003.desc
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = war_over_win
	}
	right_portrait = {
		character = scope:poacher
		animation = beg
		outfit_tags = { travel_cloak }
	}
	cooldown = { years = 10 }

	trigger = {
		OR = {
			involved_activity.activity_host = this
			has_court_position = master_of_hunt_court_position
			has_court_position = huntperson_camp_officer
		}
		scope:activity.activity_location.county = {
			NOR = {
				has_county_modifier = hunt_punished_locals_modifier
				any_county_province = { # Doesn't make narrative sense
					OR = {
						has_holding_type = nomad_holding
						has_holding_type = herder_holding
					}
				}
			}
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 0.5
			scope:activity.activity_location = {
				NOR = {
					terrain = forest
					terrain = taiga
					terrain = jungle
				}
			}
		}
		modifier = {
			factor = 0.5
			scope:activity.activity_location = {
				OR = {
					has_building_or_higher = hunting_grounds_01
					has_building_or_higher = royal_forest_01
				}
			}
		}
	}

	immediate = {
		create_character = {
			template = hunter_template
			faith = scope:activity.activity_location.faith
			culture = scope:activity.activity_location.culture
			location = scope:activity.activity_location
			save_scope_as = poacher
		}
		scope:activity = {
			activity_location = {
				county = {
					save_scope_as = county
					holder = { save_scope_as = land_owner }
				}
			}
		}
	}

	option = {
		name = hunt.4003.adventurer
		trigger = { is_landless_adventurer = yes }
		add_courtier = scope:poacher
		hunt_activity_success_change_effect = { CHANGE = increase_minor }
		domicile = {
			change_provisions = microscopic_provisions_gain
		}
		stress_impact = {
			paranoid = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
		}
	}

	option = { #Punish them
		name = hunt.4003.a
		trigger = { scope:land_owner.top_liege = root.top_liege }
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_poachers_punished_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:poacher

				# Effect
				scope:activity.activity_location.county = {
					add_county_modifier = {
						modifier = hunt_punished_locals_modifier
						years = 10
					}
				}
				root = {
					stress_impact = {
						forgiving = minor_stress_impact_gain
						compassionate = minor_stress_impact_gain
						arbitrary = minor_stress_impact_loss
						vengeful = minor_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 10
			ai_value_modifier = {
				ai_compassion = -0.5
				ai_boldness = 1
			}
		}
	}

	option = { #I will let you go if you teach me a thing or two
		name = hunt.4003.b
		trigger = {
			hunt_lifestyle_track_less_trigger = { TRACK = hunter LESS_THAN = 100 }
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_poachers_lesson_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:poacher

				# Effect
				root = {
					hunt_activity_success_change_effect = { CHANGE = decrease_minor }
					add_character_modifier = {
						modifier = hunt_poacher_training_modifier
						years = 10
					}
					hidden_effect = {
						hunter_progress_point_gain_effect = { CHANGE = 1 RANDOM_CHANGE = 1 } #Gives points towards ranking up the Hunter Lifestyle
					}
					stress_impact = {
						just = minor_stress_impact_loss
						vengeful = minor_stress_impact_gain
						forgiving = minor_stress_impact_loss
						ambitious = minor_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 10
			ai_value_modifier = {
				ai_energy = 1
				ai_honor = -0.5
			}
		}
	}
	
	option = { #Claim the animals and a legal right to their lives
		name = hunt.4003.c
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_poachers_legal_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:poacher
				
				# Effect
				root = {
					if = {
						limit = {
							is_landless_adventurer = yes
						}
						domicile = {
							change_provisions = microscopic_provisions_gain
						}
						add_gold = minor_gold_value
						hunt_activity_success_change_effect = { CHANGE = increase_minor }
					}
					else = {
						duel = {
							skill = stewardship
							value = average_skill_rating
							8 = {
								compare_modifier = {
									value = scope:duel_value
									multiplier = 0.25
								}
								desc = hunt.4003.c.tt_success
								send_interface_toast = {
									title = hunt.4003.c.tt_success
									add_gold = minor_gold_value
									add_prestige = medium_prestige_gain
									hunt_activity_success_change_effect = { CHANGE = increase_minor }
								}
							}
							12 = {
								compare_modifier = {
									value = scope:duel_value
									multiplier = -0.25
									min = -9
								}
								desc = hunt.4003.c.tt_failure
								send_interface_toast = {
									title = hunt.4003.c.tt_failure
									add_prestige = minor_prestige_loss
									scope:county = {
										add_county_modifier = {
											modifier = hunt_upset_hunting_county_modifier
											years = 10
										}
									}
								}
								hunt_activity_success_change_effect = { CHANGE = decrease_major }
							}
						}
					}
					stress_impact = {
						compassionate = medium_stress_impact_gain
						honest = medium_stress_impact_gain
						vengeful = minor_stress_impact_loss
						arrogant = minor_stress_impact_loss
						ambitious = minor_stress_impact_loss
						arbitrary = minor_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 10
			ai_value_modifier = {
				ai_greed = 1
				ai_boldness = -0.5
			}
		}
	}

	option = { #Let them off, as it's not your land
		name = {
			text = hunt.4003.d
			trigger = {
				NOR = {
					scope:land_owner.top_liege = root.top_liege
					has_relation_rival = scope:land_owner
				}
			}
		}
		name = {
			text = hunt.4003.d.vassal
			trigger = { scope:land_owner.top_liege = root.top_liege }
		}
		name = {
			text = hunt.4003.d.own
			trigger = { scope:land_owner.top_liege = root }
		}
		name = {
			text = hunt.4003.d.rival
			trigger = { has_relation_rival = scope:land_owner }
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_poachers_pardon_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:poacher

				#Effect
				root = {
					if = {
						limit = {
							NOT = { this = scope:land_owner }
						}
						reverse_add_opinion = {
							target = scope:land_owner
							modifier = hunt_released_poachers_opinion
							opinion = -10
						}
					}
					if = {
						limit = { has_relation_rival = scope:land_owner }
						stress_impact = {
							base = medium_stress_impact_loss
							just = minor_stress_impact_gain
							vengeful = minor_stress_impact_loss
						}
					}
					else_if = {
						limit = { scope:land_owner.top_liege = root.top_liege }
						stress_impact = {
							just = minor_stress_impact_gain
							vengeful = minor_stress_impact_loss
							callous = minor_stress_impact_loss
						}
					}
					else = {
						stress_impact = {
							just = minor_stress_impact_gain
							sadistic = minor_stress_impact_loss
						}
					}
				}
			}
		}
		ai_chance = {
			base = 10
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_honor = -0.5
				ai_boldness = -0.5
			}
		}
	}

	after = {
		scope:poacher = {
			if = {
				limit = {
					NOR = {
						root = { is_ai = no }
						is_courtier = yes
					}
				}
				silent_disappearance_effect = yes
			}
		}
	}
}

#######################
#	You bring down a particularly large animal
#	by Petter Vilberg
#######################

scripted_trigger can_eat_boar_trigger = {
	NOT = { culture = { has_cultural_tradition = tradition_vegetarianism } }
	#EK DISABLED: No Islam or Judaism
	#NAND = {
	#	scope:activity.var:animal_type = flag:boar
	#	faith = {
	#		OR = {
	#			religion = religion:islam_religion
	#			religion = religion:judaism_religion
	#		}
	#	}
	#}
}

hunt.4004 = {
	type = activity_event
	title = hunt.4004.t
	desc = {
		desc = hunt.4004.desc
		triggered_desc = {
			trigger = { exists = scope:credit_taker }
			desc = hunt.4004.credit_receiver
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:credit_taker
					this = scope:credit_taker
					hunt_animal_type_small_trigger = { VAR = scope:activity.var:animal_type }
				}
				desc = hunt.9001.credit_self
			}
			triggered_desc = {
				trigger = {
					exists = scope:credit_taker
					this = scope:credit_taker
					NOT = {
						hunt_animal_type_small_trigger = { VAR = scope:activity.var:animal_type }
					}
				}
				desc = hunt.9001.credit_self_big
			}
			triggered_desc = {
				trigger = {
					exists = scope:credit_taker
					this = scope:credit_taker
					hunt_animal_type_small_trigger = { VAR = scope:activity.var:animal_type }
				}
				desc = hunt.9001.credit_other
			}
			triggered_desc = {
				trigger = {
					exists = scope:credit_taker
					this = scope:credit_taker
					NOT = {
						hunt_animal_type_small_trigger = { VAR = scope:activity.var:animal_type }
					}
				}
				desc = hunt.9001.credit_other_big
			}
			triggered_desc = {
				trigger = {
					NOT = { exists = scope:credit_taker }
					hunt_animal_type_small_trigger = { VAR = scope:activity.var:animal_type }
				}
				desc = hunt.9001.credit_shared
			}
		}
		first_valid = { # Master Flavor 1
			triggered_desc = {
				trigger = {
					trigger_if = {
						limit = { exists = scope:hunt_participant }
						this = scope:hunt_participant
					}
					trigger_else = { this = scope:host }
				}
				desc = hunt.9001.opening_self
			}
			triggered_desc = {
				trigger = {
					exists = scope:hunt_participant
					scope:hunt_participant = {
						OR = {
							has_court_position = master_of_hunt_court_position
							has_court_position = huntperson_camp_officer
						}
					}
				}
				desc = hunt.9001.opening_master_of_hunt
			}
			triggered_desc = {
				trigger = { exists = scope:hunt_participant }
				desc = hunt.9001.opening_courtier
			}
		}
		first_valid = { # Master Flavor 2
			triggered_desc = {
				trigger = {
					trigger_if = {
						limit = { exists = scope:hunt_participant }
						scope:hunt_participant = {
							hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 80 }
						}
					}
					trigger_else = {
						hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 100 }
					}
				}
				desc = hunt.9001.opening_master
			}
			triggered_desc = {
				trigger = {
					trigger_if = {
						limit = { exists = scope:hunt_participant }
						scope:hunt_participant = {
							hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 50 }
						}
					}
					trigger_else = {
						hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 50 }
					}
				}
				desc = hunt.9001.opening_skilled
			}
			triggered_desc = {
				trigger = {
					trigger_if = {
						limit = { exists = scope:hunt_participant }
						scope:hunt_participant = {
							hunt_lifestyle_track_less_trigger = { TRACK = hunter LESS_THAN = 50 }
						}
					}
					trigger_else = {
						hunt_lifestyle_track_less_trigger = { TRACK = hunter LESS_THAN = 50 }
					}
				}
				desc = hunt.9001.opening_beginner
			}
			desc = hunt.9001.opening_novice
		}
		desc = hunt.9001.spoils
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = { has_character_flag = recent_hunt_wound }
			animation = pain
		}
		animation = happiness
	}
	right_portrait = {
		character = scope:credit_taker
		animation = shock
	}
	center_portrait = {
		trigger = {
			NOR = {
				scope:host ?= this
				scope:hunt_participant ?= this
			}
		}
		character = root
	}
	lower_left_portrait = {
		character = intent_target
		trigger = {
			exists = intent_target
			NOR = {
				scope:hunt_participant ?= this
				scope:host ?= this
			}
		}
	}

	immediate = {
		play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_dogs_bark"
		save_scope_as = impressive_trophy
		# Previous important rewards
		if = {
			limit = { exists = scope:activity.var:hunt_trophy_artifact }
			scope:activity.var:hunt_trophy_artifact = { save_scope_as = hunt_trophy_artifact }
		}
		if = {
			limit = { this = scope:host }
			hunt_activity_random_subordinate_participant_effect = {
				ARCHETYPE = hunter
				COMBATANT = yes
				SCOPE = hunt_participant
			}
			hunt_all_attendee_xp_effect = { CHANGE = 3 RANDOM = 2 }
			scope:activity.activity_location.county = { hunt_remove_sighting_effect = yes }
		}
		# Show personal rewards if guest
		else = { hunt_individual_guest_awards_effect = yes }
		# Show host rewards
		show_as_tooltip = {
			scope:host = { end_hunt_mystical_animal_story_cycle_effect = yes }
			scope:host = { disburse_hunt_activity_rewards = yes }
		}
		hunt_intent_outcome_tooltip_effect = yes
		# Save scopes for trophy recipient
		hunt_trophy_recipient_scope_effect = yes
		# Meat eaters
		scope:activity = {
			every_attending_character = {
				limit = {
					is_alive = yes
					NOT = { this = scope:host }
					can_eat_boar_trigger = yes
				}
				add_to_list = meat_eaters
			}
		}
	}

	option = { # Take Artifact
		name = {
			trigger = {
				scope:newly_created_artifact = {
					OR = {
						artifact_type = animal_hide
						artifact_type = animal_hide_big
					}
				}
			}
			text = hunt.8001.a
		}
		name = {
			trigger = {
				scope:newly_created_artifact = { artifact_type = animal_skull }
			}
			text = hunt.8001.b
		}
		name = {
			trigger = {
				scope:newly_created_artifact = { artifact_type = animal_trinket }
			}
			text = hunt.9001.d
		}
		name = {
			trigger = {
				scope:newly_created_artifact = { artifact_type = bird_feather }
			}
			text = hunt.9001.e
		}
		trigger = {
			this = scope:host
			exists = scope:newly_created_artifact
		}
		if = {
			limit = { exists = scope:newly_created_artifact }
			scope:newly_created_artifact = { save_scope_as = this_artifact }
			send_interface_toast = {
				title = artifact.0012.t
				right_icon = scope:newly_created_artifact
				show_as_tooltip = {
					scope:newly_created_artifact = { set_owner = root }
				}
			}			
		}
		ai_chance = {
			base = 25
			modifier = { # Already filled big wall slots - avoid AI artifact bloat
				scope:newly_created_artifact = { artifact_type = animal_hide_big }
				any_character_artifact = {
					count >= 3
					artifact_slot_type = wall_big
				}
				factor = 0
			}
			modifier = { # Already filled small wall slots - avoid AI artifact bloat
				scope:newly_created_artifact = {
					OR = {
						artifact_type = animal_hide
						artifact_type = animal_skull
					}
				}
				any_character_artifact = {
					count >= 3
					artifact_slot_type = wall_small
				}
				factor = 0
			}
			modifier = { # Already filled trinket wall slots - avoid AI artifact bloat
				scope:newly_created_artifact = {
					OR = {
						artifact_type = animal_trinket
						artifact_type = bird_feather
					}
				}
				any_character_artifact = {
					count >= 4
					artifact_slot_type = miscellaneous
				}
				factor = 0
			}
		}
	}

	option = { # Gift Artifact to Relevant Character
		name = hunt.9001.f
		trigger = {
			this = scope:host
			exists = scope:newly_created_artifact
			exists = scope:trophy_recipient
		}
		scope:newly_created_artifact = { set_owner = scope:trophy_recipient }
		hunt_gift_trophy_opinion_effect = { RECIPIENT = scope:trophy_recipient }
		ai_chance = { 
			base = 20
			ai_value_modifier = {
				ai_greed = -0.5
				ai_compassion = 0.5
				ai_sociability = 0.5
			}
			modifier = { # Don't gift court artifacts to scrubs
				scope:newly_created_artifact = {
					OR = {
						artifact_type = animal_hide_big
						artifact_type = animal_hide
						artifact_type = animal_skull
					}
				}
				scope:trophy_recipient = { has_royal_court = no }
				factor = 0
			}
		}
	}

	option = { # Gift Artifact to Credit Taker
		name = hunt.9001.g
		trigger = {
			this = scope:host
			exists = scope:newly_created_artifact
			exists = scope:animal_slayer
			NOT = { this = scope:animal_slayer }
		}
		scope:newly_created_artifact = { set_owner = scope:animal_slayer }
		hunt_gift_trophy_opinion_effect = { RECIPIENT = scope:animal_slayer }
		ai_chance = {
			base = 10
			modifier = { # Already filled big wall slots - avoid AI artifact bloat
				scope:newly_created_artifact = { artifact_type = animal_hide_big }
				any_character_artifact = {
					count >= 3
					artifact_slot_type = wall_big
				}
				factor = 0
			}
			modifier = { # Already filled small wall slots - avoid AI artifact bloat
				scope:newly_created_artifact = {
					OR = {
						artifact_type = animal_hide
						artifact_type = animal_skull
					}
				}
				any_character_artifact = {
					count >= 3
					artifact_slot_type = wall_small
				}
				factor = 0
			}
			modifier = { # Already filled trinket wall slots - avoid AI artifact bloat
				scope:newly_created_artifact = {
					OR = {
						artifact_type = animal_trinket
						artifact_type = bird_feather
					}
				}
				any_character_artifact = {
					count >= 4
					artifact_slot_type = miscellaneous
				}
				factor = 0
			}
		}
	}
	
	option = { #Make a beautiful coat
		name = hunt.4004.c
		trait = arrogant
		trigger = { has_trait = arrogant }
		flavor = hunt.4004.c.tt
		every_vassal = {
			limit = { has_trait = arrogant }
			custom = hunt.4004.every_arrogant_vassal
			add_opinion = {
				modifier = envy_opinion
				target = root
				opinion = -10
			}
		}
		every_vassal = {
			limit = {
				OR = {
					has_trait = temperate
					has_trait = humble
				}
			}
			custom = hunt.4004.every_restrained_vassal
			add_opinion = {
				modifier = respect_opinion
				target = root
				opinion = -10
			}
		}
		every_vassal = {
			limit = {
				NOR = {
					has_trait = arrogant
					has_trait = humble
					has_trait = temperate
				}
			}
			custom = hunt.4004.every_other_vassal
			add_opinion = {
				modifier = respect_opinion
				target = root
				opinion = 15
			}
		}
		stress_impact = {
			eccentric = medium_stress_impact_loss
			craven = medium_stress_impact_gain
			content = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness = 1
				ai_rationality = -0.5
			}
		}
	}
	
	option = { #Let's eat it here and now!
		name = hunt.4004.e
		trait = gluttonous
		trait = comfort_eater
		trigger = {
			NOT = { culture = { has_cultural_tradition = tradition_vegetarianism } }
			OR = {
				has_trait = gluttonous
				has_trait = comfort_eater
			}
			can_eat_boar_trigger = yes
			any_in_list = {
				list = meat_eaters
				count >= 1
			}
		}
		every_in_list = {
			list = meat_eaters
			add_opinion = {
				modifier = opinion_hunt_forest_feast
				target = root
				days = 1825
			}
		}
		stress_impact = {
			gluttonous = minor_stress_impact_loss
			comfort_eater = minor_stress_impact_loss
		}
	}
	
	option = { #Its skull will make a fine crown
		name = hunt.4004.f
		trait = sadistic
		trigger = {
			OR = {
				has_trait = sadistic
				dread > 50
			}
		}
		add_dread = medium_dread_gain
	}
}

#######################
#	You bring down a particularly large animal - II
#	by Petter Vilberg
#######################

hunt.4005 = {
	type = activity_event
	title = hunt.4005.t
	desc = hunt.4004.desc
	theme = hunt_activity
	left_portrait = root
	lower_left_portrait = {
		trigger = {
			exists = faith.religious_head
			NOT = { faith.religious_head = root }
		}
		character = faith.religious_head
	}
	# Vassal recieving trophy appears in the corner if they are imprisoned 
	right_portrait = {
		trigger = {
			NOT = { scope:trophy_recipient = { is_imprisoned = yes } }
		}
		character = scope:trophy_recipient
	}
	lower_right_portrait = {
		trigger = {
			scope:trophy_recipient = { is_imprisoned = yes } 
		}
		character = scope:trophy_recipient
	}
	orphan = yes # not used

	trigger = {
		scope:activity = {
			trigger_if = {
				limit = { exists = var:hunt_success }
				var:hunt_success = flag:yes
			}
			has_activity_option = { category = special_type option = hunt_type_legendary }
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			add = 0.5
			employs_court_position = master_of_hunt_court_position
		}
		modifier = {
			add = 0.5
			employs_court_position = huntperson_camp_officer
		}
	}

	immediate = {
		hidden_effect = {
			random_list = {
				50 = {
					trigger = {
						any_consort = {
							reverse_opinion = {
								target = root
								value > 20
							}
						}
					}		
					random_consort = {
						limit = {
							reverse_opinion = {
								target = root
								value > 20
							}
						}
						save_scope_as = trophy_recipient
					}
				}
				50 = {
					trigger = {
						any_relation = {
							type = lover
							reverse_opinion = {
								target = root
								value > 20
							}
						}
					}		
					random_relation = {
						type = lover
						limit = {
							reverse_opinion = {
								target = root
								value > 20
							}
						}
						save_scope_as = trophy_recipient
					}
				}
				50 = {
					trigger = {
						any_powerful_vassal = { always = yes }
					}		
					random_powerful_vassal = { save_scope_as = trophy_recipient }
				}
			}
		}
		scope:activity = {
			if = {
				limit = {
					any_attending_character = {
						count >= 3
						NOT = { this = root }
						is_adult = yes
					}
				}
				#Find theoretical hunt participants
				hidden_effect = {
					while = {
						count = 3
						random_attending_character = {
							limit = {
								NOT = { this = root }
								is_adult = yes
								NOT = { is_in_list = hunt_companions_right_now }
							}
							add_to_list = hunt_companions_right_now
						}
					}
				}
			}
		}
		hunt_activity_success_change_effect = { CHANGE = increase_major }
	}

	option = { #Sell it off
		name = hunt.4005.a
		add_gold = medium_gold_value
		stress_impact = {
			generous = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_greed = 0.5
			}
			compare_modifier = {
				value = stewardship
				multiplier = 3
			}
		}
	}

	option = { #A trophy for someone I care about
		name = hunt.4005.b
		trigger = {
			exists = scope:trophy_recipient
			NOT = {
				scope:trophy_recipient = {
					has_opinion_modifier = {
						modifier = gift_opinion
						target = root
					}
				}
			}
		}
		scope:trophy_recipient = {
			# Make an artifact!
			if = {
				limit = { has_royal_court = yes }
				create_artifact_animal_hide_effect = {
					OWNER = root
					HUNTER = root
					LEGENDARY = no
					ANIMAL = scope:activity.var:animal_type
				}
				scope:newly_created_artifact = {
					set_owner = {
						target = scope:trophy_recipient
						history = {
							location = root.capital_province
							actor = root
							recipient = scope:trophy_recipient
							type = given
						}
					}
				}
			}
		}
		reverse_add_opinion = {
			target = scope:trophy_recipient
			modifier = gift_opinion
			opinion = 30
		}
		stress_impact = {
			greedy = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_greed = -0.5
			}
		}
	}
	
	option = { #Send it to your religious head
		name = hunt.4005.c
		trigger = {
			exists = faith.religious_head
			NOT = { faith.religious_head = root }
			NOT = {
				faith.religious_head = {
					has_opinion_modifier = {
						modifier = gift_opinion
						target = root
					}
				}
			}
		}
		faith.religious_head = {
			# Make an artifact!
			if = {
				limit = {
					root = {
						is_ai = no
					}
					has_royal_court = yes
					is_ai = yes #so there's not a sudden random artifact in their inventory + avoiding spam
				}
				if = {
					limit = {
						can_animal_produce_skull_trigger = { VARIABLE = scope:activity.var:animal_type }
					}
					custom_tooltip = hunt.skull_tt
					create_artifact_wall_skull_effect = {
						OWNER = root
						HUNTER = root
						LEGENDARY = no
						ANIMAL = scope:activity.var:animal_type
					}
				}
				else = {
					create_artifact_animal_hide_effect = {
						OWNER = root
						HUNTER = root
						LEGENDARY = no
						ANIMAL = scope:activity.var:animal_type
					}
				}
				if = {
					limit = { exists = scope:newly_created_artifact }
					scope:newly_created_artifact = {
						set_owner = {
							target = root.faith.religious_head
							history = {
								location = root.capital_province
								actor = root
								recipient = root.faith.religious_head
								type = given
							}
						}
					}
				}
			}
		}
		faith.religious_head = {
			add_opinion = {
				target = root
				modifier = impressed_opinion
				opinion = 30
			}
		}
		stress_impact = {
			cynical = minor_stress_impact_gain
			greedy = minor_stress_impact_gain
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_zeal = 1
			}
			opinion_modifier = {
				who = faith.religious_head
				opinion_target = root
				multiplier = -0.5
			}
		}
	}
	
	option = { #Let's eat it here and now!
		name = hunt.4004.e
		trait = gluttonous
		trigger = {
			has_trait = gluttonous
			any_in_list = {
				list = hunt_companions_right_now
				count >= 1
			}
		}
		every_in_list = {
			list = hunt_companions_right_now
			add_opinion = {
				modifier = opinion_hunt_forest_feast
				target = root
				years = 5
			}
		}
		stress_impact = {
			base = minor_stress_impact_loss
			comfort_eater = minor_stress_impact_loss
		}
	}
}

#######################
#	Poor Peasants are foraging in the forest
#	by Petter Vilberg
#######################

hunt.4006 = {
	type = activity_event
	title = hunt.4006.t
	desc = hunt.4006.desc
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = personality_vengeful
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = worry
	}
	cooldown = { years = 1 }
	
	trigger = {
		scope:activity.activity_location.county = {
			NOT = {
				any_county_province = { # Doesn't make narrative sense
					OR = {
						has_holding_type = nomad_holding
						has_holding_type = herder_holding
					}
				}
			}
		}
	}

	immediate = {
		hunt_activity_random_subordinate_participant_effect = {
			ARCHETYPE = hunter
			COMBATANT = yes
			SCOPE = hunt_participant
		}
	}

	option = {
		name = hunt.4006.adventurer
		trigger = {
			is_landless_adventurer = yes
		}
		domicile = {
			change_provisions = microscopic_provisions_gain
		}
		ai_chance = {
			base = 30
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = 1
				ai_honor = -1
			}
		}
	}

	option = { #Drive them out!
		name = hunt.4006.a
		trigger = {
			is_landless_adventurer = no
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_peasants_removed_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					hunt_activity_success_change_effect = { CHANGE = increase_medium }
					add_prestige = minor_prestige_gain
					scope:activity.activity_location.county = {
						add_county_modifier = {
							modifier = hunt_peasants_denied_forest_modifier
							years = 10
						}
					}
					stress_impact = {
						compassionate = medium_stress_impact_gain
						vengeful = minor_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 30
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = 1
				ai_honor = -1
			}
		}
	}

	option = { #We came here to hunt, did we not?
		name = hunt.4006.b
		trait = sadistic
		trigger = {
			has_trait = sadistic
			NOT = { has_trait = cannibal }
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_peasants_hunted_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					add_dread = medium_dread_gain
					scope:activity.activity_location.county = {
						add_county_modifier = {
							modifier = hunt_peasants_hunted_modifier
							years = 10
						}
						holder = {
							if = {
								limit = {
									NOT = { this = root }
									ai_compassion < 0
								}
								add_opinion = {
									modifier = opinion_hunt_solved_poverty_problem
									target = root
									days = 3650
								}
								if = {
									limit = {
										OR = {
											has_trait = cannibal
											has_trait = sadistic
											any_secret = { secret_type = secret_cannibal }
										}
										root = {
											can_add_hook = {
												type = favor_hook
												target = scope:county_owner
											}
										}
									}
									root = {
										custom_tooltip = hunt.4006.special_interest
										add_hook = {
											type = favor_hook
											target = scope:county_owner
										}
									}
								}
							}
						}
					}
					stress_impact = {
						sadistic = medium_stress_impact_loss
						vengeful = minor_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = 1
			}
		}
	}

	option = { #This will do just fine...
		name = hunt.4006.c
		trait = cannibal
		trigger = {	has_trait = cannibal }
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_peasants_eaten_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					add_dread = medium_dread_gain
					scope:activity.activity_location.county = {
						add_county_modifier = {
							modifier = hunt_peasants_hunted_modifier
							years = 10
						}
						holder = {
							if = {
								limit = {
									NOT = { this = root }
									ai_compassion < 0
								}
								add_opinion = {
									modifier = opinion_hunt_solved_poverty_problem
									target = root
									days = 3650
								}
								if = {
									limit = {
										OR = {
											has_trait = cannibal
											has_trait = sadistic
											any_secret = { secret_type = secret_cannibal }
										}
										root = {
											can_add_hook = {
												type = favor_hook
												target = scope:county_owner
											}
										}
									}
									root = {
										custom_tooltip = hunt.4006.special_interest
										add_hook = {
											type = favor_hook
											target = scope:county_owner
										}
									}
								}
							}
						}
					}
					stress_impact = {
						base = medium_stress_impact_loss
						compassionate = medium_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = 1
			}
		}
	}
	
	option = { #Offer a charitable donation
		name = hunt.4006.d
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_peasants_donation_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					remove_short_term_gold = activity_minor_gold_value
					add_piety = minor_piety_gain
					hunt_activity_success_change_effect = { CHANGE = increase_medium }
					scope:activity.activity_location.county = {
						add_county_modifier = {
							modifier = hunt_aided_peasants_modifier
							years = 10
						}
					}
					stress_impact = {
						greedy = medium_stress_impact_gain
						callous = minor_stress_impact_gain
						sadistic = minor_stress_impact_gain
						vengeful = minor_stress_impact_gain
						compassionate = medium_stress_impact_loss
						generous = medium_stress_impact_loss
						improvident = major_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 70
			ai_value_modifier = {
				ai_greed = -1
				ai_boldness = 0.5
				ai_zeal = 0.5
				ai_compassion = 1
			}
		}
	}

	option = { #Leave alone
		name = hunt.4006.e
		trigger = {
			NOR = {
				has_trait = sadistic
				has_trait = cannibal
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_peasants_dismiss_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					hunt_activity_success_change_effect = { CHANGE = decrease_minor }
				}
			}
		}
		ai_chance = {
			base = 70
			ai_value_modifier = {
				ai_greed = 1
				ai_zeal = -0.5
				ai_boldness = -1
				ai_compassion = 0.5
			}
		}
	}
}

#######################
#	Run into a rampaging animal
#	by Linnéa Thimrén
#######################

hunt.4007 = {
	type = activity_event
	title = hunt.4007.t
	desc = {
		first_valid = {
			random_valid = {
				triggered_desc = {
					trigger = {
						AND = {
							has_activity_intent = befriend_attendee_intent
							intent_target = scope:similar_participant
						}
					}
					desc = hunt.4007.desc_befriend
				}
				triggered_desc = {
					trigger = { has_trait = lazy }
					desc = hunt.4007.desc_lazy
				}
				triggered_desc = {
					trigger = {
						has_trait = lustful
						OR = {
							has_relation_lover = scope:similar_participant
							can_set_relation_lover_trigger = { CHARACTER = scope:similar_participant }
							AND = {
								has_activity_intent = woo_attendee_intent
								intent_target = scope:similar_participant
							}
						}
					}
					desc = hunt.4007.desc_lustful
				}
			}
			desc = hunt.4007.desc_fallback
		}
		desc = hunt.4007.desc_ending
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = { has_trait = craven }
			animation = fear
		}
		triggered_animation = {
			trigger = {
				NOT = { has_trait = craven }
			}
			animation = shock
		}
	}
	center_portrait = {
		character = scope:bodyguard
		scripted_animation = duel_wield_weapon
	}
	right_portrait = {
		character = scope:similar_participant
		triggered_animation = {
			trigger = { has_trait = craven }
			animation = fear
		}
		triggered_animation = {
			trigger = {
				NOT = { has_trait = craven }
			}
			animation = shock
		}
	}
	cooldown = { years = 1 }
	
	trigger = {
		scope:activity = {
			any_attending_character = {
				NOT = { this = root }
				is_ai = yes
				is_adult = yes
			}
			hunt_activity_large_game_trigger = { VAR = var:animal_type }
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			add = -0.5
			employs_court_position = master_of_hunt_court_position
		}
		modifier = {
			add = -0.5
			employs_court_position = huntperson_camp_officer
		}
	}

	immediate = {
		hidden_effect = {
			scope:host = {
				random_list = {
					10 = {
						random_list = {
							5 = { # Boar
								trigger = {
									scope:activity.activity_location = { hunt_animal_boar_trigger = yes }
								}
								# Aptitude affects chance of managed game
								hunt_activity_master_aptitude_positive_modifier = { LIEGE = root }
								# Increase larger deer chance with management buildings
								hunt_activity_game_building_modifier = { PROVINCE = scope:activity.activity_location }
								set_variable = { name = animal_type value = flag:boar years = 3 }
							}
							25 = {
								random_list = {
									4 = { # Stag - Standard deer
										set_variable = { name = animal_type value = flag:stag }
									}
									2 = { # Hart - Prestigious deer
										# Aptitude affects chance of managed game
										hunt_activity_master_aptitude_positive_modifier = { LIEGE = root }
										# Increase larger deer chance with management buildings
										hunt_activity_game_building_modifier = { PROVINCE = scope:activity.activity_location }
										set_variable = { name = animal_type value = flag:hart }
									}
								}
							}
							5 = { # Aurochs
								trigger = {
									scope:activity.activity_location = { hunt_animal_aurochs_trigger = yes }
									# EK DISABLED
									#NOT = { scope:host.religion = religion:hinduism_religion }
								}
								set_variable = { name = animal_type value = flag:aurochs }
							}
							10 = { # Bison
								trigger = {
									scope:activity.activity_location = { hunt_animal_bison_trigger = yes }
								}
								set_variable = { name = animal_type value = flag:bison }
							}
							# EK ADDITION
							10 = { # Bull Netch
								trigger = {
									scope:activity.activity_location = { 
										geographical_region = mundus_tamriel_morrowind
									 }
								}
								set_variable = { name = animal_type value = flag:bull_netch }
							}
							10 = { # Mammoth
								trigger = {
									scope:activity.activity_location = { 
										OR = {
											geographical_region = mundus_tamriel_skyrim
											geographical_region = mundus_tamriel_reach
											geographical_region = mundus_tamriel_valenwood
										}
									 }
								}
								set_variable = { name = animal_type value = flag:mammoth }
							}
							# EK ADDITION END
						}
					}
					10 = {
						hunt_activity_dangerous_game_effect = { PROVINCE = scope:activity.activity_location }
					}
				}
			}
		}
		scope:activity = {
			every_attending_character = { #Find a suitable character for root to hang out with in the forest
				limit = {
					NOT = { this = root }
					is_ai = yes
					is_adult = yes
				}
				add_to_list = similar_participants
			}
		}
		random_in_list = {
			list = similar_participants
			limit = {
				exists = root.intent_target
				this = root.intent_target
			}
			alternative_limit = {
				exists = intent_target
				intent_target = root
				NOT = { has_activity_intent = murder_attendee_intent }
			}
			alternative_limit = { #Find someone lazy for root to hang out with
				root = { has_trait = lazy }
				has_trait = lazy
			}
			alternative_limit = { #Find someone for root to be attracted to
				has_trait = beauty_good
				NOT = {
					is_close_family_trigger = { CHARACTER = root }
				}
				save_temporary_scope_as = similar_temp
				root = {
					possibly_interested_in_character_trigger = { CHARACTER = scope:similar_temp }
					has_trait = chaste
				}
			}
			alternative_limit = { is_adult = yes } #Find someone. Anyone
			save_scope_as = similar_participant
		}
		hunt_activity_success_change_effect = { CHANGE = decrease_medium }
		if = {
			limit = {
				exists = court_position:bodyguard_court_position
				court_position:bodyguard_court_position = { is_participant_in_activity = scope:activity }
			}
			court_position:bodyguard_court_position = { save_scope_as = bodyguard }
		}
	}

	option = { #Suplex the animal
		name = {
			trigger = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root }
			}
			text = hunt.4007.a
		}
		name = {
			trigger = {
				NOT = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root }
				}
			}
			text = hunt.4007.a.non_martial
		}
		trait = lifestyle_hunter
		save_scope_as = rampant_hunter
		show_as_tooltip = {
			hunt_friendly_intent_effect = {
				TARGET = scope:similar_participant
				REASON = lover_hunt_saved_from_rampaging_animal
			}
			hunt_animal_melee_kill_effect = { DEATH = yes VAR = scope:host.var:animal_type }	
			if = {
				limit = { is_alive = yes }
				stress_impact = {
					craven = medium_stress_impact_gain
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = 1
				ai_energy = 1
			}
		}
	}
	
	option = { #Scream for help!
		name = {
			trigger = {
				scope:similar_participant = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root }
				}
			}
			text = hunt.4007.b
		}
		name = {
			trigger = {
				scope:similar_participant = {
					NOT = {
						can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root }
					}
				}
			}
			text = hunt.4007.b.non_martial
		}
		trigger = {
			trigger_if = {
				limit = { exists = scope:bodyguard }
				NOT = { scope:similar_participant = scope:bodyguard }
			}
		}
		save_scope_as = rampant_assist
		show_as_tooltip = {
			if = {
				limit = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root }
				}
				add_prestige = miniscule_prestige_loss
			}
			scope:similar_participant = {
				if = {
					limit = {
						can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root }
					}
					hunt_friendly_intent_effect = {
						TARGET = root
						REASON = lover_hunt_saved_from_rampaging_animal
					}
					if = {
						limit = {
							root = {
								can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:similar_participant }
							}
						}
						add_opinion = {
							target = root
							modifier = hunt_disappointed_opinion
							opinion = -10
						}
					}
				}
				else = {
					add_opinion = {
						target = root
						modifier = hunt_disappointed_opinion
						opinion = -25
					}
				}
				
			}

			stress_impact = {
				brave = medium_stress_impact_gain
			}
		}
		scope:similar_participant = {
			hunt_animal_melee_kill_effect = { DEATH = yes VAR = scope:host.var:animal_type }
		}		
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = -1
				ai_energy = -0.5
			}
		}
	}

	option = { #Befriend the animal
		name = hunt.4007.c
		trigger = {
			diplomacy >= extremely_high_skill_rating
			
		}
		skill = diplomacy
		save_scope_as = rampant_befriend
		duel = {
			skill = diplomacy
			value = high_skill_rating
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
					min = -25
				}
				show_as_tooltip = {
					add_character_modifier = {
						modifier = modifier_hunt_friend_of_animal
						years = 20
					}
					hunt_friendly_intent_effect = {
						TARGET = scope:similar_participant
						REASON = lover_hunt_saved_from_rampaging_animal
					}
				}
				save_scope_as = rampant_befriend_success
			}
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -3.5
					min = -25
				}
				show_as_tooltip = {
					hunt_animal_wound_effect = { VARIABLE = scope:host.var:animal_type }
				}
				hunt_wound_select_effect = yes
			}
		}
		if = { # Capture
			limit = {
				NOR = {
					has_character_modifier = hunt_captive_beast_modifier
					exists = var:captive_animal_type
				}
				hunt_animal_type_predator_trigger = { VAR = var:animal_type }
			}
			set_variable = {
				name = captive_animal_type
				value = root.var:animal_type
				years = 5
			}
			add_character_modifier = {
				modifier = hunt_captive_beast_modifier
				years = 5
				desc = hunt_captive_beast_modifier_custom_desc
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = 1
				ai_compassion = 1
			}
		}
	}

	option = { #Bodyguard
		name = hunt.4007.d
		trigger = {
			exists = scope:bodyguard
			NOT = { scope:bodyguard = scope:similar_participant }
		}
		save_scope_as = rampant_bodyguard
		scope:bodyguard = {
			hunt_animal_melee_kill_effect = { DEATH = yes VAR = scope:activity.var:animal_type }
		}
		show_as_tooltip = {
			if = {
				limit = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root }
				}
				stress_impact = {
					brave = minor_stress_impact_gain
					lifestyle_hunter = minor_stress_impact_gain
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = -1
				ai_energy = -0.5
			}
		}
	}

	option = { #Scare the animal
		name = hunt.4007.e
		trigger = {
			OR = {
				has_trait = physique_good_3
				has_trait = giant
			}
		}
		trait = physique_good_3
		trait = giant
		save_scope_as = rampant_scare
		show_as_tooltip = {
			hunt_friendly_intent_effect = {
				TARGET = scope:similar_participant
				REASON = lover_hunt_saved_from_rampaging_animal
			}
			stress_impact = {
				craven = medium_stress_impact_gain
			}
		}		
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = 1
				ai_energy = 1
			}
		}
	}

	option = { #Flee
		name = hunt.4007.f
		trigger = {
			calc_true_if = {
				amount >= 3
				NOT = { diplomacy >= extremely_high_skill_rating }
				NOT = { exists = scope:bodyguard }
				NOT = { has_trait = physique_good_3 }
				NOT = { has_trait = giant }
			}
		}
		save_scope_as = rampant_flee
		show_as_tooltip = {
			if = {
				limit = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root }
				}
				add_prestige = minor_prestige_loss
				reverse_add_opinion = {
					target = scope:similar_participant
					modifier = hunt_disappointed_opinion
					opinion = -15
				}
			}
			stress_impact = {
				brave = medium_stress_impact_gain
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = 1
				ai_energy = 1
			}
		}
	}

	after = {
		trigger_event = {
			id = hunt.4900
			days = 1
		}
	}
}

# Follow up
hunt.4900 = {
	type = activity_event
	title = hunt.4007.t
	desc = {
		desc = hunt.4900.desc
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:rampant_hunter }
				desc = {
					desc = hunt.4900.hunter
					first_valid = {
						triggered_desc = {
							trigger = { is_alive = no }
							desc = hunt.4900.hunter_dead
						}
						triggered_desc = {
							trigger = { has_character_flag = recent_hunt_wound }
							desc = hunt.4900.hunter_wound
						}
						desc = hunt.4900.hunter_kill
					}
				}
			}
			triggered_desc = {
				trigger = { exists = scope:rampant_assist }
				desc = {
					desc = hunt.4900.assist
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:similar_participant = { is_alive = no }
							}
							desc = hunt.4900.assist_dead
						}
						triggered_desc = {
							trigger = {
								scope:similar_participant = { has_character_flag = recent_hunt_wound }
							}
							desc = hunt.4900.assist_wound
						}
						desc = hunt.4900.assist_kill
					}
				}
			}
			triggered_desc = {
				trigger = { exists = scope:rampant_befriend }
				desc = {
					desc = hunt.4900.befriend
					first_valid = {
						triggered_desc = {
							trigger = { exists = scope:rampant_befriend_success }
							desc = hunt.4900.befriend_success
						}
						triggered_desc = {
							trigger = { is_alive = yes }
							desc = hunt.4900.befriend_wound
						}
						desc = hunt.4900.befriend_dead
					}
				}
			}
			triggered_desc = {
				trigger = { exists = scope:rampant_bodyguard }
				desc = {
					desc = hunt.4900.bodyguard
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:bodyguard = { is_alive = no }
							}
							desc = hunt.4900.bodyguard_dead
						}
						triggered_desc = {
							trigger = {
								scope:bodyguard = { has_character_flag = recent_hunt_wound }
							}
							desc = hunt.4900.bodyguard_wound
						}
						desc = hunt.4900.bodyguard_saved
					}
				}
			}
			triggered_desc = {
				trigger = { exists = scope:rampant_scare }
				desc = hunt.4900.scare
			}
			triggered_desc = {
				trigger = { exists = scope:rampant_flee }
				desc = hunt.4900.flee
			}
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				OR = {
					has_character_flag = recent_hunt_wound
					is_alive = no
				}
			}
			animation = pain
		}
		triggered_animation = {
			trigger = { exists = scope:rampant_hunter }
			animation = hunting_knife_start
		}
		triggered_animation = {
			trigger = { exists = scope:rampant_assist }
			animation = war_over_tie
		}
		triggered_animation = {
			trigger = { exists = scope:rampant_befriend }
			animation = happiness
		}
		triggered_animation = {
			trigger = { exists = scope:rampant_bodyguard }
			animation = admiration
		}
		triggered_animation = {
			trigger = { exists = scope:rampant_scare }
			animation = wrestling_victory
		}
		triggered_animation = {
			trigger = { exists = scope:rampant_flee }
			animation = wrestling_yield_start
		}
	}
	center_portrait = {
		character = scope:similar_participant
		triggered_animation = {
			trigger = {
				OR = {
					exists = scope:rampant_scare
					exists = scope:rampant_hunter
				}
				root = { is_alive = yes }
			}
			animation = admiration
		}
		animation = stress
		trigger = {
			NOT = { this = scope:portrait }
		}
	}
	right_portrait = {
		character = scope:portrait
		triggered_animation = {
			trigger = { has_character_flag = recent_hunt_wound }
			animation = pain
		}
		triggered_animation = {
			trigger = {
				OR = {
					exists = scope:rampant_scare
					exists = scope:rampant_hunter
				}
				root = { is_alive = yes }
			}
			animation = happiness
		}
		triggered_animation = {
			trigger = { exists = scope:rampant_flee }
			animation = disapproval
		}
		triggered_animation = {
			trigger = {
				root = { is_alive = no }
			}
			animation = shock
		}
	}
	artifact = {
		position = lower_center_portrait
		target = scope:newly_created_artifact
	}
	cooldown = { years = 1 }
	
	trigger = {
		exists = scope:activity
	}

	immediate = {
		scope:activity = {
			set_variable = {
				name = kill_animal_type
				value = scope:host.var:animal_type
				months = 1
			}
		}
		switch = {
			trigger = exists
			scope:rampant_hunter = {
				hidden_effect = {
					hunt_animal_melee_kill_effect = { DEATH = yes VAR = scope:host.var:animal_type }
				}				
				scope:activity = {
					add_activity_log_entry = {
						key = hunt_rampage_fought_log
						score = 25
						tags = { random bad }
						character = root
						target = scope:similar_participant

						#Effect
						root = {
							if = {
								limit = { is_alive = yes }
								hunt_friendly_intent_effect = {
									TARGET = scope:similar_participant
									REASON = lover_hunt_saved_from_rampaging_animal
								}
								stress_impact = {
									craven = medium_stress_impact_gain
								}
							}
						}
					}
				}
				scope:similar_participant = { save_scope_as = portrait }
			}
			scope:rampant_assist = {
				scope:activity = {
					add_activity_log_entry = {
						key = hunt_rampage_assist_log
						score = 25
						tags = { random bad }
						character = root
						target = scope:similar_participant

						#Effect
						root = {
							if = {
								limit = {
									can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root }
								}
								add_prestige = miniscule_prestige_loss
							}
							scope:similar_participant = {
								save_scope_as = portrait
								if = {
									limit = { has_character_flag = recent_hunt_wound }
									hunt_wound_tooltip_effect = yes
								}
								else_if = {
									limit = { is_alive = no }
									show_as_tooltip = {
										death = { death_reason = death_maimed_by_wild_beast }
									}
								}
								if = {
									limit = {
										is_alive = yes
										can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root }
									}
									hunt_friendly_intent_effect = {
										TARGET = root
										REASON = lover_hunt_saved_from_rampaging_animal
									}
									if = {
										limit = {
											root = {
												can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:similar_participant }
											}
										}
										add_opinion = {
											target = root
											modifier = hunt_disappointed_opinion
											opinion = -10
										}
									}
								}
								else_if = {
									limit = { is_alive = yes }
									add_opinion = {
										target = root
										modifier = hunt_disappointed_opinion
										opinion = -25
									}
								}
							}
							stress_impact = {
								brave = medium_stress_impact_gain
							}
						}
					}
				}
			}
			scope:rampant_befriend = {
				if = {
					limit = { exists = scope:rampant_befriend_success }
					scope:similar_participant = { save_scope_as = portrait }
					scope:activity = {
						add_activity_log_entry = {
							key = hunt_rampage_befriend_log
							score = 50
							tags = { rampage }
							character = root

							# Effect
							root = {
								add_character_modifier = {
									modifier = modifier_hunt_friend_of_animal
									years = 20
								}
								hunt_friendly_intent_effect = {
									TARGET = scope:similar_participant
									REASON = lover_hunt_saved_from_rampaging_animal
								}
							}
						}
					}
				}
				else = {
					scope:activity = {
						add_activity_log_entry = {
							key = hunt_rampage_befriend_fail_log
							score = 50
							tags = { rampage }
							character = root

							# Effect
							root = {
								hunt_wound_apply_effect = { SEVERE = no }
							}
						}
					}
				}
			}
			scope:rampant_bodyguard = {
				scope:bodyguard = { save_scope_as = portrait }
				scope:activity = {
					add_activity_log_entry = {
						key = hunt_rampage_bodyguard_log
						score = 50
						tags = { rampage }
						character = root
						target = scope:bodyguard

						# Effect
						root = {
							if = {
								limit = {
									can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root }
								}
								stress_impact = {
									brave = minor_stress_impact_gain
									lifestyle_hunter = minor_stress_impact_gain
								}
							}
							scope:bodyguard = {
								if = {
									limit = { has_character_flag = recent_hunt_wound }
									hunt_wound_tooltip_effect = yes
								}
								else_if = {
									limit = { is_alive = no }
									show_as_tooltip = {
										death = { death_reason = death_maimed_by_wild_beast }
									}
								}
							}
						}
					}
				}
			}
			scope:rampant_scare = {
				scope:similar_participant = { save_scope_as = portrait }
				scope:activity = {
					add_activity_log_entry = {
						key = hunt_rampage_frightened_log
						score = 50
						tags = { rampage }
						character = root
						target = scope:portrait

						# Effect
						root = {
							hunt_friendly_intent_effect = {
								TARGET = scope:similar_participant
								REASON = lover_hunt_saved_from_rampaging_animal
							}
						}
					}
				}
				stress_impact = {
					craven = medium_stress_impact_gain
				}
			}
			scope:rampant_flee = {
				scope:similar_participant = { save_scope_as = portrait }
				scope:activity = {
					add_activity_log_entry = {
						key = hunt_rampage_fled_log
						score = 50
						tags = { rampage }
						character = root
						target = scope:portrait

						# Effect
						root = {
							if = {
								limit = {
									can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root }
								}
								add_prestige = minor_prestige_loss
								reverse_add_opinion = {
									target = scope:similar_participant
									modifier = hunt_disappointed_opinion
									opinion = -15
								}
							}
						}
					}
				}
				stress_impact = {
					brave = medium_stress_impact_gain
				}
			}
		}		
		if = {
			limit = { 
				exists = scope:animal_slayer
				is_alive = yes
			}
			create_artifact_animal_trinket_effect = {
				OWNER = root
				HUNTER = scope:animal_slayer
				LEGENDARY = no
				ANIMAL = root.var:animal_type
			}
			if = {
				limit = { exists = scope:newly_created_artifact }
				scope:animal_slayer = {
					if = {
						limit = { is_alive = no }
						scope:newly_created_artifact = { set_artifact_description = hunt_rampage_trinket_death_desc }
					}
					else_if = {
						limit = { has_character_flag = recent_hunt_wound }
						scope:newly_created_artifact = { set_artifact_description = hunt_rampage_trinket_wound_desc }
					}
					else = {
						scope:newly_created_artifact = { set_artifact_description = hunt_rampage_trinket_slain_desc }
					}
				}
			}			
		}
	}

	option = { #
		name = {
			trigger = {
				OR = {
					exists = scope:rampant_hunter
					exists = scope:rampant_assist
					exists = scope:rampant_bodyguard
				}
				NAND = {
					exists = scope:portrait
					scope:portrait = { is_alive = no }
				}
			}
			text = hunt.4900.a.hunter
		}
		name = {
			trigger = {
				exists = scope:portrait
				scope:portrait = { is_alive = no }
			}
			text = hunt.4900.a.dead
		}
		name = {
			trigger = { exists = scope:rampant_scare }
			text = hunt.4900.a.scare
		}
		name = {
			trigger = { exists = scope:rampant_flee }
			text = hunt.4900.a.flee
		}
		trigger = { is_alive = yes }
		if = {
			limit = { exists = scope:newly_created_artifact }
			hidden_effect = { destroy_artifact = scope:newly_created_artifact }
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = 1
				ai_energy = 1
			}
		}
	}

	option = {
		name = hunt.4900.b
		trigger = { exists = scope:newly_created_artifact }
		show_as_tooltip = {
			scope:newly_created_artifact = { set_owner = root }
		}
	}

	option = { # Damn
		name = hunt.4900.c
		trigger = { is_alive = no }
		if = {
			limit = { exists = scope:newly_created_artifact }
			hidden_effect = { destroy_artifact = scope:newly_created_artifact }
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = 1
				ai_energy = 1
			}
		}
	}

	option = { # End
		name = hunt.4900.d
		trigger = {
			is_alive = yes
			scope:portrait = { is_alive = no }
		}
		scope:activity = {
			set_variable = {
				name = hunt_invalidated
				value = flag:death
			}
			set_variable = {
				name = hunt_invalidated_flavor
				value = scope:portrait
			}
		}
		custom_tooltip = hunt_ends_tt
		if = {
			limit = { exists = scope:newly_created_artifact }
			hidden_effect = { destroy_artifact = scope:newly_created_artifact }
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = 1
				ai_energy = 1
			}
		}
	}

	after = {
		if = {
			limit = { has_character_flag = recent_hunt_wound }
			hunt_wound_tooltip_effect = yes
		}
		else_if = {
			limit = { is_alive = no }
			show_as_tooltip = {
				death = { death_reason = death_maimed_by_wild_beast }
			}
		}
		if = {
			limit = { is_alive = yes }
			remove_variable = animal_type
		}
	}
}

#######################
#	Hunt with your heir
#	by Linnéa Thimrén
#######################

scripted_trigger hunt_4008_trigger = {
	NOT = { this = root }
	is_alive = yes
	is_ai = yes
	is_adult = yes	
	NOR = {
		has_trait = shrewd
		has_trait = intellect_good
		has_trait = patient
		has_trait = calm
	}
	calc_true_if = {
		amount <= 1
		diplomacy >= decent_skill_rating
		stewardship >= decent_skill_rating
		martial >= decent_skill_rating
		intrigue >= decent_skill_rating
		learning >= decent_skill_rating
	}
}

hunt.4008 = {
	type = activity_event
	title = {
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						player_heir_position = {
							target = root
							value >= 4
						}
					}
					desc = hunt.4008.t
				}
				desc = hunt.4008.t_2
			}
		}
	}
	desc = {
		desc = hunt.4008.desc
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = var:animal_type
					NOR = {
						var:animal_type = flag:fox
						var:animal_type = flag:hare
						#EK ADDITION
						var:animal_type = flag:ringtail
						var:animal_type = flag:ash_hopper
						var:animal_type = flag:badger
						# EK ADDITION END
					}
				}
				desc = hunt.4008.animal
			}
			desc = hunt.4008.fallback
		}
		desc = hunt.4008.closing
	}
	theme = hunt_activity
	override_background = {
		trigger = {
			scope:activity.activity_location = {
				NOR = { # Only Forests
					graphical_wilderness_desert_trigger = yes
					hunt_snowy_forest_trigger = yes
					graphical_wilderness_mountains_trigger = yes
					graphical_wilderness_steppe_trigger = yes
					graphical_drylands_trigger = yes
					graphical_wilderness_wetlands_trigger = yes
					graphical_wilderness_jungle_trigger = yes
				}
			}
		}
		reference = ep2_hunt_forest_hut
	}
	left_portrait = {
		character = root
		animation= shock
	}
	center_portrait = {
		character = scope:peasant
		animation = loss_1
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = stress
	}
	cooldown = { years = 5 }
	
	trigger = {
		this = scope:host
		scope:activity = {
			any_attending_character = { hunt_4008_trigger = yes }
		}
		scope:host = { # Nomads don't care / peasants are not in the steppe
			NOT = {
				government_has_flag = government_is_nomadic
			}
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			primary_title = {
				any_title_heir = { hunt_4008_trigger = yes }
			}
		}
	}

	immediate = {
		play_music_cue = "mx_cue_murder"
		scope:activity.activity_location.county = { save_scope_as = activity_place }
		scope:activity = {
			random_attending_character = {
				limit = { hunt_4008_trigger = yes }
				weight = {
					base = 1
					modifier = {
						add = 10
						has_trait = intellect_bad
					}
					modifier = {
						add = 5
						has_trait = inbred
					}
					modifier = {
						add = 10
						has_trait = dull
					}
					modifier = {
						add = 5
						has_trait = one_eyed
					}
					modifier = {
						add = 5
						has_trait = wrathful
					}
					modifier = {
						add = 5
						has_trait = impatient
					}
					modifier = {
						add = 5
						has_trait = sadistic
					}
					modifier = {
						add = 5
						has_trait = callous
					}
				}
				save_scope_as = hunt_participant
			}
		} 
		#To create the peasant
		create_character = {
			age = { 20 35 }
			random_traits = yes
			gender_female_chance = 50
			dynasty = none
			faith = this.faith
			culture = this.culture
			location = scope:activity.activity_location
			save_scope_as = peasant
			#EK ADDITION
			after_creation = {
				ek_character_setup_effect = yes
			}
		}
		unknown_murder_effect = {
			VICTIM = scope:peasant
			MURDERER = scope:hunt_participant
			REASON = death_hunting_mysterious
		}
		#You know about the secret
		scope:hunt_participant = {
			random_secret = {
				limit = {
					secret_type = secret_murder
					secret_target = scope:peasant
				}
				save_scope_as = secret
				reveal_to_without_events_effect = { CHARACTER = root }
			}
		}
		scope:activity = {
			if = {
				limit = {
					any_attending_character = {
						is_adult = yes
						NOR = {
							this = scope:hunt_participant
							this = root
							is_close_family_of = scope:hunt_participant
							is_consort_of = scope:hunt_participant
							has_relation_lover = scope:hunt_participant
							has_relation_friend = scope:hunt_participant
						}
					}
				}
				random_attending_character = {
					limit = {
						is_adult = yes
						NOR = {
							this = scope:hunt_participant
							this = root
							is_close_family_of = scope:hunt_participant
							is_consort_of = scope:hunt_participant
							has_relation_lover = scope:hunt_participant
							has_relation_friend = scope:hunt_participant
						}
					}
					save_scope_as = participant
				}
			}
		}
	}

	option = { #Convince everyone that they tried to save the peasant
		name = hunt.4008.a
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_peasant_kill_cover_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:hunt_participant

				#Effect
				root = {
					duel = {
						skill = diplomacy
						value = 12
						50 = {
							desc = hunt.4008.a.success
							compare_modifier = {
								value = scope:duel_value
								multiplier = 3.5
								min = -25
							}
							send_interface_toast = {
								title = hunt.4008.a.success
								left_icon = scope:hunt_participant
								scope:activity_place = {
									add_county_modifier = {
										modifier = hunt_protected_peasants_modifier
										years = 10
									}
								}
								scope:activity = {
									every_attending_character = {
										custom = all_hunt_participants
										add_opinion = {
											modifier = respect_opinion
											target = scope:hunt_participant
											opinion = 30
										}
									}
								}
							}
						}
						40 = {
							desc = hunt.4008.a.failure
							compare_modifier = {
								value = scope:duel_value
								multiplier = -3.5
								min = -25
							}
							send_interface_toast = {
								title = hunt.4008.a.failure
								left_icon = scope:hunt_participant
								scope:activity = {
									every_attending_character = {
										custom = all_hunt_participants
										add_opinion = {
											modifier = respect_opinion
											target = root
											opinion = -15
										}
									}
									random_attending_character = {
										limit = {
											NOR = {
												this = scope:hunt_participant
												this = root
												is_close_family_of = scope:hunt_participant
												is_consort_of = scope:hunt_participant
												has_relation_lover = scope:hunt_participant
												has_relation_friend = scope:hunt_participant
											}
										}
										save_scope_as = participant
										scope:secret = { expose_secret = scope:participant }
									}
								}
							}
						}
					}
					stress_impact = {
						callous = medium_stress_impact_loss
						sadistic = medium_stress_impact_loss
						deceitful = medium_stress_impact_loss
						honest = medium_stress_impact_gain
						just = medium_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 50
				OR = {
					has_trait = deceitful
					has_trait = callous
					has_trait = sadistic
				}
			}
			modifier = {
				add = 50
				diplomacy > average_skill_rating
			}
		}
	}

	option = { #Cover it up
		name = hunt.4008.b
		trigger = { exists = scope:participant }
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_peasant_kill_cover_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:hunt_participant

				# Effect
				root = {
					duel = {
						skill = intrigue
						value = medium_skill_rating
						25 = {
							desc = hunt.4008.b.success
							compare_modifier = {
								value = scope:duel_value
								multiplier = 3.5
								min = -15
							}
							send_interface_toast = {
								title = hunt.4008.b.success
								left_icon = scope:hunt_participant
								custom_tooltip = hunt.4008.b.success_tt
								add_hook = {
									type = indebted_hook
									target = scope:hunt_participant
								}
							}
							### EK ADDITION: TRIGGER EBONY MAIL EVENT
							if = {
								limit = {
									can_secretly_worship_boethiah = yes
									is_daedric_champion = no
									NOT = {
										has_trait = honest
										has_trait = craven
										has_trait = forgiving
									}
									OR = {
										has_trait = deceitful
										has_trait = brave
										has_trait = vengeful
										has_education_martial_trigger = yes
									}
								}
								trigger_event = {
									id = ek_daedric_artifacts.0006
									days = { 15 30 }
								}
							}
							### EK ADDITION END
						}
						15 = {
							desc = hunt.4008.b.failure
							compare_modifier = {
								value = scope:duel_value
								multiplier = -3.5
								min = -15
							}
							custom_tooltip = hunt.4008.b.failure_tt
							hidden_effect = {
								send_interface_toast = {
									title = hunt.4008.b.failure
									left_icon = scope:hunt_participant
									right_icon = scope:participant
									scope:secret = { expose_secret = scope:participant }
								}
							}
						}
					}
					stress_impact = {
						callous = medium_stress_impact_loss
						sadistic = medium_stress_impact_loss
						deceitful = medium_stress_impact_loss
						honest = medium_stress_impact_gain
						just = medium_stress_impact_gain
						paranoid = medium_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 50
				OR = {
					has_trait = deceitful
					has_trait = callous
				}
			}
			modifier = {
				add = 50
				intrigue > average_skill_rating
			}
		}
	}
	
	option = { #Heir will pay for this
		name = hunt.4008.c
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_peasant_kill_expose_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:hunt_participant

				# Effect
				root = {
					scope:secret = { expose_secret = root }
					scope:hunt_participant = {
						add_opinion = {
							target = root
							modifier = exposed_my_secret_opinion
							opinion = -15
						}
					}
					scope:activity.activity_location.county = {
						add_county_modifier = {
							modifier = hunt_heir_murder_exposed_modifier
							years = 10
						}
					}
					stress_impact = {
						just = minor_stress_impact_loss
						arrogant = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 75
				OR = {
					has_trait = just
					has_trait = honest
				}
			}
		}
	}

	option = { #I'll kill them
		name = hunt.4008.d
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_peasant_kill_murder_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:hunt_participant

				# Effect
				root = {
					unknown_murder_effect = {
						VICTIM = scope:hunt_participant
						MURDERER = root
						REASON = death_hunting_mysterious
					}
					scope:activity = {
						set_variable = {
							name = hunt_invalidated
							value = flag:death
						}
						set_variable = {
							name = hunt_invalidated_flavor
							value = scope:hunt_participant
						}
					}
					custom_tooltip = hunt_ends_tt
					stress_impact = {
						base = medium_stress_impact_gain
						vengeful = minor_stress_impact_loss
						sadistic = minor_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 50
				has_trait = sadistic
			}
			modifier = {
				add = 50
				opinion = {
					target = scope:hunt_participant
					value <= -20
				}
			}
		}
	}
}

#######################
#	Someone has a murder/abduct scheme against you (or your heir dislikes you)
#	by Linnéa Thimrén
#######################

scripted_trigger hunt_4009_scheme_trigger = {
	OR = {
		scheme_type = murder
		scheme_type = abduct
	}
	scheme_target_character = root
	save_temporary_scope_as = scheme
	scheme_progress > scheme_progress_33
	OR = {
		scheme_owner = { is_participant_in_activity = scope:activity }
		any_scheme_agent_character = { is_participant_in_activity = scope:activity }
	}
}

scripted_trigger hunt_4009_intent_trigger = {
	has_activity_intent = murder_attendee_intent
	exists = intent_target
	intent_target = root
}

scripted_trigger hunt_4009_heir_trigger = {
	exists = player_heir
	player_heir = {
		is_participant_in_activity = scope:activity
		opinion = {
			target = root
			value <= -10
		}
		has_any_good_relationship_with_root_trigger = no
		can_start_scheme = {
			type = murder
			target_character = root
		}
	}
}

scripted_trigger hunt_4009_personality_trigger = {
	OR = {
		has_trait = brave
		has_trait = ambitious
		has_trait = callous
		has_trait = sadistic
		has_relation_rival = root
		NOR = {
			has_trait = craven
			has_trait = content
		}
	}
}

hunt.4009 = {
	type = activity_event
	title = hunt.4009.t
	desc = hunt.4009.desc
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = fear
	}
	center_portrait = {
		character = scope:saving_participant
		animation = aggressive_dagger
	}
	right_portrait = {
		character = scope:schemer
		animation = assassin
	}
	
	trigger = {
		OR = {
			any_targeting_scheme = { hunt_4009_scheme_trigger = yes }
			scope:activity = {
				any_attending_character = { hunt_4009_intent_trigger = yes }
			}
			hunt_4009_heir_trigger = yes
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			add = 1
			employs_court_position = master_of_hunt_court_position
			court_position:master_of_hunt_court_position = {
				is_alive = yes
				is_participant_in_activity = scope:activity
				OR = {
					is_scheming_against = { target = root type = murder }
					is_scheming_against = { target = root type = abduct }
					hunt_4009_intent_trigger = yes
					AND = {
						root = { hunt_4009_heir_trigger = yes }
						this = root.player_heir
					}
				}
			}
		}
		modifier = {
			add = 1
			employs_court_position = huntperson_camp_officer
			court_position:huntperson_camp_officer = {
				is_alive = yes
				is_participant_in_activity = scope:activity
				OR = {
					is_scheming_against = { target = root type = murder }
					is_scheming_against = { target = root type = abduct }
					hunt_4009_intent_trigger = yes
					AND = {
						root = { hunt_4009_heir_trigger = yes }
						this = root.player_heir
					}
				}
			}
		}
		modifier = {
			add = 1
			employs_court_position = huntperson_camp_officer
			court_position:huntperson_camp_officer = {
				is_alive = yes
				is_participant_in_activity = scope:activity
				OR = {
					is_scheming_against = { target = root type = murder }
					is_scheming_against = { target = root type = abduct }
					hunt_4009_intent_trigger = yes
					AND = {
						root = { hunt_4009_heir_trigger = yes }
						this = root.player_heir
					}
				}
			}
		}
	}

	immediate = {
		play_music_cue = "mx_cue_stress"
		hidden_effect = {
			random_list = {
				10 = {
					trigger = {
						any_targeting_scheme = { hunt_4009_scheme_trigger = yes }
					}
					modifier = {
						add = 10
						any_targeting_scheme = {
							hunt_4009_scheme_trigger = yes
							OR = {
								scheme_owner = {
									is_participant_in_activity = scope:activity
									hunt_4009_personality_trigger = yes
								}
								any_scheme_agent_character = {
									is_participant_in_activity = scope:activity
									hunt_4009_personality_trigger = yes
								}
							}
						}
					}
					random_targeting_scheme = {
						limit = { hunt_4009_scheme_trigger = yes }
						random_list = {
							10 = {
								trigger = {
									scheme_owner = {
										is_participant_in_activity = scope:activity
										save_temporary_scope_as = scheme_owner_temp
									}
								}
								hunt_murderer_modifier = { MURDERER = scope:scheme_owner_temp TARGET = root }
								scheme_owner = { save_scope_as = schemer }
							}
							10 = {
								trigger = {
									any_scheme_agent_character = { is_participant_in_activity = scope:activity }
								}
								random_scheme_agent_character = {
									limit = {
										is_participant_in_activity = scope:activity
										save_temporary_scope_as = murderer_temp
									}
									weight = {
										base = 1
										hunt_murderer_modifier = { MURDERER = scope:murderer_temp TARGET = root }
									}
									save_scope_as = schemer
								}
							}
						}
						save_scope_as = scheme
					}					
				}
				25 = {
					trigger = {
						scope:activity = {
							any_attending_character = {
								has_activity_intent = murder_attendee_intent
								exists = intent_target
								intent_target = root
							}
						}
					}
					scope:activity = {
						random_attending_character = {
							limit = {
								has_activity_intent = murder_attendee_intent
								exists = intent_target
								intent_target = root
								save_temporary_scope_as = murderer_temp
							}
							weight = {
								base = 1
								hunt_murderer_modifier = { MURDERER = scope:murderer_temp TARGET = root }
							}
							save_scope_as = schemer
						}
					}
				}
				5 = { # Heir
					trigger = { hunt_4009_heir_trigger = yes }
					modifier = {
						add = 5
						exists = player_heir
						player_heir = {
							OR = {
								has_trait = callous
								has_trait = sadistic
								has_trait = ambitious
								has_relation_rival = root
								has_strong_claim_on = root.primary_title
							}
						}
					}
					player_heir = { save_scope_as = schemer }
				}
			}
			if = { #Set a murder secret if it's a murder attempt
				limit = {
					trigger_if = {
						limit = { exists = scope:scheme }
							NOT = {
							scope:scheme = { scheme_type = abduct }
						}
					}					
				}
				scope:schemer = {
					add_secret = {
						type = secret_murder_attempt
						target = root
					}
					random_secret = {
						limit = {
							secret_type = secret_murder_attempt
							secret_target = root
						}
						save_scope_as = murder_secret
						reveal_to_without_events_effect = { CHARACTER = root }
					}
				}
			}
			#Find a participant to help you!
			scope:activity = {
				random_attending_character = {
					limit = {
						save_temporary_scope_as = saver_temp
						NOR = {
							this = root
							this = scope:schemer
							hunt_4009_intent_trigger = yes
							is_scheming_against = { target = root type = murder }
							is_scheming_against = { target = root type = abduct }
							has_any_bad_relationship_with_character_trigger = { CHARACTER = root }
							AND = {
								root = { hunt_4009_heir_trigger = yes }
								this = root.player_heir
							}
							opinion = {
								target = scope:schemer
								value >= 40
							}
						}
						prowess > root.prowess
						opinion = {
							target = root
							value >= 0
						}
					}
					weight = {
						base = 0
						modifier = {
							add = {
								value = prowess
								multiply = 0.5
							}
						}
						modifier = {
							add = 3
							has_trait = education_martial
						}
						modifier = {
							add = 25
							has_court_position = bodyguard_court_position
							exists = root.court_position:bodyguard_court_position
							this = root.court_position:bodyguard_court_position
						}
						modifier = {
							add = 25
							has_court_position = akolouthos_court_position
							exists = root.court_position:akolouthos_court_position
							this = root.court_position:akolouthos_court_position
						}
					}
					save_scope_as = saving_participant
				}
			}
		}
		hunt_activity_success_change_effect = { CHANGE = decrease_major }
	}

	option = { #Take them on: Murder
		name = hunt.4009.a
		trigger = {
			trigger_if = {
				limit = { exists = scope:scheme }
				scope:scheme = { scheme_type = murder }
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_murder_defend_log
				score = 25
				tags = { random bad scheme intent }
				character = root
				target = scope:schemer

				#Effect
				root = {
					duel = {
						skill = prowess
						target = scope:schemer
						10 = { #Nothing happens but reveal
							desc = hunt.4009.a.success
							compare_modifier = {
								value = scope:duel_value
							}
							send_interface_toast = {
								title = hunt.4009.a.success
								left_icon = scope:schemer
							}
						}
						6 = { #They wound me
							desc = hunt.4009.a.failure
							compare_modifier = {
								value = scope:duel_value
								multiplier = -0.5
							}
							send_interface_toast = {
								title = hunt.4009.a.failure
								left_icon = scope:schemer
								increase_wounds_effect = { REASON = fight }
								if = {
									limit = {
										NOT = {
											has_trait = wounded_3
										}
									}
									add_character_modifier = {
										modifier = watchful_modifier
										days = watchful_modifier_duration
									}
								}
							}
						}
						2 = { #Their scheme succeeds
							desc = hunt.4009.a.critical_failure
							compare_modifier = {
								value = scope:duel_value
								multiplier = -0.5
							}
							send_interface_toast = {
								title = hunt.4009.a.critical_failure
								left_icon = scope:schemer
								unknown_murder_effect = {
									VICTIM = root
									MURDERER = scope:schemer
									REASON = death_hunting_mysterious
								}
							}
						}
					}
				}
			}
		}
		ai_chance = {
			base = 0
			modifier = {
				add = 50
				prowess > scope:schemer.prowess
			}
		}
	}

	option = { #Take them on: Abduction
		name = hunt.4009.a
		trigger = {
			exists = scope:scheme
			scope:scheme = { scheme_type = abduct }
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_abduct_defend_log
				score = 25
				tags = { random bad scheme intent }
				character = root
				target = scope:schemer

				#Effect
				root = {
					duel = {
						skill = prowess
						target = scope:schemer
						10 = { #Nothing happens but reveal
							desc = hunt.4009.a.success
							compare_modifier = {
								value = scope:duel_value
							}
							send_interface_toast = {
								title = hunt.4009.a.success
								left_icon = scope:schemer

								add_opinion = {
									target = scope:schemer
									modifier = attempted_abduction_opinion
								}
								add_character_modifier = {
									modifier = watchful_modifier
									days = watchful_modifier_duration
								}
							}
							hunt_activity_success_change_effect = { CHANGE = increase_medium }
						}
						6 = { #They wound me
							desc = hunt.4009.a.failure
							compare_modifier = {
								value = scope:duel_value
								multiplier = -0.5
							}
							send_interface_toast = {
								title = hunt.4009.a.failure
								left_icon = scope:schemer
								increase_wounds_effect = { REASON = fight }
								if = {
									limit = {
										NOT = {
											has_trait = wounded_3
										}
									}
									add_opinion = {
										target = scope:schemer
										modifier = attempted_abduction_opinion
									}
									add_character_modifier = {
										modifier = watchful_modifier
										days = watchful_modifier_duration
									}
								}
							}
						}
						2 = { #Their scheme succeeds
							desc = hunt.4009.a.critical_failure
							compare_modifier = {
								value = scope:duel_value
								multiplier = -0.5
							}
							hard_imprison_character_effect = {
								TARGET = root
								IMPRISONER = scope:schemer
							}
							add_opinion = {
								target = scope:schemer
								modifier = abducted_me_opinion
							}
						}
					}
				}
			}
		}
		ai_chance = {
			base = 0
			modifier = {
				add = 50
				prowess > scope:schemer.prowess
			}
		}
	}

	option = { #Call for help: Murder
		name = hunt.4009.b
		trigger = {
			exists = scope:saving_participant
			trigger_if = {
				limit = { exists = scope:scheme }
				scope:scheme = { scheme_type = murder }
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_murder_help_log
				score = 25
				tags = { random bad scheme intent }
				character = root
				target = scope:schemer

				#Effect
				root = {
					scope:murder_secret = {
						reveal_to_without_events_effect = { CHARACTER = scope:saving_participant }
					}
					add_prestige = medium_prestige_loss
					scope:saving_participant = { #The rescuer does the rescuing
						duel = {
							skill = prowess
							target = scope:schemer
							10 = { #They become wounded
								desc = hunt.4009.b.critical_success
								compare_modifier = {
									value = scope:duel_value
								}
									
								root = {
									send_interface_toast = {
										title = hunt.4009.b.critical_success
										left_icon = scope:schemer
										add_character_modifier = {
											modifier = watchful_modifier
											days = watchful_modifier_duration
										}
										add_opinion = {
											target = scope:saving_participant
											modifier = grateful_opinion
											opinion = 40
										}

										scope:schemer = {
											increase_wounds_effect = { REASON = fight }
										}
									}
								}
								hunt_activity_success_change_effect = { CHANGE = increase_medium }
							}
							6 = {
								desc = hunt.4009.b.failure
								compare_modifier = {
									value = scope:duel_value
									multiplier = -0.5
								}
								root = {
									send_interface_toast = {
										title = hunt.4009.b.failure
										left_icon = scope:schemer
										scope:saving_participant = {
											increase_wounds_effect = { REASON = fight }
										}
										add_character_modifier = {
											modifier = watchful_modifier
											days = watchful_modifier_duration
										}
									}
								}
							}
							2 = {
								desc = hunt.4009.b.critial_failure
								compare_modifier = {
									value = scope:duel_value
									multiplier = -0.5
								}
								root = {
									send_interface_toast = {
										left_icon = scope:schemer
										title = hunt.4009.b.critial_failure

										unknown_murder_effect = {
											VICTIM = root
											MURDERER = scope:schemer
											REASON = death_hunting_mysterious
										}
										unknown_murder_effect = {
											VICTIM = scope:saving_participant
											MURDERER = scope:schemer
											REASON = death_hunting_mysterious
										}
									}
								}
							}
						}
					}
				}
			}
		}
		ai_chance = {
			base = 0
			modifier = {
				add = 50
				prowess <= scope:schemer.prowess
			}
			modifier = {
				add = 25
				scope:saving_participant.prowess > scope:schemer.prowess
			}
		}
	}

	option = { #Call for help: Abduction
		name = hunt.4009.b
		trigger = {
			exists = scope:saving_participant
			exists = scope:scheme
			scope:scheme = { scheme_type = abduct }
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_abduct_help_log
				score = 25
				tags = { random bad scheme intent }
				character = root
				target = scope:schemer

				#Effect
				root = {
					add_prestige = medium_prestige_loss
					scope:saving_participant = { #The rescuer does the rescuing
						duel = {
							skill = prowess
							target = scope:schemer
							10 = { #They become wounded
								desc = hunt.4009.b.critical_success
								compare_modifier = {
									value = scope:duel_value
								}
									
								root = {
									send_interface_toast = {
										title = hunt.4009.b.critical_success
										left_icon = scope:schemer

										add_opinion = {
											target = scope:schemer
											modifier = attempted_abduction_opinion
										}
										add_character_modifier = {
											modifier = watchful_modifier
											days = watchful_modifier_duration
										}

										scope:schemer = {
											increase_wounds_effect = { REASON = fight }
										}
									}
								}
								hunt_activity_success_change_effect = { CHANGE = increase_medium }
							}
							6 = {
								desc = hunt.4009.b.failure
								compare_modifier = {
									value = scope:duel_value
									multiplier = -0.5
								}
								#Chance of the rescuer dying
								random = {
									chance = {
										value = 50
										subtract = scope:saving_participant.prowess
									}
									unknown_murder_effect = {
										VICTIM = scope:saving_participant
										MURDERER = scope:schemer
										REASON = death_hunting_mysterious
									}
								}
								root = {
									send_interface_toast = {
										title = hunt.4009.b.failure
										left_icon = scope:schemer
										increase_wounds_effect = { REASON = fight }
										add_opinion = {
											target = scope:schemer
											modifier = attempted_abduction_opinion
										}
										add_character_modifier = {
											modifier = watchful_modifier
											days = watchful_modifier_duration
										}
									}
								}
							}
							2 = {
								desc = hunt.4009.b.critial_failure
								compare_modifier = {
									value = scope:duel_value
									multiplier = -0.5
								}
								root = {
									send_interface_toast = {
										left_icon = scope:schemer
										title = hunt.4009.b.critial_failure


										hard_imprison_character_effect = {
											TARGET = root
											IMPRISONER = scope:schemer
										}
										add_opinion = {
											target = scope:schemer
											modifier = abducted_me_opinion
										}

										hard_imprison_character_effect = {
											TARGET = scope:schemer
											IMPRISONER = scope:schemer
										}
										scope:saving_participant = {
											add_opinion = {
												target = scope:schemer
												modifier = abducted_me_opinion
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
		ai_chance = {
			base = 0
			modifier = {
				add = 50
				prowess <= scope:schemer.prowess
			}
			modifier = {
				add = 25
				scope:saving_participant.prowess > scope:schemer.prowess
			}
		}
	}
	
	option = { #Run! - Murder
		name = hunt.4009.c
		trigger = {
			trigger_if = {
				limit = { exists = scope:scheme }
				scope:scheme = { scheme_type = murder }
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_murder_flee_log
				score = 25
				tags = { random bad scheme intent }
				character = root
				target = scope:schemer

				#Effect
				root = {
					random_list = {
						80 = {
							desc = hunt.4009.a.success
							send_interface_toast = {
								title = hunt.4009.a.success
								left_icon = scope:schemer

								scope:murder_secret = {
									reveal_to = root
								}
								add_character_modifier = {
									modifier = watchful_modifier
									days = watchful_modifier_duration
								}
							}
							hunt_activity_success_change_effect = { CHANGE = increase_medium }
						}
						20 = {
							desc = hunt.4009.c.failure
							send_interface_toast = {
								title = hunt.4009.c.failure
								left_icon = scope:schemer

								unknown_murder_effect = {
									VICTIM = root
									MURDERER = scope:schemer
									REASON = death_hunting_mysterious
								}
							}
						}
					}
				}
			}
		}
		ai_chance = {
			base = 0
			#More likely the more scared I am of the schemer
			modifier = {
				add = 25
				dread_modified_ai_boldness = {
					dreaded_character = scope:schemer
					value <= -45
				}
			}
			modifier = {
				add = 50
				dread_modified_ai_boldness = {
					dreaded_character = scope:schemer
					value <= -75
				}
			}
		}
	}
	
	option = { #Run! - Abduction
		name = hunt.4009.c
		trigger = {
			exists = scope:scheme
			scope:scheme = { scheme_type = abduct }
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_abduct_flee_log
				score = 25
				tags = { random bad scheme intent }
				character = root
				target = scope:schemer

				#Effect
				root = {
					random_list = {
						80 = {
							desc = hunt.4009.a.success
							send_interface_toast = {
								title = hunt.4009.a.success
								left_icon = scope:schemer

								add_opinion = {
									target = scope:schemer
									modifier = attempted_abduction_opinion
								}
								add_character_modifier = {
									modifier = watchful_modifier
									days = watchful_modifier_duration
								}
							}
							hunt_activity_success_change_effect = { CHANGE = increase_medium }
						}
						20 = {
							desc = hunt.4009.c.failure
							send_interface_toast = {
								title = hunt.4009.c.failure
								left_icon = scope:schemer

								hard_imprison_character_effect = {
									TARGET = root
									IMPRISONER = scope:schemer
								}
								add_opinion = {
									target = scope:schemer
									modifier = abducted_me_opinion
								}
							}
						}
					}
				}
			}
		}
		ai_chance = {
			base = 0
			#More likely the more scared I am of the schemer
			modifier = {
				add = 25
				dread_modified_ai_boldness = {
					dreaded_character = scope:schemer
					value <= -45
				}
			}
			modifier = {
				add = 50
				dread_modified_ai_boldness = {
					dreaded_character = scope:schemer
					value <= -75
				}
			}
		}
	}

	after = {
		#Make sure the Scheme is exposed, whatever else happens
		if = {
			limit = { exists = scope:scheme }
			scope:scheme = { expose_scheme = yes }
		}
	}
}

#######################
#	Someone has a murder scheme against a close family member
#	by Linnéa Thimrén
#######################

scripted_trigger hunt_4010_scheme_trigger = {
	OR = {
		scheme_type = murder
		scheme_type = abduct
	}
	NOR = {
		scheme_owner = root
		any_scheme_agent_character = { this = root }
	}
	OR = {
		scheme_owner = { is_participant_in_activity = scope:activity }
		any_scheme_agent_character = { is_participant_in_activity = scope:activity }
	}
	save_temporary_scope_as = scheme
	scheme_progress > scheme_progress_33
	# Scheme target is a close relative/spouse.
	scheme_target_character = {
		NOT = { this = root }
		is_ai = yes
		is_participant_in_activity = scope:activity # Scheme target must also be on the hunt with us.
		NOT = {
			has_any_bad_relationship_with_character_trigger = { CHARACTER = root }
		}
		reverse_opinion = {
			target = root
			value >= 25
		}
	}
}

scripted_trigger hunt_4010_intent_trigger = {
	has_activity_intent = murder_attendee_intent
	exists = intent_target
	NOT = { this = root }
	intent_target = {
		NOT = { this = root }
		OR = {
			is_close_family_of = root
			is_consort_of = root
		}
		is_ai = yes
		is_participant_in_activity = scope:activity # Scheme target must also be on the hunt with us.
		NOT = {
			has_any_bad_relationship_with_character_trigger = { CHARACTER = root }
		}
		reverse_opinion = {
			target = root
			value >= 25
		}
	}
}

scripted_trigger hunt_4010_heir_trigger = {
	exists = root.player_heir
	root.player_heir = { is_participant_in_activity = scope:activity }
	scope:activity = {
		any_attending_character = {
			NOT = { this = root }
			player_heir_position = { target = root value <= 1 }
			player_heir_position = { target = root value >= 3 }			
			opinion = {
				target = root.player_heir
				value <= -10
			}
			NOT = {
				has_any_good_relationship_with_character_trigger = { CHARACTER = root.player_heir }
			}
			can_start_scheme = {
				type = murder
				target_character = root.player_heir
			}
		}
	}
}

hunt.4010 = {
	type = activity_event
	title = hunt.4009.t # Title shared between 4009 and 4010
	desc = hunt.4010.desc
	theme = hunt_activity
	left_portrait = {
		character = scope:targeted_participant
		animation = shock
	}
	right_portrait = {
		character = scope:schemer
		animation = aggressive_dagger
	}
	
	trigger = {
		OR = {
			any_close_family_member = {
				any_targeting_scheme = { hunt_4010_scheme_trigger = yes }
			}
			any_consort = {
				any_targeting_scheme = { hunt_4010_scheme_trigger = yes }
			}
			scope:activity = {
				any_attending_character = { hunt_4010_intent_trigger = yes }
			}
			hunt_4010_heir_trigger = yes
		}
	}

	immediate = {
		play_music_cue = "mx_cue_stress"
		hidden_effect = {
			random_list = {
				10 = { # Scheme
					trigger = {
						OR = {
							any_close_family_member = {
								any_targeting_scheme = { hunt_4010_scheme_trigger = yes }
							}
							any_consort = {
								any_targeting_scheme = { hunt_4010_scheme_trigger = yes }
							}
						}
					}
					random_list = {
						10 = {
							trigger = {
								any_close_family_member = {
									any_targeting_scheme = { hunt_4010_scheme_trigger = yes }
								}
							}
							random_close_family_member = {
								limit = {
									any_targeting_scheme = { hunt_4010_scheme_trigger = yes }
								}
								save_scope_as = targeted_participant
							}
						}
						10 = {
							trigger = {
								any_consort = {
									any_targeting_scheme = { hunt_4010_scheme_trigger = yes }
								}
							}
							random_consort = {
								limit = {
									any_targeting_scheme = { hunt_4010_scheme_trigger = yes }
								}
								save_scope_as = targeted_participant
							}
						}
					}
					scope:targeted_participant = {
						random_targeting_scheme = {
							limit = { hunt_4010_scheme_trigger = yes }
							save_scope_as = scheme
							random_list = {
								10 = {
									trigger = {
										scheme_owner = { is_participant_in_activity = scope:activity }
									}
									scheme_owner = { save_scope_as = schemer }
								}
								10 = {
									trigger = {
										any_scheme_agent_character = { is_participant_in_activity = scope:activity }
									}
									random_scheme_agent_character = {
										limit = {
											is_participant_in_activity = scope:activity
											save_temporary_scope_as = murderer_temp
										}
										weight = {
											base = 1
											hunt_murderer_modifier = { MURDERER = scope:murderer_temp TARGET = scope:targeted_participant }
										}
										save_scope_as = schemer
									}
								}
							}
						}
					}
				}
				20 = { # Intent
					trigger = {
						scope:activity = {
							any_attending_character = { hunt_4010_intent_trigger = yes }
						}
					}
					scope:activity = {
						random_attending_character = {
							limit = {
								hunt_4010_intent_trigger = yes
								save_temporary_scope_as = murderer_temp
							}
							weight = {
								base = 1
								hunt_murderer_modifier = { MURDERER = scope:murderer_temp TARGET = scope:murderer_temp.intent_target }
							}
							save_scope_as = schemer
							intent_target = { save_scope_as = targeted_participant }
						}
					}
				}
				5 = { # Heir
					trigger = { hunt_4010_heir_trigger = yes }
					scope:activity = {
						random_attending_character = {
							limit = {
								player_heir_position = { target = root value <= 1 }
								player_heir_position = { target = root value >= 3 }
								opinion = {
									target = root.player_heir
									value <= -10
								}
								NOT = {
									has_any_good_relationship_with_character_trigger = { CHARACTER = root.player_heir }
								}
								can_start_scheme = {
									type = murder
									target_character = root.player_heir
								}
								save_temporary_scope_as = murderer_temp
							}
							weight = {
								base = 1
								hunt_murderer_modifier = { MURDERER = scope:murderer_temp TARGET = root.player_heir }
							}
							save_scope_as = schemer
						}
					}
					player_heir = { save_scope_as = targeted_participant }
				}
			}
		}
		#If it's a murder, create an attempted murder Secret
		if = {
			limit = {
				trigger_if = {
					limit = { exists = scope:scheme }
					NOT = { 
						scope:scheme = { scheme_type = abduct }
					}
				}
			}
			scope:schemer = {
				add_secret = {
					type = secret_murder_attempt
					target = scope:targeted_participant
				}
				random_secret = {
					limit = {
						secret_type = secret_murder_attempt
						secret_target = scope:targeted_participant
					}
					save_scope_as = murder_secret
				}
			}
		}
		scope:murder_secret = {
			reveal_to_without_events_effect = { CHARACTER = root }
			hidden_effect = {
				reveal_to_without_events_effect = { CHARACTER = scope:targeted_participant }
			}
		}
		hunt_activity_success_change_effect = { CHANGE = decrease_major }
	}

	option = { #Take them on
		name = hunt.4010.a
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_family_defend_log
				score = 25
				tags = { random bad scheme intent }
				character = scope:targeted_participant
				target = scope:schemer

				#Effect
				root = {
					duel = {
						skill = prowess
						target = scope:schemer
						12 = { #Wound them
							desc = hunt.4010.a.critical_success
							compare_modifier = {
								value = scope:duel_value
							}
							send_interface_toast = {
								title = hunt.4010.a.critical_success
								left_icon = scope:schemer
								right_icon = scope:targeted_participant

								add_prestige = medium_prestige_gain

								scope:schemer = {
									increase_wounds_effect = { REASON = fight }
								}

								scope:targeted_participant = {
									add_opinion = {
										target = root
										modifier = respect_opinion
										opinion = 20
									}
								}
							}
							hunt_activity_success_change_effect = { CHANGE = increase_medium }
						}
						9 = {
							desc = hunt.4010.a.failure
							compare_modifier = {
								value = scope:duel_value
								multiplier = -0.5
							}
							send_interface_toast = {
								title = hunt.4010.a.failure
								left_icon = scope:schemer
								right_icon = scope:targeted_participant

								increase_wounds_effect = { REASON = fight }

								save_scope_value_as = {
									name = murder_completed
									value = yes
								}
							}
						}
						3 = {
							desc = hunt.4010.a.critical_failure
							compare_modifier = {
								value = scope:duel_value
								multiplier = -0.25
							}
							send_interface_toast = {
								title = hunt.4010.a.critical_failure
								left_icon = scope:schemer
								right_icon = scope:targeted_participant
								if = {
									limit = {
										exists = scope:scheme
										scope:scheme = { scheme_type = abduct }
									}
									hard_imprison_character_effect = {
										TARGET = root
										IMPRISONER = scope:schemer
									}
									add_opinion = {
										target = scope:schemer
										modifier = abducted_me_opinion
									}
									hard_imprison_character_effect = {
										TARGET = scope:targeted_participant
										IMPRISONER = scope:schemer
									}
									scope:targeted_participant = {
										add_opinion = {
											target = scope:schemer
											modifier = abducted_me_opinion
										}
									}
								}
								else = {
									unknown_murder_effect = {
										VICTIM = root
										MURDERER = scope:schemer
										REASON = death_hunting_mysterious
									}

									unknown_murder_effect = {
										VICTIM = scope:targeted_participant
										MURDERER = scope:schemer
										REASON = death_hunting_mysterious
									}
								}
							}
						}
					}
				}
			}
		}
		ai_chance = {
			base = 0
			modifier = {
				add = 50
				prowess >= scope:schemer.prowess
			}
		}
	}

	option = { #Let your family member take them on
		name = hunt.4010.b
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_family_defend_log
				score = 25
				tags = { random bad scheme intent }
				character = scope:targeted_participant
				target = scope:schemer

				#Effect
				root = {
					scope:targeted_participant = {
						duel = {
							skill = prowess
							target = scope:schemer
							12 = {
								desc = hunt.4010.b.critical_success
								compare_modifier = {
									value = scope:duel_value
								}
								root = {
									send_interface_toast = {
										title = hunt.4010.b.critical_success
										left_icon = scope:schemer
										right_icon = scope:targeted_participant

										scope:murder_secret = {
											expose_secret = scope:schemer
										}

										scope:schemer = {
											increase_wounds_effect = { REASON = fight }
										}
									}
								}
								hunt_activity_success_change_effect = { CHANGE = increase_medium }
							}
							9 = {
								desc = hunt.4010.b.failure
								compare_modifier = {
									value = scope:duel_value
									multiplier = -0.5
								}
								root = {
									send_interface_toast = {
										title = hunt.4010.b.failure
										left_icon = scope:schemer
										right_icon = scope:targeted_participant

										scope:targeted_participant = {
											increase_wounds_effect = { REASON = fight }
										}
										save_scope_value_as = {
											name = murder_completed
											value = yes
										}
									}
								}
							}
							3 = {
								desc = hunt.4010.b.critical_failure
								compare_modifier = {
									value = scope:duel_value
									multiplier = 0.25
								}
								root = {
									send_interface_toast = {
										title = hunt.4010.b.critical_failure
										left_icon = scope:schemer
										right_icon = scope:targeted_participant
										if = {
											limit = {
												exists = scope:scheme
												scope:scheme = { scheme_type = abduct }
											}
											hard_imprison_character_effect = {
												TARGET = root
												IMPRISONER = scope:schemer
											}
											add_opinion = {
												target = scope:schemer
												modifier = abducted_me_opinion
											}
											hard_imprison_character_effect = {
												TARGET = scope:targeted_participant
												IMPRISONER = scope:schemer
											}
											scope:targeted_participant = {
												add_opinion = {
													target = scope:schemer
													modifier = abducted_me_opinion
												}
											}
										}
										else = {
											unknown_murder_effect = {
												VICTIM = root
												MURDERER = scope:schemer
												REASON = death_hunting_mysterious
											}

											unknown_murder_effect = {
												VICTIM = scope:targeted_participant
												MURDERER = scope:schemer
												REASON = death_hunting_mysterious
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
		ai_chance = {
			base = 0
			modifier = {
				add = 50
				prowess < scope:schemer.prowess
			}
			#More likely the more scared I am of the schemer
			modifier = {
				add = 25
				dread_modified_ai_boldness = {
					dreaded_character = scope:schemer
					value <= -45
				}
			}
			modifier = {
				add = 50
				dread_modified_ai_boldness = {
					dreaded_character = scope:schemer
					value <= -75
				}
			}
		}
	}

	option = { #Call for help
		name = hunt.4010.c
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_murder_help_log
				score = 25
				tags = { random bad scheme intent }
				character = scope:targeted_participant
				target = scope:schemer

				#Effect
				root = {
					add_prestige = medium_prestige_loss

					if = {
						limit = { exists = scope:murder_secret }
						scope:murder_secret = { expose_secret = root }
					}
				}
			}
		}
		ai_chance = {
			base = 0
			modifier = {
				add = 50
				AND = {
					prowess < scope:schemer.prowess
					scope:targeted_participant.prowess < scope:schemer.prowess
				}
			}
			#More likely the more scared I am of the schemer
			modifier = {
				add = 25
				dread_modified_ai_boldness = {
					dreaded_character = scope:schemer
					value <= -45
				}
			}
			modifier = {
				add = 50
				dread_modified_ai_boldness = {
					dreaded_character = scope:schemer
					value <= -75
				}
			}
		}
	}

	option = { #Sacrifice yourself
		name = hunt.4010.d
		trigger = {
			ai_honor >= high_positive_honor
		}
		add_internal_flag = dangerous
		custom_tooltip = hunt.4010.d.tt
		flavor = hunt.4010.d.flavor
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_family_sacrifice_log
				score = 25
				tags = { random bad scheme intent }
				character = scope:targeted_participant
				target = scope:schemer

				#Effect
				root = {
					increase_wounds_effect = { REASON = fight }
					scope:targeted_participant = {
						add_opinion = {
							target = root
							modifier = saved_my_life_opinion
							opinion = 40
						}
					}
					add_hook = {
						target = scope:targeted_participant
						type = saved_my_life_hook
					}
					scope:murder_secret = { expose_secret = root }
				}
			}
		}
		ai_chance = {
			base = 50
			opinion_modifier = {
				opinion_target = scope:targeted_participant
				multiplier = 0.25
			}
		}
	}
	
	after = {
		#If the murder was accomplished, root learns the Secret
		if = {
			limit = { exists = scope:murder_completed }
			scope:schemer = {
				random_secret = {
					limit = {
						secret_type = secret_murder
						secret_target = scope:targeted_participant
					}
					reveal_to_without_events_effect = { CHARACTER = root }
				}
			}
		}
		#Make sure the scheme is exposed
		if = {
			limit = { exists = scope:scheme }
			scope:scheme = { expose_scheme = yes }
		}
	}
}

#######################
#	Your lover has come with, sneak away together
#	by Linnéa Thimrén
#######################

scripted_trigger hunt_4011_lover_trigger = {
	NOT = { this = root }
	is_adult = yes
	is_ai = yes
	has_relation_lover = root
}

hunt.4011 = {
	type = activity_event
	title = hunt.4011.t
	desc = hunt.4011.desc
	theme = seduction
	override_background = { reference = wilderness_activity }
	center_portrait = {
		character = root
		animation = interested
	}
	right_portrait = {
		character = scope:lover_participant
		animation = flirtation
	}
	
	cooldown = { years = 5 }
	
	trigger = {
		exists = scope:activity
		scope:activity = {
			any_attending_character = { hunt_4011_lover_trigger = yes }
		}
	}

	weight_multiplier = {
		base = 0.5
		modifier = { #more likely to fire if no cool characters have joined
			add = 0.5
			scope:activity = {
				NOT = {
					any_attending_character = { is_powerful_vassal_of = root }
				}
			}
		}
	}

	immediate = {
		play_music_cue = "mx_cue_seduction"
		scope:activity.activity_location = { save_scope_as = background_terrain_scope }
		scope:activity = {
			random_attending_character = { #Find your lover!
				limit = { hunt_4011_lover_trigger = yes }
				save_scope_as = lover_participant
			}
		}
	}

	option = { #Go for it
		name = hunt.4011.a
		flavor = hunt.4011.a.tt
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_lover_sneak_key
				score = 25
				tags = { random good social }
				character = root
				target = scope:lover_participant

				#Effect
				root = {
					add_character_modifier = {
						modifier = hunt_fresh_air_and_exercise_modifier
						years = 5
					}
					scope:lover_participant = {
						add_opinion = {
							target = root
							modifier = love_opinion
							opinion = 20
						}
					}
					stress_impact = {
						rakish = medium_stress_impact_loss
						chaste = medium_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 0.5
			}
		}
	}

	option = { #Nah
		name = hunt.4011.b
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_lover_focus_key
				score = 25
				tags = { random good social }
				character = root
				target = scope:lover_participant

				#Effect
				root = {
					add_prestige = minor_prestige_gain
					add_character_modifier = {
						modifier = hunt_focused_attention_modifier
						years = 5
					}
					hunt_activity_success_change_effect = { CHANGE = increase_medium }
					stress_impact = {
						lustful = medium_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 0
			modifier = {
				add = 100
				has_trait = lifestyle_hunter
			}
			ai_value_modifier = {
				ai_honor = 0.25
			}
		}
	}
}

#######################
#	See glimpse of mystical animal
#	by Linnéa Thimrén
#######################

hunt.4012 = {
	type = activity_event
	title = hunt.4012.t
	desc = {
		desc = hunt.4012.desc
		first_valid = {
			triggered_desc = {
				trigger = { scope:host.var:animal_type = flag:leopard }
				desc = hunt.4012.black
			}
			desc = hunt.4012.white	
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = paranoia
	}
	cooldown = { years = 5 }

	trigger = {
		involved_activity.activity_host ?= this
		NOT = {	has_character_flag = had_mystical_animal_story }
		OR = {
			has_trait = lifestyle_hunter
			scope:activity.activity_location.county = { has_county_modifier = hunt_sighting_legendary_modifier }
		}
		trigger_if = {
			limit = {
				scope:activity = {
					has_activity_option = { category = special_type option = hunt_type_legendary }
				}
			}
			exists = scope:activity.var:hunt_outcome_random
		}
		trigger_else = {
			NOT = { exists = scope:activity.var:hunt_outcome_random }
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 0
			has_trait = blind
		}
		modifier = {
			factor = 0.5
			has_trait = one_eyed
		}
		modifier = {
			ek_human_age_equivalent >= 45 #EK EDIT: lifespan
			factor = 0.5
		}
		modifier = {
			add = {
				value = scope:activity.var:hunt_success_chance
				divide = 2
			}
		}
		modifier = {
			factor = 10
			scope:activity.activity_location.county = { has_county_modifier = hunt_sighting_legendary_modifier }
		}
	}

	immediate = {
		save_temporary_scope_as = big_local_game
		if = {
			limit = {
				scope:activity = {
					has_activity_option = { category = special_type option = hunt_type_legendary }
				}
			}
			set_variable = {
				name = animal_type
				value = scope:activity.var:animal_type
			}
		}
		else_if = {
			limit = {
				scope:activity.activity_location.county = { has_county_modifier = hunt_sighting_legendary_modifier }
			}
			set_variable = {
				name = animal_type
				value = scope:activity.activity_location.county.var:animal_type
			}
		}
		else = {
			scope:host = {
				random_list = {
					2 = {
						hunt_activity_standard_game_effect = { PROVINCE = scope:activity.activity_location HUNTER = root }
					}
					2 = {
						hunt_activity_dangerous_game_effect = { PROVINCE = scope:activity.activity_location }
					}
				}
			}
		}
		hunter_progress_point_gain_effect = { CHANGE = 2 RANDOM_CHANGE = 1 }
	}

	option = { #Chase it
		name = {
			text = hunt.4012.a.sighting
			trigger = { 
				scope:activity.activity_location.county = { has_county_modifier = hunt_sighting_legendary_modifier }
			}
		}
		name = {
			text = hunt.4012.a
			trigger = { 
				NOT = {
					scope:activity.activity_location.county = { has_county_modifier = hunt_sighting_legendary_modifier }
				}
			}
		}
		flavor = hunt.4012.a.tt
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_chased_legendary_log
				score = 25
				tags = { neutral random legendary }
				character = root

				# Effect
				root = {
					if = {
						limit = {
							scope:activity = {
								has_activity_option = { category = special_type option = hunt_type_legendary }
							}
						}
						scope:activity = { set_variable = hunt_4013 } # First Legendary hunt
					}
					else = {
						hunt_activity_success_change_effect = { CHANGE = decrease_medium }
						trigger_event = {
							id = hunt.4013
							days = 3
						}
					}
				}
			}
		}
		ai_chance = {
			base = 80
		}
	}

	option = { #Don't chase it
		name = hunt.4012.b
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_left_legendary_log
				score = 25
				tags = { neutral random legendary }
				character = root

				# Effect
				root = {
					if = {
						limit = {
							scope:activity = {
								has_activity_option = { category = special_type option = hunt_type_legendary }
							}
						}
						add_prestige = minor_prestige_loss
					}
					add_character_modifier = {
						modifier = hunt_focused_attention_modifier
						years = 5
					}
					remove_variable = animal_type
					stress_impact = {
						base = medium_stress_impact_loss
						humble = medium_stress_impact_loss
						patient = medium_stress_impact_loss
						ambitious = medium_stress_impact_gain
						stubborn = medium_stress_impact_gain
						arrogant = medium_stress_impact_gain
						lifestyle_hunter = medium_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_rationality = 0.75
			}
		}
	}
}

#######################
#	You do not find the animal
#	by Linnéa Thimrén
#######################

hunt.4013 = {
	type = activity_event
	title = hunt.4012.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					NOT = { this = scope:host }
				}
				desc = hunt.4013.guest
			}
		}
		desc = {
			desc = hunt.4013.desc
			triggered_desc = {
				trigger = { exists = scope:hunt_participant }
				desc = hunt.4013.participant
			}
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = scope:host
		animation = stress
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = worry
	}

	trigger = {
		involved_activity.activity_host ?= this
		exists = var:animal_type
		scope:activity = {
			exists = var:animal_type
			trigger_if = {
				limit = {
					has_activity_option = { category = special_type option = hunt_type_legendary }
				}
				exists = scope:activity.var:hunt_4013 # First Legendary hunt
			}
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			add = {
				value = 100
				subtract = involved_activity.var:hunt_success_chance
			}
		}
	}

	immediate = {
		if = {
			limit = { this = scope:host }
			scope:activity = {
				set_variable = {
					name = hunt_success
					value = flag:no
				}
			}
			hunt_activity_random_subordinate_participant_effect = {
				ARCHETYPE = hunter
				COMBATANT = yes
				SCOPE = hunt_participant
			}
			scope:activity = {
				if = {
					limit = {
						root = { is_ai = no }
						NOT = {
							has_activity_option = { category = special_type option = hunt_type_legendary }
						}
						exists = root.var:animal_type
					}
					activity_location.county = {
						save_scope_as = sighting_county
						# Create new sighting
						hunt_create_sighting_effect = {
							TYPE = legendary
							ANIMAL = root.var:animal_type
							OWNER = root
						}
					}
				}
			}
		}
		if = {
			limit = {
				scope:activity = {
					has_activity_option = { category = special_type option = hunt_type_legendary }
				}
			}
			custom_tooltip = hunt_fails_tt
		}
	}

	option = { #Hmm, did not find it... yet
		name = hunt.4013.a
		flavor = start_hunt_mystical_animal_story_cycle_effect.tt
		trigger = { this = scope:host }
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_legendary_escaped_log
				score = 50
				tags = { random legendary }
				character = root

				# Effect
				root = {
					if = {
						limit = {
							NOT = { has_character_flag = had_mystical_animal_story }
						}
						start_hunt_mystical_animal_story_cycle_effect = yes
					}
					stress_impact = {
						lazy = minor_stress_impact_gain
						forgiving = minor_stress_impact_gain
						fickle = minor_stress_impact_gain
						stubborn = minor_stress_impact_loss
						content = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 75
			ai_value_modifier = {
				ai_energy = 0.5

			}
		}
	}

	option = { #Lie about what you were doing
		name = hunt.4013.b
		trigger = {
			NOT = {
				scope:activity = {
					has_activity_option = { category = special_type option = hunt_type_legendary }
				}
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_legendary_lie_log
				score = 50
				tags = { random legendary }
				character = root

				# Effect
				if = {
					limit = {
						any_attending_character = {
							NOT = { this = root }
							is_alive = yes
						}
					}
					every_attending_character = {
						limit = {
							NOT = { this = root }
							is_alive = yes
						}
						custom = activity_every_attendee_tt
						add_opinion = {
							modifier = respect_opinion
							target = root
							opinion = 10
						}
					}
				}
				root = {
					stress_impact = {
						arrogant = minor_stress_impact_gain
						honest = minor_stress_impact_gain
						ambitious = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_rationality = 0.5
				ai_vengefulness = -0.5
			}
		}
	}

	option = { #You fools!
		name = hunt.4013.c
		trigger = { this = scope:host }
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_legendary_anger_log
				score = 50
				tags = { random legendary }
				character = root

				# Effect
				if = {
					limit = {
						any_attending_character = {
							NOT = { this = root }
							is_alive = yes
						}
					}
					every_attending_character = {
						limit = {
							NOT = { this = root }
							is_alive = yes
						}
						custom = activity_every_attendee_tt
						add_opinion = {
							modifier = hunt_scolded_opinion
							target = root
							opinion = -10
						}
					}
				}		
				root = {
					stress_impact = {
						calm = minor_stress_impact_gain
						patient = minor_stress_impact_gain
						just = minor_stress_impact_gain
						humble = minor_stress_impact_gain
						wrathful = medium_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = 0.5
				ai_vengefulness = 1
			}
		}
	}

	option = { #Forget it
		name = hunt.4013.d
		trigger = {
			this = scope:host
			NOT = { has_character_flag = had_mystical_animal_story }
			scope:activity.activity_location.county = { has_county_modifier = hunt_sighting_legendary_modifier }
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_legendary_forget_log
				score = 50
				tags = { random legendary }
				character = root

				# Effect
				activity_location.county = { hunt_remove_sighting_effect = yes }
				every_attending_character = {
					limit = {
						NOT = { this = root }
						has_trait = lifestyle_hunter
					}
					custom = hunt_every_hunter_attendee_tt
					add_opinion = {
						target = root
						modifier = hunt_bad_hunter_opinion
						opinion = -15
					}
				}
				root = {
					custom_tooltip = hunt.2000.b.tt
					stress_impact = {
						ambitious = minor_stress_impact_gain
						lifestyle_hunter = minor_stress_impact_gain
						stubborn = minor_stress_impact_gain
						arrogant = minor_stress_impact_gain
					}
				}
			}
		}
		trigger_event = hunt.9002
		add_character_flag = disabled_hunt_sightings_flag
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_vengefulness = -1
			}
		}
	}

	after = {	
		remove_variable = animal_type
		scope:activity = {
			if = {
				limit = {
					has_activity_option = { category = special_type option = hunt_type_legendary }
				}
				every_attending_character = {
					limit = {
						NOT = { this = scope:host }
					}
					trigger_event = hunt.4013
				}
			}
		}
	}
}

#######################
#	A guest is injured
#	by Linnéa Thimrén/Joe Parkin
#######################

scripted_trigger hunt_4014_vassal_trigger = {
	is_vassal_of = root
	is_ai = yes
	NOT = {
		has_trait_rank = {
			trait = wounded
			rank >= 2
		}
	}
}

hunt.4014 = { # Guest accident 
	type = activity_event
	title = hunt.4014.t
	desc = {
		desc = hunt.4014.desc
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:branch }
				desc = hunt.4014.branch
			}
			desc = hunt.4014.fall
		}
		triggered_desc = { # Cry out
			trigger = { exists = scope:hunt_care_cry }
			desc = hunt.4014.cry
		}
		first_valid = {
			triggered_desc = { # Dead important
				trigger = {
					exists = scope:hunt_care_cry
					scope:accident_target = { is_alive = no }
				}
				desc = hunt.4014.dead_care
			}
			triggered_desc = { # Dead
				trigger = {
					scope:accident_target = { is_alive = no }
				}
				desc = hunt.4014.dead
			}
			desc = hunt.4014.wounded # Hurt
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				NOT = { this = scope:accident_target }
			}
			animation = shock
		}
		triggered_animation = {
			trigger = { this = scope:accident_target }
			animation = pain
		}
	}
	right_portrait = {
		character = scope:hunt_participant
		triggered_animation = {
			trigger = { this = scope:accident_target }
			animation = pain
		}
		triggered_animation = {
			trigger = {
				NOT = { this = scope:accident_target }
			}
			animation = shock
		}
	}
	center_portrait = {
		trigger = {
			NOT = { scope:physician = scope:accident_target }
		}
		character = scope:physician
		animation = worry
	}

	trigger = { exists = scope:accident_target }

	immediate = {
		hunt_save_physician_effect = yes
		if = {
			limit = { exists = scope:wound }
			hidden_effect = {
				random_list = {
					8 = {
						hunt_wound_apply_effect = { SEVERE = no }
					}
					2 = {
						hunt_wound_apply_effect = { SEVERE = yes }
					}
				}
			}
			scope:activity = {
				add_activity_log_entry = {
					key = hunt_guest_injured_log
					score = 25
					tags = { bad }
					character = scope:hunt_participant

					# Effect
					scope:hunt_participant = { hunt_wound_tooltip_effect = yes }
				}
			}
		}
		else = {
			scope:activity = {
				add_activity_log_entry = {
					key = hunt_guest_died_log
					score = 25
					tags = { bad }
					character = scope:hunt_participant

					# Effect
					scope:hunt_participant = {
						death = { death_reason = death_hunting_accident }
					}
				}	
			}
		}
	}

	option = { #Try to treat vassal
		name = {
			text = hunt.4014.a.physician
			trigger = { has_trait = lifestyle_physician }
		}
		name = {
			text = hunt.4014.a.learning
			trigger = {
				NOR = {
					AND = {
						has_focus = learning_medicine_focus
						learning >= medium_skill_rating
					}
					learning >= high_skill_rating
				}
			}
		}
		name = {
			text = hunt.4014.a
			trigger = {
				OR = {
					AND = {
						has_focus = learning_medicine_focus
						learning >= medium_skill_rating
					}
					learning >= high_skill_rating
				}
			}
		}
		trigger = {
			scope:accident_target = { is_alive = yes }
		}
		skill = learning
		trait = lifestyle_physician
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_guest_treated_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:accident_target

				#Effect
				root = {
					hunt_activity_success_change_effect = { CHANGE = decrease_medium }
					add_character_modifier = {
						modifier = hunt_treated_injury_modifier
						years = 5
					}
					add_learning_lifestyle_xp = major_lifestyle_xp
					duel = {
						skill = learning
						value = medium_skill_rating
						20 = {
							compare_modifier = {
								value = scope:duel_value
								multiplier = 3.5
								min = 5
							}
							modifier = {
								has_trait = lifestyle_physician
								factor = 2
							}
							desc = hunt.4014.a.success
							send_interface_toast = {
								title = hunt.4014.a.success
								left_icon = scope:accident_target
								if = {
									limit = {
										NOR = {
											AND = {
												has_focus = learning_medicine_focus
												learning >= medium_skill_rating
											}
											learning >= high_skill_rating
										}
									}
									scope:accident_target = {
										add_character_modifier = {
											modifier = hunt_treated_wound_modifier
											years = 5
										}
									}
								}
								else = {
									scope:accident_target = {
										change_trait_rank = {
											trait = wounded
											rank = -1
											max = 1
										}
									}
								}
								activity_improve_relations_intent_effect = {
									CHARACTER = scope:accident_target
									REASON = friend_hunt_wound_treated_reason
									OPINION = 15
									MODIFIER = hunt_treated_wound_opinion
								}
							}
						}
						35 = {
							compare_modifier = {
								value = scope:duel_value
								multiplier = -3.5
								min = 5
							}
							modifier = {
								factor = 0.5
								has_trait = lifestyle_physician
							}
							desc = hunt.4014.a.failure
							scope:host = {
								send_interface_toast = {
									title = hunt.4014.a.failure
									left_icon = scope:accident_target
									scope:accident_target = {
										add_character_modifier = { modifier = infected_wound_modifier }
										add_opinion = {
											target = root
											modifier = failed_to_treat_me_opinion
											opinion = -15
										}
									}
								}
							}
						}
					}
				}
			}
		}		
		stress_impact = {
			sadistic = minor_stress_impact_gain
			callous = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			opinion_modifier = {
				opinion_target = scope:accident_target
				multiplier = 0.25
			}
			ai_value_modifier = {
				ai_compassion = 0.75
				ai_energy = 0.5
			}
		}
	}

	option = { #Give time to recover
		name = {
			text = hunt.4014.b
			trigger = {
				trigger_if = {
					limit = { exists = scope:physician }
					NOT = { scope:wounded_courtier = scope:physician }
				}				
			}
		}
		name = {
			text = hunt.4014.b.physician
			trigger = {
				trigger_if = {
					limit = { exists = scope:physician }
					NOT = { scope:wounded_courtier = scope:physician }
				}
				trigger_else = { always = no }
			}
		}
		trigger = {
			scope:accident_target = { is_alive = yes }
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_guest_waited_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:accident_target

				#Effect
				root = {
					hunt_activity_success_change_effect = { CHANGE = decrease_major }
					activity_improve_relations_intent_effect = {
						CHARACTER = scope:accident_target
						REASON = friend_hunt_wound_waited_reason
						OPINION = 15
						MODIFIER = hunt_waited_opinion
					}
					stress_impact = {
						callous = medium_stress_impact_gain
						sadistic = medium_stress_impact_gain
						impatient = medium_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 50
			opinion_modifier = {
				opinion_target = scope:accident_target
				multiplier = 0.5
			}
			modifier = {
				factor = 2
				activity_befriend_woo_trigger = { CHARACTER = scope:accident_target }
			}
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_honor = 0.5
				ai_boldness = -1
				ai_energy = -1
			}
		}
	}

	option = { #Call physician
		name = hunt.4014.c
		trigger = {
			exists = scope:physician
			NOT = { scope:accident_target = scope:physician }
			scope:severe = no
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_trap_physician_log
				score = 25
				tags = { random bad }
				character = scope:accident_target
				target = scope:physician

				#Effect
				root = {
					if = {
						limit = { exists = scope:activity.var:accident_target }
						save_scope_as = patient
					}
					else = {
						scope:wounded_courtier = { save_scope_as = patient }
					}
					hunt_physician_treatment_effect = yes
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_energy = -0.5
				ai_boldness = -0.5
				ai_rationality = 1
			}
		}
	}

	option = { #Continue hunt
		name = hunt.4014.d
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_guest_continue_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:accident_target

				#Effect
				root = {
					if = {
						limit = {
							exists = scope:accident_target
							scope:accident_target = { is_alive = yes }
						}
						scope:accident_target = {
							add_opinion = {
								target = root
								modifier = hunt_left_behind_opinion
								opinion = -15
							}
							remove_from_activity = scope:activity
						}
					}
					scope:activity = {
						if = {
							limit = {
								exists = var:participant_to_use
								var:participant_to_use = scope:accident_target
							}
							remove_variable = participant_to_use
						}
					}
					stress_impact = {
						compassionate = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 30
				has_trait = lifestyle_hunter
			}
			modifier = {
				add = 40
				OR = {
					has_trait = impatient
					has_trait = callous
					has_trait = sadistic
					opinion = {
						target = scope:accident_target
						value <= -10
					}
				}
			}
			ai_value_modifier = {
				ai_honor = -0.5
				ai_energy = 0.5
				ai_boldness = 1
			}
		}
	}

	option = { #End hunt (courtier death)
		name = hunt.4014.e
		scope:activity = {
			set_variable = {
				name = hunt_invalidated_flavor
				value = scope:accident_target
			}
			if = {
				limit = {
					scope:accident_target = { is_alive = no }
				}
				set_variable = {
					name = hunt_invalidated
					value = flag:death
				}
			}
			else = {
				set_variable = {
					name = hunt_invalidated
					value = flag:wound
				}
			}
			add_activity_log_entry = {
				key = hunt_guest_ended_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:accident_target

				#Effect
				root = {
					stress_impact = {
						lifestyle_hunter = minor_stress_impact_gain
						callous = minor_stress_impact_gain
						arbitrary = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 30
				NOT = { has_trait = lifestyle_hunter }
			}
			ai_value_modifier = {
				ai_honor = 1
				ai_compassion = 1
				ai_boldness = -0.5
			}
		}
	}
}

hunt.4910 = { # Pre-event requried to determine outcomes for tooltips
	hidden = yes
	
	trigger = {
		hunt_story_trigger = { STORY = chase }
		scope:activity = {
			OR = {
				AND = {
					exists = var:participant_to_use
					var:participant_to_use = { is_alive = yes }
				}
				any_attending_character = {
					NOT = { this = root }
				}
			}			
		}
	}

	weight_multiplier = {
		base = 0.5
		modifier = { #more likely to fire if a cool character has joined
			add = 0.5
			scope:activity = {
				any_attending_character = {
					is_of_major_interest_trigger = { CHARACTER = root }
				}
			}
		}
		modifier = {
			factor = 2
			has_character_flag = dangerous_road
		}
	}

	immediate = {		
		scope:activity = {
			hidden_effect = {
				random_list = {
					20 = {
						trigger = {
							activity_location = {
								OR = {
									terrain = forest
									terrain = taiga
									terrain = jungle
								}
							}
						}
						save_scope_as = branch
					}
					10 = {}
				}
			}
			if = {
				limit = {
					exists = var:participant_to_use
					var:participant_to_use = { is_alive = yes }
				}
				var:participant_to_use = { save_scope_as = accident_target }
			}
			else = {
				hunt_activity_random_interest_participant_effect = {
					ARCHETYPE = hunter
					COMBATANT = yes
					SCOPE = hunt_participant
				}
			}
		}
		hidden_effect = {
			random_list = {
				2 = { # Guest accident
					trigger = { exists = scope:hunt_participant }
					modifier = {
						factor = 0.5
						scope:hunt_participant = {
							has_trait = tourney_participant
							has_trait_xp = {
								trait = tourney_participant
								track = horse
								value >= 25
							}
						}
					}
					modifier = {
						factor = 0.5
						scope:hunt_participant = { has_trait = lifestyle_hunter }
					}
					modifier = {
						factor = 0.5
						scope:hunt_participant = {
							has_trait = lifestyle_hunter
							has_trait_xp = {
								trait = lifestyle_hunter
								track = hunter
								value >= 25
							}
						}
					}
					modifier = {
						add = {
							value = 0
							subtract = scope:hunt_participant.prowess
						}
					}					
					scope:hunt_participant = {
						save_scope_as = accident_target
						scope:activity = {
							set_variable = { name = accident_target value = scope:accident_target }
						}
						if = {
							limit = {
								OR = {
									is_close_family_of = scope:host
									has_relation_friend = scope:host
									has_relation_lover = scope:host
									is_consort_of = scope:host
								}
							}
							save_scope_as = hunt_care_cry
						}
						random_list = {
							8 = {
								trigger = {
									NOT = {
										has_trait_rank = { trait = wounded rank = 3 }
									}
								}
								modifier = {
									factor = 0.5
									has_trait = tourney_participant
									has_trait_xp = {
										trait = tourney_participant
										track = horse
										value >= 25
									}
								}
								modifier = {
									factor = 0.5
									has_trait = lifestyle_hunter
								}
								modifier = {
									add = {
										value = 0
										subtract = prowess
									}
								}
								hunt_wound_select_effect = yes
							}
							2 = {}
						}
					}
					trigger_event = hunt.4014
				}
				2 = { # Host accident
					modifier = {
						factor = 0.5
						has_trait = tourney_participant
						has_trait_xp = {
							trait = tourney_participant
							track = horse
							value >= 25
						}
					}
					modifier = {
						factor = 0.5
						has_trait = lifestyle_hunter
					}
					modifier = {
						factor = 0.5
						has_trait = lifestyle_hunter
						has_trait_xp = {
							trait = lifestyle_hunter
							track = hunter
							value >= 25
						}
					}
					modifier = {
						add = {
							value = 0
							subtract = prowess
						}
					}
					save_scope_as = accident_target
					scope:activity = {
						set_variable = { name = accident_target value = scope:accident_target }
					}
					random_list = {
						8 = { # Host is wounded
							trigger = {
								NOT = {
									has_trait_rank = {
										trait = wounded
										rank = 3
									}
								}
							}							
							hunt_wound_select_effect = yes							
						}		
						2 = {} # Host outright dies
					}
					trigger_event = hunt.4911
				}
			}
		}
	}
}

hunt.4911 = { # Host accident
	type = activity_event
	title = hunt.4014.t
	desc = {
		desc = hunt.4014.desc
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:branch }
				desc = hunt.4014.branch_host
			}
			desc = hunt.4014.fall_host
		}
		first_valid = { # Dead or alive
			triggered_desc = {
				trigger = {
					is_alive = no
					NOT = { exists = scope:hunt_participant }
				}
				desc = hunt.4014.dead_host
			}
			desc = hunt.4014.wounded_host
		}
		first_valid = { # Courtier mention
			triggered_desc = {
				trigger = {
					is_alive = no
					exists = scope:hunt_participant
				}
				desc = hunt.4014.dead_host_courtier
			}
			triggered_desc = {
				trigger = { exists = scope:hunt_participant }
				desc = hunt.4014.wounded_host_courtier
			}
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				NOT = { this = scope:accident_target }
			}
			animation = shock
		}
		triggered_animation = {
			trigger = { this = scope:accident_target }
			animation = pain
		}
	}
	right_portrait = {
		character = scope:hunt_participant
		triggered_animation = {
			trigger = { this = scope:accident_target }
			animation = pain
		}
		triggered_animation = {
			trigger = {
				NOT = { this = scope:accident_target }
			}
			animation = shock
		}
	}
	center_portrait = {
		character = scope:physician
		animation = worry
	}

	trigger = { exists = scope:accident_target }

	immediate = {
		hunt_save_physician_effect = yes
		if = {
			limit = { exists = scope:wound }
			scope:accident_target = {
				hidden_effect = {
					random_list = {
						8 = {
							hunt_wound_apply_effect = { SEVERE = no }
						}
						2 = {
							hunt_wound_apply_effect = { SEVERE = yes }
						}
					}
				}
			}
			scope:activity = {
				add_activity_log_entry = {
					key = hunt_guest_injured_log
					score = 25
					tags = { bad }
					character = root

					# Effect
					root = { hunt_wound_tooltip_effect = yes }
				}
			}
		}
		else = {
			scope:activity = {
				add_activity_log_entry = {
					key = hunt_guest_died_log
					score = 25
					tags = { bad }
					character = root

					# Effect
					root = {
						death = { death_reason = death_hunting_accident }
					}
				}	
			}
		}
	}

	option = { #Call physician
		name = hunt.4014.c.host
		trigger = {
			scope:accident_target = { is_alive = yes }
			exists = scope:physician
			scope:severe = no
		}
		save_scope_as = patient
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_host_physician_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:physician

				#Effect
				root = {
					hunt_physician_treatment_effect = yes
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_energy = -0.5
				ai_boldness = -0.5
				ai_rationality = 1
			}
		}
	}

	option = { #Continue hunt (wounded host)
		name = hunt.4014.f
		trigger = {
			is_alive = yes			
			scope:severe = no
		}
		flavor = hunt.4014.f.flavor
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_host_continue_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					add_prestige = minor_prestige_gain
					hunt_activity_success_change_effect = { CHANGE = increase_medium }
					stress_impact = {
						craven = minor_stress_impact_gain
						humble = minor_stress_impact_gain
						fickle = minor_stress_impact_gain
						lazy = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_energy = 1
				ai_boldness = 0.5
				ai_rationality = -0.5
			}
		}
	}

	option = { #End hunt (wounded host)
		name = hunt.4014.g
		trigger = { is_alive = yes }
		flavor = hunt.4014.g.flavor
		scope:activity = {
			set_variable = {
				name = hunt_invalidated
				value = flag:wounded
			}
			set_variable = {
				name = hunt_invalidated_flavor
				value = root
			}
			add_activity_log_entry = {
				key = hunt_host_ended_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					custom_tooltip = hunt_ends_tt
					stress_impact = {
						brave = minor_stress_impact_gain
						arrogant = minor_stress_impact_gain
						stubborn = minor_stress_impact_gain
						diligent = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_energy = -0.5
				ai_boldness = -0.5
				ai_rationality = 1
			}
		}
	}

	option = { #Died
		name = {
			trigger = { exists = scope:physician }
			text = hunt.4014.h.physician
		}
		name = {
			trigger = {
				NOT = { exists = scope:physician }
			}
			text = hunt.4014.h
		}
		trigger = { is_alive = no }
		custom_tooltip = hunt_ends_tt
	}
}

#######################
#	You walk in (out?) on lovers
#	by Linnéa Thimrén
#######################

scripted_trigger hunt_4015_basic_check_trigger = {
	NOR = {
		this = root
		has_relation_lover = root
		has_relation_soulmate = root
		is_consort_of = root
		is_close_or_extended_family_of = root
		has_trait = chaste
		has_trait = celibate
	}
	is_adult = yes
	is_ai = yes
	trigger_if = {
		limit = {
			OR = {
				is_married = yes
				is_concubine = yes
			}
		}
		might_cheat_on_every_partner_trigger = yes
	}
}

scripted_trigger hunt_4015_secret_trigger = {
	any_secret = {
		secret_type = secret_lover
		NOT = { is_known_by = root }
		secret_target = {
			hunt_4015_basic_check_trigger = yes
			is_participant_in_activity = scope:activity
		}
	}
}

hunt.4015 = {
	type = activity_event
	title = hunt.4015.t
	desc = hunt.4015.desc
	theme = hunt_activity
	left_portrait = {
		character = scope:lover_participant
		animation = flirtation
	}
	right_portrait = {
		character = scope:second_lover_participant
		animation = happiness
	}
	
	trigger = {
		scope:activity = {
			OR = { #Either two that are already lovers, or a lustful one that can pick someone up
				any_attending_character = {
					hunt_4015_basic_check_trigger = yes
					hunt_4015_secret_trigger = yes
				}
				any_attending_character = {
					hunt_4015_basic_check_trigger = yes
					OR = {
						has_trait = lustful
						has_trait = rakish
						has_trait = seducer
					}
					save_temporary_scope_as = lover_check
					scope:activity = {
						any_attending_character = {
							hunt_4015_basic_check_trigger = yes
							NOT = { this = scope:lover_check }
							save_temporary_scope_as = lover_check_2
							matching_gender_and_sexuality_trigger = { CHARACTER_1 = scope:lover_check_2 CHARACTER_2 = scope:lover_check }
							can_set_relation_lover_trigger = { CHARACTER = scope:lover_check }
							scope:lover_check.attraction >= medium_positive_attraction
						}
					}
				}
			}
		}
	}

	weight_multiplier = {
		base = 0.50
		modifier = { #more likely to fire if two participants already are lovers
			add = 0.75
			scope:activity = {
				any_attending_character = {
					hunt_4015_basic_check_trigger = yes
					hunt_4015_secret_trigger = yes
				}
			}
		}
	}

	immediate = {
		scope:activity = {
			if = { #They're already lovers
				limit = {
					any_attending_character = {
						hunt_4015_basic_check_trigger = yes
						hunt_4015_secret_trigger = yes
					}
				}
				random_attending_character = { #Find your vassal
					limit = { #They are already lovers
						hunt_4015_basic_check_trigger = yes
						hunt_4015_secret_trigger = yes
					}
					save_scope_as = lover_participant
				}
				random_attending_character = {
					limit = { #They are already lovers
						hunt_4015_basic_check_trigger = yes
						NOT = { this = scope:lover_participant }
						any_secret = {
							secret_type = secret_lover
							NOT = { is_known_by = root }
							secret_target = {
								this = scope:lover_participant
							}
						}
					}
					save_scope_as = second_lover_participant

					#To save the secret's scope
					if = {
						limit = {
							any_secret = {
								secret_type = secret_lover
								secret_target = {
									this = scope:lover_participant
									hunt_4015_basic_check_trigger = yes
								}
								NOT = { is_known_by = root }
							}
						}
						random_secret = {
							limit = {
								secret_type = secret_lover
								secret_target = {
									this = scope:lover_participant
									hunt_4015_basic_check_trigger = yes
								}
								NOT = { is_known_by = root }
							}
							save_scope_as = secret
						}
					}
				}
			}
			else = { #We make em lovers
				random_attending_character = { #Find your vassal
					limit = {
						hunt_4015_basic_check_trigger = yes
						OR = {
							has_trait = lustful
							has_trait = rakish
							has_trait = seducer
						}
						save_temporary_scope_as = lover_check
						scope:activity = {
							any_attending_character = {
								hunt_4015_basic_check_trigger = yes
								NOT = { this = scope:lover_check }
								save_temporary_scope_as = lover_check_2
								matching_gender_and_sexuality_trigger = { CHARACTER_1 = scope:lover_check_2 CHARACTER_2 = scope:lover_check }
								can_set_relation_lover_trigger = { CHARACTER = scope:lover_check }
								scope:lover_check.attraction >= medium_positive_attraction
							}
						}
					}
					save_scope_as = lover_participant
				}
				random_attending_character = {
					limit = {
						hunt_4015_basic_check_trigger = yes
						NOT = { this = scope:lover_participant }
						save_temporary_scope_as = lover_check_2
						matching_gender_and_sexuality_trigger = { CHARACTER_1 = scope:lover_check_2 CHARACTER_2 = scope:lover_check }
						can_set_relation_lover_trigger = { CHARACTER = scope:lover_participant }
					}
					save_scope_as = second_lover_participant

					#To make them lovers
					hidden_effect = { set_relation_lover = scope:lover_participant }
					
					#To save the secret's scope
					if = {
						limit = {
							any_secret = {
								secret_type = secret_lover
								secret_target = {
									this = scope:lover_participant
									hunt_4015_basic_check_trigger = yes
								}
								NOT = { is_known_by = root }
							}
						}
						random_secret = {
							limit = {
								secret_type = secret_lover
								secret_target = {
									this = scope:lover_participant
									hunt_4015_basic_check_trigger = yes
								}
								NOT = { is_known_by = root }
							}
							save_scope_as = secret
						}
					}
				}
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_lover_secret_log
				score = 25
				tags = { random social neutral }
				character = scope:lover_participant
				target = scope:second_lover_participant

				# Effect
				show_as_tooltip = {
					scope:secret = { reveal_to = root }
				}
			}
		}
		if = {
			limit = {
				exists = scope:secret
				scope:secret = {
					NOT = { is_known_by = root }
				}
			}
			scope:secret = {
				reveal_to_without_events_effect = {
					CHARACTER = root
				}
			}
		}
	}

	option = { #Keep the secret
		name = hunt.4015.a
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_lover_secret_log
				score = 25
				tags = { random social neutral }
				character = scope:lover_participant
				target = scope:second_lover_participant

				# Effect
				root = {
					reverse_add_opinion = {
						target = scope:lover_participant
						modifier = grateful_opinion
						opinion = 15
					}
					reverse_add_opinion = {
						target = scope:second_lover_participant
						modifier = grateful_opinion
						opinion = 15
					}
					stress_impact = {
						honest = minor_stress_impact_gain
						contrite = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_compassion = 0.5
			}
			modifier = {
				add = 20
				OR = {
					has_relation_lover = scope:lover_participant
					has_relation_lover = scope:second_lover_participant
				}
			}
		}
	}

	option = { #Expose the secret
		name = hunt.4015.b
		trigger = { exists = scope:secret } # Chance of Secret invalidating
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_lover_secret_log
				score = 25
				tags = { random social neutral }
				character = scope:lover_participant
				target = scope:second_lover_participant
				
				#Effect
				scope:secret = {
					expose_secret = root
				}
				root = {
					stress_impact = {
						honest = minor_stress_impact_loss
						just = minor_stress_impact_loss
						contrite = minor_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				add = 30
				OR = {
					has_trait = just
					has_trait = zealous
					has_trait = celibate
				}
			}
			ai_value_modifier = {
				ai_honor = 0.25
				ai_vengefulness = 0.25
			}
		}
	}

	option = { #Join in - relationship or seducer trait
		name = {
			trigger = {
				has_relation_lover = scope:lover_participant
				has_relation_lover = scope:second_lover_participant
			}
			text = hunt.4015.c_4
		}
		name = {
			trigger = {
				has_relation_lover = scope:lover_participant
			}
			text = hunt.4015.c_1
		}
		name = {
			trigger = {
				has_relation_lover = scope:second_lover_participant
			}
			text = hunt.4015.c_2
		}
		name = {
			trigger = {
				NOR = {
					has_relation_lover = scope:lover_participant
					has_relation_lover = scope:second_lover_participant
				}
			}
			text = hunt.4015.c_3
		}
		trigger = {
			OR = {
				AND = { #you only feel ok about it if you're lustful
					OR = {
						has_relation_lover = scope:lover_participant
						has_relation_lover = scope:second_lover_participant
					}
					has_trait = lustful
				}
				has_trait = seducer
			}
		}
		trait = seducer
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_lover_secret_join_log
				score = 25
				tags = { random social neutral }
				character = scope:lover_participant
				target = scope:second_lover_participant
				
				#Effect
				root = {
					if = {
						limit = {
							has_relation_potential_lover = scope:lover_participant
							can_set_relation_lover_trigger = { CHARACTER = scope:lover_participant }
						}
						set_relation_lover = scope:lover_participant
					}
					else_if = {
						limit = { has_relation_lover = scope:lover_participant }
						scope:lover_participant = {
							add_opinion = {
								modifier = pleased_opinion
								target = root
								opinion = 20
							}
						}
					}
					else = { set_relation_potential_lover = scope:lover_participant }
					if = {
						limit = {
							has_relation_potential_lover = scope:second_lover_participant
							can_set_relation_potential_lover_trigger = { CHARACTER = scope:second_lover_participant }
						}
						set_relation_lover = scope:second_lover_participant
					}
					else_if = {
						limit = { has_relation_lover = scope:second_lover_participant }
						scope:second_lover_participant = {
							add_opinion = {
								modifier = pleased_opinion
								target = root
								opinion = 20
							}
						}
					}
					else = { set_relation_potential_lover = scope:second_lover_participant }
					hunt_activity_success_change_effect = { CHANGE = decrease_minor }
					stress_impact = {
						base = minor_stress_impact_loss
						rakish = minor_stress_impact_loss
						lustful = minor_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 75
			modifier = {
				add = 30
				has_trait = lustful
			}
		}
	}

	option = { #Betrayed!!
		name = {
			trigger = {
				OR = {
					AND = {
						has_relation_lover = scope:second_lover_participant
						opinion = {
							target = scope:second_lover_participant
							value >= 70
						}
						NOT = { has_trait = lustful }
					}
					has_relation_soulmate = scope:second_lover_participant
				}
			}
			text = hunt.4015.d
		}
		name = {
			trigger = {
				OR = {
					AND = {
						has_relation_lover = scope:lover_participant
						opinion = {
							target = scope:lover_participant
							value >= 70
						}
						NOT = { has_trait = lustful }
					}
					has_relation_soulmate = scope:lover_participant
				}
			}
			text = hunt.4015.d_2
		}
		trigger = { #Either you are soulmates, or you like them very much
			OR = {
				OR = {
					AND = {
						has_relation_lover = scope:lover_participant
						opinion = {
							target = scope:lover_participant
							value >= 70
						}
						NOT = { has_trait = lustful }
					}
					has_relation_soulmate = scope:lover_participant
				}
				OR = {
					AND = {
						has_relation_lover = scope:second_lover_participant
						opinion = {
							target = scope:second_lover_participant
							value >= 70
						}
						NOT = { has_trait = lustful }
					}
					has_relation_soulmate = scope:second_lover_participant
				}
			}
		}
		if = {
			limit = {
				OR = {
					AND = {
						has_relation_lover = scope:lover_participant
						opinion = {
							target = scope:lover_participant
							value >= 70
						}
						NOT = { has_trait = lustful }
					}
					has_relation_soulmate = scope:lover_participant
				}
			}
			scope:lover_participant = { save_scope_as = betraying_lover }
		}
		else = {
			scope:second_lover_participant = { save_scope_as = betraying_lover }
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_lover_secret_log
				score = 25
				tags = { random social bad }
				character = scope:lover_participant
				target = scope:second_lover_participant
				
				#Effect
				root = {
					remove_relation_lover = scope:betraying_lover
					hunt_activity_success_change_effect = { CHANGE = decrease_minor }
				}
			}
		}
		ai_chance = {
			base = 100
		}
	}

	option = { #Oh come on, we have a hunt to focus on!
		name = hunt.4015.e
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_lover_secret_log
				character = scope:lover_participant
				target = scope:second_lover_participant
				
				#Effect
				root = {
					hunt_activity_success_change_effect = { CHANGE = increase_minor }
					stress_impact = {
						just = minor_stress_impact_gain
						diligent = minor_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_energy = 0.5
			}
			modifier = {
				add = 20
				NOR = {
					has_relation_lover = scope:lover_participant
					has_relation_lover = scope:second_lover_participant
				}
			}
		}
	}
}

#######################
#	You fake a catch
#	by Linnéa Thimrén
#######################

hunt.4016 = {
	type = activity_event
	title = hunt.4016.t
	desc = hunt.4016.desc
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = stress
	}

	trigger = {
		scope:activity = {
			trigger_if = {
				limit = { exists = var:hunt_success }
				var:hunt_success ?= flag:no
			}
			OR = {
				var:animal_type ?= flag:hare
				var:animal_type ?= flag:fox
				var:animal_type ?= flag:stag
				var:animal_type ?= flag:antelope
				var:animal_type ?= flag:roe
				var:animal_type ?= flag:gazelle
				#EK ADDITION
				var:animal_type ?= flag:ringtail
				var:animal_type ?= flag:ash_hopper
				var:animal_type ?= flag:badger
				# EK ADDITION
			}
		}
	}


	weight_multiplier = {
		base = 0.25
		modifier = { #more likely to fire if you're sneaky or lazy
			add = 0.75
			OR = {
				has_trait = deceitful
				has_focus = intrigue_skulduggery_focus
				has_trait = schemer
				intrigue >= high_skill_rating
				has_trait = lazy
			}
		}
	}

	option = { #Buy a catch and fake it - Guaranteed success if you're good
		name = hunt.4016.a
		trigger = {
			OR = {
				has_trait = schemer
				intrigue >= high_skill_rating
			}
			short_term_gold >= activity_minor_gold_value
		}
		trait = schemer
		skill = intrigue
		show_as_unavailable = {
			OR = {
				has_trait = schemer
				intrigue >= high_skill_rating
			}
			short_term_gold < activity_medium_gold_value
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_fake_bought_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					remove_short_term_gold = activity_minor_gold_value

					add_prestige = medium_prestige_gain
					add_character_modifier = {
						modifier = modifier_hunt_hunting_trophy
						years = 5
					}

					stress_impact = {
						honest = medium_stress_impact_gain
					}
				}
			}
		}
		
		ai_chance = {
			base = 50
			modifier = {
				add = 30
				OR = {
					has_trait = deceitful
					has_focus = intrigue_skulduggery_focus
					has_trait = schemer
					intrigue >= high_skill_rating
					has_trait = lazy
				}
			}
			ai_value_modifier = {
				ai_energy = -0.5
			}
		}
	}

	option = { #Buy a catch and fake it
		name = hunt.4016.a
		trigger = {
			NOR = {
				has_trait = schemer
				intrigue >= high_skill_rating
			}
			short_term_gold >= activity_minor_gold_value
		}
		show_as_unavailable = {
			NOR = {
				has_trait = schemer
				intrigue >= high_skill_rating
			}
			short_term_gold < activity_medium_gold_value
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_fake_bought_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					remove_short_term_gold = activity_minor_gold_value

					duel = {
						skill = intrigue
						value = 10
						35 = {
							desc = hunt.4016.b.success
							compare_modifier = {
								value = scope:duel_value
								multiplier = 0.5
							}
							send_interface_toast = {
								title = hunt.4016.b.success
								left_icon = root
								custom_tooltip = hunt.4016.b.tt
								scope:activity = {
									set_variable = {
										name = hunt_success
										value = flag:yes
									}
								}
							}
						}
						10 = {
							desc = hunt.4016.b.failure
							send_interface_toast = {
								title = hunt.4016.b.failure
								left_icon = root
								add_prestige = medium_prestige_loss
								scope:activity = {
									set_variable = {
										name = hunt_success
										value = flag:no
									}
								}
							}
						}
					}

					stress_impact = {
						honest = medium_stress_impact_gain
					}
				}
			}
		}

		ai_chance = {
			base = 50
			modifier = {
				add = 30
				OR = {
					has_trait = deceitful
					has_focus = intrigue_skulduggery_focus
					has_trait = schemer
					intrigue >= high_skill_rating
					has_trait = lazy
				}
			}
			ai_value_modifier = {
				ai_energy = -0.5
			}
		}
	}

	option = { #Nah
		name = hunt.4016.c
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_fake_truth_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					add_character_modifier = {
						modifier = hunt_chose_truth_modifier
						years = 5
					}
					stress_impact = {
						honest = medium_stress_impact_loss
						arrogant = minor_stress_impact_gain
						deceitful = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_honor = 0.5
			}
		}
	}
}

#######################
#	You get the mystical white animal!!
#	by Linnéa Thimrén
#######################

hunt.4017 = {
	type = activity_event
	title = hunt.4012.t
	desc = hunt.4017.desc
	theme = hunt_activity
	left_portrait = root
	
	trigger = {
		has_character_flag = had_mystical_animal_story
		any_owned_story = {
			story_type = story_cycle_hunt_mystical_animal
			OR = {
				var:legendary_county = {
					OR = {
						this = root.location.county
						any_neighboring_county = { this = root.location.county }
					}
				}
			}
		}
		exists = scope:activity.var:hunt_4017 # Found animal in 4018
	}

	weight_multiplier = {
		base = 1
		modifier = {
			add = 1
			any_owned_story = {
				story_type = story_cycle_hunt_mystical_animal
				exists = var:encounters
				var:encounters >= 4
				NOT = { exists = var:killing_animal }
			}
		}
		modifier = {
			exists = involved_activity.var:hunt_success_chance
			involved_activity = {
				has_activity_option = { category = special_type option = hunt_type_legendary }
			}
			add = involved_activity.var:hunt_success_chance
		}
	}

	immediate = {
		play_music_cue = "mx_cue_touching_moment"
		scope:activity = {
			set_variable = {
				name = hunt_success
				value = flag:yes
			}
		}
		random_owned_story = {
			limit = {
				story_type = story_cycle_hunt_mystical_animal
				exists = var:encounters
				var:encounters >= 3
			}
			save_scope_as = story
			set_variable = { #To safeguard against events from the story cycle itself triggering at the same time as this goes down
				name = killing_animal
				value = yes
			}
		}
		set_variable = {
			name = animal_type
			value = scope:story.var:animal_type
		}
		scope:activity = {
			set_variable = {
				name = animal_type
				value = scope:story.var:animal_type
			}
		}
	}

	option = { #Take the shot
		name = {
			# EK EDIT
			trigger = {
				NOT = {	
					scope:activity.var:animal_type = flag:hare 
					scope:activity.var:animal_type = flag:ringtail
					scope:activity.var:animal_type = flag:ash_hopper
				}
			}
			# trigger = {
			# 	NOT = {	scope:activity.var:animal_type = flag:hare }
			# }
			text = hunt.1003.a
		}
		name = {
			# EK EDIT
			trigger = {
				OR = {	
					scope:activity.var:animal_type = flag:hare 
					scope:activity.var:animal_type = flag:ringtail
					scope:activity.var:animal_type = flag:ash_hopper
				}
			}
			#trigger = { scope:activity.var:animal_type = flag:hare }
			text = hunt.1003.a.small
		}
		flavor = hunt.1003.a.flavor
		trigger = {
			can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			NOT = {
				hunt_animal_type_dangerous_trigger = { VAR = var:animal_type }
			}
		}		
		# Duel
		hunt_animal_bow_kill_effect = { DEATH = no VAR = scope:activity.var:animal_type }
		# Opinion
		hunt_dharmic_pacificism_effect = yes
		# Stress
		hunt_humble_hunter_stress_effect = yes
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_boldness = 0.5
				ai_energy = 0.5
				ai_greed = 0.5
			}
		}
	}

	option = { #The kill is mine!
		name = {
			trigger = {
				# EK EDIT
				NOT = {	
					scope:activity.var:animal_type = flag:fox 
					scope:activity.var:animal_type = flag:badger
				}
				#NOT = {	scope:activity.var:animal_type = flag:fox }
			}
			text = hunt.1003.b
		}
		name = {
			# EK EDIT
			trigger = { 
				OR = {
					scope:activity.var:animal_type = flag:fox 
					scope:activity.var:animal_type = flag:badger
				}
			}
			#trigger = { scope:activity.var:animal_type = flag:fox }
			text = hunt.1003.b.small
		}
		flavor = hunt.1003.b.flavor
		trigger = {
			# EK EDIT
			NOT = { 
				scope:activity.var:animal_type = flag:hare 
				scope:activity.var:animal_type = flag:ringtail
				scope:activity.var:animal_type = flag:ash_hopper
			}
			#NOT = { scope:activity.var:animal_type = flag:hare }
			can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
		}		
		# Duel
		hunt_animal_melee_kill_effect = { DEATH = yes VAR = scope:activity.var:animal_type }
		# Opinion
		hunt_dharmic_pacificism_effect = yes
		# Stress
		hunt_humble_hunter_stress_effect = yes
		if = {
			limit = { is_alive = yes }
			stress_impact = {
				craven = minor_stress_impact_gain
				arrogant = minor_stress_impact_loss
				ambitious = minor_stress_impact_loss
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_boldness = 0.5
				ai_energy = 0.5
				ai_greed = 0.5
			}
		}
	}

	option = { #Group kill
		name = hunt.1003.e
		trigger = {
			NOR = {
				var:animal_type ?= flag:fox
				var:animal_type ?= flag:hare
				#EK ADDITION
				var:animal_type ?= flag:ringtail
				var:animal_type ?= flag:ash_hopper
				var:animal_type ?= flag:badger
				# EK ADDITION END
			}
		}
		flavor = hunt.1003.e.flavor
		if = {
			limit = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			}
			add_internal_flag = dangerous
		}
		hunt_chance_for_no_pelt_effect = yes # Chance for no pelt reward
		# Kill outcome, prestige, injuries, etc.
		hunt_animal_melee_kill_group_effect = { DEATH = yes VAR = scope:activity.var:animal_type }
		# Opinion and Stress for Dharmic Pacificism
		hunt_dharmic_pacificism_effect = yes
		# Stress
		stress_impact = {
			ambitious = miniscule_stress_impact_gain
			arrogant = miniscule_stress_impact_gain
			greedy = miniscule_stress_impact_gain
		}
		if = {
			limit = { hunt_dharmic_pacificist_trigger = yes }
			stress_impact = { base = minor_stress_impact_gain }
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = -1
				ai_energy = -1
				ai_greed = -1
				ai_compassion = 0.5
				ai_rationality = 0.5
			}
		}
	}
}

#######################
#	You get another glimpse of the mystical white animal
#	by Linnéa Thimrén
#######################

hunt.4018 = {
	type = activity_event
	title = hunt.0510.t
	desc = hunt.4018.desc
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = worry
	}
	
	trigger = {
		has_character_flag = had_mystical_animal_story
		any_owned_story = {
			story_type = story_cycle_hunt_mystical_animal
			OR = {
				var:legendary_county = {
					OR = {
						this = root.location.county
						any_neighboring_county = { this = root.location.county }
					}
				}
			}
		}
		NOT = { exists = scope:activity.var:hunt_4013 } # Not first Legendary hunt
	}

	immediate = {
		random_owned_story = {
			limit = {
				story_type = story_cycle_hunt_mystical_animal
				exists = var:encounters
			}
			save_scope_as = story
			change_variable = { #You had yet another encounter
				name = encounters
				add = 1
			}
		}
	}

	option = { #Scour the area for it!
		name = hunt.4018.a
		flavor = hunt.4018.a.tt
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_legendary_scour_log
				score = 25
				tags = { random legendary }
				character = root

				#Effect
				root = {
					add_character_modifier = {
						modifier = hunt_disturbed_locals_modifier
						years = 5
					}
					random_list = {
						3 = { #You actually find it!
							desc = hunt.4018.a.success
							show_chance = no
							modifier = {
								add = 2
								scope:story = {
									var:encounters >= 3
								}
							}
							modifier = {
								add = 2
								scope:story = {
									var:encounters >= 5
								}
							}					
							scope:activity = { set_variable = hunt_4017 }
						}
						75 = { #you find another animal
							desc = hunt.4018.a.animal
							show_chance = no
							custom_tooltip = hunt.4018.a.animal
							scope:activity = {
								set_variable = hunt_4019
								set_variable = {
									name = hunt_success
									value = flag:no
								}
							}
						}
						25 = { #you find nothing
							desc = hunt.4018.a.failure
							show_chance = no
							custom_tooltip = hunt_fails_tt
							scope:activity = {
								set_variable = hunt_4013
								set_variable = {
									name = hunt_success
									value = flag:no
								}
							}
						}
					}
				}
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_energy = 0.5
			}
		}
	}

	option = { #Whatever
		name = hunt.4018.b
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_legendary_abandon_log
				score = 25
				tags = { random legendary }
				character = root

				#Effect
				root = {
					if = {
						limit = {
							scope:activity = {
								has_activity_option = { category = special_type option = hunt_type_legendary }
							}
						}
						custom_tooltip = hunt_fails_tt
						scope:activity = {
							set_variable = {
								name = hunt_success
								value = flag:no
							}
						}
					}
					else = {
						add_character_modifier = {
							modifier = hunt_focused_effort_modifier
							years = 5
						}
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_rationality = 0.5
			}
		}
	}
}

#######################
#	You get another animal
#	by Linnéa Thimrén
#######################

hunt.4019 = {
	type = activity_event
	title = hunt.0510.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger  = { exists = scope:hunt_participant }	
				desc = hunt.4019.courtier
			}
			desc = hunt.4019.fallback
		}
		desc = hunt.4019.desc
	}
	theme = hunt_activity
	right_portrait = {
		animation = happiness
		character = scope:hunt_participant
	}

	trigger = {
		scope:activity = {
			has_activity_option = { category = special_type option = hunt_type_legendary }
			exists = var:hunt_4019
			NOT = { exists = var:hunt_4013 } # Not first Legendary hunt
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			add = {
				value = 100
				subtract = involved_activity.var:hunt_success_chance
			}
		}
	}

	immediate = {
		if = {
			limit = { this = scope:host }
			hunt_activity_random_interest_participant_effect = {
				ARCHETYPE = hunter
				COMBATANT = yes
				SCOPE = hunt_participant
			}
		}		
	}

	option = { #Well... We got another animal
		name = hunt.4019.a
		flavor = hunt.4019.a.tt
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_proxy_kill_log
				score = 25
				tags = { random legendary }
				character = root

				#Effect
				root = {
					scope:activity = { set_variable = legendary_proxy }
					# Duel
					hunt_animal_bow_kill_effect = { DEATH = no VAR = scope:activity.var:animal_type }
					# Opinion
					hunt_dharmic_pacificism_effect = yes
					# Stress
					hunt_humble_hunter_stress_effect = yes
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_boldness = 0.5
				ai_energy = 0.5
				ai_greed = 0.5
			}
		}
		scope:activity = {
			set_variable = {
				name = hunt_success
				value = flag:yes
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_compassion = 0.5
			}
		}
	}

	option = { #Are you stupid or something?
		name = hunt.4019.b
		flavor = hunt.4019.a.tt
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_proxy_dismiss_log
				score = 25
				tags = { random legendary }
				character = root

				#Effect
				root = {
					scope:activity = {
						remove_variable = hunt_4019
						set_variable = {
							name = hunt_success
							value = flag:no
						}
					}
					custom_tooltip = hunt_fails_tt
					reverse_add_opinion = {
						target = scope:hunt_participant
						modifier = insulted_opinion
						opinion = -10
					}
					stress_impact = {
						wrathful = minor_stress_impact_loss
						impatient = minor_stress_impact_loss
						sadistic = minor_stress_impact_loss
						callous = minor_stress_impact_loss
						just = minor_stress_impact_gain
						compassionate = minor_stress_impact_gain
						patient = minor_stress_impact_gain
						calm = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = 0.5
				ai_compassion = -1
			}
		}
	}
}

#######################
#	Wildflowers!
#	by Bianca Savazzi
#######################

scripted_trigger hunt_5001_interested_in_flowers = { #POV of the picker
	OR = {
		has_trait = lifestyle_gardener
		has_trait = lifestyle_herbalist
		is_witch_trigger = yes
		has_trait = scholar
		has_trait = lifestyle_physician
		has_lifestyle = learning_lifestyle
		has_trait = curious
		AND = {
			has_court_position = court_gardener_court_position
			aptitude = {
				court_position = court_gardener_court_position
				value >= 2
			}
		}
		AND = {
			has_court_position = court_physician_court_position
			aptitude = {
				court_position = court_physician_court_position
				value >= 2
			}
		}
	}
}

hunt.5001 = {
	type = activity_event
	title = hunt.5001.t
	desc = {
		desc = hunt.5001.desc
		first_valid = {
			triggered_desc = {
				trigger = { 
					is_witch_trigger = yes
				}
				desc = hunt.5001.desc.witch
			}
			desc = hunt.5001.desc.religious
		}
		desc = hunt.5001.desc.ending
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = worry
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = happiness
	}
	cooldown = { years = 1 }
	artifact = {
		position = lower_right_portrait
		target = scope:newly_created_artifact
	}

	trigger = {
		scope:activity.activity_location = {
			NOT = {	terrain = desert }
		}
		hunt_5001_interested_in_flowers = yes
	}

	immediate = {
		hunt_activity_random_interest_participant_effect = {
			ARCHETYPE = hunter
			COMBATANT = yes
			SCOPE = hunt_participant
		}
		get_pressed_flower_species_effect = { LOCATION = scope:activity.activity_location }
		hidden_effect = {
			create_artifact_pressed_flower_effect = { OWNER = root }
			random_list = {
				10 = { # Poisonous Herbs
					trigger = { has_personality_benevolent_trigger = no }
					modifier = {
						factor = 2
						has_trait = schemer
					}
					modifier = {
						factor = 2
						any_scheme = { scheme_type = murder }
					}
					modifier = {
						factor = 2
						has_trait = education_intrigue
					}
					modifier = {
						factor = 2
						has_trait = callous
					}
					save_scope_as = poisonous_herbs
				}
				10 = { # Medicinal Herbs
					modifier = {
						factor = 2
						has_trait = schemer
					}
					modifier = {
						factor = 2
						has_court_position = court_physician_court_position
					}
					modifier = {
						factor = 2
						has_trait = education_learning
					}
					modifier = {
						factor = 2
						has_trait = compassionate
					}
					modifier = {
						factor = 2
						has_trait = lifestyle_physician
					}
				}
			}
		}
		hidden_effect_new_object = {
			scope:newly_created_artifact = {
				flag_as_trash_artifact = yes
			}
		}
	}

	option = { #Focus on the hunt
		name = hunt.5001.a
		hidden_effect_new_object = {
			scope:newly_created_artifact = {
				destroy_artifact = this 
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_host_flowers_focus_log
				score = 25
				tags = { random neutral }
				character = root
				target = scope:hunt_participant
				
				#Effect
				root = {
					hunter_progress_point_gain_effect = { CHANGE = 1 RANDOM_CHANGE = 1 }
					add_prestige = minor_prestige_gain
					hunt_activity_success_change_effect = { CHANGE = increase_medium }
					stress_impact = {
						diligent = minor_stress_impact_loss
						ambitious = minor_stress_impact_loss
						lazy = minor_stress_impact_gain
						lifestyle_gardener = minor_stress_impact_gain
						lifestyle_herbalist = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = 1
				ai_boldness = -0.5
			}
		}
	}

	option = { #Who cares what others think!?
		name = hunt.5001.b
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_host_flowers_distracted_log
				score = 25
				tags = { random neutral }
				character = root
				target = scope:hunt_participant
				artifact = scope:newly_created_artifact
				
				#Effect
				root = {
					hunt_activity_success_change_effect = { CHANGE = decrease_minor }
					show_as_tooltip = {
						scope:newly_created_artifact = { set_owner = root }
					}
					add_learning_lifestyle_xp = medium_lifestyle_xp
					scope:activity = {
						if = {
							limit = {
								any_attending_character = {
									NOT = { this = root }
									has_trait = lifestyle_hunter
								}
							}
							every_attending_character = {
								limit = {
									NOT = { this = root }
									has_trait = lifestyle_hunter
								}
								custom = hunt_every_hunter_attendee_tt
								add_opinion = {
									target = root
									modifier = hunt_distracted_opinion
									opinion = -10
								}
							}
						}
					}
					stress_impact = {
						lifestyle_hunter = medium_stress_impact_gain
						diligent = minor_stress_impact_gain
						impatient = minor_stress_impact_gain
						lifestyle_gardener = minor_stress_impact_loss
						lifestyle_herbalist = minor_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = -1
				ai_boldness = 0.5
			}
		}
	}

	option = { #Deadly nightshade
		name = hunt.5001.d
		trigger = { has_trait = lifestyle_herbalist }
		trait = lifestyle_herbalist
		flavor = {
			first_valid = {
				triggered_desc = {
					trigger = { exists = scope:poisonous_herbs }
					desc = hunt.5001.d.poisonous
				}
				desc = hunt.5001.d.medicinal
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_host_flowers_poison_log
				score = 25
				tags = { random neutral }
				character = root
				target = scope:hunt_participant
				
				#Effect
				root = {
					hunt_activity_success_change_effect = { CHANGE = decrease_minor }
					if = {
						limit = { exists = scope:poisonous_herbs }
						add_character_modifier = {
							modifier = hunt_poisonous_herbs_modifier
							years = 5
						}
						stress_impact = {
							lifestyle_hunter = minor_stress_impact_gain
							schemer = minor_stress_impact_loss
							lifestyle_gardener = miniscule_stress_impact_loss
							lifestyle_herbalist = minor_stress_impact_loss
						}
					}
					else = {
						add_character_modifier = {
							modifier = hunt_medicinal_herbs_modifier
							years = 5
						}
						if = {
							limit = { has_trait = lifestyle_physician }
							add_trait_xp = {
								trait = lifestyle_physician
								value = 2
							}
						}
						stress_impact = {
							lifestyle_hunter = minor_stress_impact_gain
							lifestyle_physician = minor_stress_impact_loss
							lifestyle_gardener = miniscule_stress_impact_loss
							lifestyle_herbalist = minor_stress_impact_loss
						}
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = -1
				ai_boldness = 0.5
			}
		}
	}

	option = { #Uuuh, distraction!
		name = hunt.5001.c
		trigger = { exists = scope:hunt_participant }
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_host_flowers_steal_log
				score = 25
				tags = { random neutral }
				character = root
				target = scope:hunt_participant
				artifact = scope:newly_created_artifact
				
				#Effect
				root = {
					duel = {
						skill = intrigue
						value = average_skill_rating
						75 = {
							desc = hunt.5001.c.success
							compare_modifier = {
								value = scope:duel_value
								multiplier = 5
							}
							min = 10
							show_as_tooltip = {
								scope:newly_created_artifact = {
									set_owner = root
								}
							}
							add_intrigue_lifestyle_xp = major_lifestyle_experience
						}
						25 = {	
							desc = learn_language_ongoing.1100.a.failure
							compare_modifier = {
								value = scope:duel_value
								multiplier = -5
							}
							min = 10
							reverse_add_opinion = {
								modifier = thinks_liege_incapable_opinion
								target = scope:hunt_participant
								opinion = -10
							}
							hidden_effect_new_object = {
								scope:newly_created_artifact = { destroy_artifact = this }
							}
						}
					}
					stress_impact = {
						lifestyle_hunter = medium_stress_impact_gain
						diligent = minor_stress_impact_gain
						honest = minor_stress_impact_gain
						lifestyle_gardener = minor_stress_impact_loss
						lifestyle_herbalist = minor_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_honor = -0.5
				ai_boldness = 0.5
			}
		}
	}
}

scripted_trigger hunt_5002_courtier_interested_in_flowers = {
	NOR = {
		this = root
		trigger_if = {
			limit = { exists = scope:hunt_participant }
			this = scope:hunt_participant
		}
	}
	hunt_5001_interested_in_flowers = yes
	is_ai = yes
}

hunt.5002 = {
	type = activity_event
	title = hunt.5001.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						AND = {
							exists = scope:gardener
							scope:hunt_participant = scope:gardener
						}
						AND = {
							exists = scope:physician
							scope:hunt_participant = scope:physician
						}
					}
				}
				desc = hunt.5002.opening_position
			}
			desc = hunt.5002.opening
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:hunt_participant_2
					OR = {
						AND = {
							exists = scope:gardener
							scope:hunt_participant_2 = scope:gardener
						}
						AND = {
							exists = scope:physician
							scope:hunt_participant_2 = scope:physician
						}
					}
				}
				desc = hunt.5002.second_position
			}
			triggered_desc = {
				trigger = { exists = scope:hunt_participant_2 }
				desc = hunt.5002.second
			}
			desc = hunt.5002.alone
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:gardener
					scope:hunt_participant = {
						OR = {
							this = scope:gardener
							has_trait = lifestyle_gardener
						}
					}
				}
				desc = hunt.5002.gardener
			}
			triggered_desc = {
				trigger = {
					exists = scope:physician
					scope:hunt_participant = {
						OR = {
							this = scope:physician
							has_trait = lifestyle_herbalist
						}
					}
				}
				desc = hunt.5002.physician
			}
			desc = hunt.5002.desc
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = disapproval
	}
	center_portrait = {
		character = scope:hunt_participant_2
		animation = thinking
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = happiness
	}
	lower_right_portrait = {
		trigger = {
			exists = scope:physician
			NOR = {
				scope:physician = scope:hunt_participant
				AND = {
					exists = scope:hunt_participant_2
					scope:physician = scope:hunt_participant_2
				}
			}
		}
		character = scope:physician
	}
	lower_center_portrait = {
		trigger = {
			exists = scope:gardener
			NOR = {
				scope:gardener = scope:hunt_participant
				AND = {
					exists = scope:hunt_participant_2
					scope:gardener = scope:hunt_participant_2
				}
			}
		}
		character = scope:gardener
	}
	cooldown = { years = 1 }

	trigger = {
		scope:activity.activity_location = {
			NOT = {	terrain = desert }
		}
		scope:activity = {
			any_attending_character = { hunt_5002_courtier_interested_in_flowers = yes }
		}
	}

	immediate = {
		if = {
			limit = { employs_court_position = court_gardener_court_position }
			court_position:court_gardener_court_position = { save_scope_as = gardener }
		}
		if = {
			limit = { employs_court_position = court_physician_court_position }
			court_position:court_physician_court_position = { save_scope_as = physician }
		}
		scope:activity = {
			every_attending_character = {
				limit = { hunt_5002_courtier_interested_in_flowers = yes }
				add_to_list = flower_people
			}
		}
		random_in_list = {
			list = flower_people
			limit = {
				is_of_major_interest_trigger = { CHARACTER = root }
			}
			alternative_limit = {
				is_of_minor_interest_trigger = { CHARACTER = root }
			}
			alternative_limit = { always = yes }
			weight = {
				base = 1
				modifier = {
					add = 1
					exists = scope:gardener
					this = scope:gardener
				}
				modifier = {
					add = 1
					exists = scope:physician
					this = scope:physician
				}
			}
			save_scope_as = hunt_participant
		}
		if = {
			limit = {
				any_in_list = {
					list = flower_people
					NOT = { this = scope:hunt_participant }
				}
				exists = scope:hunt_participant
			}
			hidden_effect = {
				random = {
					chance = 33
					random_in_list = {
						list = flower_people
						limit = {
							is_of_major_interest_trigger = { CHARACTER = root }
							NOT = { this = scope:hunt_participant }
						}
						alternative_limit = {
							is_of_minor_interest_trigger = { CHARACTER = root }
							NOT = { this = scope:hunt_participant }
						}
						alternative_limit = {
							NOT = { this = scope:hunt_participant }
						}
						weight = {
							base = 1
							modifier = {
								add = 1
								exists = scope:gardener
								this = scope:gardener
							}
							modifier = {
								add = 1
								exists = scope:physician
								this = scope:physician
							}
						}
						save_scope_as = hunt_participant_2
						progress_towards_friend_effect = {
							REASON = friend_bonded_over_botany
							CHARACTER = scope:hunt_participant
							OPINION = default_friend_opinion
						}
					}
				}
			}
		}		
	}

	option = { #Focus on the hunt
		name = {
			text = hunt.5002.a
			trigger = {
				NOT = { exists = scope:hunt_participant_2 }
			}
		}
		name = {
			text = hunt.5002.a.second
			trigger = { exists = scope:hunt_participant_2 }
		}
		flavor = hunt.5002.a.flavor
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_flowers_focus_log
				score = 25
				tags = { random neutral social }
				character = scope:hunt_participant
				target = scope:hunt_participant_2
				
				#Effect
				root = {
					hunter_progress_point_gain_effect = { CHANGE = 1 RANDOM_CHANGE = 1 }
					add_prestige = miniscule_prestige_gain
					reverse_add_opinion = {
						modifier = disappointed_opinion
						target = scope:hunt_participant
						opinion = -10
					}
					if = {
						limit = { exists = scope:hunt_participant_2 }
						reverse_add_opinion = {
							modifier = disappointed_opinion
							target = scope:hunt_participant_2
							opinion = -10
						}
					}
					hunt_activity_success_change_effect = { CHANGE = increase_medium }
					stress_impact = {
						lifestyle_herbalist = minor_stress_impact_gain
						lifestyle_gardener = minor_stress_impact_gain
						patient = minor_stress_impact_gain
						content = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = 0.5
				ai_energy = 1
			}
			modifier = {
				factor = 2
				has_trait = lifestyle_hunter
			}
		}
	}

	option = { #learn about flowers
		name = hunt.5002.b
		trigger = {
			NOR = {
				has_trait = lifestyle_herbalist
				has_trait = lifestyle_gardener
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_flowers_learn_log
				score = 25
				tags = { random neutral social }
				character = scope:hunt_participant
				target = scope:hunt_participant_2
				
				#Effect
				root = {
					hunt_activity_success_change_effect = { CHANGE = decrease_minor }
					add_learning_lifestyle_xp = major_lifestyle_xp
					hidden_effect = {
						scope:hunt_participant = {
							create_artifact_pressed_flower_effect = { OWNER = scope:hunt_participant }
						}
					}
					stress_impact = {
						lifestyle_hunter = minor_stress_impact_gain
						impatient = minor_stress_impact_gain
						ambitious = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = -0.5
				ai_energy = -1
			}
			modifier = {
				factor = 2
				has_lifestyle = learning_lifestyle
			}
		}
	}

	option = { #gardener bond
		name = {
			trigger = {
				has_trait = lifestyle_gardener
				NOT = { has_trait = lifestyle_herbalist }
			}
			text = hunt.5002.e.gardener
		}
		name = {
			trigger = {
				has_trait = lifestyle_herbalist
				NOT = { has_trait = lifestyle_gardener }
			}
			text = hunt.5002.e.herbalist
		}
		name = {
			trigger = {
				has_trait = lifestyle_gardener
				has_trait = lifestyle_herbalist
			}
			text = hunt.5002.e
		}
		flavor = hunt.5002.e.flavor
		trigger = {
			OR = {
				has_trait = lifestyle_gardener
				has_trait = lifestyle_herbalist
			}
		}
		trait = lifestyle_gardener
		trait = lifestyle_herbalist
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_flowers_bond_log
				score = 25
				tags = { random neutral }
				character = scope:hunt_participant
				target = scope:hunt_participant_2
				
				#Effect
				root = {
					hunt_activity_success_change_effect = { CHANGE = decrease_minor }
					create_artifact_pressed_flower_effect = { OWNER = root }
					progress_towards_friend_effect = {
						REASON = friend_bonded_over_botany
						CHARACTER = scope:hunt_participant
						OPINION = default_friend_opinion
					}
					if = {
						limit = { exists = scope:hunt_participant_2 }
						progress_towards_friend_effect = {
							REASON = friend_bonded_over_botany
							CHARACTER = scope:hunt_participant_2
							OPINION = default_friend_opinion
						}
					}
					stress_impact = {
						impatient = minor_stress_impact_gain
						ambitious = minor_stress_impact_gain
						lifestyle_herbalist = minor_stress_impact_loss
						lifestyle_gardener = medium_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_rationality = 0.5
				ai_energy = -1
				ai_sociability = 0.5
			}
		}
	}

	option = { #gardener cp
		name = {
			trigger = {
				scope:gardener = { is_participant_in_activity = scope:activity }
				OR = {
					scope:hunt_participant = scope:gardener
					trigger_if = {
						limit = { exists = scope:hunt_participant_2 }
						scope:hunt_participant_2 = scope:gardener
					}
				}
			}
			text = hunt.5002.g
		}
		name = {
			trigger = {
				scope:gardener = { is_participant_in_activity = scope:activity }
				NOR = {
					scope:hunt_participant = scope:gardener
					trigger_if = {
						limit = { exists = scope:hunt_participant_2 }
						scope:hunt_participant_2 = scope:gardener
					}
				}
			}
			text = hunt.5002.g.present
		}
		name = {
			trigger = {
				scope:gardener = {
					NOT = { is_participant_in_activity = scope:activity }
				}
			}
			text = hunt.5002.g.elsewhere
		}
		flavor = {
			first_valid = {
				triggered_desc = {
					trigger = {
						scope:gardener = { is_participant_in_activity = scope:activity }
						OR = {
							scope:hunt_participant = scope:gardener
							trigger_if = {
								limit = { exists = scope:hunt_participant_2 }
								scope:hunt_participant_2 = scope:gardener
							}
						}
					}
					desc = hunt.5002.cp_flavor
				}
				triggered_desc = {
					trigger = {
						scope:gardener = { is_participant_in_activity = scope:activity }
						NOR = {
							scope:hunt_participant = scope:gardener
							trigger_if = {
								limit = { exists = scope:hunt_participant_2 }
								scope:hunt_participant_2 = scope:gardener
							}
						}
					}
					desc = hunt.5002.cp_present_flavor
				}
				desc = hunt.5002.cp_elsewhere_flavor
			}
		}
		trigger = { exists = scope:gardener }
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_flowers_gardener_log
				score = 25
				tags = { random social neutral }
				character = scope:hunt_participant
				target = scope:hunt_participant_2
				
				#Effect
				root = {
					add_character_modifier = {
						modifier = hunt_blooming_garden_modifier
						years = 5 
					}
					scope:gardener = {
						if = {
							limit = { is_participant_in_activity = scope:activity }
							remove_from_activity = scope:activity
							if = {
								limit = {
									OR = {
										has_trait = lifestyle_hunter
										has_trait = lazy
										NOR = {
											has_trait = lifestyle_herbalist
											has_trait = lifestyle_gardener
										}
									}
								}
								add_opinion = {
									modifier = annoyed_opinion
									target = root
									opinion = -10
								}
							}
							else = {
								add_opinion = {
									modifier = grateful_opinion
									target = root
									opinion = 10
								}
							}
						}
						else = {
							scope:hunt_participant = {
								remove_from_activity = scope:activity
								if = {
									limit = {
										OR = {
											has_trait = lifestyle_hunter
											has_trait = lazy
											NOR = {
												has_trait = lifestyle_herbalist
												has_trait = lifestyle_gardener
											}
										}
									}
									add_opinion = {
										modifier = annoyed_opinion
										target = root
										opinion = -20
									}
								}
								else = {
									add_opinion = {
										modifier = annoyed_opinion
										target = root
										opinion = -10
									}
								}
							}
							if = {
								limit = { exists = scope:hunt_participant_2 }
								scope:hunt_participant_2 = {
									remove_from_activity = scope:activity
									if = {
										limit = {
											OR = {
												has_trait = lifestyle_hunter
												has_trait = lazy
												NOR = {
													has_trait = lifestyle_herbalist
													has_trait = lifestyle_gardener
												}
											}
										}
										add_opinion = {
											modifier = annoyed_opinion
											target = root
											opinion = -20
										}
									}
									else = {
										add_opinion = {
											modifier = annoyed_opinion
											target = root
											opinion = -10
										}
									}
								}
							}
							add_opinion = {
								modifier = grateful_opinion
								target = root
								opinion = 10
							}
						}
					}
					stress_impact = {
						impatient = minor_stress_impact_gain
						ambitious = minor_stress_impact_gain
						lifestyle_herbalist = miniscule_stress_impact_loss
						lifestyle_gardener = minor_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_zeal = 1
				ai_boldness = 1
			}
			modifier = {
				factor = 2
				has_trait = paranoid
			}
		}
	}

	option = { #physician cp
		name = {
			trigger = {
				scope:physician = { is_participant_in_activity = scope:activity }
				OR = {
					scope:hunt_participant = scope:physician
					trigger_if = {
						limit = { exists = scope:hunt_participant_2 }
						scope:hunt_participant_2 = scope:physician
					}
				}
			}
			text = hunt.5002.h
		}
		name = {
			trigger = {
				scope:physician = { is_participant_in_activity = scope:activity }
				NOR = {
					scope:hunt_participant = scope:physician
					trigger_if = {
						limit = { exists = scope:hunt_participant_2 }
						scope:hunt_participant_2 = scope:physician
					}
				}
			}
			text = hunt.5002.h.present
		}
		name = {
			trigger = {
				scope:physician = {
					NOT = { is_participant_in_activity = scope:activity }
				}
			}
			text = hunt.5002.h.elsewhere
		}
		flavor = {
			first_valid = {
				triggered_desc = {
					trigger = {
						scope:physician = { is_participant_in_activity = scope:activity }
						OR = {
							scope:hunt_participant = scope:physician
							trigger_if = {
								limit = { exists = scope:hunt_participant_2 }
								scope:hunt_participant_2 = scope:physician
							}
						}
					}
					desc = hunt.5002.cp_flavor
				}
				triggered_desc = {
					trigger = {
						scope:physician = { is_participant_in_activity = scope:activity }
						NOR = {
							scope:hunt_participant = scope:physician
							trigger_if = {
								limit = { exists = scope:hunt_participant_2 }
								scope:hunt_participant_2 = scope:physician
							}
						}
					}
					desc = hunt.5002.cp_present_flavor
				}
				desc = hunt.5002.cp_elsewhere_flavor
			}
		}
		trigger = { exists = scope:physician }
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_flowers_physician_log
				score = 25
				tags = { random social neutral }
				character = scope:hunt_participant
				target = scope:hunt_participant_2
				
				#Effect
				root = {
					add_character_modifier = {
						modifier = hunt_stocked_medicus_modifier
						years = 5 
					}
					scope:physician = {
						if = {
							limit = { is_participant_in_activity = scope:activity }
							remove_from_activity = scope:activity
							if = {
								limit = {
									NOT = { this = scope:hunt_participant }
									OR = {
										has_trait = lifestyle_hunter
										has_trait = lazy
										NOR = {
											has_trait = lifestyle_herbalist
											has_trait = lifestyle_gardener
										}
									}
								}
								add_opinion = {
									modifier = annoyed_opinion
									target = root
									opinion = -10
								}
							}
							else = {
								add_opinion = {
									modifier = grateful_opinion
									target = root
									opinion = 10
								}
							}
						}
						else = {
							scope:hunt_participant = {
								remove_from_activity = scope:activity
								if = {
									limit = {
										OR = {
											has_trait = lifestyle_hunter
											has_trait = lazy
											NOR = {
												has_trait = lifestyle_herbalist
												has_trait = lifestyle_gardener
											}
										}
									}
									add_opinion = {
										modifier = annoyed_opinion
										target = root
										opinion = -20
									}
								}
								else = {
									add_opinion = {
										modifier = grateful_opinion
										target = root
										opinion = 10
									}
								}
							}
						}
					}
					stress_impact = {
						impatient = minor_stress_impact_gain
						callous = minor_stress_impact_gain
						lifestyle_herbalist = minor_stress_impact_loss
						lifestyle_gardener = miniscule_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_zeal = 1
				ai_boldness = 1
			}
			modifier = {
				factor = 2
				has_trait = paranoid
			}
		}
	}

	option = { #Witchcraft!?
		name = {
			text = hunt.5002.c
			trigger = {
				scope:hunt_participant = {
					NOR = {
						has_trait = witch
						any_secret = {
							secret_type = secret_witch
							is_known_by = root
						}
					}
				}
			}
		}
		name = {
			text = hunt.5002.c.known
			trigger = {
				scope:hunt_participant = {
					OR = {
						has_trait = witch
						any_secret = {
							secret_type = secret_witch
							is_known_by = root
						}
					}
				}
			}
		}
		flavor = hunt.5002.c.flavor
		trigger = {
			NOR = {
				is_witch_trigger = yes
				faith = { has_doctrine_parameter = witchcraft_accepted }
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_flowers_witchcraft_log
				score = 25
				tags = { random social bad }
				character = scope:hunt_participant
				target = scope:hunt_participant_2
				
				#Effect
				root = {
					add_piety = minor_piety_gain
					scope:hunt_participant = {
						add_opinion = {
							modifier = accused_crime_opinion
							target = root
							opinion = -15
						}
						add_character_modifier = {
							modifier = hunt_witch_suspicion_modifier
							years = 5
						}
					}
					if = {
						limit = { exists = scope:hunt_participant_2 }
						scope:hunt_participant_2 = {
							add_opinion = {
								modifier = accused_crime_opinion
								target = root
								opinion = -15
							}
							add_character_modifier = {
								modifier = hunt_witch_suspicion_modifier
								years = 5
							}
						}
					}
					stress_impact = {
						cynical = minor_stress_impact_gain
						compassionate = minor_stress_impact_gain
						lifestyle_herbalist = medium_stress_impact_gain
						lifestyle_gardener = medium_stress_impact_gain
						scholar = medium_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_zeal = 1
				ai_boldness = 1
			}
			modifier = {
				factor = 2
				has_trait = paranoid
			}
		}
	}

	option = { #Witch - Be more careful
		name = hunt.5002.d
		flavor = hunt.5002.d.flavor
		trigger = {
			is_witch_trigger = yes
			scope:hunt_participant = {
				OR = {
					has_trait = witch
					any_secret = {
						secret_type = secret_witch
						is_known_by = root
					}
				}
			}
		}
		trait = witch
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_flowers_fellow_witch_log
				score = 25
				tags = { random neutral social }
				character = scope:hunt_participant
				target = scope:hunt_participant_2
				
				#Effect
				root = {
					add_character_modifier = {
						modifier = hunt_witch_protector_modifier
						years = 10
					}
					reverse_add_opinion = {
						modifier = hunt_fellow_witch_opinion
						target = scope:hunt_participant
						opinion = 15
					}
					if = {
						limit = {
							any_secret = {
								secret_type = secret_witch
								NOT = { is_known_by = scope:hunt_participant }
							}
						}
						random_secret = {
							limit = {
								secret_type = secret_witch
								NOT = { is_known_by = scope:hunt_participant }
							}
							reveal_to = scope:hunt_participant
						}
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_zeal = 1
				ai_boldness = 1
			}
			modifier = {
				factor = 2
				has_trait = paranoid
			}
		}
	}
}

scripted_trigger hunt_5003_animal_over_flower = {
	OR = {
		has_trait = sadistic
		has_trait = vengeful
		has_trait = lifestyle_hunter
		has_trait = brave
		has_trait = berserker
		has_court_position = master_of_hunt_court_position
		has_court_position = huntperson_camp_officer
	}
}

hunt.5003 = {
	type = activity_event
	title = hunt.8001.t
	desc = {
		desc = hunt.5003.opening
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:hunt_participant = { has_relation_lover = root }
				}
				desc = hunt.5003.desc
			}
			desc = hunt.5003.desc_woo
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:hunt_participant = { hunt_5003_animal_over_flower = yes }
				}
				desc = hunt.5003.desc.animal
			}
			desc = hunt.5003.desc.flower
		}
		desc = hunt.5003.ending
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:hunt_participant = { has_relation_lover = root }
				}
				desc = hunt.5003.ending_lover
			}
			desc = hunt.5003.ending_woo
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = admiration
	}
	right_portrait = {
		character = scope:hunt_participant
		triggered_animation = {
			trigger = {
				scope:hunt_participant = { hunt_5003_animal_over_flower = yes }
			}
			animation = hunting_carcass_start
		}
		triggered_animation  = {
			trigger = {
				scope:hunt_participant = { hunt_5003_animal_over_flower = no }
			}
			animation = flirtation
		}
	}
	artifact = {
		 target = scope:newly_created_artifact 
		position = lower_right_portrait
	}
	cooldown = { years = 1 }

	trigger = {
		scope:activity = {
			any_attending_character = {
				OR = {
					has_relation_lover = root
					is_scheming_against = {
						target = root
						type = seduce
					}
					is_scheming_against = {
						target = root
						type = courting
					}
					AND = {
						has_activity_intent = woo_attendee_intent
						intent_target = root
					}
				}
				is_alive = yes
				is_ai = yes
			}
		}
	}

	immediate = {
		# Fetch lover
		scope:activity = {
			every_attending_character = {
				limit = {
					OR = {
						has_relation_lover = root
						is_scheming_against = {
							target = root
							type = seduce
						}
						is_scheming_against = {
							target = root
							type = courting
						}
						AND = {
							has_activity_intent = woo_attendee_intent
							intent_target = root
						}
					}
					is_alive = yes
					is_ai = yes
				}
				add_to_list = lover_list
			}
			random_in_list = {
				list = lover_list
				limit = {
					AND = {
						has_activity_intent = woo_attendee_intent
						intent_target = root
					}
				}
				alternative_limit = {
					OR = {
						is_scheming_against = {
							target = root
							type = seduce
						}
						is_scheming_against = {
							target = root
							type = courting
						}
					}
				}
				alternative_limit = { has_relation_soulmate = root } # prioritise soulmates
				alternative_limit = { is_powerful_vassal = yes } # second priority is characters that are interesting gameplay-wise
				alternative_limit = { has_secret_relation_lover = root }
				alternative_limit = { always = yes } # Fallback is boring lover
				save_scope_as = hunt_participant
			}
		}
		# Fetch potential onlooker
		scope:activity = {
			if = {
				limit = {
					any_attending_character = {
						NOR = {
							this = root
							this = scope:hunt_participant
						}
						is_alive = yes
						is_ai = yes
					}
				}
				every_attending_character = {
					limit = {
						NOR = {
							this = root
							this = scope:hunt_participant
						}
						is_alive = yes
						is_ai = yes
					}
					add_to_list = witness_list
				}
				random_in_list = {
					list = witness_list
					limit = {
						is_of_major_interest_trigger = { CHARACTER = root }
					}
					alternative_limit = {
						is_of_minor_interest_trigger = { CHARACTER = root }
					}
					alternative_limit = { always = yes }
					save_scope_as = potential_witness
				}
			}
		}

		# Gift depends on personality (same as desc)
		hidden_effect = {
			if = {
				limit = {
					scope:hunt_participant = { hunt_5003_animal_over_flower = yes }
					has_royal_court = yes
				}
				create_artifact_animal_hide_effect = {
					OWNER = root
					HUNTER = scope:hunt_participant
					LEGENDARY = no
					ANIMAL = flag:hare
				}
			}
			else_if = {
				limit = {
					scope:hunt_participant = { hunt_5003_animal_over_flower = yes }
				}
				create_artifact_animal_trinket_effect = {
					OWNER = root
					HUNTER = scope:hunt_participant
					LEGENDARY = no
					ANIMAL = flag:hare
				}
			}
			else = {
				scope:hunt_participant = {
					save_scope_as = flower_picker
					get_pressed_flower_species_effect = { LOCATION = scope:activity.activity_location }
					create_artifact_pressed_flower_effect = { OWNER = root }
				}
			}
		}
	}

	option = { #Scold your secret lover
		name = hunt.5003.a
		trigger = {
			OR = {
				has_secret_relation_lover = scope:hunt_participant 
				any_secret = {
					secret_type = secret_lover
					secret_target = { this = scope:hunt_participant }
				}
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_lover_scold_key
				score = 25
				tags = { random good social }
				character = root
				target = scope:hunt_participant

				#Effect
				root = {
					add_character_modifier = {
						modifier = hunt_protected_their_secret_modifier
						years = 5
					}
					reverse_add_opinion = {
						modifier = disappointed_opinion
						target = scope:hunt_participant
						opinion = -10
					}
					hidden_effect_new_object = {
						scope:newly_created_artifact = { destroy_artifact = this }
					}
					stress_impact = {
						trusting = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_compassion = -0.5
				ai_boldness = -0.5
				ai_rationality = 0.5
			}
		}
	}

	option = { #Thank you sweetie
		name = {
			text = hunt.5003.b
			trigger = { has_relation_lover = scope:hunt_participant }
		}
		name = {
			text = hunt.5003.b.woo
			trigger = {
				NOT = { has_relation_lover = scope:hunt_participant }
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_lover_gift_key
				score = 25
				tags = { random good social }
				character = root
				target = scope:hunt_participant

				#Effect
				root = {
					show_as_tooltip = {
						scope:newly_created_artifact = { set_owner = root }
					}
					if = {
						limit = {
							NOT = { has_relation_lover = scope:hunt_participant }
						}
						scope:hunt_participant = {
							if = {
								limit = {
									has_activity_intent = woo_attendee_intent
									intent_target = root
								}
								progress_towards_lover_effect = {
									REASON = lover_hunt_gift_reason
									CHARACTER = root
									OPINION = default_lover_opinion
								}
							}
							else = {
								random_scheme = {
									limit = {
										scheme_target_character = root
										OR = {
											scheme_type = seduce
											scheme_type = courting
										}
									}
									add_scheme_progress = scheme_progress_gain
								}
							}
						}
					}
					#But alas, you're not completely alone and might've been spotted!
					if = {
						limit = {
							OR = {
								has_secret_relation_lover = scope:hunt_participant 
								any_secret = {
									secret_type = secret_lover
									secret_target = { this = scope:hunt_participant }
								}
							}
						}
						custom_tooltip = hunt.5003.b.tt
					}
					stress_impact = {
						base = medium_stress_impact_loss
						callous = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_boldness = 0.5
				ai_rationality = -0.5
			}
		}
	}

	option = { #Chance it
		name = {
			text = hunt.5003.d
			trigger = { has_relation_lover = scope:hunt_participant }
		}
		name = {
			text = hunt.5003.d.woo
			trigger = {
				NOT = { has_relation_lover = scope:hunt_participant }
			}
		}
		trigger = {
			OR = {
				has_relation_lover = scope:hunt_participant
				might_cheat_on_every_partner_trigger = yes
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_lover_chance_key
				score = 25
				tags = { random good social }
				character = root
				target = scope:hunt_participant

				#Effect
				root = {
					scope:newly_created_artifact = { set_owner = root }
					random_list = {
						10 = {
							had_sex_with_effect = {
								CHARACTER = scope:hunt_participant
								PREGNANCY_CHANCE = pregnancy_chance
							}
							scope:newly_created_artifact = { add_durability = -10 }
							scope:hunt_participant = {
								if = {
									limit = {
										has_activity_intent = woo_attendee_intent
										intent_target = root
									}
									progress_towards_lover_effect = {
										REASON = lover_hunt_gift_reason
										CHARACTER = root
										OPINION = default_lover_opinion
									}
								}
								else_if = {
									limit = {
										is_scheming_against = {
											target = root
											type = seduce
										}
									}
									random_scheme = {
										limit = {
											scheme_target_character = root
											scheme_type = seduce
										}
										end_scheme = yes
									}
									set_relation_lover = root
								}
								else = {
									random_scheme = {
										limit = {
											scheme_target_character = root
											scheme_type = courting
										}
										add_scheme_progress = scheme_progress_gain
									}
								}
							}
						}
						10 = {
							trigger = {
								scope:hunt_participant = {
									is_scheming_against = {
										target = root
										type = courting
									}
								}
							}
							reverse_add_opinion = {
								target = scope:hunt_participant
								modifier = insulted_opinion
								opinion = -10
							}
						}
					}
					stress_impact = {
						base = major_stress_impact_loss
						callous = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = 0.5
				ai_boldness = 1
				ai_rationality = -1
			}
		}
	}

	option = { # I don't want this
		name = hunt.5003.c
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_lover_reject_key
				score = 25
				tags = { random good social }
				character = root
				target = scope:hunt_participant

				#Effect
				root = {
					add_prestige = miniscule_prestige_gain
					reverse_add_opinion = {
						modifier = spurned_gift_opinion
						target = scope:hunt_participant
						opinion = -10
					}
					random = {
						chance = 33
						modifier = {
							factor = 2 
							scope:hunt_participant = { has_trait = vengeful }
						}
						modifier = {
							factor = 0.5
							scope:hunt_participant = { has_trait = forgiving }
						}
						opinion_modifier = {
							opinion_target = scope:hunt_participant
							multiplier = 0.33
						}
						remove_lover_or_downgrade_relationship_effect = { SCOPE = scope:hunt_participant }
					}
					scope:newly_created_artifact = { destroy_artifact = this }
					stress_impact = {
						compassionate = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_compassion = -1
				ai_boldness = 0.5
				ai_rationality = 0.5
			}
		}
	}

	after = {
		if = {
			limit = { has_relation_lover = scope:hunt_participant }
			custom_tooltip = hunt.5003.b.tt
			hidden_effect = {
				random = {
					chance = 80
					modifier = {
						has_character_modifier = hunt_protected_their_secret_modifier
						factor = 0.5
					}
					random_secret = {
						limit = {
							secret_type = secret_lover
							secret_target = { this = scope:hunt_participant }
						}
						if = {
							limit = { exists = scope:potential_witness }
							reveal_to = scope:potential_witness
						}
					}
				}
			}
		}
	}
}

#######################
#	Fawning doe
#	by Joe Parkin
#######################

hunt.5010 = {
	type = activity_event
	title = hunt.5010.t
	desc = {
		desc = hunt.5010.desc
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = stress
	}
	cooldown = { years = 25 }

	trigger = {
		has_dlc_feature = tours_and_tournaments
		exists = scope:activity.var:animal_type
		NOT = { has_character_modifier = hunt_tame_deer_modifier }
		hunt_story_trigger = { STORY = chase }
		scope:activity = {
			hunt_activity_deer_game_trigger = { VAR = var:animal_type }
			activity_location.county = {
				NOT = { has_county_modifier = hunt_mismanaged_game_modifier }
			}
		}
	}

	immediate = {
		play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_dogs_bark"
		hunt_activity_random_subordinate_participant_effect = {
			ARCHETYPE = hunter
			COMBATANT = yes
			SCOPE = hunt_participant
		}
		hunt_activity_success_change_effect = { CHANGE = decrease_minor }
		hunter_progress_point_gain_effect = { CHANGE = 1 RANDOM_CHANGE = 1 }
	}

	option = { #Kill it anyway
		name = hunt.5010.a
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_doe_kill_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					custom_tooltip = hunt_female_quarry_tt
					if = {
						limit = { has_royal_court = yes }
						hunt_no_skull_effect = yes
					}
					else = { custom_tooltip = hunt_no_antlers_tt }
					if = {
						limit = { employs_court_position = master_of_hunt_court_position }
						court_position:master_of_hunt_court_position = {
							add_opinion = {
								modifier = hunt_game_mismanagement_opinion
								target = root
							}
						}
					}
					if = {
						limit = { employs_court_position = huntperson_camp_officer }
						court_position:huntperson_camp_officer = {
							add_opinion = {
								modifier = hunt_game_mismanagement_opinion
								target = root
							}
						}
					}
					scope:activity = {
						set_variable = female_quarry
						every_attending_character = {
							limit = {
								NOT = { this = root }
								is_alive = yes
								has_trait = lifestyle_hunter
								trigger_if = {
									limit = {
										exists = root.court_position:master_of_hunt_court_position
									}
									NOT = { this = root.court_position:master_of_hunt_court_position }
								}
								trigger_if = {
									limit = {
										exists = root.court_position:huntperson_camp_officer
									}
									NOT = { this = root.court_position:huntperson_camp_officer }
								}
							}
							custom = hunt_every_hunter_attendee_tt
							add_opinion = {
								modifier = hunt_game_mismanagement_opinion
								target = root
							}
						}
						activity_location.county = {
							set_variable = {
								name = mismanaged_animal_type
								value = scope:activity.var:animal_type
							}
							add_county_modifier = {
								modifier = hunt_mismanaged_game_modifier
								years = 7
								desc = hunt_mismanaged_game_modifier_custom_desc
							}
						}
					}
					hunt_dharmic_pacificism_effect = yes
					stress_impact = {
						diligent = minor_stress_impact_gain
						compassionate = minor_stress_impact_gain
						lifestyle_hunter = miniscule_stress_impact_gain
						education_stewardship_2 = minor_stress_impact_gain
						education_stewardship_3 = minor_stress_impact_gain
						education_stewardship_4 = minor_stress_impact_gain
						education_stewardship_5 = minor_stress_impact_gain
						overseer = minor_stress_impact_gain
					}
				}
			}
		}
		scope:activity = {
			set_variable = {
				name = hunt_success
				value = flag:yes
			}
			progress_activity_phase_after = { days = 1 }
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = -0.5
				ai_compassion = -0.5
				ai_boldness = -0.5
			}
		}
	}

	option = { #Snare fawn
		name = hunt.5010.b
		trigger = { has_trait = lifestyle_hunter }
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_fawn_capture_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					hunt_activity_success_change_effect = { CHANGE = decrease_major }
					set_variable = {
						name = tame_animal_type
						value = scope:activity.var:animal_type
					}
					add_character_modifier = {
						modifier = hunt_tame_deer_modifier
						years = 10
						desc = hunt_tame_deer_modifier_custom_desc
					}
					stress_impact = {
						compassionate = medium_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_energy = 0.5
				ai_boldness = 1
			}
		}
	}

	option = { #Find that stag!
		name = hunt.5010.c
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_doe_dismiss_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					stress_impact = {
						lifestyle_hunter = miniscule_stress_impact_loss
						lazy = minor_stress_impact_gain
						arbitrary = minor_stress_impact_gain
						callous = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = 1
				ai_boldness = 0.5
			}
		}
	}
}

#######################
#	Falcon snatched
#	by Joe Parkin
#######################

hunt.5050 = {
	type = activity_event
	title = hunt.5050.t
	desc = hunt.5050.desc
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = sadness
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = worry
	}
	artifact = {
		position = lower_right_portrait
		target = scope:newly_created_artifact
	}
	cooldown = { years = 10 }

	trigger = {
		has_dlc_feature = tours_and_tournaments
		hunt_story_trigger = { STORY = falconry }
	}

	immediate = {
		play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ep2_event_grand_hunt_falconry/ep2_event_grand_hunt_falconry_send"
		hunt_activity_random_subordinate_participant_effect = {
			ARCHETYPE = falconer
			COMBATANT = no
			SCOPE = hunt_participant
		}
		hunt_activity_success_change_effect = { CHANGE = decrease_minor }
		hidden_effect = {
			random = {
				chance = 50
				if = {
					limit = { exists = scope:activity.var:raptor_type }
					create_artifact_bird_feather_effect = {
						OWNER = root
						HUNTER = root
						ANIMAL = scope:activity.var:raptor_type
					}
				}
				if = {
					limit = { exists = scope:newly_created_artifact }
					scope:newly_created_artifact = { set_artifact_description = artifact_bird_feather_raptor_description }
				}
				scope:activity = {
					set_variable = {
						name = hunt_trophy_artifact
						value = scope:newly_created_artifact
					}
				}
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_bird_snatched_log
				score = 25
				tags = { bad }
				character = root

				#Effect
				root = {
					if = {
						limit = { has_character_modifier = peregrine_falcon }
						remove_character_modifier = peregrine_falcon
					}
				}
			}
		}
	}

	option = { #Chase thief
		name = hunt.5050.a
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_snatch_chase_log
				score = 25
				tags = { random legendary }
				character = root

				#Effect
				root = {
					random_list = {
						1 = {
							desc = hunt.5050.a.success
							modifier = { add = learning }
							modifier = {
								has_trait = lifestyle_hunter
								factor = 1.5
							}
							send_interface_toast = {
								title = hunt.5050.a.success
								add_prestige = minor_prestige_gain
								stress_impact = {
									base = medium_stress_impact_loss
								}
							}
						}
						20 = {
							desc = hunt.5050.a.failure
							send_interface_toast = {
								title = hunt.5050.a.failure
								hunt_activity_success_change_effect = { CHANGE = decrease_minor }
							}
						}
					}
					hidden_effect = {
						if = {
							limit = { exists = scope:newly_created_artifact }
							scope:newly_created_artifact = { destroy_artifact = this }
						}
					}
					stress_impact = {
						lazy = minor_stress_impact_gain
						forgiving = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = -0.5
				ai_compassion = -0.5
				ai_boldness = -0.5
			}
		}
	}

	option = { #Take another guest's bird
		name = hunt.5050.b
		trigger = { exists = scope:hunt_participant }
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_snatch_steal_log
				score = 25
				tags = { random legendary }
				character = root
				target = scope:hunt_participant

				#Effect
				root = {
					reverse_add_opinion = {
						target = scope:hunt_participant
						modifier = annoyed_opinion
						opinion = -10			
					}
					stress_impact = {
						humble = minor_stress_impact_gain
						generous = minor_stress_impact_gain
					}
				}
			}
		}
		hidden_effect = {
			if = {
				limit = { exists = scope:newly_created_artifact }
				scope:newly_created_artifact = { destroy_artifact = this }
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = -0.5
				ai_compassion = -0.5
				ai_boldness = -0.5
			}
		}
	}

	option = { #Pick up feather
		name = hunt.5050.c
		trigger = { exists = scope:newly_created_artifact }
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_snatch_feather_log
				score = 25
				tags = { random legendary }
				character = root
				artifact = scope:newly_created_artifact

				#Effect
				root = {
					custom_tooltip = hunt.5050.c.tt
					show_as_tooltip = {
						scope:newly_created_artifact = { set_owner = root }
					}
					stress_impact = {
						callous = minor_stress_impact_gain
						fickle = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = -0.5
				ai_compassion = -0.5
				ai_boldness = -0.5
			}
		}
	}

	option = { #Do nothing
		name = hunt.5050.d
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_snatch_dismiss_log
				score = 25
				tags = { random legendary }
				character = root

				#Effect
				root = {
					hidden_effect = {
						if = {
							limit = { exists = scope:newly_created_artifact }
							scope:newly_created_artifact = { destroy_artifact = this }
						}
					}
					stress_impact = {
						wrathful = minor_stress_impact_gain
						vengeful = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = -0.5
				ai_compassion = -0.5
				ai_boldness = -0.5
			}
		}
	}
}

#######################
#	Found an eyas
#	by Joe Parkin
#######################

hunt.5060 = {
	type = activity_event
	title = hunt.5060.t
	desc = hunt.5060.desc
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = admiration
	}
	right_portrait = {
		character = scope:hunt_participant
		animation = happiness
	}
	cooldown = { years = 10 }

	trigger = {
		has_dlc_feature = tours_and_tournaments
		scope:activity.activity_location = {
			NOR = {
				terrain = desert
				terrain = desert_mountains
				terrain = farmlands
				terrain = floodplains
				terrain = oasis
				terrain = jungle
			}
		}
		NOT = { has_character_modifier = peregrine_falcon }
	}

	immediate = {
		hunt_activity_random_interest_participant_effect = {
			ARCHETYPE = falconer
			COMBATANT = no
			SCOPE = hunt_participant
		}
		hunter_progress_point_gain_effect = { CHANGE = 1 RANDOM_CHANGE = 1 }
	}

	option = { #Take falcon
		name = hunt.5060.a
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_eyas_taken_log
				score = 25
				tags = { good random }
				character = root

				#Effect
				root = {
					if = {
						limit = { has_character_modifier = peregrine_falcon }
						hidden_effect = { remove_character_modifier = peregrine_falcon }			
					}
					add_character_modifier = {
						modifier = peregrine_falcon
						years = 5
					}
					stress_impact = {
						lazy = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = -0.5
				ai_compassion = -0.5
				ai_boldness = -0.5
			}
		}
	}

	option = { #Gift falcon
		name = hunt.5060.b
		trigger = { exists = scope:hunt_participant }
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_eyas_gift_log
				score = 25
				tags = { good random }
				character = root
				target = scope:hunt_participant

				#Effect
				root = {
					scope:hunt_participant = {
						if = {
							limit = { has_character_modifier = peregrine_falcon }
							hidden_effect = { remove_character_modifier = peregrine_falcon }
						}
						add_character_modifier = {
							modifier = peregrine_falcon
							years = 5
						}
					}
					activity_improve_relations_intent_effect = {
						CHARACTER = scope:hunt_participant
						REASON = friend_hunt_gifted_eyas
						OPINION = 15
						MODIFIER = hunt_gifted_eyas_opinion
					}
					stress_impact = {
						compassionate = major_stress_impact_loss
						generous = minor_stress_impact_loss
						lazy = minor_stress_impact_loss
						humble = minor_stress_impact_gain
						greedy = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = -0.5
				ai_compassion = -0.5
				ai_boldness = -0.5
			}
		}
	}

	option = { #Put it back
		name = hunt.5060.c
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_eyas_left_log
				score = 25
				tags = { good random }
				character = root

				#Effect
				root = {
					if = {
						limit = {
							is_landless_adventurer = yes
						}
						add_prestige = miniscule_prestige_gain
					}
					else = {
						add_prestige = medium_prestige_gain
					}
					hunt_activity_success_change_effect = { CHANGE = increase_minor }
					stress_impact = {
						lifestyle_hunter = minor_stress_impact_gain
						callous = minor_stress_impact_gain
						lazy = medium_stress_impact_loss
						compassionate = major_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = -0.5
				ai_compassion = -0.5
				ai_boldness = -0.5
			}
		}
	}
}

#######################
#	Meet local madman
#	by Linnéa Thimrén
#######################

hunt.7001 = {
	type = activity_event
	title = hunt.7001.t
	desc = hunt.7001.desc
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = fear
	}
	right_portrait = {
		character = scope:peasant
		animation = anger
		outfit_tags = { beggar_rags }
	}
	override_background = { reference = wilderness_wetlands }
	
	trigger = {
		scope:activity.activity_location = {
			county = {
				NOR = {
					has_county_modifier = hunt_talked_to_madman_modifier
					has_county_modifier = hunt_killed_local_madman_modifier
					has_county_modifier = hunt_disrespected_locals_modifier
				}
			}
			NOR = {
				terrain = plains
				terrain = mountains
				terrain = steppe
				terrain = desert
				terrain = desert_mountains
				terrain = oasis
				terrain = hills
				terrain = drylands
			}
		}
		NOT = { has_character_modifier = hunt_guide_local_madman_modifier }
	}

	weight_multiplier = {
		base = 1
		modifier = {
			add = 19
			scope:activity.activity_location = { terrain = wetlands }
		}
	}

	immediate = {
		scope:activity.activity_location = {
			county = {
				save_scope_as = activity_place
				holder = { save_scope_as = county_owner }
			}
		}
		#To create Shrek
		create_character = {
			age = { 20 35 }
			trait = giant
			trait = cynical
			trait = brave
			trait = eccentric
			random_traits = no
			gender_female_chance = 0
			dynasty = none
			faith = this.faith
			culture = this.culture
			location = scope:activity.activity_location
			save_scope_as = peasant
			#EK ADDITION
			after_creation = {
				ek_character_setup_effect = yes
			}
		}
	}

	option = {
		name = hunt.7001.adventurer
		trigger = {
			is_landless_adventurer = yes
		}
		set_variable = {
			name = hunt_guide_local_madman_place
			value = scope:activity_place
			years = 15
		}
		domicile = {
			change_provisions = microscopic_provisions_gain
		}
		scope:activity = {
			hunt_activity_success_change_effect = { CHANGE = increase_minor }
		}
		hunter_progress_point_gain_effect = { CHANGE = 1 RANDOM_CHANGE = 1 }
		add_courtier = scope:peasant
		
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_rationality = 0.5
			}
		}
	}

	option = { #Pls give us the tour
		name = hunt.7001.a
		set_variable = {
			name = hunt_guide_local_madman_place
			value = scope:activity_place
			years = 15
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_swamp_tour_log
				score = 25
				tags = { random neutral }
				character = root
				target = scope:peasant

				# Effects
				root = {
					hunter_progress_point_gain_effect = { CHANGE = 1 RANDOM_CHANGE = 1 }
					add_character_modifier = {
						modifier = hunt_guide_local_madman_modifier
						years = 15
						desc = hunt_guide_local_madman_modifier_custom_desc
					}
				}
				hunt_activity_success_change_effect = { CHANGE = decrease_minor }
			}
		}
		
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_rationality = 0.5
			}
		}
	}

	option = { #I'll convince him
		name = hunt.7001.b
		trigger = { this = scope:county_owner }
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_swamp_talked_key
				score = 25
				tags = { random neutral }
				character = root
				target = scope:peasant

				# Effects
				root = {
					duel = {
						skill = diplomacy
						target = scope:peasant
						10 = {
							desc = hunt.7001.b_success
							compare_modifier = {
								value = scope:duel_value
								min = -2.5
							}
							send_interface_toast = {
								title = hunt.7001.b_success
								left_icon = scope:peasant
								scope:activity_place = {
									add_county_modifier = {
										modifier = hunt_talked_to_madman_modifier
										days = 1825
									}
								}
								hunt_activity_success_change_effect = { CHANGE = increase_medium }
							}
						}
						10 = {
							desc = hunt.7001.b_failure
							compare_modifier = {
								value = scope:duel_value
								multiplier = -0.25
								min = -2.5
							}
							send_interface_toast = {
								title = hunt.7001.b_failure
								left_icon = scope:peasant
								add_prestige = minor_prestige_loss
								hunt_activity_success_change_effect = { CHANGE = decrease_medium }
							}
						}
					}
				}
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
			}
		}
	}

	option = { #Here's something to hunt!
		name = hunt.7001.c
		if = {
			limit = { has_trait = sadistic }
			hunt_activity_success_change_effect = { CHANGE = increase_major }
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_swamp_kill_key
				score = 25
				tags = { neutral random }
				character = root
				target = scope:peasant

				# Effect
				root = {
					hunter_progress_point_gain_effect = { CHANGE = 1 RANDOM_CHANGE = 1 }
				}
				add_dread = minor_dread_gain
				scope:peasant = {
					death = {
						death_reason = death_manhunted
						killer = root
					}
				}
				scope:activity_place = {
					add_county_modifier = {
						modifier = hunt_killed_local_madman_modifier
						days = 1825
					}
				}
				stress_impact = {
					sadistic = medium_stress_impact_loss
					compassionate = medium_stress_impact_gain
				}
			}
		}
		ai_chance = {
			base = 25
			modifier = {
				add = 100
				has_trait = sadistic
			}
			ai_value_modifier = {
				ai_vengefulness = 0.5
			}
		}
	}

	option = { #Out of my way peasant
		name = hunt.7001.d
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_swamp_dismissed_key
				score = 25
				tags = { random neutral }
				character = root
				target = scope:peasant

				# Effects
				scope:activity_place = {
					add_county_modifier = {
						modifier = hunt_disrespected_locals_modifier
						years = 5
					}
				}
				hunt_activity_success_change_effect = { CHANGE = increase_minor }
				stress_impact = {
					lifestyle_hunter = minor_stress_impact_loss
					compassionate = minor_stress_impact_gain
					humble = minor_stress_impact_gain
					just = minor_stress_impact_gain
					patient = minor_stress_impact_gain
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = 1
				ai_honor = -1
			}
		}
	}
}

#######################
#	Participant caught in a trap
#	by Joe Parkin
#######################

hunt.7011 = {
	type = activity_event
	title = hunt.7011.t
	desc = {
		desc = hunt.7011.desc
		random_valid = {
			desc = hunt.7011.snare # Snare
			desc = hunt.7011.bear # Bear
			desc = hunt.7011.pit # Pit
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:hunt_participant = { is_alive = yes }
				}
				desc = {
					desc = hunt.7011.alive
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:hunt_participant = { is_lowborn = yes }
							}
							desc = hunt.7011.lowborn
						}
						desc = hunt.7011.noble
					}
				}
			}
			desc = hunt.7011.dead
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = shock
	}
	center_portrait = {
		character = scope:physician
		animation = worry
		trigger = {
			NOT = { scope:hunt_participant = scope:physician }
		}
	} 
	right_portrait = {
		character = scope:hunt_participant
		animation = loss_1
	}
	cooldown = { years = 1 }

	trigger = {
		has_dlc_feature = tours_and_tournaments
		scope:activity = {
			any_attending_character = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				hunt_is_valid_subordinate_trigger = { LIEGE = scope:host }
			}
			activity_location.county = {
				NOT = { has_county_modifier = hunt_punished_trappers_modifier }
			}
		}
		NOT = {
			hunt_story_trigger = { STORY = chase }
		}
	}

	weight_multiplier = {
		base = 1
		# More likely if Master of Hunt is incompetent
		hunt_activity_master_aptitude_negative_modifier = { LIEGE = root }
		# More likely as development increases
		hunt_activity_building_development_modifier = { PROVINCE = scope:activity.activity_location }
	}

	immediate = {
		hunt_activity_random_subordinate_participant_effect = {
			ARCHETYPE = bumbling
			COMBATANT = yes
			SCOPE = hunt_participant
		}
		scope:hunt_participant = {
			increase_wounds_effect = { REASON = hunting_trap }
		}
		hunt_save_physician_effect = yes
		scope:activity = {
			if = {
				limit = {
					any_attending_character = {
						NOR = {
							this = root
							this = scope:hunt_participant
						}
					}
				}
				random_attending_character = {
					limit = {
						NOR = {
							this = root
							this = scope:hunt_participant
						}
					}
					save_scope_as = witness
				}
			}
		}
	}

	option = { #We must press on
		name = hunt.7011.a
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_trap_continue_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:hunt_participant

				#Effect
				root = {
					scope:hunt_participant = {
						add_character_modifier = {
							modifier = hunt_left_in_trap_modifier
							years = 5
						}
					}
					reverse_add_opinion = {
						target = scope:hunt_participant
						modifier = hunt_left_in_trap_opinion
						opinion = -20
					}
					stress_impact = {
						generous = minor_stress_impact_gain
						compassionate = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = 0.5
				ai_boldness = 0.5
				ai_compassion = -0.5
			}
		}
	}

	option = { #Physician
		name = hunt.7011.b
		trigger = {
			exists = scope:physician
			NOT = { scope:physician = scope:hunt_participant }
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_trap_physician_log
				score = 25
				tags = { random bad }
				character = scope:hunt_participant
				target = scope:physician

				#Effect
				root = {
					hunt_activity_success_change_effect = { CHANGE = decrease_medium }
					scope:hunt_participant = { save_scope_as = patient }
					hunt_physician_treatment_effect = yes
					stress_impact = {
						just = medium_stress_impact_loss
						compassionate = medium_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 10
				has_activity_intent = murder_attendee_intent
				exists = intent_target
				intent_target = scope:hunt_participant
			}
			opinion_modifier = {
				opinion_target = scope:hunt_participant
				multiplier = -0.5
			}
			ai_value_modifier = {
				ai_energy = -0.5
				ai_boldness = -0.5
				ai_compassion = 0.5
			}
		}
	}

	option = { #Send home
		name = hunt.7011.c
		trigger = {
			trigger_if = {
				limit = { exists = scope:physician }
				scope:physician = scope:hunt_participant
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_trap_home_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:hunt_participant

				#Effect
				root = {
					hunt_activity_success_change_effect = { CHANGE = decrease_medium }
					stress_impact = {
						greedy = minor_stress_impact_gain
						callous = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			opinion_modifier = {
				opinion_target = scope:hunt_participant
				multiplier = 0.5
			}
			ai_value_modifier = {
				ai_energy = -0.5
				ai_boldness = -0.5
				ai_compassion = 0.5
			}
		}
	}

	option = { #Kill
		name = hunt.7011.d
		trigger = {
			OR = {
				has_relation_rival = scope:hunt_participant
				any_scheme = {
					scheme_type = murder
					scheme_target_character = scope:hunt_participant
				}
				AND = {
					has_activity_intent = murder_attendee_intent
					intent_target = scope:hunt_participant
				}
				AND = {
					exists = house.house_head
					house.house_head = {
						any_owned_story = {
							story_type = story_cycle_house_feud
							exists = var:house_feud_house
							var:house_feud_house = scope:hunt_participant.house
						}
					}
				}
			}
		}
		flavor = hunt.7011.d.flavor
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_trap_murder_log
				score = 25
				tags = { random bad scheme intent }
				character = root
				target = scope:hunt_participant

				#Effect
				root = {
					unknown_murder_effect = {
						VICTIM = scope:hunt_participant
						MURDERER = root
						REASON = death_hunting_trap
					}
					if = {
						limit = { exists = scope:witness }
						duel = {
							skill = intrigue
							value = medium_skill_rating
							25 = {
								desc = hunt.7011.d.success
							}
							30 = {
								desc = hunt.7011.d.failure
								random_secret = {
									limit = {
										secret_type = secret_murder
										secret_target = scope:hunt_participant
									}
									reveal_to = scope:witness
								}
							}
						}
					}	
					stress_impact = {
						just = medium_stress_impact_gain
						compassionate = medium_stress_impact_gain
						honest = medium_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 10
				has_activity_intent = murder_attendee_intent
				exists = intent_target
				intent_target = scope:hunt_participant
			}
			opinion_modifier = {
				opinion_target = scope:hunt_participant
				multiplier = -0.5
			}
			ai_value_modifier = {
				ai_energy = -0.5
				ai_boldness = -0.5
				ai_compassion = 0.5
			}
		}
	}

	option = { #Punish peasants
		name = hunt.7011.e
		flavor = hunt.7011.e.flavor
		add_internal_flag = special
		trigger = {
			this = scope:activity.activity_location.province_owner
			scope:activity.activity_location = {
				OR = {
					has_building_or_higher = hunting_grounds_01
					has_building_or_higher = royal_forest_01
				}
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_trap_punish_log
				score = 25
				tags = { random bad scheme intent }
				character = root
				target = scope:hunt_participant

				#Effect
				root = {
					scope:activity.activity_location = {
						switch = {
							trigger = has_building_or_higher
							royal_forest_01 = { custom_tooltip = hunt.7011.e.royal_forests }
							hunting_grounds_01 = { custom_tooltip = hunt.7011.e.hunting_grounds }
						}
						county = {
							add_county_modifier = {
								modifier = hunt_punished_trappers_modifier
								years = 10
							}
						}
					}
					add_dread = minor_dread_gain
					stress_impact = {
						just = medium_stress_impact_gain
						compassionate = medium_stress_impact_gain
						honest = medium_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			modifier = {
				factor = 10
				has_activity_intent = murder_attendee_intent
				exists = intent_target
				intent_target = scope:hunt_participant
			}
			opinion_modifier = {
				opinion_target = scope:hunt_participant
				multiplier = -0.5
			}
			ai_value_modifier = {
				ai_energy = -0.5
				ai_boldness = -0.5
				ai_compassion = 0.5
			}
		}
	}
}

#######################
#	Boulder jumping - Ulrich X von Bregenz
#	by Joe Parkin
#######################

hunt.7020 = {
	type = activity_event
	title = hunt.7020.t
	desc = {
		desc = hunt.7020.desc
		first_valid = {
			triggered_desc = {
				trigger = {
					has_activity_intent = murder_attendee_intent
					intent_target = scope:pertinent
				}
				desc = hunt.7020.murder
			}
			triggered_desc = {
				trigger = {
					has_activity_intent = woo_attendee_intent
					intent_target = scope:pertinent
				}
				desc = hunt.7020.woo
			}
			triggered_desc = {
				trigger = {
					has_activity_intent = befriend_attendee_intent
					intent_target = scope:pertinent
				}
				desc = hunt.7020.befriend
			}
			desc = hunt.7020.bravado
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:onlooker
		animation = happiness
	}
	lower_center_portrait = {
		character = scope:pertinent
		trigger = {
			NOT = { this = root }
		}
	}
	cooldown = { years = 15 }

	trigger = {
		has_dlc_feature = tours_and_tournaments
		scope:activity = {
			any_attending_character = {	count >= 5 }
			activity_location = {
				NOR = {
					terrain = plains
					terrain = wetlands
					terrain = steppe
				}
			}
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			scope:activity.activity_location = {
				OR = {
					terrain = hills
					terrain = mountains
					terrain = desert_mountains
				}
			}
		}
		modifier = {
			factor = 1.5
			has_activity_intent = murder_attendee_intent
			exists = intent_target
			intent_target = {
				is_alive = yes
				is_participant_in_activity = scope:activity
			}
		}
		modifier = {
			has_trait = arrogant
			factor = 2
		}
		modifier = {
			has_trait = humble
			factor = 0.5
		}
		modifier = {
			factor = 0.5
			health < fine_health
		}
	}

	immediate = {
		if = {
			limit = {
				OR = {
					has_activity_intent = woo_attendee_intent
					has_activity_intent = befriend_attendee_intent
					has_activity_intent = murder_attendee_intent
				}
				exists = intent_target
				intent_target = {
					is_alive = yes
					NOT = { this = root }
					is_participant_in_activity = scope:activity
				}				
			}
			intent_target = { save_scope_as = intentee }
		}
		else_if = {
			limit = {
				exists = var:hunt_murder_attempt
				var:hunt_murder_attempt = {
					is_alive = yes
					is_participant_in_activity = scope:activity
				}
			}
			var:hunt_murder_attempt = { save_scope_as = intentee }
		}
		hunt_activity_random_subordinate_participant_effect = {
			ARCHETYPE = arrogant
			COMBATANT = yes
			SCOPE = hunt_participant
		}
		if = {
			limit = { exists = scope:intentee }
			scope:intentee = { save_scope_as = pertinent }
		}
		else_if = {
			limit = { exists = scope:hunt_participant }
			save_scope_as = pertinent
		}
		if = {
			limit = {
				exists = scope:hunt_participant
				NOT = { scope:hunt_participant = scope:pertinent }
			}
			scope:hunt_participant = { save_scope_as = onlooker }
		}
		else = {
			scope:activity = {
				random_attending_character = {
					limit = {
						NOR = {
							this = root
							this = scope:pertinent
							trigger_if = {
								limit = { exists = scope:hunt_participant }
								this = scope:hunt_participant
							}
						}
					}
					save_scope_as = onlooker
				}
			}
		}
		save_scope_value_as = {
			name = integer
			value = {
				integer_range = {
					min = -3
					max = 3
				}
			}
		}
	}

	option = { #Jump the boulder
		name = hunt.7020.b
		flavor = hunt.7020.b.flavor
		hunt_wound_select_effect = yes
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_boulder_jump_key
				score = 25
				tags = { random neutral }
				character = root

				# Effect
				root = {
					random_list = {
						20 = {
							desc = hunt_boulder_jump_success_self
							min = 5
							hunt_boulder_jump_success_modifiers = { CHARACTER = root }
							send_interface_toast = {
								title = hunt_boulder_jump_success_self
								add_prestige = miniscule_prestige_gain
								scope:activity = {
									every_attending_character = {
										limit = {
											NOT = { this = root }
										}
										custom = activity_every_attendee_tt
										add_opinion = {
											target = root
											modifier = hunt_jumped_boulder_opinion
											opinion = 5
										}
									}
								}
							}
						}
						30 = {
							desc = hunt_boulder_jump_failure_self
							min = 5
							hunt_boulder_jump_failure_modifiers = { CHARACTER = root }
							show_as_tooltip = { add_prestige = miniscule_prestige_loss }
							hidden_effect = {
								send_interface_toast = {
									title = hunt_boulder_jump_failure_self
									add_prestige = minor_prestige_loss
									hunt_wound_apply_effect = { SEVERE = no }
								}
							}
							hunt_activity_success_change_effect = { CHANGE = decrease_medium }
						}
					}
					if = {
						limit = {
							has_activity_intent = woo_attendee_intent
							intent_target = { is_participant_in_activity = scope:activity }
						}
						random = {
							chance = 25
							modifier = { add = scope:integer }
							modifier = {
								factor = 1.5
								intent_target = { has_personality_extroverted_trigger = yes }
							}
							modifier = {
								factor = 0.75
								intent_target = { has_personality_introverted_trigger = yes }
							}
							modifier = {
								factor = 1.5
								intent_target = { has_personality_emotional_trigger = yes }
							}
							modifier = {
								factor = 0.75
								intent_target = { has_personality_levelheaded_trigger = yes }
							}
							send_interface_toast = {
								title = hunt_boulder_impressed_title
								left_icon = intent_target
								progress_towards_lover_effect = {
									REASON = lover_jumped_over_boulder_reason
									CHARACTER = intent_target
									OPINION = default_lover_opinion
								}
							}
						}
					}		
					stress_impact = {
						craven = minor_stress_impact_gain
						humble = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = 0.5
				ai_boldness = 0.5
				ai_rationality = -0.5
			}
		}
	}

	option = { #Jump the BIG boulder
		name = {
			trigger = {
				has_activity_intent = woo_attendee_intent
				intent_target = scope:pertinent
			}
			text = hunt.7020.a.intent
		}
		name = {
			trigger = {
				NAND = {
					has_activity_intent = woo_attendee_intent
					intent_target = scope:pertinent
				}
			}
			text = hunt.7020.a
		}
		flavor = hunt.7020.a.flavor
		hunt_wound_select_effect = yes
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_boulder_big_key
				score = 25
				tags = { random neutral }
				character = root

				# Effect
				random_list = {
					5 = {
						desc = hunt_boulder_jump_success_self
						min = 5
						hunt_boulder_jump_success_modifiers = { CHARACTER = root }
						send_interface_toast = {
							title = hunt_boulder_jump_success_self
							root = {
								add_prestige = minor_prestige_gain
							}
							scope:activity = {
								every_attending_character = {
									limit = {
										NOT = { this = root }
									}
									custom = activity_every_attendee_tt
									add_opinion = {
										target = root
										modifier = hunt_jumped_boulder_opinion
										opinion = 15
									}
								}
							}
						}
					}
					50 = {
						desc = hunt_boulder_jump_failure_self
						min = 20
						hunt_boulder_jump_failure_modifiers = { CHARACTER = root }
						show_as_tooltip = {
							root = {
								add_prestige = miniscule_prestige_gain
								add_character_modifier = {
									modifier = crushed_by_boulder_modifier
									months = 6
								}
							}
						}
						hidden_effect = {
							send_interface_toast = {
								title = hunt_boulder_jump_failure_self
								root = {
									add_prestige = miniscule_prestige_gain
									add_character_modifier = {
										modifier = crushed_by_boulder_modifier
										months = 6
									}
									hunt_wound_apply_effect = { SEVERE = yes }
								}
							}
						}
						hunt_activity_success_change_effect = { CHANGE = decrease_medium }
					}
				}
				root = {
					if = {
						limit = {
							has_activity_intent = woo_attendee_intent
							intent_target = { is_participant_in_activity = scope:activity }
						}
						random = {
							chance = 50
							modifier = { add = scope:integer }
							modifier = {
								factor = 1.5
								intent_target = { has_personality_extroverted_trigger = yes }
							}
							modifier = {
								factor = 0.75
								intent_target = { has_personality_introverted_trigger = yes }
							}
							modifier = {
								factor = 1.5
								intent_target = { has_personality_emotional_trigger = yes }
							}
							modifier = {
								factor = 0.75
								intent_target = { has_personality_levelheaded_trigger = yes }
							}
							send_interface_toast = {
								title = hunt_boulder_impressed_title
								left_icon = intent_target
								progress_towards_lover_effect = {
									REASON = lover_jumped_over_boulder_reason
									CHARACTER = intent_target
									OPINION = default_lover_opinion
								}
							}
						}
					}
				}
				stress_impact = {
					craven = medium_stress_impact_gain
					humble = minor_stress_impact_gain
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = 1
				ai_boldness = 1
				ai_rationality = -1
			}
		}
	}

	option = { #Goad into jump
		name = {
			trigger = {
				OR = {
					AND = {
						has_activity_intent = murder_attendee_intent
						intent_target = scope:pertinent
					}
					has_relation_rival = scope:pertinent
				}
			}
			text = hunt.7020.c.rival
		}
		name = {
			trigger = {
				NOR = {
					AND = {
						has_activity_intent = murder_attendee_intent
						intent_target = scope:pertinent
					}
					has_relation_rival = scope:pertinent
				}
			}
			text = hunt.7020.c
		}
		trigger = {
			exists = scope:pertinent
			OR = {
				AND = {
					has_activity_intent = murder_attendee_intent
					intent_target = scope:pertinent
				}
				has_relation_rival = scope:pertinent
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_boulder_goad_key
				score = 25
				tags = { random neutral }
				character = root
				target = scope:pertinent

				# Effect
				scope:pertinent = {
					if = {
						limit = {
							NOR = {
								has_trait = arrogant
								has_trait = brave
							}
						}
						add_opinion = {
							target = root
							modifier = hunt_jump_boulder_pressure_opinion
							opinion = -10
						}
					}
					hunt_wound_select_effect = yes
					random_list = {
						20 = {
							desc = hunt_boulder_jump_success_pertinent
							hunt_boulder_jump_success_modifiers = { CHARACTER = scope:pertinent }
							root = {
								send_interface_toast = {
									title = hunt_boulder_jump_success_pertinent
									left_icon = scope:pertinent
									scope:pertinent = { add_prestige = miniscule_prestige_gain }
									scope:activity = {
										every_attending_character = {
											limit = {
												NOT = { this = root }
											}
											custom = activity_every_attendee_tt
											add_opinion = {
												target = scope:pertinent
												modifier = hunt_jumped_boulder_opinion
												opinion = 5
											}
										}
									}
								}
							}
						}
						30 = {
							desc = hunt_boulder_jump_failure_pertinent
							hunt_boulder_jump_failure_modifiers = { CHARACTER = scope:pertinent }
							show_as_tooltip = { add_prestige = miniscule_prestige_loss }
							root = {
								hidden_effect = {
									send_interface_toast = {
										title = hunt_boulder_jump_failure_pertinent
										left_icon = scope:pertinent
										scope:pertinent = {
											add_prestige = miniscule_prestige_loss
											hunt_wound_apply_effect = { SEVERE = no }
										}
									}
								}
							}
						}
						20 = {
							desc = hunt_boulder_jump_refusal
							hunt_boulder_jump_failure_modifiers = { CHARACTER = scope:pertinent }
							modifier = {
								factor = 0.5
								scope:pertinent = { has_personality_extroverted_trigger = yes }
							}
							modifier = {
								factor = 2
								scope:pertinent = { has_personality_introverted_trigger = yes }
							}
							modifier = {
								factor = 0.5
								scope:pertinent = { has_personality_emotional_trigger = yes }
							}
							modifier = {
								factor = 2
								scope:pertinent = { has_personality_levelheaded_trigger = yes }
							}
							root = {
								send_interface_toast = {
									title = hunt_boulder_jump_refusal
									left_icon = scope:pertinent
									scope:pertinent = { add_prestige = minor_prestige_loss }
								}
							}
						}
					}
				}
				root = {
					stress_impact = {
						compassionate = minor_stress_impact_gain
						humble = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			opinion_modifier = {
				opinion_target = scope:pertinent
				multiplier = -0.5
			}
			modifier = {
				factor = 10
				OR = {
					AND = {
						has_activity_intent = murder_attendee_intent
						intent_target = scope:pertinent
					}
					has_relation_rival = scope:pertinent
				}
			}
			ai_value_modifier = {
				ai_energy = -0.5
				ai_boldness = -0.5
				ai_compassion = -1
			}
		}
	}

	option = { #Challenge to jump
		name = hunt.7020.d
		flavor = hunt.7020.d.flavor
		trigger = {
			exists = scope:pertinent
			OR = {
				AND = {
					has_activity_intent = befriend_attendee_intent
					intent_target = scope:pertinent
				}
				has_relation_friend = scope:pertinent
			}
		}
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_boulder_challenge_key
				score = 25
				tags = { random neutral }
				character = root
				target = scope:pertinent

				# Effect
				root = {
					if = {
						limit = {
							scope:pertinent = {
								NOR = {
									has_trait = arrogant
									has_trait = brave
								}
							}
						}
						reverse_add_opinion = {
							target = scope:pertinent
							modifier = hunt_jump_boulder_pressure_opinion
							opinion = -10
						}
					}
					if = {
						limit = {
							has_activity_intent = woo_attendee_intent
							intent_target = scope:pertinent
						}
						random = {
							chance = 25
							modifier = {
								scope:pertinent = {
									NOR = {
										has_trait = arrogant
										has_trait = brave
									}
								}
								factor = 2
							}
							modifier = { add = scope:integer }
							modifier = {
								factor = 1.5
								intent_target = { has_personality_extroverted_trigger = yes }
							}
							modifier = {
								factor = 0.75
								intent_target = { has_personality_introverted_trigger = yes }
							}
							modifier = {
								factor = 1.5
								intent_target = { has_personality_emotional_trigger = yes }
							}
							modifier = {
								factor = 0.75
								intent_target = { has_personality_levelheaded_trigger = yes }
							}
							send_interface_toast = {
								title = hunt_boulder_impressed_title
								left_icon = intent_target
								progress_towards_lover_effect = {
									REASON = lover_jumped_over_boulder_reason
									CHARACTER = intent_target
									OPINION = default_lover_opinion
								}
							}
						}
					}
					hunt_wound_select_effect = yes
					random_list = {
						10 = {
							desc = hunt_boulder_jump_success_both
							min = 5
							hunt_boulder_jump_success_modifiers = { CHARACTER = root }
							hunt_boulder_jump_success_modifiers = { CHARACTER = scope:pertinent }
							show_as_tooltip = { add_prestige = miniscule_prestige_gain }
							hidden_effect = {
								send_interface_toast = {
									title = hunt_boulder_jump_success_both
									left_icon = scope:pertinent
									add_prestige = miniscule_prestige_gain
									scope:pertinent = { add_prestige = miniscule_prestige_gain }
									scope:activity = {
										every_attending_character = {
											limit = {
												NOR = {
													this = root
													this = scope:pertinent
												}
											}
											custom = hunt_every_attendee_tt
											add_opinion = {
												target = root
												modifier = hunt_jumped_boulder_opinion
												opinion = 5
											}
											add_opinion = {
												target = scope:pertinent
												modifier = hunt_jumped_boulder_opinion
												opinion = 5
											}
										}
									}
								}
							}
						}
						20 = {
							desc = hunt_boulder_jump_failure_self
							min = 5
							hunt_boulder_jump_failure_modifiers = { CHARACTER = root }
							show_as_tooltip = { add_prestige = minor_prestige_loss }
							hidden_effect = {
								send_interface_toast = {
									title = hunt_boulder_jump_failure_self
									left_icon = scope:pertinent
									add_prestige = minor_prestige_loss
									hunt_wound_apply_effect = { SEVERE = no }
									scope:pertinent = { add_prestige = miniscule_prestige_gain }
									scope:activity = {
										every_attending_character = {
											limit = {
												NOR = {
													this = root
													this = scope:pertinent
												}
											}
											custom = hunt_every_attendee_tt
											add_opinion = {
												target = scope:pertinent
												modifier = hunt_jumped_boulder_opinion
												opinion = 5
											}
										}
									}
								}
							}
						}
						20 = {
							desc = hunt_boulder_jump_failure_pertinent
							min = 5
							hunt_boulder_jump_failure_modifiers = { CHARACTER = scope:pertinent }
							show_as_tooltip = { add_prestige = miniscule_prestige_gain }
							hidden_effect = {
								send_interface_toast = {
									title = hunt_boulder_jump_failure_pertinent
									left_icon = scope:pertinent
									scope:pertinent = {
										add_prestige = miniscule_prestige_loss
										hunt_wound_apply_effect = { SEVERE = no }
									}
									add_prestige = miniscule_prestige_gain
									scope:activity = {
										every_attending_character = {
											limit = {
												NOR = {
													this = root
													this = scope:pertinent
												}
											}
											custom = hunt_every_attendee_tt
											add_opinion = {
												target = root
												modifier = hunt_jumped_boulder_opinion
												opinion = 5
											}
										}
									}
								}
							}
						}
						10 = {
							desc = hunt_boulder_jump_failure_both
							min = 5
							hunt_boulder_jump_failure_modifiers = { CHARACTER = root }
							hunt_boulder_jump_failure_modifiers = { CHARACTER = scope:pertinent }
							show_as_tooltip = { add_prestige = miniscule_prestige_loss }	
							hidden_effect = {
								send_interface_toast = {
									title = hunt_boulder_jump_failure_both
									left_icon = scope:pertinent
									add_prestige = miniscule_prestige_loss
									hunt_wound_apply_effect = { SEVERE = no }
									scope:pertinent = {
										add_prestige = miniscule_prestige_loss
										hunt_wound_apply_effect = { SEVERE = no }
									}
								}
							}
						}
						10 = {
							desc = hunt_boulder_jump_refusal
							hunt_boulder_jump_failure_modifiers = { CHARACTER = root }
							modifier = {
								factor = 0.5
								scope:pertinent = { has_personality_extroverted_trigger = yes }
							}
							modifier = {
								factor = 2
								scope:pertinent = { has_personality_introverted_trigger = yes }
							}
							modifier = {
								factor = 0.5
								scope:pertinent = { has_personality_emotional_trigger = yes }
							}
							modifier = {
								factor = 2
								scope:pertinent = { has_personality_levelheaded_trigger = yes }
							}
							send_interface_toast = {
								title = hunt_boulder_jump_refusal
								left_icon = scope:pertinent
								scope:pertinent = { add_prestige = minor_prestige_loss }
							}
						}
					}
					stress_impact = {
						compassionate = minor_stress_impact_gain
						humble = minor_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			opinion_modifier = {
				opinion_target = scope:pertinent
				multiplier = -0.5
			}
			modifier = {
				factor = 10
				has_activity_intent = murder_attendee_intent
				exists = intent_target
				intent_target = scope:pertinent
			}
			ai_value_modifier = {
				ai_energy = -0.5
				ai_boldness = -0.5
				ai_compassion = -1
			}
		}
	}

	option = { #Think better of it
		name = hunt.7020.e
		flavor = hunt.7020.e.flavor
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_boulder_brain_key
				score = 25
				tags = { random neutral }
				character = root

				# Effect
				root = {
					hunt_activity_success_change_effect = { CHANGE = increase_minor }
					stress_impact = {
						brave = miniscule_stress_impact_gain
						arrogant = miniscule_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_energy = -1
				ai_boldness = -1
				ai_compassion = 0.5
			}
		}
	}
}

#######################
#	Seduce intent - conversation
#	by Joe Parkin
#######################

hunt.7100 = {
	type = activity_event
	title = hunt.7100.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:woo_target.primary_spouse
					NOT = { is_consort_of = scope:woo_target }
					scope:woo_target.primary_spouse = { is_participant_in_activity = scope:activity }
				}
				desc = hunt.7100.married
			}
			triggered_desc = {
				trigger = {
					exists = scope:woo_target.primary_spouse
					NOT = { is_consort_of = scope:woo_target }
				}
				desc = hunt.7100.married_absent
			}
			triggered_desc = {
				trigger = {
					exists = scope:woo_target.primary_spouse
					is_consort_of = scope:woo_target
				}
				desc = hunt.7100.currentspouse
			}
			desc = hunt.7100.opening
		}
		desc = hunt.7100.desc
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = flirtation
	}
	right_portrait = {
		character = scope:woo_target
		animation = happiness
	}
	cooldown = { years = 1 }

	trigger = {
		OR = {
			AND = {
				has_activity_intent = woo_attendee_intent
				exists = intent_target
				intent_target = {
					is_alive = yes
					is_participant_in_activity = scope:activity
				}
			}
			any_scheme = {
				OR = {
					scheme_type = seduce
					scheme_type = courting
				}
				scheme_target_character = {
					is_alive = yes
					is_participant_in_activity = scope:activity
				}
			}
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 10
			has_activity_intent = woo_attendee_intent
			exists = intent_target
			intent_target = {
				is_alive = yes
				is_participant_in_activity = scope:activity
			}
		}
	}

	immediate = {
		save_scope_as = woo_actor
		if = {
			limit = {
				has_activity_intent = woo_attendee_intent
				exists = intent_target
				intent_target = {
					is_alive = yes
					is_participant_in_activity = scope:activity
				}
			}
			intent_target = {
				save_scope_as = woo_target
				save_scope_as = target
			}
		}
		else = {
			random_scheme = {
				limit = {
					scheme_type = seduce
					scheme_target_character = {
						is_alive = yes
						is_participant_in_activity = scope:activity
					}
				}
				scheme_target_character = {
					save_scope_as = woo_target
					save_scope_as = target
				}
			}
		}
	}

	option = { #We must press on
		name = hunt.7100.a
		trigger = { has_trait = lifestyle_hunter }
		custom_tooltip = hunt.7100.a.tt
		save_scope_value_as = {
			name = woo_approach
			value = flag:hunter
		}
		stress_impact = {
			craven = minor_stress_impact_gain
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = 0.5
				ai_boldness = 0.5
				ai_compassion = -0.5
			}
		}
	}

	option = { #Falconer
		name = hunt.7100.b
		trigger = {
			has_trait = lifestyle_hunter
			has_trait_xp = {
				trait = lifestyle_hunter
				track = falconer
				value >= trait_second_level
			}
		}
		custom_tooltip = hunt.7100.b.tt
		save_scope_value_as = {
			name = woo_approach
			value = flag:falconer
		}
		stress_impact = {
			shy = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
		}
	}

	option = { #Pity
		name = hunt.7100.c
		custom_tooltip = hunt.7100.c.tt
		save_scope_value_as = {
			name = woo_approach
			value = flag:pity
		}
		stress_impact = {
			sadistic = minor_stress_impact_gain
			callous = minor_stress_impact_gain
		}
		ai_chance = {
			base = 25
			opinion_modifier = {
				opinion_target = scope:woo_target
				multiplier = 0.5
			}
			ai_value_modifier = {
				ai_energy = -0.5
				ai_boldness = -0.5
				ai_compassion = 0.5
			}
		}
	}

	option = { #Wastrel
		name = hunt.7100.d
		custom_tooltip = hunt.7100.d.tt
		save_scope_value_as = {
			name = woo_approach
			value = flag:wastrel
		}
		stress_impact = {
			lifestyle_hunter = minor_stress_impact_gain
			content = minor_stress_impact_gain
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = 1
				ai_compassion = 0.5
			}
		}
	}

	option = { #Steward
		name = hunt.7100.e
		custom_tooltip = hunt.7100.e.tt
		save_scope_value_as = {
			name = woo_approach
			value = flag:steward
		}
		stress_impact = {
			impatient = minor_stress_impact_gain
			lazy = minor_stress_impact_gain
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = 1
				ai_compassion = 0.5
			}
		}
	}

	after = {
		show_as_tooltip = {
			random_list = {
				10 = {
					desc = seduce_ongoing_possible_outcomes_tooltip_effect.success.desc
					show_chance = no
					progress_towards_lover_effect = {
						CHARACTER = scope:woo_target
						OPINION = 15
						REASON =  lover_hunt_conversation_impressed
					}
				}
				10 = {
					desc = seduce_ongoing_possible_outcomes_tooltip_effect.failure.desc
					show_chance = no
					reverse_add_opinion = {
						target = scope:woo_target
						modifier = hunt_failed_woo_opinion
						opinion = -10
					}
				}
			}
		}
		scope:woo_target = {
			save_scope_as = target
			hidden_effect = {
				#Evaluate what makes for a "right" choice
				if = {
					limit = {
						OR = {
							AND = {
								OR = {
									has_trait = lifestyle_hunter
									ai_energy > medium_positive_energy
								}
								hunt_dharmic_pacificist_trigger = no
								exists = scope:woo_approach
								scope:woo_approach = flag:hunter
							}
							AND = {
								OR = {
									AND = {
										has_trait = lifestyle_hunter
										has_trait_xp = {
											trait = lifestyle_hunter
											track = falconer
											value >= trait_second_level
										}	
									}
									ai_sociability > medium_positive_compassion # socialbility doesn't exist
								}
								hunt_dharmic_pacificist_trigger = no
								exists = scope:woo_approach
								scope:woo_approach = flag:falconer
							}
							AND = {
								OR = {
									has_personality_benevolent_trigger = yes
									ai_compassion > medium_positive_compassion
								}
								exists = scope:woo_approach
								scope:woo_approach = flag:pity
							}
							AND = {
								OR = {
									has_trait = ambitious
									ai_boldness > medium_positive_boldness
								}
								exists = scope:woo_approach
								scope:woo_approach = flag:wastrel
							}
							AND = {
								OR = {
									has_trait = education_stewardship
									ai_rationality > medium_positive_rationality
								}
								exists = scope:woo_approach
								scope:woo_approach = flag:steward
							}
						}
					}
					save_scope_value_as = {
						name = made_great_choice
						value = yes
					}
				}
				random_list = {
					100 = { #Success
						modifier = {
							add = 100
							exists = scope:woo_approach
							scope:woo_approach = flag:hunter
							has_trait = brave
						}
						modifier = {
							add = 100
							exists = scope:woo_approach
							scope:woo_approach = flag:falconer
							has_trait = gregarious
						}
						modifier = {
							add = 100
							exists = scope:woo_approach
							scope:woo_approach = flag:pity
							has_trait = compassionate
						}
						modifier = {
							add = 100
							exists = scope:woo_approach
							scope:woo_approach = flag:wastrel
							has_trait = diligent
						}
						modifier = {
							add = 100
							exists = scope:woo_approach
							scope:woo_approach = flag:steward
							has_trait = architect
						}
						trigger_event = {
							id = hunt.7101
							days = { 1 2 }
						}
						scope:woo_actor = {
							trigger_event = {
								id = hunt.7103
								days = { 3 4 }
							}
						}
					}
					100 = { #Failure
						trigger = {
							NOT = { exists = scope:made_great_choice }
						}
						modifier = {
							add = 100
							exists = scope:woo_approach
							OR = {
								scope:woo_approach = flag:hunter
								scope:woo_approach = flag:falconer
							}
							hunt_dharmic_pacificist_trigger = yes
						}
						modifier = {
							add = 100
							exists = scope:woo_approach
							scope:woo_approach = flag:hunter
							has_trait = craven
						}
						modifier = {
							add = 100
							exists = scope:woo_approach
							scope:woo_approach = flag:falconer
							has_trait = shy
						}
						modifier = {
							add = 100
							exists = scope:woo_approach
							scope:woo_approach = flag:pity
							OR = {
								has_trait = callous
								has_trait = sadistic
							}
						}
						modifier = {
							add = 100
							exists = scope:woo_approach
							scope:woo_approach = flag:wastrel
							has_trait = content
						}
						modifier = {
							add = 100
							exists = scope:woo_approach
							scope:woo_approach = flag:steward
							has_trait = lazy
						}
						trigger_event = {
							id = hunt.7102
							days = { 1 2 }
						}
						scope:woo_actor = {
							trigger_event = {
								id = hunt.7104
								days = { 3 4 }
							}
						}
					}
				}
			}
		}
	}
}

#Target: Success
hunt.7101 = {
	type = activity_event
	title = hunt.7100.t
	desc = {
		desc = hunt.7101.opening
		first_valid = {
			triggered_desc = {
				trigger = { scope:woo_approach = flag:hunter }
				desc = hunt.7101.hunter
			}
			triggered_desc = {
				trigger = { scope:woo_approach = flag:falconer }
				desc = hunt.7101.falconer
			}
			triggered_desc = {
				trigger = { scope:woo_approach = flag:pity }
				desc = hunt.7101.pity
			}
			triggered_desc = {
				trigger = { scope:woo_approach = flag:wastrel }
				desc = hunt.7101.wastrel
			}
			triggered_desc = {
				trigger = { scope:woo_approach = flag:steward }
				desc = hunt.7101.steward
			}
			desc = hunt.7101.fallback
		}
	}	
	left_portrait = {
		character = scope:woo_actor
		animation = flirtation
	}
	theme = seduce_scheme

	trigger = { exists = scope:woo_approach }

	option = {
		name = hunt.7102.a
		add_stress = minor_stress_loss
		show_as_tooltip = {
			progress_towards_lover_effect = {
				CHARACTER = scope:woo_target
				OPINION = 15
				REASON =  lover_hunt_conversation_impressed
			}
		}
	}
}

#Target: Failure
hunt.7102 = {
	type = activity_event
	title = hunt.7100.t
	desc = {
		desc = hunt.7101.opening
		first_valid = {
			triggered_desc = {
				trigger = { scope:woo_approach = flag:hunter }
				desc = hunt.7102.hunter
			}
			triggered_desc = {
				trigger = { scope:woo_approach = flag:falconer }
				desc = hunt.7102.falconer
			}
			triggered_desc = {
				trigger = { scope:woo_approach = flag:pity }
				desc = hunt.7102.pity
			}
			triggered_desc = {
				trigger = { scope:woo_approach = flag:wastrel }
				desc = hunt.7102.wastrel
			}
			triggered_desc = {
				trigger = { scope:woo_approach = flag:steward }
				desc = hunt.7102.steward
			}
			desc = hunt.7102.fallback
		}
	}
	left_portrait = {
		character = scope:woo_actor
		animation = flirtation
	}
	theme = unfriendly

	trigger = { exists = scope:woo_approach }

	option = {
		name = hunt.7102.a
	}
}

#Actor: Success
hunt.7103 = {
	type = activity_event
	title = hunt.7100.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = { scope:woo_approach = flag:hunter }
				desc = hunt.7103.hunter
			}
			triggered_desc = {
				trigger = { scope:woo_approach = flag:falconer }
				desc = hunt.7103.falconer
			}
			triggered_desc = {
				trigger = { scope:woo_approach = flag:pity }
				desc = hunt.7103.pity
			}
			triggered_desc = {
				trigger = { scope:woo_approach = flag:wastrel }
				desc = hunt.7103.wastrel
			}
			triggered_desc = {
				trigger = { scope:woo_approach = flag:steward }
				desc = hunt.7103.steward
			}
			desc = hunt.7103.fallback
		}
		desc = hunt.7103.desc
	}	
	left_portrait = {
		character = root
		animation = flirtation_left
	}	
	right_portrait = {
		character = scope:woo_target
		animation = flirtation
	}
	theme = seduce_scheme
	
	override_background = { reference = wilderness_activity }

	trigger = { exists = scope:woo_approach }

	option = {
		name = hunt.7103.a
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_woo_success_key
				score = 75
				tags = { random good intent }
				character = root
				target = scope:woo_target

				#Effect
				root = {
					progress_towards_lover_effect = {
						CHARACTER = scope:woo_target
						OPINION = 15
						REASON = lover_hunt_conversation_impressed
					}
				}
			}
		}
	}
}

#Actor: Failure
hunt.7104 = {
	type = activity_event
	title = hunt.7100.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = { scope:woo_approach = flag:hunter }
				desc = hunt.7104.hunter
			}
			triggered_desc = {
				trigger = { scope:woo_approach = flag:falconer }
				desc = hunt.7104.falconer
			}
			triggered_desc = {
				trigger = { scope:woo_approach = flag:pity }
				desc = hunt.7104.pity
			}
			triggered_desc = {
				trigger = { scope:woo_approach = flag:wastrel }
				desc = hunt.7104.wastrel
			}
			triggered_desc = {
				trigger = { scope:woo_approach = flag:steward }
				desc = hunt.7104.steward
			}
			desc = hunt.7104.fallback
		}
		desc = hunt.7104.desc
	}	
	left_portrait = {
		character = scope:woo_target
		animation = eyeroll
	}
	theme = seduce_scheme

	trigger = { exists = scope:woo_approach }

	option = {
		name = hunt.7104.a
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_woo_failure_key
				score = 75
				tags = { random bad intent }
				character = root
				target = scope:woo_target

				#Effect
				reverse_add_opinion = {
					target = scope:woo_target
					modifier = hunt_failed_woo_opinion
					opinion = -10
				}
			}
		}
	}
}

#######################
#	Murder scheme green light
#	by Joe Parkin
#######################

scripted_trigger hunt_hostile_scheme_target_trigger = {
	NOT = { this = root }
	is_alive = yes
	is_participant_in_activity = scope:activity
	# Murder scheme target
	any_targeting_scheme = {
		scheme_type = $TYPE$
		OR = {
			scheme_owner = root
			any_scheme_agent_character = { this = root }
		}
	}
}

hunt.7200 = {
	type = activity_event
	title = hunt.7200.t
	desc = {
		desc = hunt.7200.desc
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:accomplice_2 }
				desc = hunt.7200.accomplice_2
			}
			triggered_desc = {
				trigger = { exists = scope:accomplice }
				desc = hunt.7200.accomplice
			}
			desc = hunt.7200.alone
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = scheme
	}
	right_portrait = {
		character = scope:murder_target
		animation = happiness
	}
	center_portrait = {
		character = scope:accomplice
		animation = schadenfreude
	}
	lower_left_portrait = scope:accomplice_2
	cooldown = { years = 1 }

	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		has_dlc_feature = tours_and_tournaments
		scope:activity ?= {
			any_attending_character = {
				hunt_hostile_scheme_target_trigger = { TYPE = murder }
			}
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			scope:host.court_position:master_of_hunt_court_position ?= this
			hunt_murder_risk_trigger = yes
		}
		modifier = {
			factor = 2
			scope:host.court_position:huntperson_camp_officer ?= this
			hunt_murder_risk_trigger = yes
		}
	}

	immediate = {
		scope:activity = {
			random_attending_character = {
				limit = {
					hunt_hostile_scheme_target_trigger = { TYPE = murder }
				}
				save_scope_as = murder_target
				# Murder scheme target
				random_targeting_scheme = {
					limit = {
						scheme_type = murder
						OR = {
							scheme_owner = root
							any_scheme_agent_character = { this = root }
						}
					}
					save_scope_as = scheme
					every_scheme_agent_character = { add_to_list = murder_agents }
					scheme_owner = { save_scope_as = murder_schemer }
					hunt_save_hostile_accomplice_effect = {
						SCHEME = murder
						VICTIM = scope:murder_target
					}
				}
			}
		}
	}

	option = { # Today is the day
		name = hunt.7200.a
		custom_tooltip = hunt_murder_accomplice_tt
		set_variable = {
			name = hunt_murder_attempt
			value = scope:murder_target
			years = 1
		}
		stress_impact = {
			patient = minor_stress_impact_gain
			craven = minor_stress_impact_gain
		}
	}

	option = { # We are not ready
		name = hunt.7200.d
		set_variable = {
			name = hunt_murder_defer
			value = scope:murder_target
			years = 1
		}
		hunt_activity_success_change_effect = { CHANGE = increase_minor }
		stress_impact = {
			impatient = minor_stress_impact_gain
			brave = minor_stress_impact_gain
		}
	}
}

#######################
#	Murder scheme attempt
#	by Joe Parkin
#######################

hunt.7210 = {
	type = activity_event
	title = hunt.7200.t
	desc = {
		desc = hunt.7210.opening
		desc = hunt.7210.desc
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:accomplice }
				desc = hunt.7210.accomplice
			}
			desc = hunt.1012.alone
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = scheme
	}
	right_portrait = {
		character = scope:murder_target
		animation = thinking
	}
	center_portrait = {
		character = scope:accomplice
		animation = schadenfreude
	}
	lower_center_portrait = scope:accomplice_2
	cooldown = { years = 1 }

	trigger = {
		NOR = {
			hunt_story_trigger = { STORY = ambush }
			hunt_story_trigger = { STORY = stealth }
		}
		hunt_murder_intent_target_trigger = yes
		OR = {
			can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
			AND = {
				scope:activity = {
					any_attending_character = {
						any_targeting_scheme = {
							hunt_murder_scheme_target_trigger = yes
							OR = {
								scheme_owner = { hunt_valid_murder_accomplice_trigger = yes }
								any_scheme_agent_character = { hunt_valid_murder_accomplice_trigger = yes }
							}
						}
					}
				}
			}
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			scope:host.court_position:master_of_hunt_court_position ?= this
			hunt_murder_risk_trigger = yes
		}
		modifier = {
			factor = 2
			scope:host.court_position:huntperson_camp_officer ?= this
			hunt_murder_risk_trigger = yes
		}
	}

	immediate = {
		save_scope_as = murder_actor
		hidden_effect = { hunt_save_murder_target_effect = yes }
	}

	option = { #Take the shot!
		name = hunt.7200.a
		flavor = hunt.1012.a.tt
		reason = activity_intent
		set_variable = {
			name = hunt_murder_attempt
			value = scope:murder_target
		}
		hunt_increment_murder_accident_attempt = yes #So it doesn't get silly, we track attempts and make chance to succeed lower for each recent one
		duel = {
			skills = { intrigue prowess }
			target = scope:murder_target		
			10 = { # ...but target is killed
				desc = hunt_kill_murder_killed
				compare_modifier = {
					value = scope:duel_value
					multiplier = 0.5
				}
				custom_tooltip = hunt_target_attendee_killed_tt
				save_scope_as = murder_success
				min = 2
			}
			10 = { # ...the target survives
				desc = hunt_kill_murder_escape
				compare_modifier = {
					value = scope:duel_value
					multiplier = -0.5
				}
				custom_tooltip = hunt_target_attendee_injured_chance_tt
				hidden_effect = {
					random = {
						chance = 50
						save_scope_as = murder_injury
					}
				}
				min = 2
			}
		}
		trigger_event = { id = hunt.7211 days = 1 }
		stress_impact = {
			vengeful = medium_stress_impact_loss
			sadistic = medium_stress_impact_loss
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_vengefulness = 0.5
				ai_energy = 0.5
				ai_boldness = 0.25
				ai_honor = -0.25
				ai_compassion = -0.25
			}
		}
	}

	option = { #Restrain yourself
		name = hunt.7210.b
		flavor = hunt.1012.b.flavor
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_murder_restrain_key
				score = 25
				tags = { random intent }
				character = root
				target = scope:murder_target

				# Effect
				root = {
					if = {
						limit = { exists = scope:accomplice }
						reverse_add_opinion = {
							target = scope:accomplice
							modifier = hunt_did_not_shoot_opinion
							opinion = -10
						}
					}
					hunt_activity_success_change_effect = { CHANGE = increase_minor }
					stress_impact = {
						base = minor_stress_gain
						sadistic = minor_stress_impact_gain
						wrathful = minor_stress_impact_gain
						vengeful = minor_stress_impact_gain
						impatient = minor_stress_impact_gain
						compassionate = medium_stress_impact_loss
						forgiving = medium_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 50
			ai_value_modifier = {
				ai_honor = 0.75
				ai_rationality = 0.25
				ai_compassion = 0.25
				ai_vengefulness = -0.25
			}
		}
	}
}

#######################
#	Murder scheme outcome
#	by Joe Parkin
#######################

hunt.7211 = {
	type = activity_event
	title = hunt.7200.t
	desc = {
		desc = hunt.7211.desc
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:accomplice_2 }
				desc = hunt.7211.accomplice_2
			}
			triggered_desc = {
				trigger = { exists = scope:accomplice }
				desc = hunt.7211.accomplice
			}
		}
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:murder_success }
				desc = hunt.7211.success
			}
			desc = hunt.7211.failure
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = { exists = scope:murder_success }
			animation = schadenfreude
		}
		animation = stress
	}
	right_portrait = {
		character = scope:murder_target
		triggered_animation = {
			trigger = { exists = scope:murder_success }
			animation = loss_1
		}
		animation = fear
	}
	center_portrait = {
		character = scope:accomplice
		triggered_animation = {
			trigger = { exists = scope:murder_success }
			animation = happiness
		}
		animation = fear
	}
	lower_center_portrait = scope:accomplice_2
	cooldown = { years = 1 }

	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		var:hunt_murder_attempt ?= {
			is_alive = yes
			is_participant_in_activity = scope:activity
		}
	}

	immediate = {
		if = {
			limit = { exists = scope:murder_success }
			scope:activity = {
				add_activity_log_entry = {
					key = hunt_murder_shot_key
					score = 25
					tags = { random intent }
					character = root
					target = scope:murder_target

					# Effect
					show_as_tooltip = {
						unknown_murder_effect = {
							VICTIM = scope:murder_target
							MURDERER = root
							REASON = death_hunting_accident
						}
					}
				}
			}
		}
		else = {
			scope:activity = {
				add_activity_log_entry = {
					key = hunt_murder_miss_key
					score = 25
					tags = { random intent }
					character = root
					target = scope:murder_target

					# Effect
					root = {
						show_as_tooltip = {
							if = {
								limit = { exists = scope:murder_injury }
								scope:murder_target = {
									change_trait_rank = {
										trait = wounded
										rank = 1
										max = 3
									}
								}
							}
							attempted_murder_opinion_effect = {
								VICTIM = scope:murder_target
								MURDERER = root
							}
							scope:scheme ?= {
								expose_scheme = yes
								if = {
									limit = { exists = scope:accomplice }
									expose_scheme_agent = scope:accomplice
								}
								if = {
									limit = { exists = scope:accomplice_2 }
									expose_scheme_agent = scope:accomplice_2
								}
							}
							scope:murder_target = {
								if = {
									limit = { exists = scope:accomplice }
									add_opinion = {
										target = scope:accomplice
										modifier = attempted_murder_me_crime
									}
								}
								if = {
									limit = { exists = scope:accomplice_2 }
									add_opinion = {
										target = scope:accomplice_2
										modifier = attempted_murder_me_crime
									}
								}
							}
						}
					}
				}
			}
		}
		scope:murder_target = { trigger_event = hunt.7212 }
	}

	option = { # Success
		name = hunt.7411.a
		trigger = { exists = scope:murder_success }
	}

	option = { # Failure
		name = hunt.7411.b
		trigger = {
			NOT = { exists = scope:murder_success }
		}
		if = {
			limit = { this = scope:host }
			custom_tooltip = hunt_ends_tt
		}
	}
}

# Target
hunt.7212 = { # Target
	type = activity_event
	title = hunt.7200.t
	desc = {
		desc = hunt.7212.desc
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:accomplice_2 }
				desc = hunt.7212.accomplice_2
			}
			triggered_desc = {
				trigger = { exists = scope:accomplice }
				desc = hunt.7212.accomplice
			}
		}
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:accomplice_2 }
				desc = hunt.7212.success
			}
			desc = hunt.7212.failure
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = { exists = scope:murder_success }
			animation = loss_1
		}
		animation = fear
	}
	right_portrait = {
		character = scope:murder_actor
		triggered_animation = {
			trigger = { exists = scope:murder_success }
			animation = schadenfreude
		}
		animation = stress
	}
	center_portrait = {
		character = scope:accomplice
		triggered_animation = {
			trigger = { exists = scope:murder_success }
			animation = happiness
		}
		animation = fear
	}
	lower_left_portrait = scope:accomplice_2
	cooldown = { years = 1 }

	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	immediate = {
		if = {
			limit = { exists = scope:murder_success }
			unknown_murder_effect = { VICTIM = scope:murder_target MURDERER = scope:murder_actor REASON = death_hunting_accident }
			if = {
				limit = { this = scope:host }
				scope:activity = {
					set_variable = {
						name = hunt_invalidated
						value = flag:death
					}
					set_variable = {
						name = hunt_invalidated_flavor
						value = root
					}
				}
			}
			else_if = {
				limit = {
					NOR = {
						scope:murder_actor = scope:host
						scope:accomplice ?= scope:host
						scope:accomplice_2 ?= scope:host
					}
				}
				save_scope_as = invalidated_flavor
				scope:host = { trigger_event = hunt.0080 }
			}
		}
		else = {
			if = {
				limit = { exists = scope:murder_injury }
				change_trait_rank = {
					trait = wounded
					rank = 1
					max = 3
				}
			}
			attempted_murder_opinion_effect = {
				VICTIM = scope:murder_target
				MURDERER = scope:murder_actor
			}
			scope:scheme ?= {
				if = {
					limit = { exists = scope:accomplice }
					expose_scheme_agent = scope:accomplice
				}
				if = {
					limit = { exists = scope:accomplice_2 }
					expose_scheme_agent = scope:accomplice_2
				}
				expose_scheme = yes
			}
			if = {
				limit = { exists = scope:accomplice }
				attempted_murder_opinion_effect = {
					VICTIM = scope:murder_target
					MURDERER = scope:accomplice
				}
			}
			if = {
				limit = { exists = scope:accomplice_2 }
				attempted_murder_opinion_effect = {
					VICTIM = scope:murder_target
					MURDERER = scope:accomplice_2
				}
			}
		}
	}

	option = { # Success
		name = hunt.7212.a
		trigger = { exists = scope:murder_success }
	}

	option = { # Failure
		name = hunt.7212.b
		trigger = {
			NOT = { exists = scope:murder_success }
		}
		if = {
			limit = {
				OR = {
					this = scope:host
					scope:host = scope:murder_actor
				}
			}
			scope:activity = {
				set_variable = {
					name = hunt_invalidated
					value = flag:assassination_attempt
				}
				set_variable = {
					name = hunt_invalidated_flavor
					value = root
				}
				set_variable = {
					name = hunt_invalidated_culprit
					value = scope:murder_actor
				}
			}
		}
		else_if = {
			limit = {
				NOR = {
					scope:murder_actor = scope:host
					scope:accomplice ?= scope:host
					scope:accomplice_2 ?= scope:host
				}
			}
			save_scope_as = invalidated_flavor
			scope:murder_actor = { save_scope_as = invalidated_culprit }
			scope:host = { trigger_event = hunt.0083 }
		}
	}
}

#######################
#	Befriend intent
#	by Joe Parkin
#######################

hunt.7300 = {
	type = activity_event
	title = hunt.7300.t
	desc = {
		desc = hunt.7300.desc
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = happiness
	}
	right_portrait = {
		character = scope:befriend_target
	}
	cooldown = { years = 1 }

	trigger = {
		has_dlc_feature = tours_and_tournaments
		OR = {
			AND = {
				has_activity_intent = befriend_attendee_intent
				exists = intent_target
				intent_target = {
					is_alive = yes
					is_participant_in_activity = scope:activity
				}
			}
			any_scheme = {
				scheme_type = befriend
				scheme_target_character = {
					is_alive = yes
					is_participant_in_activity = scope:activity
				}
			}
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 10
			has_activity_intent = befriend_attendee_intent
			exists = intent_target
			intent_target = {
				is_alive = yes
				is_participant_in_activity = scope:activity
			}
		}
	}

	immediate = {
		save_scope_as = befriend_actor
		if = {
			limit = {
				has_activity_intent = befriend_attendee_intent
				exists = intent_target
				intent_target = {
					is_alive = yes
					is_participant_in_activity = scope:activity
				}
			}
			intent_target = { save_scope_as = befriend_target }
		}
		else = {
			random_scheme = {
				limit = {
					scheme_type = befriend
					scheme_target_character = {
						is_alive = yes
						is_participant_in_activity = scope:activity
					}
				}
				scheme_target_character = { save_scope_as = befriend_target }
			}
		}
		scope:befriend_target = {
			save_scope_as = woo_target
			save_scope_as = target
		}
	}

	option = { #Suck up
		name = hunt.7100.a
		custom_tooltip = hunt.7100.a.tt
		save_scope_value_as = {
			name = befriend_approach
			value = flag:suck_up
		}
		stress_impact = {
			craven = minor_stress_impact_gain
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_energy = 0.5
				ai_boldness = 0.5
				ai_compassion = -0.5
			}
		}
	}

	option = { #Fellow hunter
		name = hunt.7100.b
		trigger = {
			has_trait = lifestyle_hunter
			scope:befriend_target = { has_trait = lifestyle_hunter }
		}
		custom_tooltip = hunt.7100.b.tt
		save_scope_value_as = {
			name = befriend_approach
			value = flag:hunter
		}
		stress_impact = {
			shy = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
		}
	}

	option = { #Mentor
		name = hunt.7100.c
		custom_tooltip = hunt.7100.c.tt
		save_scope_value_as = {
			name = befriend_approach
			value = flag:mentor
		}
		stress_impact = {
			sadistic = minor_stress_impact_gain
			callous = minor_stress_impact_gain
		}
		ai_chance = {
			base = 25
			opinion_modifier = {
				opinion_target = scope:befriend_target
				multiplier = 0.5
			}
			ai_value_modifier = {
				ai_energy = -0.5
				ai_boldness = -0.5
				ai_compassion = 0.5
			}
		}
	}

	option = { #Wastrel
		name = hunt.7100.d
		custom_tooltip = hunt.7100.d.tt
		save_scope_value_as = {
			name = befriend_approach
			value = flag:wastrel
		}
		stress_impact = {
			lifestyle_hunter = minor_stress_impact_gain
			content = minor_stress_impact_gain
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = 1
				ai_compassion = 0.5
			}
		}
	}

	option = { #Steward
		name = hunt.7100.e
		custom_tooltip = hunt.7100.e.tt
		save_scope_value_as = {
			name = befriend_approach
			value = flag:steward
		}
		stress_impact = {
			impatient = minor_stress_impact_gain
			lazy = minor_stress_impact_gain
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = 1
				ai_compassion = 0.5
			}
		}
	}

	after = {
		show_as_tooltip = {
			random_list = {
				10 = {
					desc = seduce_ongoing_possible_outcomes_tooltip_effect.success.desc
					show_chance = no
					progress_towards_friend_effect = {
						CHARACTER = scope:befriend_target
						OPINION = 15
						REASON =  friend_hunt_conversation_impressed
					}
				}
				10 = {
					desc = seduce_ongoing_possible_outcomes_tooltip_effect.failure.desc
					show_chance = no
					reverse_add_opinion = {
						target = scope:befriend_target
						modifier = hunt_bored_opinion
						opinion = -10
					}
				}
			}
		}
		scope:befriend_target = {
			save_scope_as = target
			hidden_effect = {
				#Evaluate what makes for a "right" choice
				if = {
					limit = {
						OR = {
							AND = {
								has_trait = arrogant
								hunt_dharmic_pacificist_trigger = no
								exists = scope:befriend_target
								scope:befriend_approach = flag:suck_up
							}
							AND = {
								ai_energy > medium_positive_energy
								ai_sociability > medium_positive_compassion # sociability doesn't exist
								hunt_dharmic_pacificist_trigger = no
								exists = scope:befriend_target
								scope:befriend_approach = flag:hunter
							}
							AND = {
								has_trait = humble
								opinion = {
									target = root
									value >= 25
								}
								exists = scope:befriend_target
								scope:befriend_approach = flag:mentor
							}
						}
					}
					save_scope_value_as = {
						name = made_great_choice
						value = yes
					}
				}
				random_list = {
					100 = { #Success
						modifier = {
							add = 100
							exists = scope:befriend_approach
							scope:befriend_approach = flag:suck_up
							has_trait = fickle
						}
						modifier = {
							add = 100
							exists = scope:befriend_approach
							scope:befriend_approach = flag:hunter
							has_trait = gregarious
						}
						modifier = {
							add = 100
							exists = scope:befriend_approach
							scope:befriend_approach = flag:mentor
							has_trait = compassionate
						}
						trigger_event = {
							id = hunt.7301
							days = { 1 2 }
						}
						scope:befriend_actor = {
							trigger_event = {
								id = hunt.7303
								days = { 3 4 }
							}
						}
					}
					100 = { #Failure
						trigger = {
							NOT = { exists = scope:made_great_choice }
						}
						modifier = {
							add = 100
							exists = scope:befriend_approach
							scope:befriend_approach = flag:hunter
							hunt_dharmic_pacificist_trigger = yes
						}
						modifier = {
							add = 100
							exists = scope:befriend_approach
							scope:befriend_approach = flag:hunter
							has_trait = craven
						}
						modifier = {
							add = 100
							exists = scope:befriend_approach
							scope:befriend_approach = flag:falconer
							has_trait = shy
						}
						modifier = {
							add = 100
							exists = scope:befriend_approach
							scope:befriend_approach = flag:pity
							OR = {
								has_trait = callous
								has_trait = sadistic
							}
						}
						modifier = {
							add = 100
							exists = scope:befriend_approach
							scope:befriend_approach = flag:wastrel
							has_trait = content
						}
						modifier = {
							add = 100
							exists = scope:befriend_approach
							scope:befriend_approach = flag:steward
							has_trait = lazy
						}
						trigger_event = {
							id = hunt.7302
							days = { 1 2 }
						}
						scope:befriend_actor = {
							trigger_event = {
								id = hunt.7304
								days = { 3 4 }
							}
						}
					}
				}
			}
		}
	}
}

#Target: Success
hunt.7301 = {
	type = activity_event
	title = hunt.7300.t
	desc = {
		desc = hunt.7301.opening
		first_valid = {
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:hunter }
				desc = hunt.7301.hunter
			}
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:falconer }
				desc = hunt.7301.falconer
			}
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:pity }
				desc = hunt.7301.pity
			}
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:wastrel }
				desc = hunt.7301.wastrel
			}
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:steward }
				desc = hunt.7301.steward
			}
			desc = hunt.7301.fallback
		}
	}	
	left_portrait = {
		character = scope:befriend_actor
		animation = admiration
	}
	theme = seduce_scheme

	trigger = { exists = scope:befriend_approach }

	option = {
		name = hunt.7302.a
		add_stress = minor_stress_loss
		show_as_tooltip = {
			progress_towards_friend_effect = {
				CHARACTER = scope:befriend_target
				OPINION = 15
				REASON =  friend_hunt_conversation_impressed
			}
		}
	}
}

#Target: Failure
hunt.7302 = {
	type = activity_event
	title = hunt.7100.t
	desc = {
		desc = hunt.7101.opening
		first_valid = {
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:hunter }
				desc = hunt.7302.hunter
			}
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:falconer }
				desc = hunt.7302.falconer
			}
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:pity }
				desc = hunt.7302.pity
			}
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:wastrel }
				desc = hunt.7302.wastrel
			}
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:steward }
				desc = hunt.7302.steward
			}
			desc = hunt.7302.fallback
		}
	}
	left_portrait = {
		character = scope:befriend_actor
		animation = admiration
	}
	theme = unfriendly
	override_background = { reference = wilderness_activity }

	trigger = { exists = scope:befriend_approach }

	option = {
		name = hunt.7102.a
	}
}

#Actor: Success
hunt.7303 = {
	type = activity_event
	title = hunt.7100.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:hunter }
				desc = hunt.7303.hunter
			}
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:falconer }
				desc = hunt.7303.falconer
			}
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:pity }
				desc = hunt.7303.pity
			}
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:wastrel }
				desc = hunt.7303.wastrel
			}
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:steward }
				desc = hunt.7303.steward
			}
			desc = hunt.7303.fallback
		}
		desc = hunt.7303.desc
	}	
	center_portrait = {
		character = scope:befriend_target
		animation = admiration
	}
	right_portrait = {
		character = root
		animation = storyteller
	}
	theme = befriend_scheme
	override_background = { reference = wilderness_activity }

	trigger = { exists = scope:befriend_approach }

	option = {
		name = hunt.7303.a
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_befriend_success_key
				score = 75
				tags = { random good intent }
				character = root
				target = scope:befriend_target

				#Effect
				root = {
					progress_towards_friend_effect = {
						CHARACTER = scope:befriend_target
						OPINION = 15
						REASON = friend_hunt_conversation_impressed
					}
				}
			}
		}
	}
}

#Actor: Failure
hunt.7304 = {
	type = activity_event
	title = hunt.7300.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:hunter }
				desc = hunt.7304.hunter
			}
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:falconer }
				desc = hunt.7304.falconer
			}
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:pity }
				desc = hunt.7304.pity
			}
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:wastrel }
				desc = hunt.7304.wastrel
			}
			triggered_desc = {
				trigger = { scope:befriend_approach = flag:steward }
				desc = hunt.7304.steward
			}
			desc = hunt.7304.fallback
		}
		desc = hunt.7304.desc
	}	
	left_portrait = {
		character = root
		animation = stress
	}	
	right_portrait = {
		character = scope:befriend_target
		animation = eyeroll
	}
	theme = befriend_scheme
	override_background = { reference = wilderness_activity }

	trigger = { exists = scope:befriend_approach }

	option = {
		name = hunt.7304.a
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_befriend_failure_key
				score = 75
				tags = { random bad intent }
				character = root
				target = scope:befriend_target

				#Effect
				root = {
					reverse_add_opinion = {
						target = scope:befriend_target
						modifier = hunt_failed_woo_opinion
						opinion = -10
					}
				}
			}
		}
	}
}

#######################
#	Abduct scheme green light
#	by Joe Parkin
#######################

hunt.7400 = {
	type = activity_event
	title = hunt.7400.t
	desc = {
		desc = hunt.7400.desc
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:accomplice_2 }
				desc = hunt.7400.accomplice_2
			}
			triggered_desc = {
				trigger = { exists = scope:accomplice }
				desc = hunt.7400.accomplice
			}
			desc = hunt.7400.alone
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = scheme
	}
	right_portrait = {
		character = scope:abduct_target
		animation = happiness
	}
	center_portrait = {
		character = scope:accomplice
		animation = schadenfreude
	}
	lower_left_portrait = scope:accomplice_2
	cooldown = { years = 1 }

	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		has_dlc_feature = tours_and_tournaments
		scope:activity ?= {
			any_attending_character = {
				hunt_hostile_scheme_target_trigger = { TYPE = abduct }
			}
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			scope:host.court_position:master_of_hunt_court_position ?= this
			hunt_murder_risk_trigger = yes
		}
		modifier = {
			factor = 2
			scope:host.court_position:huntperson_camp_officer ?= this
			hunt_murder_risk_trigger = yes
		}
	}

	immediate = {
		scope:activity = {
			random_attending_character = {
				limit = {
					hunt_hostile_scheme_target_trigger = { TYPE = abduct }
				}
				save_scope_as = abduct_target
				# Murder scheme target
				random_targeting_scheme = {
					limit = {
						scheme_type = abduct
						OR = {
							scheme_owner = root
							any_scheme_agent_character = { this = root }
						}
					}
					save_scope_as = scheme
					every_scheme_agent_character = { add_to_list = abduct_agents }
					scheme_owner = { save_scope_as = abduct_schemer }
					hunt_save_hostile_accomplice_effect = {
						SCHEME = abduct
						VICTIM = scope:abduct_target
					}
				}
			}
		}
	}

	option = { # Today is the day
		name = hunt.7400.a
		custom_tooltip = hunt_abduct_accomplice_tt
		set_variable = {
			name = hunt_abduct_attempt
			value = scope:abduct_target
			years = 1
		}
		stress_impact = {
			patient = minor_stress_impact_gain
			craven = minor_stress_impact_gain
		}
	}

	option = { # We are not ready
		name = hunt.7400.d
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_abduct_defer_key
				score = 25
				tags = { random scheme }
				character = root
				target = scope:abduct_target

				# Effect
				root = {
					set_variable = {
						name = hunt_abduct_defer
						value = scope:abduct_target
						years = 1
					}
					stress_impact = {
						impatient = minor_stress_impact_gain
						brave = minor_stress_impact_gain
					}
				}
			}
		}
	}
}

#######################
#	Abduct scheme attempt
#	by Joe Parkin
#######################

hunt.7410 = {
	type = activity_event
	title = hunt.7400.t
	desc = {
		desc = hunt.7410.desc
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:accomplice_2 }
				desc = hunt.7410.accomplice_2
			}
			triggered_desc = {
				trigger = { exists = scope:accomplice }
				desc = hunt.7410.accomplice
			}
			desc = hunt.7410.alone
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = scheme
	}
	right_portrait = {
		character = scope:abduct_target
		animation = idle
	}
	center_portrait = {
		character = scope:accomplice
		animation = schadenfreude
	}
	lower_center_portrait = scope:accomplice_2
	cooldown = { years = 1 }

	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		var:hunt_abduct_attempt ?= {
			is_alive = yes
			is_participant_in_activity = scope:activity
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			scope:host.court_position:master_of_hunt_court_position ?= this
			hunt_murder_risk_trigger = yes
		}
		modifier = {
			factor = 2
			scope:host.court_position:huntperson_camp_officer ?= this
			hunt_murder_risk_trigger = yes
		}
	}

	immediate = {
		save_scope_as = abduct_actor
		var:hunt_abduct_attempt ?= {
			save_scope_as = abduct_target
			random_targeting_scheme = {
				limit = {
					scheme_type = abduct
					OR = {
						scheme_owner = root
						any_scheme_agent_character = { this = root }
					}
				}
				save_scope_as = scheme
				every_scheme_agent_character = {
					limit = { is_participant_in_activity = scope:activity }
					add_to_list = abduct_agents
				}
			}
		}
		hunt_save_hostile_accomplice_effect = {
			SCHEME = abduct
			VICTIM = scope:abduct_target
		}
	}

	option = { # Go fer it
		name = hunt.7410.a
		duel = {
			skills = { intrigue prowess }
			target = scope:abduct_target
			10 = {
				desc = hunt.7410.a.success
				compare_modifier = {
					value = scope:duel_value
					multiplier = 1
					min = -2.5
				}
				modifier = {
					exists = scope:accomplice
					factor = 1.5
				}
				modifier = {
					exists = scope:accomplice_2
					factor = 1.5
				}
				modifier = {
					add = scope:scheme.scheme_progress
				}
				save_scope_as = abduct_success
				show_as_tooltip = {
					hard_imprison_character_effect = {
						TARGET = scope:abduct_target
						IMPRISONER = root
					}
					successful_abduct_outcome_event_option_effect = yes
				}
			}
			20 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -1
					min = -2.5
				}
				desc = hunt.7410.a.failure
				show_as_tooltip = {
					scope:scheme = {
						if = {
							limit = { exists = scope:accomplice }
							expose_scheme_agent = scope:accomplice
						}
						if = {
							limit = { exists = scope:accomplice_2 }
							expose_scheme_agent = scope:accomplice_2
						}
						expose_scheme = yes
					}
				}
			}
		}
		custom_tooltip = hunt_ends_tt
		trigger_event = { id = hunt.7411 days = 1 }
		stress_impact = {
			craven = miniscule_stress_impact_gain
			patient = miniscule_stress_impact_gain
			lazy = miniscule_stress_impact_gain
		}
	}

	option = { # Flake
		name = hunt.7410.b
		stress_impact = {
			brave = miniscule_stress_impact_gain
			impatient = miniscule_stress_impact_gain
			diligent = miniscule_stress_impact_gain
		}
	}
}

#######################
#	Abduct scheme outcome
#	by Joe Parkin
#######################

hunt.7411 = { # Actor
	type = activity_event
	title = hunt.7400.t
	desc = {
		desc = hunt.7411.desc
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:accomplice_2 }
				desc = hunt.7411.accomplice_2
			}
			triggered_desc = {
				trigger = { exists = scope:accomplice }
				desc = hunt.7411.accomplice
			}
		}
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:accomplice_2 }
				desc = hunt.7411.success
			}
			desc = hunt.7411.failure
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = { exists = scope:abduct_success }
			animation = schadenfreude
		}
		animation = stress
	}
	right_portrait = {
		character = scope:abduct_target
		triggered_animation = {
			trigger = { exists = scope:abduct_success }
			animation = prisonhouse
		}
		animation = fear
		override_imprisonment_visuals = yes
	}
	center_portrait = {
		character = scope:accomplice
		triggered_animation = {
			trigger = { exists = scope:abduct_success }
			animation = happiness
		}
		animation = shock
	}
	lower_center_portrait = scope:accomplice_2
	cooldown = { years = 1 }

	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		var:hunt_abduct_attempt ?= {
			is_alive = yes
			is_participant_in_activity = scope:activity
		}
	}

	immediate = {
		if = {
			limit = { exists = scope:abduct_success }
			scope:activity = {
				add_activity_log_entry = {
					key = hunt_abduct_success_key
					score = 25
					tags = { random scheme }
					character = root
					target = scope:abduct_target
					
					#Effect
					root = {
						show_as_tooltip = {
							hard_imprison_character_effect = {
								TARGET = scope:abduct_target
								IMPRISONER = root
							}
							successful_abduct_outcome_event_option_effect = yes
							abduct_opinion_effect = {
								VICTIM = scope:abduct_target
								ABDUCTER = root
							}
							scope:abduct_target = {
								if = {
									limit = { exists = scope:accomplice }
									add_opinion = {
										target = scope:accomplice
										modifier = abducted_me_crime
									}
								}
								if = {
									limit = { exists = scope:accomplice_2 }
									add_opinion = {
										target = scope:accomplice_2
										modifier = abducted_me_crime
									}
								}
							}
						}
					}
				}
			}
		}
		else = {
			scope:activity = {
				add_activity_log_entry = {
					key = hunt_abduct_failure_key
					score = 25
					tags = { random scheme }
					character = root
					target = scope:abduct_target

					#Effect
					root = {
						show_as_tooltip = {
							attempted_abduction_opinion_effect = {
								VICTIM = scope:abduct_target
								ABDUCTER = root
							}
							scope:scheme = {
								expose_scheme = yes
								if = {
									limit = { exists = scope:accomplice }
									expose_scheme_agent = scope:accomplice
								}
								if = {
									limit = { exists = scope:accomplice_2 }
									expose_scheme_agent = scope:accomplice_2
								}
							}
							scope:abduct_target = {
								if = {
									limit = { exists = scope:accomplice }
									add_opinion = {
										target = scope:accomplice
										modifier = attempted_abduct_me_crime
									}
								}
								if = {
									limit = { exists = scope:accomplice_2 }
									add_opinion = {
										target = scope:accomplice_2
										modifier = attempted_abduct_me_crime
									}
								}
							}
						}
					}
				}
			}
		}
		scope:abduct_target = { trigger_event = hunt.7412 }
	}

	option = { # Success
		name = hunt.7411.a
		trigger = { exists = scope:abduct_success }
	}

	option = { # Failure
		name = hunt.7411.b
		trigger = {
			NOT = { exists = scope:abduct_success }
		}
	}

	after = {
		custom_tooltip = hunt_ends_tt
	}
}

hunt.7412 = { # Target
	type = activity_event
	title = hunt.7400.t
	desc = {
		desc = hunt.7212.desc
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:accomplice_2 }
				desc = hunt.7212.accomplice_2
			}
			triggered_desc = {
				trigger = { exists = scope:accomplice }
				desc = hunt.7212.accomplice
			}
		}
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:accomplice_2 }
				desc = hunt.7412.success
			}
			desc = hunt.7412.failure
		}
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = { exists = scope:abduct_success }
			animation = prisonhouse
		}
		animation = fear
		override_imprisonment_visuals = yes
	}
	right_portrait = {
		character = scope:abduct_actor
		triggered_animation = {
			trigger = { exists = scope:abduct_success }
			animation = schadenfreude
		}
		animation = stress
	}
	lower_left_portrait = scope:accomplice
	lower_center_portrait = scope:accomplice_2
	cooldown = { years = 1 }

	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	immediate = {
		if = {
			limit = { exists = scope:abduct_success }
			add_character_flag = {
				flag = was_abducted_block_notification_event
				days = 2
			}
			hard_imprison_character_effect = {
				TARGET = scope:abduct_target
				IMPRISONER = scope:abduct_actor
			}
			successful_abduct_outcome_event_option_effect = yes
			abduct_opinion_effect = {
				VICTIM = scope:abduct_target
				ABDUCTER = scope:abduct_actor
			}
			if = {
				limit = { exists = scope:accomplice }
				abduct_opinion_effect = {
					VICTIM = scope:abduct_target
					ABDUCTER = scope:accomplice
				}
			}
			if = {
				limit = { exists = scope:accomplice_2 }
				abduct_opinion_effect = {
					VICTIM = scope:abduct_target
					ABDUCTER = scope:accomplice_2
				}
			}
		}
		else = {
			attempted_abduction_opinion_effect = {
				VICTIM = scope:abduct_target
				ABDUCTER = scope:abduct_actor
			}
			scope:scheme = {
				if = {
					limit = { exists = scope:accomplice }
					expose_scheme_agent = scope:accomplice
				}
				if = {
					limit = { exists = scope:accomplice_2 }
					expose_scheme_agent = scope:accomplice_2
				}
				expose_scheme = yes
			}
			if = {
				limit = { exists = scope:accomplice }
				attempted_abduction_opinion_effect = {
					VICTIM = scope:abduct_target
					ABDUCTER = scope:accomplice
				}
			}
			if = {
				limit = { exists = scope:accomplice_2 }
				attempted_abduction_opinion_effect = {
					VICTIM = scope:abduct_target
					ABDUCTER = scope:accomplice_2
				}
			}
		}
	}

	option = { # Success
		name = hunt.7412.a
		trigger = { exists = scope:abduct_success }
		if = {
			limit = { this = scope:host }
			scope:activity = {
				set_variable = {
					name = hunt_invalidated
					value = flag:abduction
				}
				set_variable = {
					name = hunt_invalidated_flavor
					value = root
				}
				set_variable = {
					name = hunt_invalidated_flavor
					value = scope:abduct_actor
				}
			}
		}
		else_if = {
			limit = {
				NOR = {
					scope:abduct_actor = scope:host
					scope:accomplice ?= scope:host
					scope:accomplice_2 ?= scope:host
				}
			}
			save_scope_as = invalidated_flavor
			scope:abduct_actor = { save_scope_as = invalidated_culprit }
			scope:host = { trigger_event = hunt.0085 }
		}
	}

	option = { # Failure
		name = hunt.7212.b
		trigger = {
			NOT = { exists = scope:abduct_success }
		}
		if = {
			limit = { this = scope:host }
			scope:activity = {
				set_variable = {
					name = hunt_invalidated
					value = flag:abduction_attempt
				}
				set_variable = {
					name = hunt_invalidated_flavor
					value = root
				}
				set_variable = {
					name = hunt_invalidated_flavor
					value = scope:abduct_actor
				}
			}
		}
		else_if = {
			limit = {
				NOR = {
					scope:abduct_actor = scope:host
					scope:accomplice ?= scope:host
					scope:accomplice_2 ?= scope:host
				}
			}
			save_scope_as = invalidated_flavor
			scope:abduct_actor = { save_scope_as = invalidated_culprit }
			scope:host = { trigger_event = hunt.0084 }
		}
	}
}

#######################
#	Suspicious arrow
#	by Joe Parkin
#######################

scripted_trigger hunt_7800_murder_attempt_trigger = {
	can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root }
	OR = {
		is_scheming_against = {
			target = root
			type = murder
		}
		AND = {
			has_activity_intent = murder_attendee_intent
			intent_target ?= root
		}
		has_relation_rival = root
		house ?= { var:house_feud_house ?= root.house }
	}
}

hunt.7800 = {
	type = activity_event
	title = hunt.7800.t
	desc = {
		desc = hunt.7800.desc
		random_valid = {
			triggered_desc = {
				trigger = {
					location = {
						OR = {
							terrain = taiga
							terrain = forest
						}
					}
				}
				desc = hunt.7800.tree
			}
			desc = hunt.7800.ground
		}
		desc = hunt.7800.closing
	}
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = paranoia
	}
	#cooldown = { years = 1 }

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			scope:activity = {
				any_attending_character = { hunt_7800_murder_attempt_trigger = yes }
			}
		}
		modifier = {
			factor = 2
			court_position:master_of_hunt_court_position ?= { hunt_7800_murder_attempt_trigger = yes }
		}
		modifier = {
			factor = 2
			court_position:huntperson_camp_officer ?= { hunt_7800_murder_attempt_trigger = yes }
		}
	}

	immediate = {
		scope:activity = {
			if = {
				limit = {
					any_attending_character = { hunt_7800_murder_attempt_trigger = yes }
				}
				random_attending_character = {
					limit = { hunt_7800_murder_attempt_trigger = yes }
					save_scope_as = culprit
				}
				save_scope_value_as = {
					name = intrigue_duel
					value = scope:culprit.intrigue
				}
			}
			else = {
				save_scope_value_as = {
					name = intrigue_duel
					value = medium_skill_rating
				}
			}
		}
		stress_impact = {
			base = miniscule_stress_impact_gain
			craven = miniscule_stress_impact_gain
		}
	}

	option = { # Just a mistake...
		name = hunt.7800.a
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_arrow_dimiss_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					stress_impact = {
						craven = minor_stress_impact_gain
						paranoid = medium_stress_impact_gain
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_rationality = 0.5
				ai_boldness = 0.5
			}
		}
	}

	option = { # I will get to the bottom of this!
		name = hunt.7800.b
		
		duel = {
			skill = intrigue
			value = scope:intrigue_duel
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 1
				}
				modifier = {
					factor = 0
					NOT = { exists = scope:culprit }
				}
				desc = hunt.7800.b.success
				show_chance = no
				trigger_event = { id = hunt.7801 days = 1 }
				custom_tooltip = hunt.7800.b.tt
				stress_impact = {
					trusting = medium_stress_impact_gain
				}
			}
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -2
				}
				desc = hunt.7800.b.failure
				show_chance = no
				scope:activity = {
					add_activity_log_entry = {
						key = hunt_arrow_investigate_log
						score = 25
						tags = { random bad }
						character = root

						# Effect
						root = {
							send_interface_toast = {
								title = hunt.7800.b.failure
								left_icon = root
								stress_impact = {
									base = minor_stress_impact_gain
									paranoid = medium_stress_impact_gain
									trusting = medium_stress_impact_gain
								}
							}
						}
					}
				}
			}
		}
		
		ai_chance = {
			base = 10
			ai_value_modifier = {
				ai_rationality = 1
				ai_boldness = 1
			}
		}
	}

	option = { # Nope
		name = hunt.7800.c
		scope:activity = {
			set_variable = {
				name = hunt_invalidated
				value = flag:assassination_attempt
			}
			set_variable = {
				name = hunt_invalidated_flavor
				value = root
			}
			add_activity_log_entry = {
				key = hunt_arrow_flee_log
				score = 25
				tags = { random bad }
				character = root

				#Effect
				root = {
					custom_tooltip = hunt_ends_tt
					stress_impact = {
						craven = medium_stress_impact_loss
						paranoid = medium_stress_impact_loss
					}
				}
			}
		}
		ai_chance = {
			base = 15
			ai_value_modifier = {
				ai_rationality = 1
				ai_boldness = -0.5
			}
		}
	}
}

hunt.7801 = {
	type = activity_event
	title = hunt.7801.t
	desc = hunt.7801.desc
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = anger
	}
	right_portrait = {
		character = scope:culprit
		animation = fear
	}
	cooldown = { years = 1 }

	option = { # Forgive
		name = hunt.7801.a
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_arrow_forgive_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:culprit

				# Effect
				root = {
					add_hook = {
						type = threat_hook
						target = scope:culprit
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = -1
			}
			opinion_modifier = {
				opinion_target = scope:culprit
				multiplier = -0.5
			}
		}
	}

	option = { # Arrest
		name = hunt.7801.b
		scope:activity = {
			add_activity_log_entry = {
				key = hunt_arrow_arrest_log
				score = 25
				tags = { random bad }
				character = root
				target = scope:culprit

				# Effect
				root = {
					attempted_murder_opinion_effect = {
						VICTIM = root
						MURDERER = scope:culprit
					}
					rightfully_imprison_character_effect = {
						TARGET = scope:culprit
						IMPRISONER = root
					}
					scope:activity = {
						set_variable = {
							name = hunt_invalidated
							value = flag:assassination_attempt
						}
						set_variable = {
							name = hunt_invalidated_flavor
							value = root
						}
						set_variable = {
							name = hunt_invalidated_culprit
							value = scope:culprit
						}
						custom_tooltip = hunt_ends_tt
					}
				}
			}
		}
		ai_chance = {
			base = 25
			ai_value_modifier = {
				ai_boldness = 1
			}
			opinion_modifier = {
				opinion_target = scope:culprit
				multiplier = -0.5
			}
		}
	}
}

#########################
#	ARTIFACT EVENTS 	#
#	8001 - 8999	        #
#########################

#######################
#	Hide or Skull?
#	by Bianca Savazzi
#######################

hunt.8001 = {
	type = activity_event
	title = hunt.8001.t
	desc = hunt.8001.desc
	theme = hunt_activity
	left_portrait = {
		character = root
		animation = ecstasy
	}
	cooldown = { years = 20 } # Don't want this option to happen too often
	orphan = yes

	trigger = {
		has_royal_court = yes # Since these are court artifacts and serve no real purpose to those without a court
		scope:activity.var:hunt_success ?= flag:yes # Gotta have a successful hunt/"hunt" to skin an animal
	}

	immediate = {
		scope:activity.activity_location.county = { save_scope_as = activity_place }
	}

	#Get Hide
	option = {
		name = hunt.8001.a
		custom_tooltip = hunt.hide_tt
		create_artifact_animal_hide_effect = {
			OWNER = root
			HUNTER = root
			LEGENDARY = no
			ANIMAL = scope:activity.var:animal_type
		}
	}

	#Get Skull
	option = {
		name = hunt.8001.b
		trigger = {
			#Animals that don't produce skulls:
			can_animal_produce_skull_trigger = { VARIABLE = scope:activity.var:animal_type }
		}
		custom_tooltip = hunt.skull_tt
		create_artifact_wall_skull_effect = {
			OWNER = root
			HUNTER = root
			LEGENDARY = no
			ANIMAL = scope:activity.var:animal_type
		} 
	}

	#Focus on good feast
	option = {
		name = hunt.8001.c
		trigger = {
			scope:activity = {
				any_attending_character = {
					NOT = { this = root }
				}
			}
		}
		scope:activity = {
			every_attending_character = { #All participants of the hunt are impressed with the feast
				custom = EVERY_ACTIVITY_PARTICIPANT_EFFECT
				limit = {
					NOT = { this = root }
				}
				add_opinion = {
					modifier = impressed_opinion
					target = root
					opinion = 10
				}
			}
		}
	}

	after = {
		if = {
			limit = { exists = scope:newly_created_artifact }
			scope:newly_created_artifact = { save_scope_as = this_artifact }
			send_interface_toast = {
				title = artifact.0012.t
				right_icon = scope:newly_created_artifact
				show_as_tooltip = {
					scope:newly_created_artifact = { set_owner = root }
				}
			}
		}
	}
}

##################
#	END EVENTS 	 #
#	9001 - 9999	 #
##################

#######################
#	Hunt has ended
#	by Linnéa Thimrén
#######################

scripted_effect hunt_activity_master_hunt_scope_effect = {
	if = {
		limit = {
			employs_court_position = master_of_hunt_court_position
			scope:activity = {
				any_attending_character = { this = root.court_position:master_of_hunt_court_position }
			}
		}
		court_position:master_of_hunt_court_position = { save_scope_as = master_of_hunt	}
	}
	else_if = {
		limit = {
			employs_court_position = huntperson_camp_officer
			scope:activity = {
				any_attending_character = { this = root.court_position:huntperson_camp_officer }
			}
		}
		court_position:huntperson_camp_officer = { save_scope_as = master_of_hunt	}
	}
}

hunt.9001 = {
	type = activity_event
	title = hunt.9001.t
	desc = {
		first_valid = { # Success Summary
			triggered_desc = {
				trigger = {
					scope:activity.var:hunt_success_chance >= 40
					scope:activity.var:hunt_success_chance_event >= hunt_activity_success_increase_medium_value
				}
				desc = hunt.9001.desc_good
			}
			triggered_desc = {
				trigger = {
					scope:activity.var:hunt_success_chance >= 40
					scope:activity.var:hunt_success_chance_event < hunt_activity_success_decrease_minor_value
				}
				desc = hunt.9001.desc_good_bad
			}
			triggered_desc = {
				trigger = {
					scope:activity.var:hunt_success_chance < 40
					scope:activity.var:hunt_success_chance_event < hunt_activity_success_decrease_minor_value
				}
				desc = hunt.9001.desc_bad
			}
			triggered_desc = {
				trigger = {
					scope:activity.var:hunt_success_chance < 40
					scope:activity.var:hunt_success_chance_event >= hunt_activity_success_increase_medium_value
				}
				desc = hunt.9001.desc_bad_good
			}
			desc = hunt.9001.desc_same
		}
		first_valid = { # Credit/personality lavor
			triggered_desc = { # Murder Intent
				trigger = { exists = scope:murder_target }
				desc = {
					first_valid = {
						triggered_desc = {
							trigger = {
								exists = scope:murder_target.killer
								scope:murder_target.killer = root
								any_secret = {
									secret_type = secret_murder
									secret_target = scope:murder_target
								}
							}
							desc = hunt.9001.murder_secret
						}
						triggered_desc = {
							trigger = {
								exists = scope:murder_target.killer
								scope:murder_target.killer = root
							}
							desc = hunt.9001.murder_public
						}
						triggered_desc = {
							trigger = {
								scope:murder_target = { is_alive = no }
							}
							desc = hunt.9001.murder_dead
						}
						desc = hunt.9001.murder_fail
					}
				}
			}
			triggered_desc = { # Woo Intent
				trigger = { exists = scope:woo_target }
				desc = {
					first_valid = {
						triggered_desc = {
							trigger = { has_relation_soulmate = scope:woo_target }
							desc = hunt.9001.woo_soulmate
						}
						triggered_desc = {
							trigger = { has_relation_lover = scope:woo_target }
							desc = hunt.9001.woo_lover
						}
						triggered_desc = {
							trigger = { has_relation_potential_lover = scope:woo_target }
							desc = hunt.9001.woo_potential
						}
						desc = hunt.9001.woo_fail
					}
				}
			}
			triggered_desc = { # Befriend Intent
				trigger = { exists = scope:befriend_target }
				desc = {
					first_valid = {
						triggered_desc = {
							trigger = { has_relation_best_friend = scope:befriend_target }
							desc = hunt.9001.befriend_best
						}
						triggered_desc = {
							trigger = { has_relation_friend = scope:befriend_target }
							desc = hunt.9001.befriend_friend
						}
						triggered_desc = {
							trigger = { has_relation_potential_lover = scope:befriend_target }
							desc = hunt.9001.befriend_potential
						}
						desc = hunt.9001.befriend_fail
					}
				}
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = { category = special_type option = hunt_type_falconry }
					}
				}
				desc = hunt.9001.falconry
			}
			triggered_desc = {
				trigger = {
					scope:credit_taker ?= this
					hunt_animal_type_small_trigger = { VAR = scope:activity.var:animal_type }
				}
				desc = hunt.9001.credit_self
			}
			triggered_desc = {
				trigger = {
					scope:credit_taker ?= this
					NOT = {
						hunt_animal_type_small_trigger = { VAR = scope:activity.var:animal_type }
					}
				}
				desc = hunt.9001.credit_self_big
			}
			triggered_desc = {
				trigger = {
					exists = scope:credit_taker
					NOT = { scope:credit_taker = this }
					hunt_animal_type_small_trigger = { VAR = scope:activity.var:animal_type }
				}
				desc = hunt.9001.credit_other
			}
			triggered_desc = {
				trigger = {
					exists = scope:credit_taker
					NOT = { scope:credit_taker = this }
					NOT = {
						hunt_animal_type_small_trigger = { VAR = scope:activity.var:animal_type }
					}
				}
				desc = hunt.9001.credit_other_big
			}
			triggered_desc = {
				trigger = {
					NOT = { exists = scope:credit_taker }
					hunt_animal_type_small_trigger = { VAR = scope:activity.var:animal_type }
				}
				desc = hunt.9001.credit_shared
			}
			triggered_desc = {
				trigger = {
					NOT = { exists = scope:credit_taker }
				}
				desc = hunt.9001.credit_shared_big
			}
			triggered_desc = {
				trigger = {
					NOR = {
						has_trait = callous
						has_trait = arrogant
					}
				}
				desc = hunt.9001.opening_compassionate
			}
			triggered_desc = {
				trigger = {
					NOR = {
						has_trait = compassionate
						has_trait = humble
					}
				}
				desc = hunt.9001.opening_callous
			}
			triggered_desc = {
				trigger = {
					NOR = {
						has_trait = humble
						has_trait = content
					}
				}
				desc = hunt.9001.opening_ambitious
			}
			triggered_desc = {
				trigger = {
					NOR = {
						has_trait = arrogant
						has_trait = ambitious
					}
				}
				desc = hunt.9001.opening_content
			}
			triggered_desc = {
				trigger = {
					NOT = { has_trait = craven }
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				}
				desc = hunt.9001.opening_martial
			}
			triggered_desc = {
				trigger = {
					OR = {
						has_trait = scholar
						has_trait = education_learning
						has_trait = lifestyle_physician
					}
				}
				desc = hunt.9001.opening_learning
			}
		}
		first_valid = { # Master Flavor 1
			triggered_desc = {
				trigger = {
					scope:hunt_participant ?= {
						OR = {
							has_court_position = master_of_hunt_court_position
							has_court_position = huntperson_camp_officer
						}
					}
					exists = scope:activity.var:captive_animal
				}
				desc = hunt.9001.opening_captive_master_of_hunt
			}
			triggered_desc = {
				trigger = {
					scope:hunt_participant ?= {
						OR = {
							has_court_position = master_of_hunt_court_position
							has_court_position = huntperson_camp_officer
						}
					}
					scope:activity = {
						has_activity_option = { category = special_type option = hunt_type_falconry }
					}
				}
				desc = hunt.9001.opening_falconry_master_of_hunt
			}
			triggered_desc = {
				trigger = {
					scope:hunt_participant ?= {
						OR = {
							has_court_position = master_of_hunt_court_position
							has_court_position = huntperson_camp_officer
						}
					}
				}
				desc = hunt.9001.opening_master_of_hunt
			}
			triggered_desc = {
				trigger = {
					exists = scope:activity.var:captive_animal
					exists = scope:hunt_participant
					NOT = { this = scope:hunt_participant }
				}
				desc = hunt.9001.opening_captive_courtier
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = { category = special_type option = hunt_type_falconry }
					}
					trigger_if = {
						limit = { exists = scope:hunt_participant }
						this = scope:hunt_participant
					}
					trigger_else = { this = scope:host }
				}
				desc = hunt.9001.opening_falconry_self
			}
			triggered_desc = {
				trigger = {
					scope:hunt_participant ?= {
						NOT = {
							OR = {
								has_court_position = master_of_hunt_court_position
								has_court_position = huntperson_camp_officer
							}
						}
					}
					scope:activity = {
						has_activity_option = { category = special_type option = hunt_type_falconry }
					}
				}
				desc = hunt.9001.opening_falconry_courtier
			}
			triggered_desc = {
				trigger = {
					exists = scope:activity.var:captive_animal
					trigger_if = {
						limit = { exists = scope:hunt_participant }
						this = scope:hunt_participant
					}
					trigger_else = { this = scope:host }
				}
				desc = hunt.9001.opening_captive_self
			}
			triggered_desc = {
				trigger = {
					trigger_if = {
						limit = { exists = scope:hunt_participant }
						this = scope:hunt_participant
					}
					trigger_else = { this = scope:host }
				}
				desc = hunt.9001.opening_self
			}
			triggered_desc = {
				trigger = { exists = scope:hunt_participant }
				desc = hunt.9001.opening_courtier
			}
		}
		first_valid = { # Master Flavor 2
			triggered_desc = {
				trigger = { exists = scope:activity.var:captive_animal }
				desc = hunt.9001.opening_captive
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = { category = special_type option = hunt_type_falconry }
					}
				}
				desc = hunt.9001.opening_falconry
			}
			triggered_desc = {
				trigger = {
					trigger_if = {
						limit = { exists = scope:hunt_participant }
						scope:hunt_participant = {
							hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 80 }
						}
					}
					trigger_else = {
						hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 100 }
					}
				}
				desc = hunt.9001.opening_master
			}
			triggered_desc = {
				trigger = {
					trigger_if = {
						limit = { exists = scope:hunt_participant }
						scope:hunt_participant = {
							hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 50 }
						}
					}
					trigger_else = {
						hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 50 }
					}
				}
				desc = hunt.9001.opening_skilled
			}
			triggered_desc = {
				trigger = {
					trigger_if = {
						limit = { exists = scope:hunt_participant }
						scope:hunt_participant = {
							hunt_lifestyle_track_less_trigger = { TRACK = hunter LESS_THAN = 50 }
						}
					}
					trigger_else = {
						hunt_lifestyle_track_less_trigger = { TRACK = hunter LESS_THAN = 50 }
					}
				}
				desc = hunt.9001.opening_beginner
			}
			desc = hunt.9001.opening_novice
		}
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:activity.var:captive_animal }
				desc = hunt.9001.spoils_captive
			}
			triggered_desc = {
				trigger = {
					scope:activity = {
						has_activity_option = { category = special_type option = hunt_type_falconry }
					}
				}
				desc = hunt.9001.spoils_falconry
			}
			desc = hunt.9001.spoils
		}
	}
	left_portrait = {
		character = scope:host
		animation = war_over_win
		triggered_animation = {
			trigger = { has_character_flag = recent_hunt_wound }
			animation = pain
		}
		triggered_animation = {
			trigger = {
				NOT = { exists = scope:hunt_participant }
				NOT = { scope:activity.var:animal_type = flag:hare }
			}
			animation = hunting_knife_start
		}
		triggered_animation = {
			trigger = {
				NOT = { exists = scope:hunt_participant }
				scope:activity.var:animal_type = flag:hare
			}
			animation = hunting_carcass_start
		}
		triggered_animation = {
			trigger = { exists = scope:hunt_participant }
			animation = happiness
		}
	}
	right_portrait = {
		trigger = { exists = scope:hunt_participant }
		character = scope:hunt_participant
		triggered_animation = {
			trigger = { has_character_flag = recent_hunt_wound }
			animation = pain
		}
		triggered_animation = {
			trigger = {
				NOT = { scope:activity.var:animal_type = flag:hare }
			}
			animation = hunting_knife_start
		}
		triggered_animation = {
			trigger = { scope:activity.var:animal_type = flag:hare }
			animation = hunting_carcass_start
		}
	}
	lower_left_portrait = {
		character = intent_target
		trigger = {
			exists = intent_target
			NOR = {
				scope:hunt_participant ?= this
				scope:host ?= this
			}
		}
	}
	lower_center_portrait = {
		character = scope:trophy_recipient
		trigger = {
			exists = scope:trophy_recipient
			NOR = {
				scope:hunt_participant ?= this
				scope:host ?= this
				root.intent_target ?= this
			}
		}
	}	
	artifact = { # To display the artifact in the event-window
		target = scope:newly_created_artifact
		position = lower_right_portrait
		trigger = { exists = scope:newly_created_artifact }
	}
	theme = hunt_activity

	immediate = {
		play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Hunts/ConstructionKits/ep2_event_grand_hunt_ck_dogs_bark"
		if = {
			limit = { this = scope:host }
			if = {
				limit = {
					scope:activity = {
						has_activity_option = { category = special_type option = hunt_type_falconry }
					}
				}
				hunt_activity_random_subordinate_participant_effect = {
					ARCHETYPE = falconer
					COMBATANT = no
					SCOPE = hunt_participant
				}
			}
			else_if = {
				limit = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				}
				hunt_activity_random_subordinate_participant_effect = {
					ARCHETYPE = hunter
					COMBATANT = yes
					SCOPE = hunt_participant
				}
			}
			hunt_all_attendee_xp_effect = { CHANGE = 2 RANDOM = 2 }
			# Previous important rewards
			if = {
				limit = { exists = scope:activity.var:hunt_trophy_artifact }
				scope:activity.var:hunt_trophy_artifact = { save_scope_as = hunt_trophy_artifact }
			}
			hunt_complete_remove_sightings_effect = yes # Remove sightings
		}
		# Show personal rewards if guest
		else = { hunt_individual_guest_awards_effect = yes }
		# Show host rewards
		show_as_tooltip = {
			scope:host = { disburse_hunt_activity_rewards = yes }
		}
		hunt_intent_outcome_tooltip_effect = yes
		# Save scopes for trophy recipient
		hunt_trophy_recipient_scope_effect = yes
		# Special legend stuff
		disburse_hunt_legend_seeds = yes
	}

	option = { # Nothing
		name = hunt.9001.a
		trigger = {
			NOT = { exists = scope:newly_created_artifact }
		}
		ai_chance = {
			base = 10
		}
	}

	option = { # Take Artifact
		name = {
			trigger = {
				scope:newly_created_artifact = {
					OR = {
						artifact_type = animal_hide
						artifact_type = animal_hide_big
					}
				}
			}
			text = hunt.8001.a
		}
		name = {
			trigger = {
				scope:newly_created_artifact = { artifact_type = animal_skull }
			}
			text = hunt.8001.b
		}
		name = {
			trigger = {
				scope:newly_created_artifact = { artifact_type = animal_trinket }
			}
			text = hunt.9001.d
		}
		name = {
			trigger = {
				scope:newly_created_artifact = { artifact_type = bird_feather }
			}
			text = hunt.9001.e
		}
		trigger = {
			this = scope:host
			exists = scope:newly_created_artifact
		}
		if = {
			limit = { exists = scope:newly_created_artifact }
			scope:newly_created_artifact = { save_scope_as = this_artifact }
			send_interface_toast = {
				title = artifact.0012.t
				right_icon = scope:newly_created_artifact
				show_as_tooltip = {
					scope:newly_created_artifact = { set_owner = root }
				}
			}			
		}
		ai_chance = {
			base = 25
			modifier = { # Already filled big wall slots - avoid AI artifact bloat
				scope:newly_created_artifact = { artifact_type = animal_hide_big }
				any_character_artifact = {
					count >= 3
					artifact_slot_type = wall_big
				}
				factor = 0
			}
			modifier = { # Already filled small wall slots - avoid AI artifact bloat
				scope:newly_created_artifact = {
					OR = {
						artifact_type = animal_hide
						artifact_type = animal_skull
					}
				}
				any_character_artifact = {
					count >= 3
					artifact_slot_type = wall_small
				}
				factor = 0
			}
			modifier = { # Already filled trinket wall slots - avoid AI artifact bloat
				scope:newly_created_artifact = {
					OR = {
						artifact_type = animal_trinket
						artifact_type = bird_feather
					}
				}
				any_character_artifact = {
					count >= 4
					artifact_slot_type = miscellaneous
				}
				factor = 0
			}
		}
	}

	option = { # Gift Artifact to Relevant Character
		name = {
			text = hunt.9001.f
			trigger = {
				NOT = {
					scope:trophy_recipient = { is_participant_in_activity = scope:activity }
				}
			}
		}
		name = {
			text = hunt.9001.f.present
			trigger = {
				scope:trophy_recipient = { is_participant_in_activity = scope:activity }
			}
		}
		trigger = {
			this = scope:host
			exists = scope:newly_created_artifact
			exists = scope:trophy_recipient
		}
		scope:newly_created_artifact = { set_owner = scope:trophy_recipient }
		hunt_gift_trophy_opinion_effect = { RECIPIENT = scope:trophy_recipient }
		ai_chance = { 
			base = 20
			ai_value_modifier = {
				ai_greed = -0.5
				ai_compassion = 0.5
				ai_sociability = 0.5
			}
			modifier = { # Don't gift court artifacts to scrubs
				scope:newly_created_artifact = {
					OR = {
						artifact_type = animal_hide_big
						artifact_type = animal_hide
						artifact_type = animal_skull
					}
				}
				scope:trophy_recipient = { has_royal_court = no }
				factor = 0
			}
		}
	}

	option = { # Gift Artifact to Credit Taker
		name = hunt.9001.g
		trigger = {
			this = scope:host
			exists = scope:newly_created_artifact
			exists = scope:animal_slayer
			NOT = { this = scope:animal_slayer }
		}
		scope:newly_created_artifact = { set_owner = scope:animal_slayer }
		hunt_gift_trophy_opinion_effect = { RECIPIENT = scope:animal_slayer }
		ai_chance = {
			base = 10
			modifier = { # Already filled big wall slots - avoid AI artifact bloat
				scope:newly_created_artifact = { artifact_type = animal_hide_big }
				any_character_artifact = {
					count >= 3
					artifact_slot_type = wall_big
				}
				factor = 0
			}
			modifier = { # Already filled small wall slots - avoid AI artifact bloat
				scope:newly_created_artifact = {
					OR = {
						artifact_type = animal_hide
						artifact_type = animal_skull
					}
				}
				any_character_artifact = {
					count >= 3
					artifact_slot_type = wall_small
				}
				factor = 0
			}
			modifier = { # Already filled trinket wall slots - avoid AI artifact bloat
				scope:newly_created_artifact = {
					OR = {
						artifact_type = animal_trinket
						artifact_type = bird_feather
					}
				}
				any_character_artifact = {
					count >= 4
					artifact_slot_type = miscellaneous
				}
				factor = 0
			}
		}
	}

	after = {
		if = {
			limit = { this = scope:host }
			scope:activity = {
				every_attending_character = {
					limit = {
						NOT = { this = scope:host }
					}
					trigger_event = hunt.9001
				}
			}
		}
		else = {
			show_as_tooltip = {
				add_prestige = hunt_prestige_guest_gain_value
			}
		}
		if = { # Fallback for Fawning Doe etc.
			limit = { exists = scope:activity }
			scope:activity = {
				set_variable = {
					name = hunt_invalidated
					value = root
				}
			}			
		}
	}
}

hunt.9002 = {
	type = activity_event
	title = hunt.9002.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:activity.var:hunt_success_chance >= 50
					scope:activity.var:hunt_success_chance_event >= hunt_activity_success_increase_medium_value
				}
				desc = hunt.9001.desc_good
			}
			triggered_desc = {
				trigger = {
					scope:activity.var:hunt_success_chance >= 50
					scope:activity.var:hunt_success_chance_event < hunt_activity_success_decrease_minor_value
				}
				desc = hunt.9001.desc_good_bad
			}
			triggered_desc = {
				trigger = {
					scope:activity.var:hunt_success_chance < 50
					scope:activity.var:hunt_success_chance_event < hunt_activity_success_decrease_minor_value
				}
				desc = hunt.9001.desc_bad
			}
			triggered_desc = {
				trigger = {
					scope:activity.var:hunt_success_chance < 50
					scope:activity.var:hunt_success_chance_event >= hunt_activity_success_increase_medium_value
				}
				desc = hunt.9001.desc_bad_good
			}
			desc = hunt.9001.desc_same
		}
		triggered_desc = { # Murder Intent
			trigger = { has_activity_intent = murder_attendee_intent }
			desc = {
				first_valid = {
					triggered_desc = {
						trigger = {							
							exists = intent_target.killer
							intent_target.killer = root
							any_secret = {
								secret_type = secret_murder
								secret_target = root.intent_target
							}
						}
						desc = hunt.9001.murder_secret
					}
					triggered_desc = {
						trigger = {
							exists = intent_target.killer
							intent_target.killer = root
						}
						desc = hunt.9001.murder_public
					}
					triggered_desc = {
						trigger = {
							intent_target = { is_alive = no }
						}
						desc = hunt.9001.murder_dead
					}
					desc = hunt.9001.murder_fail
				}
			}
		}
		triggered_desc = { # Woo Intent
			trigger = { has_activity_intent = woo_attendee_intent  }
			desc = {
				first_valid = {
					triggered_desc = {
						trigger = { has_relation_soulmate = intent_target }
						desc = hunt.9001.woo_soulmate
					}
					triggered_desc = {
						trigger = { has_relation_lover = intent_target }
						desc = hunt.9001.woo_lover
					}
					triggered_desc = {
						trigger = { has_relation_potential_lover = intent_target }
						desc = hunt.9001.woo_potential
					}
					desc = hunt.9001.woo_fail
				}
			}
		}
		triggered_desc = { # Befriend Intent
			trigger = { has_activity_intent = befriend_attendee_intent }
			desc = {
				first_valid = {
					triggered_desc = {
						trigger = { has_relation_best_friend = intent_target }
						desc = hunt.9001.befriend_best
					}
					triggered_desc = {
						trigger = { has_relation_friend = intent_target }
						desc = hunt.9001.befriend_friend
					}
					triggered_desc = {
						trigger = { has_relation_potential_lover = intent_target }
						desc = hunt.9001.befriend_potential
					}
					desc = hunt.9001.befriend_fail
				}
			}
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:hunt_participant
					scope:hunt_participant = {
						OR = {
							has_court_position = master_of_hunt_court_position
							has_court_position = huntperson_camp_officer
						}
					}
				}
				desc = hunt.9002.opening_master_of_hunt
			}
			triggered_desc = {
				trigger = { exists = scope:hunt_participant }
				desc = hunt.9002.opening_courtier
			}
			desc = hunt.9002.opening
		}
		desc = hunt.9002.opening_animal
	}
	left_portrait = {
		character = scope:host
		triggered_animation = {
			trigger = { has_character_flag = recent_hunt_wound }
			animation = pain
		}
		animation = sadness
	}
	right_portrait = {
		trigger = { exists = scope:hunt_participant }
		character = scope:hunt_participant
		triggered_animation = {
			trigger = { has_character_flag = recent_hunt_wound }
			animation = pain
		}
		animation = disapproval
	}
	artifact = { # To display the artifact in the event-window
		target = scope:hunt_trophy_artifact
		position = lower_right_portrait
	}
	lower_left_portrait = {
		trigger = {
			exists = root.intent_target
			NOR = {
				scope:hunt_participant ?= this
				scope:host ?= this
			}
		}
		character = root.intent_target
	}
	center_portrait = {
		trigger = {
			NOR = {
				scope:host ?= this
				scope:hunt_participant ?= this
			}
		}
		character = root
	}
	theme = hunt_activity

	trigger = {
		scope:activity = {
			trigger_if = {
				limit = { exists = var:hunt_success }
				var:hunt_success = flag:no
			}
		}
	}

	immediate = {
		if = {
			limit = { this = scope:host }
			if = {
				limit = { exists = scope:activity.var:hunt_trophy_artifact }
				scope:activity.var:hunt_trophy_artifact = { save_scope_as = hunt_trophy_artifact }
			}
			if = {
				limit = {
					scope:activity = {
						has_activity_option = { category = special_type option = hunt_type_falconry }
					}
				}
				hunt_activity_random_subordinate_participant_effect = {
					ARCHETYPE = falconer
					COMBATANT = no
					SCOPE = hunt_participant
				}
			}
			else_if = {
				limit = {
					can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host }
				}
				hunt_activity_random_subordinate_participant_effect = {
					ARCHETYPE = hunter
					COMBATANT = yes
					SCOPE = hunt_participant
				}
			}
			hunt_all_attendee_xp_effect = { CHANGE = 1 RANDOM = 1 }
		}
		# Show personal rewards if guest
		else = { hunt_individual_guest_awards_effect = yes }
		# Show host rewards
		show_as_tooltip = {
			scope:host = { disburse_hunt_activity_rewards = yes }
		}
		hunt_complete_remove_sightings_effect = yes # Remove sightings
		hunt_intent_outcome_tooltip_effect = yes
	}

	option = {
		name = {
			trigger = {
				NOT = { has_trait = lifestyle_hunter }
			}
			text = hunt.9001.b
		}
		name = {
			trigger = { has_trait = lifestyle_hunter }
			text = hunt.9001.c
		}
	}

	after = {
		if = {
			limit = { this = scope:host }
			scope:activity = {
				every_attending_character = {
					limit = {
						NOT = { this = scope:host }
					}
					if = {
						limit = { exists = scope:murder_target }
						clear_saved_scope = murder_target
					}
					if = {
						limit = { exists = scope:woo_target }
						clear_saved_scope = woo_target
					}
					if = {
						limit = { exists = scope:befriend_target }
						clear_saved_scope = befriend_target
					}
					if = {
						limit = { has_activity_intent = murder_attendee_intent }
						intent_target = { save_scope_as = murder_target }
					}
					else_if = {
						limit = { has_activity_intent = murder_attendee_intent }
						intent_target = { save_scope_as = woo_target }
					}
					else_if = {
						limit = { has_activity_intent = befriend_attendee_intent }
						intent_target = { save_scope_as = befriend_target }
					}
					trigger_event = hunt.9002
				}
			}
		}
	}
}
