###########################################
#                                         #
# Horse Lords wolf's blood events         #
# ID HL.1000-HL.1999                      #
#                                         #
###########################################

# Written by Tobias Bodlund

namespace = HL

###########################################
# The Wolf Child                          #
# ID HL.1000-HL.1099                      #
###########################################

# Child is born with Wolf's blood
character_event = {
	id = HL.1000

	is_triggered_only = yes # on_birth
	hide_window = yes

	has_dlc = "Horse Lords"

	trigger = {
		culture_group = altaic
		NOT = { culture = khitan }

		OR = {
			father = {
				trigger_if = {
					limit = { ai = yes }

					has_game_rule = {
						name = supernatural_events
						value = unrestricted
					}
				}

				num_of_children < 2
			}

			mother = {
				trigger_if = {
					limit = { ai = yes }

					has_game_rule = {
						name = supernatural_events
						value = unrestricted
					}
				}

				num_of_children < 2
			}
		}

		NOR = {
			has_game_rule = {
				name = supernatural_events
				value = off
			}

			any_close_relative = {
				OR = {
					has_character_modifier = wolf_child
					has_character_modifier = wolf_blood
				}
			}
		}
	}

	immediate = {
		random = {
			chance = 5

			father = { narrative_event = { id = HL.1001 days = 300 } }
			mother = { narrative_event = { id = HL.1001 days = 300 } }
		}
	}
}

# Baby shows wolf-like behavior
narrative_event = {
	id = HL.1001
	title = EVTTITLE_HL_1001
	desc = EVTDESC_HL_1001
	picture = GFX_evt_birth
	border = GFX_event_narrative_frame_war

	is_triggered_only = yes

	only_capable = yes

	trigger = {
		trigger_if = {
			limit = { ai = yes }

			has_game_rule = {
				name = supernatural_events
				value = unrestricted
			}
		}

		NOT = {
			has_game_rule = {
				name = supernatural_events
				value = off
			}
		}

		FROM = {
			is_alive = yes
			NOT = { trait = sickly }
		}
	}

	option = {
		name = EVTOPTA_HL_1001 # Positive response

		FROM = {
			show_scope_change = no

			add_character_modifier = {
				name = wolf_child
				duration = -1
			}

			set_character_flag = wolf_blood_first_generation
		}

		opinion = {
			name = opinion_favorite
			who = FROM
			years = 100
		}
	}

	option = {
		name = EVTOPTB_HL_1001 # Negative response

		FROM = {
			show_scope_change = no

			add_character_modifier = {
				name = wolf_child
				duration = -1
			}

			set_character_flag = wolf_blood_first_generation
		}

		opinion = {
			name = opinion_worried
			who = FROM
			years = 15
		}
	}
}

# Childless ruler finds child nursed by wolves, may adopt...
narrative_event = {
	id = HL.1010
	title = EVTTITLE_HL_1001
	desc = EVTDESC_HL_1010
	picture = GFX_evt_birth
	border = GFX_event_narrative_frame_war

	is_triggered_only = yes # on_yearly_pulse, random_events

	min_age = 16
	only_playable = yes
	culture_group = altaic
	only_capable = yes
	has_dlc = "Horse Lords"

	trigger = {
		trigger_if = {
			limit = { ai = yes }

			has_game_rule = {
				name = supernatural_events
				value = unrestricted
			}
		}

		has_children = no

		NOR = {
			culture = khitan
			religion = jain

			any_close_relative = {
				OR = {
					has_character_modifier = wolf_child
					has_character_modifier = wolf_blood
				}
			}

			has_game_rule = {
				name = supernatural_events
				value = off
			}
		}
	}

	option = {
		name = EVTOPTA_HL_1010 # Take the child in and adopt it

		create_character = {
			age = 1
			dynasty = ROOT
		}

		new_character = {
			if = {
				limit = { ROOT = { is_female = no } }
				set_father = ROOT
			}
			else = {
				set_mother = ROOT
			}

			set_character_flag = wolf_blood_first_generation

			add_character_modifier = {
				name = wolf_child
				duration = -1
			}
		}

		custom_tooltip = { text = adopt_wolf_child }
	}

	option = {
		name = EVTOPTB_HL_1010 # Leave it

		piety = -10
	}
}

# Child (ruler or child to ruler) gets lost in woods. Is taken in and rescued by wolves..
narrative_event = {
	id = HL.1020
	title = EVTTITLE_HL_1001
	desc = EVTDESC_HL_1020
	picture = GFX_evt_wolf
	border = GFX_event_narrative_frame_war

	is_triggered_only = yes # on_yearly_pulse, random_events

	culture_group = altaic
	only_capable = yes
	has_dlc = "Horse Lords"
	min_age = 5
	max_age = 9

	trigger = {
		OR = {
			trigger_if = {
				limit = { ai = yes }

				has_game_rule = {
					name = supernatural_events
					value = unrestricted
				}
			}

			father = { ai = no }
			mother = { ai = no }
		}

		NOR = {
			culture = khitan
			any_sibling = { is_older_than = ROOT }
			has_character_modifier = wolf_child
			has_character_modifier = wolf_blood

			any_close_relative = {
				OR = {
					has_character_modifier = wolf_child
					has_character_modifier = wolf_blood
				}
			}

			has_game_rule = {
				name = supernatural_events
				value = off
			}
		}
	}

	option = {
		name = EVTOPTA_HL_1020

		set_character_flag = wolf_blood_first_generation

		add_character_modifier = {
			name = wolf_child
			duration = -1
		}

		father = { narrative_event = { id = HL.1021 } }
		mother = { narrative_event = { id = HL.1021 } }
	}
}

