targeted_decisions = {
	dismantle_spy_network = {
		ai_target_filter = realm
		only_rulers = yes
		ai_check_interval = 12
		from_potential = {
			is_ruler = yes
			has_character_flag = has_personal_spy_network
			any_courtier = { has_job_title = job_spymaster }
		}
		potential = {
			has_character_flag = has_personal_spy_network
			OR = {
				is_variable_equal = { which = "personal_spy_network" value = 10 }
				check_variable = { which = "personal_spy_network" value = 10 }
			}
			FROM = {
				OR = {
					ai = no
					AND = {
						has_plot = yes
						plot_target_char = { character = ROOT }
					}
				}
			}
			NOT = { character = FROM }
		}
		allow = {
			FROM = {
				custom_tooltip = {
					text = SPYNETWORK_10_PLUS
					hidden_tooltip = {
						OR = {
							is_variable_equal = { which = "personal_spy_network" value = 10 }
							check_variable = { which = "personal_spy_network" value = 10 }
						}
					}
				}
			}
			ROOT = {
				is_within_diplo_range = FROM
				custom_tooltip = {
					text = NOT_SPIES_RECENTLY_ASSAULTED
					hidden_tooltip = {
						OR = {
							NOT = { has_character_flag = spy_network_assaulted }
							had_character_flag = { flag = spy_network_assaulted days = 180 }
						}
					}
				}
			}
		}
		effect = {
			ROOT = { set_character_flag = spy_network_assaulted }
			FROM = {
				custom_tooltip = {
					text = SPYNETWORK_DECREASE_10_LIEGE
					hidden_tooltip = {
						change_variable = { which = "personal_spy_network" value = -10 }
					}
				}
			}
			random_list = {
				20 = {
					modifier = {
						factor = 0.5
						OR = {
							ROOT = { is_ruler = no }
							ROOT = { NOT = { any_courtier = { has_job_title = job_spymaster } } }
						}
					}
					modifier = {
						factor = 0.8
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						ROOT = { job_spymaster = { FROM = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 1 } } } } }
					}
					modifier = {
						factor = 0.8
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						ROOT = { job_spymaster = { FROM = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 3 } } } } }
					}
					modifier = {
						factor = 0.8
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						ROOT = { job_spymaster = { FROM = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 5 } } } } }
					}
					modifier = {
						factor = 0.8
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						ROOT = { job_spymaster = { FROM = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 7 } } } } }
					}
					modifier = {
						factor = 0.8
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						ROOT = { job_spymaster = { FROM = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 9 } } } } }
					}
					modifier = {
						factor = 1.5
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						FROM = { job_spymaster = { ROOT = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 1 } } } } }
					}
					modifier = {
						factor = 1.5
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						FROM = { job_spymaster = { ROOT = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 3 } } } } }
					}
					modifier = {
						factor = 1.5
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						FROM = { job_spymaster = { ROOT = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 5 } } } } }
					}
					modifier = {
						factor = 1.5
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						FROM = { job_spymaster = { ROOT = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 7 } } } } }
					}
					modifier = {
						factor = 2.0
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						FROM = { job_spymaster = { ROOT = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 9 } } } } }
					}
					custom_tooltip = { text = DISMANTLE_ATTEMPT_FAILS }
				}
				10 = {
					custom_tooltip = { text = SPYNETWORK_DECREASE_5 }
					hidden_tooltip = {
						ROOT = {
							set_character_flag = small_network_decrease
							change_variable = { which = "personal_spy_network" value = -5 }
						}
					}
				}
				50 = {
					custom_tooltip = { text = SPYNETWORK_DECREASE_10 }
					hidden_tooltip = {
						ROOT = {
							set_character_flag = med_network_decrease
							change_variable = { which = "personal_spy_network" value = -10 }
						}
					}
				}
				20 = {
					modifier = {
						factor = 0
						ROOT = {
							NOR = {
								is_variable_equal = { which = "personal_spy_network" value = 20 }
								check_variable = { which = "personal_spy_network" value = 20 }
							}
						}
					}
					custom_tooltip = { text = SPYNETWORK_DECREASE_20 }
					hidden_tooltip = {
						ROOT = {
							set_character_flag = large_network_decrease
							change_variable = { which = "personal_spy_network" value = -20 }
						}
					}
				}
			}
			random_list = {
				50 = {
					modifier = {
						factor = 0.2
						OR = {
							ROOT = { is_ruler = no }
							ROOT = { NOT = { any_courtier = { has_job_title = job_spymaster } } }
						}
					}
					modifier = {
						factor = 0.8
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						ROOT = { job_spymaster = { FROM = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 1 } } } } }
					}
					modifier = {
						factor = 0.8
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						ROOT = { job_spymaster = { FROM = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 3 } } } } }
					}
					modifier = {
						factor = 0.8
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						ROOT = { job_spymaster = { FROM = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 5 } } } } }
					}
					modifier = {
						factor = 0.8
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						ROOT = { job_spymaster = { FROM = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 7 } } } } }
					}
					modifier = {
						factor = 0.8
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						ROOT = { job_spymaster = { FROM = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 9 } } } } }
					}
					modifier = {
						factor = 1.5
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						FROM = { job_spymaster = { ROOT = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 1 } } } } }
					}
					modifier = {
						factor = 1.5
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						FROM = { job_spymaster = { ROOT = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 3 } } } } }
					}
					modifier = {
						factor = 1.5
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						FROM = { job_spymaster = { ROOT = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 5 } } } } }
					}
					modifier = {
						factor = 1.5
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						FROM = { job_spymaster = { ROOT = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 7 } } } } }
					}
					modifier = {
						factor = 2.0
						ROOT = { is_ruler = yes }
						ROOT = { any_courtier = { has_job_title = job_spymaster } }
						FROM = { job_spymaster = { ROOT = { job_spymaster = { attribute_diff = { character = PREVPREV attribute = learning value = 9 } } } } }
					}
					custom_tooltip = { text = DISMANTLE_ATTEMPT_DISCOVERED }
					hidden_tooltip = {
						FROM = { character_event = { id = 20356 } }
						ROOT = { character_event = { id = 20357 days = 1 } }
					}
				}
				50 = {
					custom_tooltip = { text = DISMANTLE_ATTEMPT_NOT_DISCOVERED }
					hidden_tooltip = {
						FROM = { character_event = { id = 20358 } }
						ROOT = { character_event = { id = 20359 days = 1 } }
					}
				}
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.5
				always = yes
			}
			modifier = {
				factor = 10
				check_variable = { which = "personal_spy_network" value = 29 }
			}
		}
	}
}

