targeted_decisions = {

	prisoner_brazen_bull = {
		diplomacy_icon = GFX_special_bloodline_decision

		filter = court
		ai_target_filter = court
		ai_check_interval = 12

		only_playable = yes

		from_potential = {
			has_dlc = "Holy Fury"
			is_adult = yes
			prisoner = no
			is_incapable = no

			any_owned_bloodline = {
				has_bloodline_flag = bloodline_brazen_bull
				bloodline_is_active_for = PREV
			}
		}

		potential = {
			host = { character = FROM }
			prisoner = yes
			age >= 13
		}

		allow = {
			show_only_failed_conditions = yes

			ROOT = {
				diplomatic_immunity = no
			}
		}

		effect = {
			if = {
				limit = {
					is_ruler = yes
					vassal_of = FROM # Executing your own vassals this way will intimidate the others
				}

				custom_tooltip = {
					text = tooltip_decision_brazen_bull

					FROM = {
						any_courtier_or_vassal = {
							limit = {
								age >= 5 # Old enough to witness and understand what's happening
								NOT = { trait = brave }
							}

							opinion = {
								name = opinion_scared_into_submission
								who = FROM
								years = 4
							}
						}
					}
				}
			}

			hidden_effect = {
				save_event_target_as = kinslayer_target # to deal with Kinslayer
				character_event = { id = HF.24005 } # Killed by brazen bull (generic executions)

				FROM = {
					character_event = { id = HF.24004 } # Host notified of death by brazen bull
					add_kinslayer_trait_effect = yes

					if = {
						limit = {
							has_nickname = no
							is_adult = yes
							is_incapable = no
						}

						random_list = {
							1 = { give_nickname = nick_the_cruel }
							5 = { give_nickname = nick_the_dragon }
							5 = { give_nickname = nick_the_monster }
							5 = { give_nickname = nick_the_tyrant }
							300 = { }
						}
					}
				}

				mother = {
					opinion = {
						name = opinion_executed_child
						who = FROM
					}
				}

				father = {
					opinion = {
						name = opinion_executed_child
						who = FROM
					}
				}

				any_spouse = {
					opinion = {
						name = opinion_spouse_slayer
						who = FROM
					}
				}

				any_child = {
					opinion = {
						name = opinion_killed_close_kin
						who = FROM
					}
				}

				if = {
					limit = {
						NOR = {
							dynasty = FROM
							sibling = FROM
						}
					}

					any_sibling = {
						opinion = {
							name = opinion_killed_close_kin
							who = FROM
						}
					}
				}
			}

			FROM = {
				show_scope_change = no

				tiered_piety_negative_effect = yes

				add_character_modifier = {
					name = intimidated_plotters
					days = 1250
				}

				random = {
					chance = 25
					add_trait_cruel_effect = yes
				}

				if = {
					limit = { trait = kind }

					random = {
						chance = 50
						remove_trait_kind_effect = yes
					}

					hidden_effect = {
						if = {
							limit = {
								OR = {
									is_close_relative = ROOT

									NOR = {
										trait = impaler
										trait = lunatic
									}
								}
							}

							random_list = {
								20 = { add_trait_stressed_effect = yes }
								 8 = { add_trait_depressed_effect = yes }
								 2 = { add_trait_lunatic_effect = yes }
								70 = { } # Nothing
							}
						}
					}
				}
			}
		}


		ai_will_do = {
			factor = 0.1

			trigger = {
				FROM = {
					piety >= 100

					opinion = {
						who = ROOT
						value < 40
					}

					trigger_if = {
						limit = { independent = no }

						liege = {
							NOT = { dynasty = ROOT }
						}
					}

					OR = {
						is_rival = ROOT
						trait = cruel
						trait = impaler
						trait = wroth
						trait = arbitrary
						trait = paranoid
						trait = deceitful
						trait = proud
						trait = lunatic
						trait = possessed
					}

					NOR = {
						trait = kind
						trait = just
						trait = patient
						trait = shy
						trait = greedy
					}
				}
			}

			mult_modifier = {
				factor = 10

				FROM = {
					OR = {
						is_rival = ROOT
						trait = cruel
						trait = impaler
						trait = wroth
						trait = arbitrary
					}
				}
			}
		}
	}

	prisoner_macabre_banquet = {
		diplomacy_icon = GFX_special_bloodline_decision

		filter = court
		ai_target_filter = court
		ai_check_interval = 12

		only_playable = yes

		from_potential = {
			has_dlc = "Holy Fury"
			is_adult = yes
			prisoner = no
			is_incapable = no

			any_owned_bloodline = {
				has_bloodline_flag = bloodline_macabre_banquet
				bloodline_is_active_for = PREV
			}
		}

		potential = {
			host = { character = FROM }
			prisoner = yes
			age >= 13
		}

		allow = {
			show_only_failed_conditions = yes

			ROOT = {
				diplomatic_immunity = no
			}
		}

		effect = {
			if = {
				limit = {
					is_ruler = yes
					vassal_of = FROM # Executing your own vassals this way will intimidate the others
				}

				custom_tooltip = {
					text = tooltip_decision_brazen_bull

					FROM = {
						any_courtier_or_vassal = {
							limit = {
								age >= 5 # Old enough to witness and understand what's happening
								NOT = { trait = brave }
							}

							opinion = {
								name = opinion_scared_into_submission
								who = FROM
								years = 4
							}
						}
					}
				}
			}

			hidden_effect = {
				character_event = { id = HF.24106 }	# Killed by macabre banquet
				save_event_target_as = kinslayer_target # to deal with Kinslayer

				FROM = {
					character_event = { id = HF.24105 } # Notify host
					add_kinslayer_trait_effect = yes

					if = {
						limit = {
							has_nickname = no
							is_adult = yes
							is_incapable = no
						}

						random_list = {
							1 = { give_nickname = nick_the_cruel }
							5 = { give_nickname = nick_the_dragon }
							5 = { give_nickname = nick_the_monster }
							5 = { give_nickname = nick_the_tyrant }
							300 = { }
						}
					}
				}

				mother = {
					opinion = {
						name = opinion_executed_child
						who = FROM
					}
				}

				father = {
					opinion = {
						name = opinion_executed_child
						who = FROM
					}
				}

				any_spouse = {
					opinion = {
						name = opinion_spouse_slayer
						who = FROM
					}
				}

				any_child = {
					opinion = {
						name = opinion_killed_close_kin
						who = FROM
					}
				}

				if = {
					limit = {
						NOR = {
							dynasty = FROM
							sibling = FROM
						}
					}

					any_sibling = {
						opinion = {
							name = opinion_killed_close_kin
							who = FROM
						}
					}
				}
			}

			FROM = {
				show_scope_change = no

				tiered_piety_negative_effect = yes

				add_character_modifier = {
					name = intimidated_plotters
					days = 1250
				}

				random = {
					chance = 25
					add_trait_cruel_effect = yes
				}

				if = {
					limit = { trait = kind }

					hidden_effect = {
						random = {
							chance = 50
							remove_trait_kind_effect = yes
						}

						if = {
							limit = {
								OR = {
									is_close_relative = ROOT

									NOR = {
										trait = impaler
										trait = lunatic
									}
								}
							}

							random_list = {
								20 = { add_trait_stressed_effect = yes }
								 8 = { add_trait_depressed_effect = yes }
								 2 = { add_trait_lunatic_effect = yes }
								70 = { } # Nothing
							}
						}
					}
				}
			}
		}

		ai_will_do = {
			factor = 0.1

			trigger = {
				FROM = {
					piety >= 100

					opinion = {
						who = ROOT
						value < 40
					}

					trigger_if = {
						limit = { independent = no }

						liege = {
							NOT = { dynasty = ROOT }
						}
					}

					OR = {
						is_rival = ROOT
						trait = cruel
						trait = impaler
						trait = wroth
						trait = arbitrary
						trait = paranoid
						trait = deceitful
						trait = proud
						trait = lunatic
						trait = possessed
					}

					NOR = {
						trait = kind
						trait = just
						trait = patient
						trait = shy
						trait = greedy
					}
				}
			}

			mult_modifier = {
				factor = 10

				FROM = {
					OR = {
						is_rival = ROOT
						trait = cruel
						trait = impaler
						trait = wroth
						trait = arbitrary
					}
				}
			}
		}
	}

	prisoner_dragon_burning = {
		diplomacy_icon = GFX_special_bloodline_decision

		filter = court
		ai_target_filter = court
		ai_check_interval = 12

		only_playable = yes

		from_potential = {
			has_dlc = "Holy Fury"
			is_adult = yes
			prisoner = no
			is_incapable = no

			OR = {
				culture = dragon_culture # Random World

				any_owned_bloodline = {
					has_bloodline_flag = bloodline_murder_burn
					bloodline_is_active_for = PREV
				}
			}
		}

		potential = {
			host = { character = FROM }
			prisoner = yes
			is_adult = yes
		}

		allow = {
			show_only_failed_conditions = yes

			ROOT = {
				diplomatic_immunity = no
			}
		}

		effect = {
			hidden_effect = {
				save_event_target_as = kinslayer_target # to deal with Kinslayer
				character_event = { id = HF.24235 } # Killed by (dragon) burning

				FROM = {
					character_event = { id = HF.24234 } # Notify host
					add_kinslayer_trait_effect = yes

					if = {
						limit = {
							has_nickname = no
							is_adult = yes
							is_incapable = no
						}
					}

					random_list = {
						1 = { give_nickname = nick_the_cruel }
						5 = { give_nickname = nick_the_dragon }
						5 = { give_nickname = nick_the_monster }
						5 = { give_nickname = nick_the_tyrant }
						300 = { }
					}
				}

				mother = {
					opinion = {
						name = opinion_executed_child
						who = FROM
					}
				}

				father = {
					opinion = {
						name = opinion_executed_child
						who = FROM
					}
				}

				spouse = {
					opinion = {
						name = opinion_spouse_slayer
						who = FROM
					}
				}

				any_child = {
					opinion = {
						name = opinion_killed_close_kin
						who = FROM
					}
				}

				if = {
					limit = {
						NOR = {
							dynasty = FROM
							sibling = FROM
						}
					}

					any_sibling = {
						opinion = {
							name = opinion_killed_close_kin
							who = FROM
						}
					}
				}
			}

			if = {
				limit = {
					is_ruler = yes
					vassal_of = FROM # Executing your own vassals this way will intimidate the others
				}

				custom_tooltip = {
					text = tooltip_decision_brazen_bull

					FROM = {
						any_courtier_or_vassal = {
							limit = {
								age >= 5 # Old enough to witness and understand what's happening
								NOT = { trait = brave }
							}

							opinion = {
								name = opinion_scared_into_submission
								who = FROM
								years = 4
							}
						}
					}
				}
			}

			FROM = {
				show_scope_change = no

				tiered_piety_negative_effect = yes

				add_character_modifier = {
					name = intimidated_plotters
					days = 1250
				}

				random = {
					chance = 25
					add_trait_cruel_effect = yes
				}

				if = {
					limit = { trait = kind }

					random = {
						chance = 50
						remove_trait_kind_effect = yes
					}

					hidden_effect = {
						if = {
							limit = {
								OR = {
									is_close_relative = ROOT

									NOR = {
										trait = impaler
										trait = lunatic
									}
								}
							}

							random_list = {
								20 = { add_trait_stressed_effect = yes }
								 8 = { add_trait_depressed_effect = yes }
								 2 = { add_trait_lunatic_effect = yes }
								70 = { } # Nothing
							}
						}
					}
				}
			}
		}

		ai_will_do = {
			factor = 0.1

			trigger = {
				FROM = {
					piety >= 100

					opinion = {
						who = ROOT
						value < 40
					}

					trigger_if = {
						limit = { independent = no }

						liege = {
							NOT = { dynasty = ROOT }
						}
					}

					OR = {
						is_rival = ROOT
						trait = cruel
						trait = impaler
						trait = wroth
						trait = arbitrary
						trait = paranoid
						trait = deceitful
						trait = proud
						trait = lunatic
						trait = possessed
					}

					NOR = {
						trait = kind
						trait = just
						trait = patient
						trait = shy
						trait = greedy
					}
				}
			}

			mult_modifier = {
				factor = 10

				FROM = {
					OR = {
						trait = cruel
						trait = impaler
						trait = wroth
						is_rival = ROOT
						trait = arbitrary
					}
				}
			}
		}
	}

	dynastic_meddling = {
		diplomacy_icon = GFX_special_bloodline_decision

		filter = dynasty
		ai_target_filter = dynasty
		ai_check_interval = 40

		only_playable = yes

		from_potential = {
			has_dlc = "Holy Fury"
			is_adult = yes
			prisoner = no
			is_incapable = no

			any_owned_bloodline = {
				has_bloodline_flag = bloodline_dynastic_meddling
				bloodline_is_active_for = PREV
			}
		}

		potential = {
			is_close_relative = FROM
			is_within_diplo_range = FROM
			is_adult = yes
			prisoner = no
			is_incapable = no
		}

		allow = {
			show_only_failed_conditions = yes

			FROM = {
				piety >= 0
				age >= 40 # Meddler must be old

				custom_tooltip = {
					text = tooltip_dynastic_meddling_cooldown
					NOT = { has_character_modifier = dynastic_meddling_cooldown }
				}
			}

			ROOT = {
				age < 35 # Target must be young
				diplomatic_immunity = no
			}
		}

		effect = {
			FROM = {
				trigger_switch = {
					on_trigger = real_tier

					EMPEROR  = { piety = -100 }
					KING     = { piety =  -75 }
					DUKE     = { piety =  -50 }
					COUNT    = { piety =  -30 }
					BARON    = { piety =  -15 }
					fallback = { piety =   -5 }
				}
			}

			custom_tooltip = {
				text = tooltip_dynastic_meddling

				FROM = {
					character_event = { id = HF.24152 } # Family Bloodline - Dynastic meddling

					add_character_modifier = {
						name = dynastic_meddling_cooldown
						years = 5
						hidden = yes
					}
				}

				if = {
					limit = { ai = no }

				#	CleanSlate: unused?
				#	change_variable = {
				#		which = family_nagging
				#		value = 1
				#	}

					# Stop the AI from spamming the player
					add_character_modifier = {
						name = dynastic_meddling_target_cooldown
						years = 5
						hidden = yes
					}
				}
			}
		}


		ai_will_do = {
			factor = 1

			trigger = {
				FROM = {
					trigger_if = {
						limit = { higher_real_tier_than = COUNT }
						piety >= 200
					}

					NOR = {
						trait = shy
						trait = patient
						trait = slothful
						trait = depressed
						trait = content
						is_rival = ROOT
						is_lover = ROOT
						is_friend = ROOT
					}
				}

				# Player should not be spammed
				NOT = { has_character_modifier = dynastic_meddling_target_cooldown }

				# AI only picks decision if host, guest, liege, or spouse of target
				OR = {
					host = { character = FROM }
					FROM = { host = { character = ROOT } }
					is_married = FROM
					is_vassal_or_below = FROM
				}
			}

			mult_modifier = { # Will interfere
				factor = 5

				FROM = {
					OR = {
						trait = diligent
						trait = wroth
						trait = proud
						trait = just
						trait = gregarious
						trait = socializer
					}
				}
			}

			mult_modifier = { # Needs a good talk
				factor = 3

				ROOT = {
					OR = {
						trait = stressed
						trait = depressed
						trait = drunkard
						trait = slothful

						trigger_if = {
							limit = { trait = lustful }

							trigger_if = {
								limit = { is_married = yes }
								num_of_children >= 2
							}
						}

						has_focus = focus_seduction
						trait = uncouth
						trait = fat
						trait = malnourished
					}
				}
			}

			mult_modifier = {
				factor = 6
				FROM = { has_focus = focus_family }
			}

			mult_modifier = {
				factor = 4
				FROM = { age >= 60 }
				ROOT = { age <  25 }
			}
		}
	}

	murder_deflection_decision = {
		diplomacy_icon = GFX_special_bloodline_decision

		filter = self
		ai_target_filter = self
		ai_check_interval = 75

		only_playable = yes

		potential = {
			has_dlc = "Holy Fury"
			is_adult = yes
			prisoner = no
			is_incapable = no

			any_owned_bloodline = {
				has_bloodline_flag = bloodline_murder_deflection
				bloodline_is_active_for = PREV
			}
		}

		allow = {
			intrigue >= 8

			OR = {
				trait = kinslayer
				trait = familial_kinslayer
				trait = dynastic_kinslayer
				trait = tribal_kinslayer
				has_character_modifier = known_murderer
				has_character_modifier = vicious_rumors
				has_character_modifier = vicious_rumors_2
			}

			custom_tooltip = {
				text = tooltip_deflection_cooldown
				NOT = { has_character_modifier = deflection_decision_cooldown }
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_murder_deflection_decision

				character_event = { id = HF.24107 } # Murder deflection

				add_character_modifier = {
					name = deflection_decision_cooldown
					years = 10
					hidden = yes
				}
			}
		}


		ai_will_do = {
			factor = 0.1

			trigger = {
				FROM = {
					piety >= 100

					opinion = {
						who = ROOT
						value < 40
					}

					trigger_if = {
						limit = { independent = no }

						liege = {
							NOT = { dynasty = ROOT }
						}
					}

					OR = {
						is_rival = ROOT
						trait = cruel
						trait = impaler
						trait = wroth
						trait = arbitrary
						trait = paranoid
						trait = deceitful
						trait = proud
						trait = lunatic
						trait = possessed
					}

					NOR = {
						trait = kind
						trait = just
						trait = patient
						trait = shy
						trait = greedy
					}
				}
			}

			mult_modifier = {
				factor = 10

				FROM = {
					OR = {
						is_rival = ROOT
						trait = cruel
						trait = impaler
						trait = wroth
						trait = arbitrary
					}
				}
			}
		}
	}

	drill_troops_decision = {
		diplomacy_icon = GFX_special_bloodline_decision

		filter = self
		ai_target_filter = self
		ai_check_interval = 40

		only_playable = yes

		potential = {
			has_dlc = "Holy Fury"
			is_landed = yes
			is_adult = yes

			any_owned_bloodline = {
				has_bloodline_flag = bloodline_drill
				bloodline_is_active_for = PREV
			}
		}

		allow = {
			prestige >= 50

			custom_tooltip = {
				text = tooltip_drill_troops_cooldown
				NOT = { has_character_modifier = drill_troops_cooldown }
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_drill_troops_action

				character_event = { id = HF.24134 }

				add_character_modifier = {
					name = drill_troops_cooldown
					years = 10
					hidden = yes
				}
			}
		}

		ai_will_do = {
			factor = 1

			trigger = {
				war = yes
			}

			mult_modifier = {
				factor = 0.25
				trait = brave
			}

			mult_modifier = {
				factor = 0.25
				martial < 5
			}
		}
	}

	endearing_noblemen_decision = {
		diplomacy_icon = GFX_special_bloodline_decision

		filter = self
		ai_target_filter = self
		ai_check_interval = 40

		only_playable = yes

		potential = {
			has_dlc = "Holy Fury"
			is_landed = yes
			is_adult = yes

			any_owned_bloodline = {
				has_bloodline_flag = bloodline_endearing
				bloodline_is_active_for = PREV
			}
		}

		allow = {
			prestige >= 50
			prisoner = no

			custom_tooltip = {
				text = tooltip_drill_troops_cooldown
				NOT = { has_character_modifier = endearing_noblemen_cooldown }
			}
		}

		effect = {
			custom_tooltip = {
				text = tooltip_endearing_noblemen_action

				character_event = { id = HF.24138 }

				add_character_modifier = {
					name = endearing_noblemen_cooldown
					years = 10
					hidden = yes
				}
			}
		}

		ai_will_do = {
			factor = 1

			mult_modifier = {
				factor = 0.25
				trait = shy
			}

			mult_modifier = {
				factor = 1.5
				trait = gregarious
			}

			mult_modifier = {
				factor = 0.5
				diplomacy < 5
			}
		}
	}

	dissolve_factions_decision = {
		diplomacy_icon = GFX_special_bloodline_decision

		filter = self
		ai_target_filter = self
		ai_check_interval = 40

		only_playable = yes

		potential = {
			has_dlc = "Holy Fury"
			is_landed = yes
			is_adult = yes
			higher_real_tier_than = COUNT

			any_owned_bloodline = {
				has_bloodline_flag = bloodline_dismantle_factions
				bloodline_is_active_for = PREV
			}
		}

		allow = {
			prestige >= 500
			piety >= 250

			custom_tooltip = {
				text = tooltip_dismantle_factions_cooldown
				NOT = { has_character_modifier = dismantle_factions_cooldown }
			}

			custom_tooltip = {
				text = tooltip_dismantle_factions_exist

				any_vassal = {
					in_faction = yes
				}
			}
		}

		effect = {
			prestige = -500
			piety = -250

			custom_tooltip = {
				text = tooltip_dismantle_factions

				character_event = { id = HF.24144 }

				add_character_modifier = {
					name = dismantle_factions_cooldown
					years = 10
					hidden = yes
				}
			}
		}

		ai_will_do = {
			factor = 1

			trigger = {
				NOT = { trait = trusting }

				# CleanSlate: odd requirement?
				any_vassal = {
					faction_power = {
						faction = faction_succ_seniority
						power >= 0.75
					}
				}
			}

			mult_modifier = {
				factor = 5
				trait = paranoid
			}

			mult_modifier = {
				factor = 2
				trait = cruel
			}

			mult_modifier = {
				factor = 0.25
				trait = kind
			}

			mult_modifier = {
				factor = 0.25

				NOT = {
					any_vassal = {
						in_faction = yes
						count >= 5
					}
				}
			}

			mult_modifier = {
				factor = 3

				any_vassal = {
					in_faction = yes
					count >= 10
				}
			}

			# CleanSlate: odd requirement?
			mult_modifier = {
				factor = 0.1

				NOT = {
					any_vassal = {
						faction_power = {
							faction = faction_succ_seniority
							power >= 1.0
						}
					}
				}
			}
		}
	}
}