# Child tells parent of experience with wolves...
narrative_event = {
	id = HL.1021
	title = EVTTITLE_HL_1001
	desc = EVTDESC_HL_1021
	picture = GFX_evt_wolf
	border = GFX_event_narrative_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA_HL_1021 # Positive response

		tooltip = {
			FROM = {
				show_scope_change = no

				add_character_modifier = {
					name = wolf_child
					duration = -1
				}
			}
		}

		opinion = {
			name = opinion_impressed
			who = FROM
			years = 3
		}
	}

	option = {
		name = EVTOPTB_HL_1021 # Negative response

		tooltip = {
			FROM = {
				show_scope_change = no

				add_character_modifier = {
					name = wolf_child
					duration = -1
				}
			}
		}

		if = {
			limit = {
				NOT = {
					has_opinion_modifier = {
						name = opinion_worried
						who = FROM
					}
				}
			}

			opinion = {
				name = opinion_worried
				who = FROM
				years = 3
			}
		}
	}
}

# Child getting older, court rumors of real mother being a wolf
narrative_event = {
	id = HL.1030
	title = EVTTITLE_HL_1030
	desc = EVTDESC_HL_1030
	picture = GFX_evt_whispers
	border = GFX_event_narrative_frame_war

	is_triggered_only = yes # on_yearly_pulse

	has_character_flag = wolf_blood_first_generation
	only_capable = yes
	min_age = 13

	trigger = {
		OR = {
			trigger_if = {
				limit = { ai = yes }

				has_game_rule = {
					name = supernatural_events
					value = unrestricted
				}
			}

			father = { ai = no }
			mother = { ai = no }
		}

		NOT = { has_character_flag = wolf_spawn_rumors }
	}

	immediate = {
		set_character_flag = wolf_spawn_rumors
	}

	option = {
		name = EVTOPTA_HL_1030

		prestige = 20

		random = {
			chance = 30
			add_trait_fully_proud_effect = yes
		}
	}

	option = {
		name = EVTOPTB_HL_1030

		trigger = {
			mother_even_if_dead = { always = yes }
		}

		random = {
			chance = 30

			if = {
				limit = {
					NOT = { trait = wroth }
				}

				add_trait_fully_wroth_effect = yes
			}
			else = {
				add_trait_fully_deceitful_effect = yes
			}
		}

		reverse_opinion = {
			name = strengthened_loyalty
			who = mother
			years = 3
		}
	}


	option = {
		name = EVTOPTC_HL_1030

		random = {
			chance = 30

			if = {
				limit = {
					NOT = { trait = paranoid }
				}

				add_trait_fully_paranoid_effect = yes
			}
			else = {
				add_trait_fully_envious_effect = yes
			}
		}
	}

	option = {
		name = EVTOPTD_HL_1030

		prestige = 10
	}

	after = {
		father = { narrative_event = { id = HL.1031 } }
		mother = { narrative_event = { id = HL.1031 } }
	}
}

# Parents hear wolf rumors
narrative_event = {
	id = HL.1031
	title = EVTTITLE_HL_1031
	desc = EVTDESC_HL_1031
	picture = GFX_evt_whispers
	border = GFX_event_narrative_frame_war

	is_triggered_only = yes

	only_capable = yes

	option = {
		name = EVTOPTA_HL_1031 # Accept gossip

		opinion = {
			name = opinion_approves
			who = FROM
			years = 3
		}
	}

	option = {
		name = EVTOPTB_HL_1031 # Disapprove of gossip

		prestige = 30
	}
}

# Reaches maturity - change Wolf-Child modifier to Wolf's Blood
character_event = {
	id = HL.1040
	title = EVTTITLE_HL_1040
	desc = EVTDESC_HL_1040
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes # on_adulthood

	has_character_flag = wolf_blood_first_generation

	option = {
		name = EVTOPTA_HL_1040

		remove_character_modifier = wolf_child

		add_character_modifier = {
			name = wolf_blood
			duration = -1
		}

		if = {
			limit = { has_nickname = no }
			give_nickname = nick_the_wolf
		}

		father = { character_event = { id = HL.1041 } }
		mother = { character_event = { id = HL.1041 } }
	}
}

# Reach maturity - notify parents
character_event = {
	id = HL.1041
	title = EVTTITLE_HL_1040
	desc = EVTDESC_HL_1041
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	ai = no
	only_capable = yes

	option = {
		name = EVTOPTA_HL_1041

		tooltip = {
			FROM = {
				show_scope_change = no

				remove_character_modifier = wolf_child

				add_character_modifier = {
					name = wolf_blood
					duration = -1
				}

				if = {
					limit = { has_nickname = nick_the_wolf }
					give_nickname = nick_the_wolf
				}
			}
		}
	}
}

###########################################
# Great Hunt random event - wolves appear #
# and run beside you                      #
# ID HL.1100                              #
###########################################

