# Republic
# local_regiment_cost = -0.25
# local_unrest = -2.5
# local_sailors_modifier = 0.25
# trade_goods_size_modifier = 0.10
# local_institution_spread = 0.15
# trade_value_modifier = 0.10
# local_religious_conversion_resistance = 0.35
# local_hostile_movement_speed = -0.1
# local_garrison_size = 0.25

es_expand_city_garrisons = {
	potential = { 
		OR = {
			government = republic
			has_reform = presidential_despot_reform
		}
	}
	allow = { always = yes }
	modifier = { local_garrison_size = 0.25 }
	color = { 128 205 193 }
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			all_province_in_state = {
				NOT = { has_building = fort_15th }
				NOT = { has_building = fort_16th }
				NOT = { has_building = fort_17th }
				NOT = { has_building = fort_18th }
			}
		}
		modifier = {
			factor = 5
			any_province_in_state = {
				OR = {
					has_building = fort_15th
					has_building = fort_16th
					has_building = fort_17th
					has_building = fort_18th
				}
			}
		}
	}
}

es_coordinate_territorial_resistance = {
	potential = { 
		OR = {
			government = republic
			has_reform = presidential_despot_reform
		}
	}
	allow = { always = yes }
	modifier = { local_hostile_movement_speed = -0.1 }
	color = { 247 220 111 }
	
	#ROOT - Country, FROM - Province, if all provinces in a state, that are owned by the country, meet this requirement, the alert will appear.
	notify_trigger = {
		NOT = { is_at_war = yes }
	}
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			all_province_in_state = {
				controlled_by = ROOT
			}
		}
		modifier = {
			factor = 5
			any_province_in_state = {
				NOT = { controlled_by = ROOT }
			}
		}
	}
}

es_promote_religious_tolerance = {
	potential = { 
		OR = {
			government = republic
			has_reform = presidential_despot_reform
		}
	}
	allow = { always = yes }
	modifier = { local_religious_conversion_resistance = 0.35 }
	color = { 200 179 199 }
	
	#ROOT - Country, FROM - Province, if all provinces in a state, that are owned by the country, meet this requirement, the alert will appear.
	notify_trigger = {
		FROM = {
			has_owner_religion = yes
		}
	}
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			all_province_in_state = {
				religion = ROOT
			}
		}
		modifier = {
			factor = 5
			any_province_in_state = {
				NOT = { religion = ROOT }
			}
		}
	}
}

es_support_merchants = {
	potential = { 
		OR = {
			government = republic
			has_reform = presidential_despot_reform
		}
	}
	allow = { always = yes }
	modifier = { trade_value_modifier = 0.10 }
	color = { 204 91 83 }
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			any_province_in_state = {
				NOT = { province_has_center_of_trade_of_level = 2 }
			}
		}
		modifier = {
			factor = 5
			any_province_in_state = {
				province_has_center_of_trade_of_level = 3
			}
		}
	}
}

es_spread_new_technologies = {
	potential = { 
		OR = {
			government = republic
			has_reform = presidential_despot_reform
		}
	}
	allow = { always = yes }
	modifier = { local_institution_spread = 0.15 }
	color = { 164 248 31 }
	
	#ROOT - Country, FROM - Province, if all provinces in a state, that are owned by the country, meet this requirement, the alert will appear.
	notify_trigger = {
		FROM = {
			current_institution = 100
		}
	}
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			owner = {
				NOT = { is_lacking_institutions = yes }
			}
		}
		modifier = {
			factor = 5
			any_province_in_state = {
				current_institution_growth = 5
			}
		}
	}
}

es_subsidize_local_craftsmen = {
	potential = { 
		OR = {
			government = republic
			has_reform = presidential_despot_reform
		}
	}
	allow = { always = yes }
	modifier = { trade_goods_size_modifier = 0.10 }
	color = { 53 0 193 }
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			all_province_in_state = {
				NOT = { base_production = 3 }
			}
		}
		modifier = {
			factor = 5
			any_province_in_state = {
				base_production = 5
			}
		}
	}
}

es_advertise_naval_service = {
	potential = { 
		OR = {
			government = republic
			has_reform = presidential_despot_reform
		}
	}
	allow = { always = yes }
	modifier = { local_sailors_modifier = 0.25 }
	color = { 60 157 240 }
	
	#ROOT - Country, FROM - Province, if all provinces in a state, that are owned by the country, meet this requirement, the alert will appear.
	notify_trigger = {
		FROM = {
			NOT = { has_port = yes }
		}
	}
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			owner = {
				navy_size_percentage = 0.95
			}
		}
		modifier = {
			factor = 0
			all_province_in_state = {
				NOT = { has_port = yes }
			}
		}
		modifier = {
			factor = 5
			owner = {
				NOT = { navy_size_percentage = 0.50 }
			}
		}
	}
}

es_deploy_additional_guards = {
	potential = { 
		OR = {
			government = republic
			has_reform = presidential_despot_reform
		}
	}
	allow = { always = yes }
	modifier = { local_unrest = -2.5 }
	color = { 245 146 55 }
	
	#ROOT - Country, FROM - Province, if all provinces in a state, that are owned by the country, meet this requirement, the alert will appear.
	notify_trigger = {
		FROM = {
			NOT = { unrest = 1 }
		}
	}
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			all_province_in_state = {
				NOT = { unrest = 1 }
			}
		}
		modifier = {
			factor = 5
			any_province_in_state = {
				unrest = 5
			}
		}
	}
}

es_organise_self_sufficient_regiments = {
	potential = { 
		OR = {
			government = republic
			has_reform = presidential_despot_reform
		}
	}
	allow = { always = yes }
	modifier = { local_regiment_cost = -0.25 }
	color = { 36 140 29 }
	
	ai_will_do = {
		factor = 10
		modifier = {
			factor = 0
			owner = {
				NOT = { is_at_war = yes }
			}
		}
		modifier = {
			factor = 5
			owner = {
				NOT = { army_size_percentage = 0.5 }
			}
		}
	}
}