tr_est_hacking_adopt = {
	unlocks_agenda = agenda_est_hacking
	modifier = {
		category_computing_research_speed_mult = 0.25
	}
}

tr_est_hacking_finish = {
	modifier = {
		rivalries_influence_produces_mult = 0.30
		ascension_perks_add = 1
	}
	
	tradition_swap = {
		name = tr_est_hacking_finish_terminator
		trigger = {
			OR = {
				has_civic = civic_machine_terminator
				has_civic = civic_machine_assimilator	
			}
		}	
		modifier = {
			army_morale_damage_mult = 0.25
			ascension_perks_add = 1
		}
		weight = { factor = 1 }
	}
}


tr_est_hacking_1 = {
	modifier = {
		ship_evasion_mult = 0.10
	}

	ai_weight = { factor = 5000 }
}

tr_est_hacking_2 = {
	custom_tooltip = tr_est_hacking_2_desc

	possible = { has_tradition = tr_est_hacking_1 }	

	on_enabled = {
		every_neighbor_country = {
			limit = {
				NOR = {
					has_ethic = ethic_gestalt_consciousness	
					has_defensive_pact = prev
					is_in_federation_with = prev
					is_overlord_to = prev
					prev = {
						is_overlord_to = prev
					}
				}
			}
			if = {
				limit = {
					NOR = {
						has_modifier = mod_est_shroudborn_2
						has_modifier = mod_est_hacking_2
					}
				}
				add_modifier = {
					modifier = "mod_est_hacking_2"
					days = -1
				}
			}
		}
	}

	tradition_swap = {
		name = tr_est_hacking_2_passive_AI
		inherit_icon = yes
		inherit_name = yes
		trigger = { est_AI_no_passive_aggressive_traditons = yes }	
		modifier = {
			army_morale_damage_mult = 0.30
		}
		weight = { factor = 1 }
	}

	ai_weight = { factor = 5000 }
}

tr_est_hacking_3 = {
	possible = { has_tradition = tr_est_hacking_2 }

	modifier = {
		planet_sensor_range_add = 2
	}

	ai_weight = { factor = 5000 }
}

tr_est_hacking_4 = {
	custom_tooltip = tr_est_hacking_4_desc

	possible = { has_tradition = tr_est_hacking_3 }
	
	tradition_swap = {
		custom_tooltip = tr_est_hacking_4_terminator_desc
	
		name = tr_est_hacking_4_terminator
		inherit_icon = yes
		trigger = {
			has_civic = civic_machine_terminator
			est_AI_no_passive_aggressive_traditons = no
		}	
		on_enabled = {
			if = {
				limit = {
					Not = {
						has_global_flag = est_hacking_4_terminator_picked_flag
					}
				}
				set_global_flag = est_hacking_4_terminator_picked_flag
			}
		}
		weight = { factor = 1 }
	}
	
	tradition_swap = {
		name = tr_est_hacking_4_passive_AI
		trigger = { est_AI_no_passive_aggressive_traditons = yes }	
		modifier = {
			ship_weapon_damage = 0.05
		}
		weight = { factor = 1 }
	}

	ai_weight = { factor = 5000 }
}

tr_est_hacking_5 = {
	modifier = {
		all_technology_research_speed = 0.10
	}

	ai_weight = { factor = 5000 }
}