## Great Hunt random event - wolves appear and run beside you
# CleanSlate: HL.1100 moved to base_hunting_events.txt

###########################################
# The Call of the Wolves                  #
# ID HL.1200-HL.1299                      #
###########################################

# Wolves howl outside several nights in a row
narrative_event = {
	id = HL.1200
	title = EVTTITLE_HL_1200
	desc = EVTDESC_HL_1200
	picture = GFX_evt_bad_news
	border = GFX_event_narrative_frame_war

	is_triggered_only = yes # on_yearly_pulse, random_events

	has_character_flag = wolf_blood_first_generation
	only_capable = yes
	prisoner = no
	min_age = 18
	in_command = no

	trigger = {
		trigger_if = {
			limit = { ai = yes }

			has_game_rule = {
				name = supernatural_events
				value = unrestricted
			}
		}

		is_inaccessible_trigger = no
		NOT = { has_character_flag = call_of_the_wolves }
	}

	immediate = {
		set_character_flag = call_of_the_wolves
		set_character_flag = do_not_disturb
	}

	option = {
		name = EVTOPTA_HL_1200

		add_character_modifier = {
			name = sleep_deprivation
			days = 30
		}

		character_event = {
			id = HL.1201
			days = 30
		}
	}
}

# Wolves keep howling, night after night
character_event = {
	id = HL.1201
	title = EVTTITLE_HL_1201
	desc = EVTDESC_HL_1201
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA_HL_1201

		narrative_event = {
			id = HL.1210 # Go out alone
			tooltip = wolves_go_out_alone_tooltip
		}
	}

	option = {
		name = EVTOPTB_HL_1201

		character_event = {
			id = HL.1202 # Go out with guards
			tooltip = wolves_go_out_with_guards_tooltip
		}
	}

	option = {
		name = EVTOPTC_HL_1201

		narrative_event = {
			id = HL.1203 # Ignore (hint at negative effects of denying your instincts)
			days = 15
			tooltip = wolves_ignore_tooltip
		}

		remove_do_not_disturb_effect = yes
	}
}

# Wolves howl - go out with guards, wolves retreat
character_event = {
	id = HL.1202
	title = EVTTITLE_HL_1202
	desc = EVTDESC_HL_1202
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA_HL_1202

		narrative_event = {
			id = HL.1210 # Send guards home and follow wolves alone
			tooltip = wolves_continue_alone_tooltip
		}
	}

	option = {
		name = EVTOPTB_HL_1202 # Go back inside

		narrative_event = {
			id = HL.1203 # Ignore (hint at negative effects of denying your instincts)
			days = 15
			tooltip = wolves_ignore_tooltip
		}

		remove_do_not_disturb_effect = yes
	}
}

# Didn't follow wolves, they disappear, you become unhappy as you miss their nightly howls...
narrative_event = {
	id = HL.1203
	title = EVTTITLE_HL_1203
	desc = EVTDESC_HL_1203
	picture = GFX_evt_bad_news
	border = GFX_event_narrative_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA_HL_1203

		if = {
			limit = {
				NOT = { trait = stressed }
			}

			add_trait = stressed
		}
		else_if = {
			limit = {
				NOT = { trait = depressed }
			}

			add_trait = depressed
		}
	}
}

# Follow wolves alone, they run deep into the wild
narrative_event = {
	id = HL.1210
	title = EVTTITLE_HL_1210
	desc = EVTDESC_HL_1210
	picture = GFX_evt_wolf
	border = GFX_event_narrative_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA_HL_1210

		narrative_event = {
			id = HL.1230
			days = 5
			tooltip = wolves_run_with_wolves_tooltip
		}
	}
}

# Run and hunt with wolves, kill prey, eat raw meat
narrative_event = {
	id = HL.1230
	title = EVTTITLE_HL_1230
	desc = EVTDESC_HL_1230
	picture = GFX_evt_wolf
	border = GFX_event_narrative_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA_HL_1230

		add_character_modifier = {
			name = good_hunt
			years = 1
		}

		random = {
			chance = 30
			remove_trait_temperate_effect = yes
		}
	}

	option = {
		name = EVTOPTB_HL_1230

		random = {
			chance = 30
			add_trait_fully_temperate_effect = yes
		}
	}

	after = {
		narrative_event = {
			id = HL.1240
			days = 5
		}
	}
}

# Had a good time with wolves
narrative_event = {
	id = HL.1240
	title = EVTTITLE_HL_1240
	desc = EVTDESC_HL_1240
	picture = GFX_evt_wolf
	border = GFX_event_narrative_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA_HL_1240

		add_character_modifier = {
			name = good_times
			years = 2
		}

		narrative_event = {
			id = HL.1250
			days = 5
		}
	}
}

