### REGULAR ESPIONAGE

until_max_network_cap_policy = {
	weight = {
		modifier = {
			is_spynetwork_max_level < 100
			weight = 60
		}
	}
}

fix_chance_10 = {
	weight = {
		base = 10
	}
}

kaleidoscope_policy = {
	weight = {
		base = 20
		modifier = {
			owner = {
				has_deficit = energy
			}
			weight = 100
		}
	}
}

smuggle_pops_policy = {
	weight = {
		base = 0
		modifier = {
			owner = {
				is_egalitarian = yes
			}
			target = {
				OR = {
					has_valid_civic = civic_slaver_guilds
					has_valid_civic = civic_indentured_assets
					has_valid_civic = civic_dystopian_society
					is_slaver = yes
					allows_purge = yes
				}
			}
			add = 30
		}
		modifier = {
			owner = {
				OR = {
					has_valid_civic = civic_machine_servitor
					has_valid_civic = civic_hive_bodysnatcher
					has_origin = origin_necrophage
				}
			}
			add = 20
		}
		modifier = {
			target = {
				any_owned_species = {
					is_same_species = root.owner.species
				}
			}
			add = 10
		}
		modifier = {
			owner = {
				OR = {
					has_valid_civic = civic_slaver_guilds
					has_valid_civic = civic_indentured_assets
					has_valid_civic = civic_dystopian_society
					has_origin = origin_slavers
					is_slaver = yes
				}
			}
			add = 10
		}
		modifier = {
			owner = {
				has_origin = origin_slavers
			}
			target = {
				OR = {
					has_origin = origin_broken_shackles
					has_origin = origin_payback
				}
			}
			factor = 2
		}
		modifier = {
			target = {
				is_overlord_to = root.owner
			}
			factor = 0.5
		}
	}
}

prepare_invasion_policy = {
	weight = {
		base = 0
		modifier = {
			owner = {
				is_neighbor_of = root.target
			}
			add = 50
		}
		modifier = {
			owner = {
				is_rival = root.target
			}
			factor = 2
		}
		modifier = {
			owner = {
				has_defensive_pact = root.target
			}
			factor = 0
		}
	}
}

extort_favors_policy = {
	weight = {
		base = 0
		modifier = {
			owner = {
				is_galactic_community_member = yes
			}
			target = {
				galactic_community_rank <= 5
			}
			add = 5
		}
		modifier = {
			owner = {
				has_tradition = tr_politics_finish
			}
			add = 5
		}
	}
}

operation_spark_rebellion_policy = {
	weight = {
		base = 0
		modifier = {
			imperial_authority <= 25
			add = 5
		}
		modifier = {
			owner = {
				has_tradition = tr_politics_finish
			}
			add = 5
		}
		modifier = {
			owner = {
				OR = {
					is_rival = galactic_emperor
					galactic_emperor = { is_rival = prev }
				}
			}
			add = 5
		}
	}
}

### PRE-FTL ESPIONAGE

pre_ftl_uplifting_policy = {
	weight = {
		modifier = {
			owner = {
				has_ai_personality_behaviour = uplifter
			}
			weight = 30
		}
		modifier = {
			owner = {
				OR = {
					has_ai_personality_behaviour = infiltrator
					has_ai_personality_behaviour = dominator
				}
			}
			target = {
				NOT = { has_country_flag = early_space_age }
			}
			weight = 10
		}
	}
}

pre_ftl_infiltrating_policy = {
	weight = {
		modifier = {
			owner = {
				OR = {
					has_ai_personality_behaviour = infiltrator
					has_ai_personality_behaviour = dominator
				}
			}
			weight = 30
		}
	}
}

pre_ftl_subtlety_policy = {
	weight = {
		modifier = {
			owner = {
				has_ai_personality_behaviour = infiltrator
			}
			target = {
				current_awareness_level > low
			}
			weight = 30
		}
	}
}
