tr_subterfuge_adopt = {
	unlocks_agenda = agenda_uncover_secrets
	modifier = {
		intel_decryption_add = 2
		espionage_operation_cost_mult = -0.2
		fleet_mia_time_mult = -0.2
		ship_shield_add = 120
	}
	custom_tooltip_with_modifiers = tr_subterfuge_adopt_desc
}

tr_subterfuge_finish = {
	# the refund effect is implemented elsewhere
	custom_tooltip_with_modifiers = tr_subterfuge_cloaking_finish_desc1
	modifier = {
		ascension_perks_add = 1
		ship_shield_mult = 0.2
		intel_encryption_add = 2
	}

	tradition_swap = {
		name = tr_subterfuge_cloaking_finish
		inherit_effects = no
		inherit_icon = yes
		trigger = {
			has_first_contact_dlc = yes
		}
		custom_tooltip_with_modifiers = tr_subterfuge_cloaking_finish_desc1
		modifier = {
			ship_cloaking_strength_add = 2
			intel_encryption_add = 2
			ship_shield_mult = 0.2
			ascension_perks_add = 1
		}

		weight = {
			factor = 1
		}
	}
}

tr_subterfuge_nda = {

	modifier = {
		espionage_hostile_operation_difficulty_add = 2
		ship_friendly_territory_evasion_mult = 0.2
		ship_friendly_territory_shield_mult = 0.2
	}

	tradition_swap = {
		name = tr_subterfuge_nda_hive
		inherit_effects = yes
		inherit_icon = yes
		trigger = {
			is_hive_empire = yes
		}

		weight = {
			factor = 1
		}
	}

	tradition_swap = {
		name = tr_subterfuge_nda_machine
		inherit_effects = yes
		inherit_icon = yes
		trigger = {
			is_machine_empire = yes
		}

		weight = {
			factor = 1
		}
	}

	ai_weight = {
		factor = 5000
	}
}

tr_subterfuge_double_agents = {

	triggered_modifier = {
		potential = {
			is_nomadic = no
		}
		envoys_add = 2
		country_claim_influence_cost_mult = -0.2
		espionage_operation_skill_add = 2
	}
	triggered_modifier = {
		potential = {
			is_nomadic = yes
		}
		envoys_add = 2
		scavenge_debris_mult = 0.2
		espionage_operation_skill_add = 2
	}

	tradition_swap = {
		inherit_icon = yes
		inherit_name = yes
		trigger = {
			OR = {
				is_homicidal = yes
				has_valid_civic = civic_machine_assimilator
				has_valid_civic = civic_inwards_perfection
			}
		}
		modifier = {
			envoys_add = 2
			country_war_exhaustion_mult = -0.2
			espionage_operation_skill_add = 2
		}
		weight = {
			factor = 1
		}
	}

	ai_weight = {
		factor = 5000
	}
}

tr_subterfuge_information_security = {
	possible = {
		has_tradition = tr_subterfuge_nda
	}
	
	modifier = {
		ship_evasion_add = 10
		ship_speed_mult = 0.2
		ship_emergency_ftl_mult = -0.2
	}

	ai_weight = {
		factor = 5000
	}
}

tr_subterfuge_operational_security = {
	possible = {
		has_tradition = tr_subterfuge_double_agents
		has_tradition = tr_subterfuge_nda
	}
	
	modifier = {
		ship_accuracy_add = 10
		ship_tracking_add = 10
		ship_sensor_range_add = 1
	}

	tradition_swap = {
		name = tr_subterfuge_operational_security_gestalt
		inherit_effects = yes
		inherit_icon = yes
		trigger = {
			is_gestalt = yes
		}

		weight = {
			factor = 1
		}
	}

	ai_weight = {
		factor = 5000
	}
}

tr_subterfuge_shadow_recruits = {
	possible = {
		has_tradition = tr_subterfuge_double_agents
	}

	modifier = {
		spy_network_daily_value_mult = 0.5
		operations_upkeep_mult = -0.5
		spy_network_levels_add = 25
	}

	ai_weight = {
		factor = 5000
	}
}