# Return home, wife/lover/everyone is worried. Say something about it
narrative_event = {
	id = HL.1250
	title = EVTTITLE_HL_1250
	picture = GFX_evt_tengri_throneroom_oldgods
	border = GFX_event_narrative_frame_war

	desc = {
		text = EVTDESCA_HL_1250
		trigger = {
			NOT = { has_character_flag = wolf_homecoming_worried_character } # No one special was worried about you...
		}
	}
	desc = {
		text = EVTDESCB_HL_1250
		trigger = { has_character_flag = wolf_homecoming_worried_character } # Someone special was worried about you...
	}

	is_triggered_only = yes

	immediate = {
		if = {
			limit = {
				any_spouse = {
					at_location = ROOT
					is_incapable = no
					prisoner = no
				}
			}

			any_spouse = {
				limit = {
					at_location = ROOT
					is_incapable = no
					prisoner = no
				}

				score_value = {
					value = 10
					interesting_courtier_selection_score = yes
				}

				save_event_target_as = wolf_worried_homecoming
			}

			set_character_flag = wolf_homecoming_worried_character
		}
		else_if = {
			limit = {
				any_lover = {
					at_location = ROOT
					is_incapable = no
					prisoner = no
				}
			}

			any_lover = {
				limit = {
					at_location = ROOT
					is_incapable = no
					prisoner = no
				}

				score_value = {
					value = 10
					interesting_courtier_selection_score = yes
				}

				save_event_target_as = wolf_worried_homecoming
			}

			set_character_flag = wolf_homecoming_worried_character
		}
		else_if = {
			limit = {
				is_senior_consort_party = yes

				any_consort = {
					at_location = ROOT
					is_incapable = no
					prisoner = no
				}
			}

			any_consort = {
				limit = {
					at_location = ROOT
					is_incapable = no
					prisoner = no
				}

				score_value = {
					value = 10
					interesting_courtier_selection_score = yes
				}

				save_event_target_as = wolf_worried_homecoming
			}

			set_character_flag = wolf_homecoming_worried_character
		}
	}

	option = {
		name = EVTOPTA_HL_1250

		prestige = 20

		if = {
			limit = { has_character_flag = wolf_homecoming_worried_character }

			reverse_opinion = {
				name = opinion_cautious
				who = event_target:wolf_worried_homecoming
				years = 3
			}
		}
	}

	option = {
		name = EVTOPTB_HL_1250

		prestige = 50

		if = {
			limit = { has_character_flag = wolf_homecoming_worried_character }

			reverse_opinion = {
				name = opinion_afraid
				who = event_target:wolf_worried_homecoming
				years = 3
			}
		}
	}

	option = {
		name = EVTOPTC_HL_1250

		trigger = { has_character_flag = wolf_homecoming_worried_character }

		reverse_opinion = {
			name = opinion_reassured_of_love
			who = event_target:wolf_worried_homecoming
			years = 3
		}
	}

	after = {
		clr_character_flag = wolf_homecoming_worried_character
		remove_do_not_disturb_effect = yes
	}
}

###########################################
# Possessed: Lycanthropy                  #
# ID HL.1400-HL.1499                      #
###########################################

## If Possessed: lycanthropy

# First occurrence...
narrative_event = {
	id = HL.1400
	title = EVTTITLE_HL_1400
	desc = EVTDESC_HL_1400
	picture = GFX_evt_wolf
	border = GFX_event_narrative_frame_war

	is_triggered_only = yes # on_yearly_pulse, random_events

	min_age = 18
	has_dlc = "Horse Lords"
	only_capable = yes
	prisoner = no

	trigger = {
		trait = possessed
		is_inaccessible_trigger = no

		trigger_if = {
			limit = { ai = yes }

			has_game_rule = {
				name = supernatural_events
				value = unrestricted
			}
		}

		NOR = {
			has_character_modifier = lycanthropy

			has_game_rule = {
				name = supernatural_events
				value = off
			}
		}
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 10

			OR = {
				has_character_flag = wolf_blood_inherited
				has_character_flag = wolf_blood_first_generation
			}
		}
	}

	option = {
		name = EVTOPTA_HL_1510

		add_character_modifier = {
			name = lycanthropy
			duration = -1
		}

		# Select random werewolf event...
		hidden_effect = {
			random_list = {
				10 = { character_event = { id = HL.1410 } }
				10 = { character_event = { id = HL.1420 } }
				10 = { character_event = { id = HL.1430 } }
				10 = { character_event = { id = HL.1440 } }
				10 = { character_event = { id = HL.1450 } }
				10 = { character_event = { id = HL.1460 } }
				10 = { character_event = { id = HL.1470 } }
				10 = { character_event = { id = HL.1480 } }
			}
		}
	}
}

# It's full moon!
character_event = {
	id = HL.1401
	title = EVTTITLE_HL_1401
	desc = EVTDESC_HL_1401
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes # on_yearly_pulse, random_events

	min_age = 18
	only_capable = yes
	prisoner = no

	trigger = {
		trait = possessed
		has_character_modifier = lycanthropy
		is_inaccessible_trigger = no

		trigger_if = {
			limit = { ai = yes }

			has_game_rule = {
				name = supernatural_events
				value = unrestricted
			}
		}

	}

	option = {
		name = EVTOPTA_HL_1401

		# Oh no, it's happening again... select random werewolf event...
		hidden_effect = {
			random_list = {
				10 = { character_event = { id = HL.1410 } }
				10 = { character_event = { id = HL.1420 } }
				10 = { character_event = { id = HL.1430 } }
				10 = { character_event = { id = HL.1440 } }
				10 = { character_event = { id = HL.1450 } }
				10 = { character_event = { id = HL.1460 } }
				10 = { character_event = { id = HL.1470 } }
				10 = { character_event = { id = HL.1480 } }
			}
		}
	}
}