decisions = {
	hire_assassin_nonruler = {
		ai_check_interval = 3
		potential = {
			has_character_flag = has_personal_spy_network
			OR = {
				has_plot = plot_kill_character
				has_plot = plot_kill_spouse
				has_plot = plot_take_revenge
			}
			plot_target_char = {
				OR = {
					is_ruler = no
					lower_tier_than = COUNT
				}
				NOR = {
					character = ROOT
					father = { higher_tier_than = BARON }
					mother = { higher_tier_than = BARON }
				}
			}
		}
		allow = {
			wealth = 50
			custom_tooltip = {
				text = SPYNETWORK_10_PLUS
				hidden_tooltip = {
					OR = {
						is_variable_equal = { which = "personal_spy_network" value = 10 }
						check_variable = { which = "personal_spy_network" value = 10 }
					}
				}
			}
			custom_tooltip = {
				text = NOT_HIRED_ASSASSIN_LAST_YEAR
				hidden_tooltip = {
					OR = {
						NOT = { has_character_flag = hired_recent_assassin }
						had_character_flag = { flag = hired_recent_assassin days = 365 }
					}
				}
			}
		}
		effect = {
			set_character_flag = hired_recent_assassin
			custom_tooltip = {
				text = SPYNETWORK_DECREASE_10
				hidden_tooltip = {
					change_variable = { which = "personal_spy_network" value = -10 }
				}
			}
			wealth = -50
			custom_tooltip = {
				text = SEND_SPY_ASSASSIN
				hidden_tooltip = {
					plot_target_char = {
						ROOT = { send_assassin = PREV }
					}
				}
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOR = {
					trait = decadent
					trait = cruel
					trait = wroth
					trait = deceitful
				}
			}
			modifier = {
				factor = 0
				OR = {
					trait = kind
					trait = patient
					trait = honest
					trait = just
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_character_modifier = ai_austerity
					has_character_modifier = planning_claimant_adventure
					has_character_flag = claimant_adventurer
				}
			}
		}
	}
	
	hire_assassin_count = {
		ai_check_interval = 3
		potential = {
			has_character_flag = has_personal_spy_network
			OR = {
				has_plot = plot_kill_character
				has_plot = plot_kill_spouse
				has_plot = plot_take_revenge
			}
			plot_target_char = {
				OR = {
					tier = COUNT
					father = { tier = COUNT }
					mother = { tier = COUNT }
				}
				NOR = {
					character = ROOT
					father = { higher_tier_than = COUNT }
					mother = { higher_tier_than = COUNT }
				}
			}
		}
		allow = {
			wealth = 150
			custom_tooltip = {
				text = SPYNETWORK_10_PLUS
				hidden_tooltip = {
					OR = {
						is_variable_equal = { which = "personal_spy_network" value = 10 }
						check_variable = { which = "personal_spy_network" value = 10 }
					}
				}
			}
			custom_tooltip = {
				text = NOT_HIRED_ASSASSIN_LAST_YEAR
				hidden_tooltip = {
					OR = {
						NOT = { has_character_flag = hired_recent_assassin }
						had_character_flag = { flag = hired_recent_assassin days = 365 }
					}
				}
			}
		}
		effect = {
			set_character_flag = hired_recent_assassin
			custom_tooltip = {
				text = SPYNETWORK_DECREASE_10
				hidden_tooltip = {
					change_variable = { which = "personal_spy_network" value = -10 }
				}
			}
			wealth = -150
			custom_tooltip = {
				text = SEND_SPY_ASSASSIN
				hidden_tooltip = {
					plot_target_char = {
						ROOT = { send_assassin = PREV }
					}
				}
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOR = {
					trait = decadent
					trait = cruel
					trait = wroth
					trait = deceitful
				}
			}
			modifier = {
				factor = 0
				OR = {
					trait = kind
					trait = patient
					trait = honest
					trait = just
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_character_modifier = ai_austerity
					has_character_modifier = planning_claimant_adventure
					has_character_flag = claimant_adventurer
				}
			}
		}
	}

	hire_assassin_duke = {
		ai_check_interval = 3
		potential = {
			has_character_flag = has_personal_spy_network
			OR = {
				has_plot = plot_kill_character
				has_plot = plot_kill_spouse
				has_plot = plot_take_revenge
			}
			plot_target_char = {
				OR = {
					tier = DUKE
					father = { tier = DUKE }
					mother = { tier = DUKE }
				}
				NOR = {
					character = ROOT
					father = { higher_tier_than = DUKE }
					mother = { higher_tier_than = DUKE }
				}
			}
		}
		allow = {
			wealth = 250
			custom_tooltip = {
				text = SPYNETWORK_20_PLUS
				hidden_tooltip = {
					OR = {
						is_variable_equal = { which = "personal_spy_network" value = 20 }
						check_variable = { which = "personal_spy_network" value = 20 }
					}
				}
			}
			custom_tooltip = {
				text = NOT_HIRED_ASSASSIN_LAST_YEAR
				hidden_tooltip = {
					OR = {
						NOT = { has_character_flag = hired_recent_assassin }
						had_character_flag = { flag = hired_recent_assassin days = 365 }
					}
				}
			}
		}
		effect = {
			set_character_flag = hired_recent_assassin
			custom_tooltip = {
				text = SPYNETWORK_DECREASE_20
				hidden_tooltip = {
					change_variable = { which = "personal_spy_network" value = -20 }
				}
			}
			wealth = -250
			custom_tooltip = {
				text = SEND_SPY_ASSASSIN
				hidden_tooltip = {
					plot_target_char = {
						ROOT = { send_assassin = PREV }
					}
				}
			}
		}
		ai_will_do = {
			factor = 1

			modifier = {
				factor = 0
				NOR = {
					trait = decadent
					trait = cruel
					trait = wroth
					trait = deceitful
				}
			}
			modifier = {
				factor = 0
				OR = {
					trait = kind
					trait = patient
					trait = honest
					trait = just
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_character_modifier = ai_austerity
					has_character_modifier = planning_claimant_adventure
					has_character_flag = claimant_adventurer
				}
			}
		}
	}

	hire_assassin_king = {
		ai_check_interval = 3
		potential = {
			has_character_flag = has_personal_spy_network
			OR = {
				has_plot = plot_kill_character
				has_plot = plot_kill_spouse
				has_plot = plot_take_revenge
			}
			plot_target_char = {
				OR = {
					tier = KING
					father = { tier = KING }
					mother = { tier = KING }
				}
				NOR = {
					character = ROOT
					father = { tier = EMPEROR }
					mother = { tier = EMPEROR }
				}
			}
		}
		allow = {
			wealth = 350
			custom_tooltip = {
				text = SPYNETWORK_20_PLUS
				hidden_tooltip = {
					OR = {
						is_variable_equal = { which = "personal_spy_network" value = 20 }
						check_variable = { which = "personal_spy_network" value = 20 }
					}
				}
			}
			custom_tooltip = {
				text = NOT_HIRED_ASSASSIN_LAST_YEAR
				hidden_tooltip = {
					OR = {
						NOT = { has_character_flag = hired_recent_assassin }
						had_character_flag = { flag = hired_recent_assassin days = 365 }
					}
				}
			}
		}
		effect = {
			set_character_flag = hired_recent_assassin
			custom_tooltip = {
				text = SPYNETWORK_DECREASE_20
				hidden_tooltip = {
					change_variable = { which = "personal_spy_network" value = -20 }
				}
			}
			wealth = -350
			custom_tooltip = {
				text = SEND_SPY_ASSASSIN
				hidden_tooltip = {
					plot_target_char = {
						ROOT = { send_assassin = PREV }
					}
				}
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOR = {
					trait = decadent
					trait = cruel
					trait = wroth
					trait = deceitful
				}
			}
			modifier = {
				factor = 0
				OR = {
					trait = kind
					trait = patient
					trait = honest
					trait = just
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_character_modifier = ai_austerity
					has_character_modifier = planning_claimant_adventure
					has_character_flag = claimant_adventurer
				}
			}
		}
	}

	hire_assassin_emperor = {
		ai_check_interval = 3
		potential = {
			has_character_flag = has_personal_spy_network
			OR = {
				has_plot = plot_kill_character
				has_plot = plot_kill_spouse
				has_plot = plot_take_revenge
			}
			plot_target_char = {
				NOT = { character = ROOT }
				OR = {
					tier = EMPEROR
					father = { tier = EMPEROR }
					mother = { tier = EMPEROR }
				}
			}
		}
		allow = {
			wealth = 450
			custom_tooltip = {
				text = SPYNETWORK_30_PLUS
				hidden_tooltip = {
					OR = {
						is_variable_equal = { which = "personal_spy_network" value = 30 }
						check_variable = { which = "personal_spy_network" value = 30 }
					}
				}
			}
			custom_tooltip = {
				text = NOT_HIRED_ASSASSIN_LAST_YEAR
				hidden_tooltip = {
					OR = {
						NOT = { has_character_flag = hired_recent_assassin }
						had_character_flag = { flag = hired_recent_assassin days = 365 }
					}
				}
			}
		}
		effect = {
			set_character_flag = hired_recent_assassin
			custom_tooltip = {
				text = SPYNETWORK_DECREASE_30
				hidden_tooltip = {
					change_variable = { which = "personal_spy_network" value = -30 }
				}
			}
			wealth = -450
			custom_tooltip = {
				text = SEND_SPY_ASSASSIN
				hidden_tooltip = {
					plot_target_char = {
						ROOT = { send_assassin = PREV }
					}
				}
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOR = {
					trait = decadent
					trait = cruel
					trait = wroth
					trait = deceitful
				}
			}
			modifier = {
				factor = 0
				OR = {
					trait = kind
					trait = patient
					trait = honest
					trait = just
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_character_modifier = ai_austerity
					has_character_modifier = planning_claimant_adventure
					has_character_flag = claimant_adventurer
				}
			}
		}
	}
	
	use_spy_network_1 = {
		ai_check_interval = 12
		potential = {
			has_character_flag = has_personal_spy_network
			NOR = {
				has_character_modifier = plot_assisted_spying
				has_character_modifier = plot_assisted_spying2
				has_character_modifier = plot_assisted_spying3
				has_character_modifier = plot_assisted_spying4
				has_character_modifier = plot_assisted_spying5
			}
		}
		allow = {
			custom_tooltip = {
				text = SPYNETWORK_10_PLUS
				hidden_tooltip = {
					OR = {
						is_variable_equal = { which = "personal_spy_network" value = 10 }
						check_variable = { which = "personal_spy_network" value = 10 }
					}
				}
			}
			is_adult = yes
			prisoner = no
			NOR = {
				trait = incapable
				is_inaccessible_trigger = yes
				has_character_modifier = away_from_court
			}
		}
		effect = {
			custom_tooltip = {
				text = SPYNETWORK_DECREASE_10
				hidden_tooltip = {
					change_variable = { which = "personal_spy_network" value = -10 }
				}
			}
			add_character_modifier = {
				name = plot_assisted_spying
				duration = 365
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOR = {
					has_plot = yes
					has_any_opinion_modifier = opinion_spying_on
				}
			}
		}
	}
	
	use_spy_network_2 = {
		ai_check_interval = 12
		potential = {
			has_character_flag = has_personal_spy_network
			has_character_modifier = plot_assisted_spying
		}
		allow = {
			custom_tooltip = {
				text = SPYNETWORK_20_PLUS
				hidden_tooltip = {
					OR = {
						is_variable_equal = { which = "personal_spy_network" value = 20 }
						check_variable = { which = "personal_spy_network" value = 20 }
					}
				}
			}
			is_adult = yes
			prisoner = no
			NOR = {
				trait = incapable
				is_inaccessible_trigger = yes
				has_character_modifier = away_from_court
			}
		}
		effect = {
			hidden_tooltip = { remove_character_modifier = plot_assisted_spying }
			custom_tooltip = {
				text = SPYNETWORK_DECREASE_20
				hidden_tooltip = {
					change_variable = { which = "personal_spy_network" value = -20 }
				}
			}
			add_character_modifier = {
				name = plot_assisted_spying2
				duration = 365
			}
		}
		ai_will_do = {
			factor = 1

			modifier = {
				factor = 0
				NOR = {
					has_plot = plot_kill_character
					has_plot = plot_kill_spouse
					has_plot = plot_take_revenge
					has_plot = plot_stir_rebellion
					has_plot = plot_become_republic
					has_plot = plot_seize_trade_post
					has_plot = plot_discredit_councillor
					has_plot = plot_embezzle_from_liege
					has_plot = plot_fabricate_treason
					has_plot = plot_fabricate_treason_liege
					has_plot = plot_fabricate_heresy
					has_plot = plot_gain_liege_title
					has_plot = plot_gain_fellow_vassal_title
					has_plot = plot_weaken_fellow_vassal
					has_plot = plot_kidnap_liege
					has_plot = plot_usurp_wife
					has_plot = plot_replace_regent
					has_plot = plot_incapable_usurp
				}
			}
		}
	}
	
	use_spy_network_3 = {
		ai_check_interval = 12
		potential = {
			has_character_flag = has_personal_spy_network
			has_character_modifier = plot_assisted_spying2
		}
		allow = {
			custom_tooltip = {
				text = SPYNETWORK_30_PLUS
				hidden_tooltip = {
					OR = {
						is_variable_equal = { which = "personal_spy_network" value = 30 }
						check_variable = { which = "personal_spy_network" value = 30 }
					}
				}
			}
			is_adult = yes
			prisoner = no
			NOR = {
				trait = incapable
				is_inaccessible_trigger = yes
				has_character_modifier = away_from_court
			}
		}
		effect = {
			hidden_tooltip = { remove_character_modifier = plot_assisted_spying2 }
			custom_tooltip = {
				text = SPYNETWORK_DECREASE_30
				hidden_tooltip = {
					change_variable = { which = "personal_spy_network" value = -30 }
				}
			}
			add_character_modifier = {
				name = plot_assisted_spying3
				duration = 365
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOR = {
					has_plot = plot_kill_character
					has_plot = plot_kill_spouse
					has_plot = plot_take_revenge
					has_plot = plot_stir_rebellion
					has_plot = plot_become_republic
					has_plot = plot_fabricate_treason
					has_plot = plot_fabricate_treason_liege
					has_plot = plot_fabricate_heresy
					has_plot = plot_gain_liege_title
					has_plot = plot_gain_fellow_vassal_title
					has_plot = plot_weaken_fellow_vassal
					has_plot = plot_kidnap_liege
					has_plot = plot_usurp_wife
					has_plot = plot_replace_regent
					has_plot = plot_incapable_usurp
				}
			}
		}
	}
	
	use_spy_network_4 = {
		ai_check_interval = 12
		potential = {
			has_character_flag = has_personal_spy_network
			has_character_modifier = plot_assisted_spying3
		}
		allow = {
			custom_tooltip = {
				text = SPYNETWORK_40_PLUS
				hidden_tooltip = {
					OR = {
						is_variable_equal = { which = "personal_spy_network" value = 40 }
						check_variable = { which = "personal_spy_network" value = 40 }
					}
				}
			}
			is_adult = yes
			prisoner = no
			NOR = {
				trait = incapable
				is_inaccessible_trigger = yes
				has_character_modifier = away_from_court
			}
		}
		effect = {
			hidden_tooltip = { remove_character_modifier = plot_assisted_spying3 }
			custom_tooltip = {
				text = SPYNETWORK_DECREASE_40
				hidden_tooltip = {
					change_variable = { which = "personal_spy_network" value = -40 }
				}
			}
			add_character_modifier = {
				name = plot_assisted_spying4
				duration = 365
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOR = {
					has_plot = plot_kill_character
					has_plot = plot_kill_spouse
					has_plot = plot_take_revenge
					has_plot = plot_stir_rebellion
					has_plot = plot_become_republic
					has_plot = plot_kidnap_liege
					has_plot = plot_replace_regent
					has_plot = plot_incapable_usurp
				}
			}
		}
	}
	
	use_spy_network_5 = {
		ai_check_interval = 12
		potential = {
			has_character_flag = has_personal_spy_network
			has_character_modifier = plot_assisted_spying4
		}
		allow = {
			custom_tooltip = {
				text = SPYNETWORK_50_PLUS
				hidden_tooltip = {
					OR = {
						is_variable_equal = { which = "personal_spy_network" value = 50 }
						check_variable = { which = "personal_spy_network" value = 50 }
					}
				}
			}
			is_adult = yes
			prisoner = no
			NOR = {
				trait = incapable
				is_inaccessible_trigger = yes
				has_character_modifier = away_from_court
			}
		}
		effect = {
			hidden_tooltip = { remove_character_modifier = plot_assisted_spying4 }
			custom_tooltip = {
				text = SPYNETWORK_DECREASE_50
				hidden_tooltip = {
					change_variable = { which = "personal_spy_network" value = -50 }
				}
			}
			add_character_modifier = {
				name = plot_assisted_spying5
				duration = 365
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				NOR = {
					has_plot = plot_kill_character
					has_plot = plot_kill_spouse
					has_plot = plot_take_revenge
					has_plot = plot_kidnap_liege
					has_plot = plot_incapable_usurp
				}
			}
		}
	}
}