# Howling for hours on mountaintop
character_event = {
	id = HL.1410
	desc = EVTDESC_HL_1410
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA_HL_1510

		character_event = {
			id = HL.1490
			days = 4
			tooltip = werewolf_howling_tooltip
		}

		set_character_flag = werewolf_howling_on_mountaintop
	}
}

# Swims river, sleeps outside, becomes ill or catches pneumonia
character_event = {
	id = HL.1420
	desc = EVTDESC_HL_1420
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA_HL_1420

		character_event = {
			id = HL.1490
			days = 4
			tooltip = werewolf_swimming_tooltip
		}

		set_character_flag = werewolf_swims_river_sleeps_outside
	}
}

# Kills cow
character_event = {
	id = HL.1430
	desc = EVTDESC_HL_1430
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA_HL_1430

		character_event = {
			id = HL.1490
			days = 4
			tooltip = werewolf_killed_cow_tooltip
		}

		set_character_flag = werewolf_killed_something
	}
}

# Kills pig
character_event = {
	id = HL.1440
	desc = EVTDESC_HL_1440
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA_HL_1430

		character_event = {
			id = HL.1490
			days = 4
			tooltip = werewolf_killed_pig_tooltip
		}

		set_character_flag = werewolf_killed_something
	}
}

# Kills dog
character_event = {
	id = HL.1450
	desc = EVTDESC_HL_1450
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA_HL_1430

		character_event = {
			id = HL.1490
			days = 4
			tooltip = werewolf_killed_dog_tooltip
		}

		set_character_flag = werewolf_killed_something
	}
}

# Kills peasant
character_event = {
	id = HL.1460
	desc = EVTDESC_HL_1460
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA_HL_1430

		character_event = {
			id = HL.1490
			days = 4
			tooltip = werewolf_killed_someone_tooltip
		}

		set_character_flag = werewolf_killed_something
	}
}

# Kills courtier
character_event = {
	id = HL.1470
	desc = EVTDESC_HL_1460
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	option = {
		name = EVTOPTA_HL_1430

		character_event = {
			id = HL.1490
			days = 4
		}

		set_character_flag = werewolf_killed_something

		random_courtier = {
			show_scope_change = no

			limit = {
				at_location = ROOT
				ai = yes
			}

			death = {
				death_reason = death_murder_unknown
				killer = ROOT
			}
		}
	}
}

# Kills courtier in neighboring province
character_event = {
	id = HL.1480
	desc = EVTDESC_HL_1460
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes

	immediate = {
		set_character_flag = werewolf_killed_something

		location = {
			random_neighbor_province = {
				owner = {
					random_courtier = {
						limit = {
							at_location = PREV
							is_ruler = no
						}

						save_event_target_as = werewolf_prey
					}
				}
			}
		}
	}

	option = {
		name = EVTOPTA_HL_1430

		event_target:werewolf_prey = {
			show_scope_change = no

			death = {
				death_reason = death_murder_unknown
				killer = ROOT
			}
		}

		character_event = {
			id = HL.1490
			days = 4
		}
	}
}

# Returns after full moon rage, strange memories of wolves, probably just a dream...
character_event = {
	id = HL.1490
	title = EVTTITLE_HL_1490
	picture = GFX_evt_bad_news
	border = GFX_event_normal_frame_war

	desc = {
		text = EVTDESCA_HL_1490
		trigger = { has_character_flag = werewolf_howling_on_mountaintop }
	}
	desc = {
		text = EVTDESCB_HL_1490
		trigger = { has_character_flag = werewolf_swims_river_sleeps_outside }
	}
	desc = {
		text = EVTDESCC_HL_1490
		trigger = { has_character_flag = werewolf_killed_something }
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTA_HL_1490

		trigger_switch = {
			on_trigger = has_character_flag

			werewolf_howling_on_mountaintop = {

				clr_character_flag = werewolf_howling_on_mountaintop

				add_character_modifier = {
					name = hoarse
					years = 2
				}
			}

			werewolf_swims_river_sleeps_outside = {

				clr_character_flag = werewolf_swims_river_sleeps_outside

				if = {
					limit = { trait = pneumonic }

					random = {
						chance = 20
						add_trait_infirm_effect = yes
					}
				}
				else_if = {
					limit = { trait = ill }
					add_trait = pneumonic
				}
				else_if = {
					limit = { is_ill = no }

					if = {
						limit = { has_dlc = "Reapers" }
						add_symptom_effect = yes
					}
					else = {
						add_trait = ill
					}
				}
			}

			werewolf_killed_something = {

				clr_character_flag = werewolf_killed_something

				add_character_modifier = {
					name = werewolf_killed
					years = 2
				}
			}
		}
	}
}

###########################################
# Random events, all (most of them are    #
# much less likely to occur after first   #
# generation)                             #
# ID HL.1500-HL.1599                      #
###########################################

# If Impaler/lunatic: cannibalism...
character_event = {
	id = HL.1500
	desc = EVTDESC_HL_1500
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_capable = yes

	trigger = {
		has_character_modifier = wolf_blood

		OR = {
			trait = impaler
			trait = lunatic
		}

		NOT = { has_character_flag = wolf_resisted_cannibalism }
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 0.2
			has_character_flag = wolf_blood_inherited
		}

		mult_modifier = {
			factor = 4
			trait = cannibal
		}

		mult_modifier = {
			factor = 1.5
			trait = cruel
		}

		mult_modifier = {
			factor = 1.5
			trait = possessed
		}

		mult_modifier = {
			factor = 1.5
			trait = gluttonous
		}

		mult_modifier = {
			factor = 1.5
			trait = hunter
		}

		mult_modifier = {
			factor = 0.5
			trait = temperate
		}

		mult_modifier = {
			factor = 0.5
			trait = kind
		}

		mult_modifier = {
			factor = 0.5
			trait = charitable
		}
	}

	option = {
		name = EVTOPTA_HL_1500 # The Wolf is hungry!

		random_courtier = {
			show_scope_change = no

			limit = {
				at_location = ROOT
				ai = yes
				NOT = { is_child_of = ROOT }
			}

			death = {
				death_reason = death_murder_unknown
				killer = ROOT
			}

			hidden_effect = {
				if = {
					limit = {
						religion_openly_bon_or_reformed_trigger = yes
						ROOT = { ai = no }
						is_ironman = yes
					}

					ROOT = {
						set_character_flag = achievement_bon_appetit
					}
				}
			}
		}

		if = {
			limit = {
				NOT = { trait = cannibal }
			}

			add_trait = cannibal
		}
	}

	option = {
		name = EVTOPTB_HL_1500 # I... must... resist it...

		if = {
			limit = {
				NOT = { trait = stressed }
			}

			add_trait = stressed
		}
		else_if = {
			limit = {
				NOT = { trait = depressed }
			}

			add_trait = depressed
		}

		set_character_flag = wolf_resisted_cannibalism
	}
}

# Howling at the moon (not if possessed or lunatic)
character_event = {
	id = HL.1510
	desc = EVTDESC_HL_1510
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_capable = yes

	trigger = {
		has_character_modifier = wolf_blood

		NOR = {
			trait = possessed
			trait = lunatic
			has_character_flag = wolf_howled_at_moon
		}
	}

	option = {
		name = EVTOPTA_HL_1510

		set_character_flag = wolf_howled_at_moon # Bark at the moon

		add_character_modifier = {
			name = good_times
			years = 2
		}
	}
}

# Hunter instinct strikes unexpectedly (and awkwardly) at court
character_event = {
	id = HL.1520
	desc = EVTDESC_HL_1520
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_capable = yes

	trigger = {
		has_character_modifier = wolf_blood

		NOR = {
			trait = patient
			religion = jain
			has_character_flag = wolf_hunting_instinct_at_court
		}
	}

	immediate = {
		any_courtier = {
			limit = {
				at_location = ROOT
				is_adult = yes
				is_incapable = no
			}

			score_value = {
				value = 10
				interesting_courtier_selection_score = yes
			}

			save_event_target_as = wolf_hunting_instinct_at_court_courtier
		}
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 0.2
			has_character_flag = wolf_blood_inherited
		}

		mult_modifier = {
			factor = 2
			trait = hunter
		}
	}

	option = {
		name = EVTOPTA_HL_1520

		set_character_flag = wolf_hunting_instinct_at_court

		reverse_opinion = {
			name = opinion_horrified
			who = event_target:wolf_hunting_instinct_at_court_courtier
			years = 3
		}
	}
}

# Hunter instincts in martial training (upgrade martial education)
character_event = {
	id = HL.1530
	desc = EVTDESC_HL_1530
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_capable = yes

	trigger = {
		has_character_modifier = wolf_blood

		OR = {
			trait = misguided_warrior
			trait = tough_soldier
			trait = skilled_tactician
		}

		NOT = { has_character_flag = wolf_hunting_instinct_martial_training }
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 0.2
			has_character_flag = wolf_blood_inherited
		}

		mult_modifier = {
			factor = 2
			trait = hunter
		}

		mult_modifier = {
			factor = 2
			trait = misguided_warrior
		}

		mult_modifier = {
			factor = 0.5
			trait = skilled_tactician
		}
	}

	option = {
		name = EVTOPTA_HL_1530

		set_character_flag = wolf_hunting_instinct_martial_training

		trigger_switch = {
			on_trigger = trait

			misguided_warrior = {
				hidden_effect = { remove_trait = misguided_warrior }
				add_trait = tough_soldier
			}

			tough_soldier = {
				hidden_effect = { remove_trait = tough_soldier }
				add_trait = skilled_tactician
			}

			skilled_tactician = {
				hidden_effect = { remove_trait = skilled_tactician }
				add_trait = brilliant_strategist
			}
		}

		if = {
			limit = {
				can_have_more_leadership_traits = yes
				NOT = { trait = trickster }
			}

			add_trait = trickster
		}
	}
}

# Become strong
character_event = {
	id = HL.1540
	desc = EVTDESC_HL_1540
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_capable = yes

	trigger = {
		has_character_modifier = wolf_blood
		is_strong_trigger = no
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 0.2
			has_character_flag = wolf_blood_inherited
		}
	}

	option = {
		name = EVTOPTA_HL_1540

		add_trait = brawny
	}
}

# Cunning as a wolf (quick)
character_event = {
	id = HL.1550
	desc = EVTDESC_HL_1550
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_capable = yes

	trigger = {
		has_character_modifier = wolf_blood
		is_smart_trigger = no
		is_dumb_trigger = no
		NOT = { trait = inbred }
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 0.2
			has_character_flag = wolf_blood_inherited
		}
	}

	option = {
		name = EVTOPTA_HL_1550

		add_trait = shrewd
	}
}

# Animal instincts take over... (lustful)
character_event = {
	id = HL.1560
	desc = EVTDESC_HL_1560
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_capable = yes

	trigger = {
		has_character_modifier = wolf_blood
		NOT = { trait = lustful }
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 0.2
			has_character_flag = wolf_blood_inherited
		}

		mult_modifier = {
			factor = 0.1
			trait = celibate
		}

		mult_modifier = {
			factor = 0.3
			trait = chaste
		}
	}

	option = {
		name = {
			text = EVTOPTA_HL_1560 # Growl!
			trigger = {
				NOR = {
					trait = celibate
					trait = chaste
				}
			}
		}
		name = {
			text = EVTOPTB_HL_1560 # It's like an animal inside me!
			trigger = { trait = celibate }
		}
		name = {
			text = EVTOPTC_HL_1560 # I smell new smells...
			trigger = {
				trait = chaste
				NOT = { trait = celibate }
			}
		}

		remove_trait_silently_celibate_effect = yes
		add_trait_fully_silently_lustful_effect = yes
	}
}

# Pack instinct (gregarious)
character_event = {
	id = HL.1570
	desc = EVTDESC_HL_1570
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_capable = yes

	trigger = {
		has_character_modifier = wolf_blood
		NOT = { trait = gregarious }
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 0.2
			has_character_flag = wolf_blood_inherited
		}

		mult_modifier = {
			factor = 0.5
			trait = shy
		}
	}

	option = {
		name = EVTOPTA_HL_1570 # Hmm, I almost licked one of them...

		trigger = {
			NOT = { trait = shy }
		}

		add_trait = gregarious
	}

	option = {
		name = EVTOPTB_HL_1570 # I sense a new... belonging.

		trigger = { trait = shy }

		remove_trait = shy
		add_trait = gregarious
	}
}

# Wolf is brave (brave)
character_event = {
	id = HL.1580
	desc = EVTDESC_HL_1580
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_capable = yes

	trigger = {
		has_character_modifier = wolf_blood
		NOT = { trait = brave }
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 0.2
			has_character_flag = wolf_blood_inherited
		}

		mult_modifier = {
			factor = 0.2
			trait = craven
		}
	}

	option = {
		name = EVTOPTA_HL_1580

		trigger = {
			NOT = { trait = craven }
		}

		add_trait = brave
	}

	option = {
		name = EVTOPTB_HL_1580

		trigger = { trait = craven }

		remove_trait = craven
		add_trait = brave
	}
}

# Animal cruelty (cruel)
character_event = {
	id = HL.1590
	desc = EVTDESC_HL_1590
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_capable = yes

	trigger = {
		has_character_modifier = wolf_blood
		NOT = { trait = cruel }
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 0.2
			has_character_flag = wolf_blood_inherited
		}

		mult_modifier = {
			factor = 0.5
			trait = kind
		}
	}

	option = {
		name = EVTOPTA_HL_1590

		trigger = {
			NOT = { trait = kind }
		}

		add_trait = cruel
	}

	option = {
		name = EVTOPTB_HL_1590

		trigger = { trait = kind }

		remove_trait = kind
		add_trait = cruel
	}
}

###########################################
# Random events, negative. Second and     #
# later generations                       #
# ID HL.1600-HL.1599                      #
###########################################

# Rabid wolf (wroth)
character_event = {
	id = HL.1610
	desc = EVTDESC_HL_1610
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes # on_yearly_pulse, random_events

	has_character_flag = wolf_blood_inherited
	only_capable = yes

	trigger = {
		has_character_modifier = wolf_blood
		NOT = { trait = wroth }
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 0.5
			trait = patient
		}
	}

	option = {
		name = EVTOPTA_HL_1610

		trigger = {
			NOT = { trait = patient }
		}

		add_trait = wroth
	}

	option = {
		name = EVTOPTB_HL_1610

		trigger = { trait = patient }

		remove_trait = patient
		add_trait = wroth
	}
}

# Wolf-face (ugly)
character_event = {
	id = HL.1620
	desc = EVTDESC_HL_1620
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_diplomacy

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_capable = yes
	has_character_flag = wolf_blood_inherited

	trigger = {
		has_character_modifier = wolf_blood
		NOT = { trait = uncouth }
	}

	option = {
		name = EVTOPTA_HL_1620

		trigger = { has_fair_trait_trigger = no }

		add_trait = uncouth
	}

	option = {
		name = EVTOPTB_HL_1620 # No longer fair I am!

		trigger = { has_fair_trait_trigger = yes }

		if = {
			limit = { trait = attractive }
			remove_trait = attractive
		}

		if = {
			limit = { trait = groomed }
			remove_trait = groomed
		}

		add_trait = uncouth
	}
}

# Animal mind (lower learning trait level)
character_event = {
	id = HL.1630
	desc = EVTDESC_HL_1630
	picture = GFX_evt_wolf
	border = GFX_event_normal_frame_war

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_capable = yes
	has_character_flag = wolf_blood_inherited

	trigger = {
		has_character_modifier = wolf_blood

		OR = {
			trait = dutiful_cleric
			trait = scholarly_theologian
			trait = mastermind_theologian
		}

		NOT = { has_character_flag = wolf_animal_mind_learning }

	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 2
			trait = hunter
		}

		mult_modifier = {
			factor = 3
			trait = mastermind_theologian
		}

		mult_modifier = {
			factor = 0.5
			trait = dutiful_cleric
		}
	}

	option = {
		name = EVTOPTA_HL_1630

		set_character_flag = wolf_animal_mind_learning

		trigger_switch = {
			on_trigger = trait

			mastermind_theologian = {
				hidden_effect = { remove_trait = mastermind_theologian }
				add_trait = scholarly_theologian
			}

			scholarly_theologian = {
				hidden_effect = { remove_trait = scholarly_theologian }
				add_trait = dutiful_cleric
			}

			dutiful_cleric = {
				hidden_effect = { remove_trait = dutiful_cleric }
				add_trait = detached_priest
			}
		}
	}
}

# Really howl at the moon! (lunatic)
narrative_event = {
	id = HL.1640
	title = EVTTITLE_HL_1401
	desc = EVTDESC_HL_1640
	picture = GFX_evt_wolf
	border = GFX_event_narrative_frame_war

	is_triggered_only = yes # on_yearly_pulse, random_events

	only_capable = yes
	has_character_flag = wolf_blood_inherited

	trigger = {
		has_character_modifier = wolf_blood
		NOT = { has_character_flag = wolf_howled_at_moon }
	}

	weight_multiplier = {
		factor = 1

		mult_modifier = {
			factor = 3
			trait = lunatic
		}
	}

	option = {
		name = EVTOPTA_HL_1510

		set_character_flag = wolf_howled_at_moon

		if = {
			limit = {
				NOT = { trait = lunatic }
			}

			add_trait = lunatic
		}

		add_character_modifier = {
			name = good_times
			years = 2
		}
	}
}

###########################################
# Inheriting the Wolf's Blood             #
# ID HL.1700-HL.1799                      #
###########################################

character_event = {
	id = HL.1700

	is_triggered_only = yes # on_birth
	hide_window = yes

	has_dlc = "Horse Lords"

	trigger = {
		OR = {
			father_even_if_dead = {
				has_character_modifier = wolf_blood
				is_father_real_father = yes
			}

			mother_even_if_dead = {
				has_character_modifier = wolf_blood
			}
		}

		NOT = {
			has_game_rule = {
				name = supernatural_events
				value = off
			}
		}
	}

	immediate = {
		character_event = {
			id = HL.1701 # This is when you would start noticing it...
			days = 150
		}
	}
}

# Check for Wolf's Blood inheritance
character_event = {
	id = HL.1701

	is_triggered_only = yes
	hide_window = yes

	immediate = {
		random_list = {
			10 = { # Inherits Wolf's Blood
				mult_modifier = {
					factor = 1.5

					culture_group = altaic
					NOT = { culture = khitan }
				}

				mult_modifier = {
					factor = 2

					any_player = {
						OR = {
							is_parent_of = ROOT
							is_grandparent_of = ROOT
						}
					}
				}

				mult_modifier = {
					factor = 2

					OR = {
						father_even_if_dead = { has_character_flag = wolf_blood_first_generation }
						mother_even_if_dead = { has_character_flag = wolf_blood_first_generation }
					}
				}

				mult_modifier = {
					factor = 2

					# If both parents have Wolf's Blood
					father_even_if_dead = { has_character_modifier = wolf_blood }
					mother_even_if_dead = { has_character_modifier = wolf_blood }
				}

				mult_modifier = {
					factor = 1.5

					any_close_relative = {
						is_grandparent_of = ROOT
						has_character_flag = wolf_blood_first_generation
					}
				}

				add_character_modifier = {
					name = wolf_blood
					duration = -1
				}

				set_character_flag = wolf_blood_inherited
				father = { narrative_event = { id = HL.1702 } }
				mother = { narrative_event = { id = HL.1702 } }
			}

			100 = { } # No inheritance
		}
	}
}

# Notify of inheritance
narrative_event = {
	id = HL.1702
	title = EVTTITLE_HL_1702
	picture = GFX_evt_wolf
	border = GFX_event_narrative_frame_war

	desc = {
		text = EVTDESCA_HL_1702
		trigger = { has_character_modifier = wolf_blood } # Has my blood!
	}
	desc = {
		text = EVTDESCB_HL_1702
		trigger = {
			NOT = { has_character_modifier = wolf_blood } # Has my spouse's blood!
		}
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTA_HL_1702 # Positive response

		tooltip = {
			FROM = {
				show_scope_change = no

				add_character_modifier = {
					name = wolf_blood
					duration = -1
				}
			}
		}

		opinion = {
			name = opinion_happy
			who = FROM
			years = 15
		}
	}

	option = {
		name = EVTOPTB_HL_1702 # Negative response

		tooltip = {
			FROM = {
				show_scope_change = no

				add_character_modifier = {
					name = wolf_blood
					duration = -1
				}
			}
		}

		opinion = {
			name = opinion_worried
			who = FROM
			years = 15
		}
	}
}