﻿ai_strategy_maintain_power_balance = {
	icon = "gfx/interface/icons/ai_strategy_icons/maintain_power_balance.dds"
	
	type = diplomatic
	
	undesirable_infamy_level = {
		value = 25
	}
	
	unacceptable_infamy_level = {
		value = 50
	}
	
	ideological_opinion_effect_mult = {
		value = 1.5
	}
	
	wargoal_maneuvers_fraction = {
		value = -0.1
	}	
	
	diplomatic_play_neutrality = {
		value = 0
	}
	
	diplomatic_play_boldness = {
		value = -25
	}
	
	recklessness = {
		value = -0.25
	}
	
	aggression = {
		value = 0.25	

		if = {
			limit = { 
				NOT = { is_country_type = unrecognized }
				scope:target_country = { is_country_type = unrecognized } 
			}
			add = 0.25
			
			if = {
				limit = { has_technology_researched = civilizing_mission }
				add = 0.5
			}			
		}

		# Less aggressive against countries we're just antagonistic against, rather than belligerent/domineering
		if = {
			limit = {
				has_attitude = {
					who = scope:target_country
					attitude = antagonistic
				}					
			}
			multiply = 0.1
		}

		# More aggressive against ideological enemies, a bit less aggressive against ideological allies
		if = {
			limit = {
				"ai_ideological_opinion(scope:target_country)" < 0
			}
			
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.2
				add = 1
				max = 4.0
			}				
		}	
		else = {
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.05
				add = 1
				min = 0.5
			}			
		}		
	}
	 
	building_group_weights = {
		bg_technology = 1.25
	}
	
	secret_goal_weights = {
		protect = 1.5
		dominate = 1.5
		reconcile = 1.5
	}
	
	wargoal_weights = {
		regime_change = 3.0
		humiliation = 2.0
		liberate_subject = 1.5
		liberate_country = 1.5
	}

	possible = {
		always = yes
	}
	
	weight = {
		value = 10
		
		if = {
			limit = { country_rank < rank_value:major_power }
			add = 10
		}

		if = {
			limit = { 
				exists = c:FRA
				c:FRA = this
				ruler = {
					has_variable = legitimist_leader # strict adherence to the Congress of Vienna
				}
			}
			add = 20
		}
	}
}

ai_strategy_territorial_expansion = {
	icon = "gfx/interface/icons/ai_strategy_icons/territorial_expansion.dds"
	
	type = diplomatic
	
	undesirable_infamy_level = {
		value = 50
	}
	
	unacceptable_infamy_level = {
		value = 100
	}
	
	ideological_opinion_effect_mult = {
		value = 0.75
	}
	
	wargoal_maneuvers_fraction = {
		value = 0.15
	}		
	
	diplomatic_play_neutrality = {
		value = 25
	}
	
	diplomatic_play_boldness = {
		value = 25
	}
	
	recklessness = {
		value = 0.25
	}
	
	aggression = {
		value = 1
		
		if = {
			limit = { 
				NOT = { is_country_type = unrecognized }
				scope:target_country = { is_country_type = unrecognized } 
			}
			add = 1
		}	

		# Less aggressive against countries we're just antagonistic against, rather than belligerent/domineering
		if = {
			limit = {
				has_attitude = {
					who = scope:target_country
					attitude = antagonistic
				}					
			}
			multiply = 0.25
		}	

		# More aggressive against ideological enemies, a bit less aggressive against ideological allies
		if = {
			limit = {
				"ai_ideological_opinion(scope:target_country)" < 0
			}
			
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.2
				add = 1
				max = 4.0
			}				
		}	
		else = {
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.05
				add = 1
				min = 0.5
			}			
		}			
	}

	building_group_weights = {
		bg_army = 1.5
	}
	
	secret_goal_weights = {
		protect = 0.5
		conquer = 1.5
	}

	wargoal_weights = {
		conquer_state = 1.5
		return_state = 1.5
	}

	secret_goal_scores = {
		conquer = {
			if = {
				limit = {
					can_reach_target_country = yes
					has_strategic_adjacency = scope:target_country
					scope:target_country.country_rank <= root.country_rank
				}
				
				if = {
					limit = {
						NOT = { is_country_type = unrecognized }
						scope:target_country = { NOT = { is_country_type = unrecognized } }
					}
					add = 25
				}		
				else_if = {
					limit = {				
						scope:target_country = { is_country_type = unrecognized }						
					}
					add = 50
				}
			}
		}
	}
		
	possible = {
		always = yes
	}

	weight = {
		value = 10

		if = {
			limit = { 
				exists = c:FRA
				c:FRA = this
				ruler = {
					has_variable = bonapartist_leader
				}
			}
			add = 5
		}
			
		if = {
			limit = { ig:ig_armed_forces = { is_powerful = yes } }
			multiply = 1.5
		}			
		
		if = {
			limit = { country_is_in_europe = yes }
			multiply = 0.25
		}	
		
		if = {
			limit = { has_law = law_type:law_council_republic }
			multiply = 0.5
		}
	}
}

ai_strategy_colonial_expansion = {
	icon = "gfx/interface/icons/ai_strategy_icons/colonial_expansion.dds"
	
	type = diplomatic
	
	undesirable_infamy_level = {
		value = 25
	}
	
	unacceptable_infamy_level = {
		value = 50
	}
	
	ideological_opinion_effect_mult = {
		value = 1.0
	}
	
	wargoal_maneuvers_fraction = {
		value = 0
	
		if = {
			limit = {
				scope:enemy_country = { is_country_type = unrecognized }
			}
			add = 0.25
		}	
	}		
	
	diplomatic_play_neutrality = {
		value = 25
	}
	
	diplomatic_play_boldness = {
		value = -15
	}
	
	recklessness = {
		value = 0.1
	}
	
	# Added to value from default strategy
	aggression = {
		value = 0.25
		if = {
			limit = { 
				NOT = { is_country_type = unrecognized }
				scope:target_country = { is_country_type = unrecognized } 
			}
			add = 0.75			
			
			if = {
				limit = { has_technology_researched = civilizing_mission }
				add = 1.0
			}			
		}

		# Less aggressive against countries we're just antagonistic against, rather than belligerent/domineering
		if = {
			limit = {
				has_attitude = {
					who = scope:target_country
					attitude = antagonistic
				}					
			}
			multiply = 0.1
		}	

		# More aggressive against ideological enemies, a bit less aggressive against ideological allies
		if = {
			limit = {
				"ai_ideological_opinion(scope:target_country)" < 0
			}
			
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.2
				add = 1
				max = 4.0
			}				
		}	
		else = {
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.05
				add = 1
				min = 0.5
			}			
		}		
	}
	
	building_group_weights = {
		bg_navy = 1.5
	}
	
	colonial_interest_ratio = {
		value = 0.10
	
		if = {
			limit = { navy_size >= 30 }
			add = 0.1
		}
		
		if = {
			limit = { navy_size >= 60 }
			add = 0.1
		}		
		
		if = {
			limit = { navy_size >= 90 }
			add = 0.1
		}	
		
		if = {
			limit = { navy_size >= 120 }
			add = 0.1
		}			
	}
	
	secret_goal_scores = {
		dominate = {
			if = {
				limit = {
					scope:target_country = { NOT = { is_country_type = unrecognized } }
				}
				multiply = 0.25
			}		
			if = {
				limit = {
					has_strategic_adjacency = scope:target_country
					scope:target_country = { is_country_type = unrecognized }
				}
				add = 200
			}	
		}		
		conquer = {
			if = {
				limit = {
					scope:target_country = { NOT = { is_country_type = unrecognized } }
				}
				multiply = 0.25
			}		
			if = {
				limit = {
					has_strategic_adjacency = scope:target_country
					scope:target_country = { is_country_type = unrecognized }
				}
				add = 200
			}	
		}		
	}

	wargoal_weights = {
		conquer_state = 1.5
		reduce_autonomy = 1.5
		take_treaty_port = 1.5
	}	
		
	possible = {
		navy_size >= 25
		is_country_type = recognized
		OR = {
			has_law = law_type:law_colonial_resettlement
			has_law = law_type:law_colonial_exploitation
		}
	}

	weight = {
		value = 10

		if = {
			limit = { 
				exists = c:FRA
				c:FRA = this
				ruler = {
					has_variable = bonapartist_leader
				}
			}
			add = 10
		}
		
		if = {
			limit = { country_rank = rank_value:major_power }
			add = 5
		}	

		if = {
			limit = { country_rank = rank_value:great_power }
			add = 5
		}			
		
		if = {
			limit = { navy_size < 50 }
			multiply = 0.5
		}		
		
		if = {
			limit = { navy_size >= 75 }
			multiply = 1.5
		}	

		if = {
			limit = { has_technology_researched = civilizing_mission }
			multiply = 1.25
		}	
		
		if = {
			limit = { has_law = law_type:law_council_republic }
			multiply = 0.01
		}			
	}
}

ai_strategy_armed_isolationism = {
	icon = "gfx/interface/icons/ai_strategy_icons/armed_isolationism.dds"
	
	type = diplomatic

	undesirable_infamy_level = {
		value = 1
	}
	
	unacceptable_infamy_level = {
		value = 25
	}
	
	ideological_opinion_effect_mult = {
		value = 0.75
	}
	
	wargoal_maneuvers_fraction = {
		value = -0.1
	}		
	
	diplomatic_play_neutrality = {
		value = 50
	}
	
	diplomatic_play_boldness = {
		value = 0
	}
	
	recklessness = {
		value = -0.5
	}
	
	aggression = {
		value = 0
	}
	
	building_group_weights = {
		bg_army = 1.5
	}
	
	secret_goal_weights = {
		conquer = 0.0
		dominate = 0.0
		protect = 0.0
	}

	wargoal_weights = {
		conquer_state = 0.0
		make_protectorate = 0.0
		reduce_autonomy = 0.0
		make_tributary = 0.0
	}	
	
	possible = {
		NOT = { country_rank = rank_value:great_power }
		NOT = { has_law = law_type:law_council_republic }
	}
	
	weight = {
		value = 10
		
		if = {
			limit = { is_country_type = unrecognized }
			add = 50
		}
		
		if = {
			limit = { has_law = law_type:law_national_militia }
			add = 50
		}

		if = {
			limit = { has_law = law_type:law_isolationism }
			add = 100
		}	
		
		if = {
			limit = {
				has_variable = japan_forced_to_open_market
			}
			multiply = 0.1
		}		

		if = {
			limit = { country_rank = rank_value:great_power }
			multiply = 0.1
		}			
		
		if = {
			limit = { country_rank = rank_value:major_power }
			multiply = 0.5
		}
		#Ultimate Flavor added regional power
		if = {
			limit = { country_rank = rank_value:unrecognized_regional_power }
			multiply = 0.5
		}
	}
}

ai_strategy_economic_imperialism = {
	icon = "gfx/interface/icons/ai_strategy_icons/economic_imperialism.dds"
	
	type = diplomatic
	
	undesirable_infamy_level = {
		value = 25
	}
	
	unacceptable_infamy_level = {
		value = 50
	}
	
	ideological_opinion_effect_mult = {
		value = 1.0
	}
	
	wargoal_maneuvers_fraction = {
		value = 0
	
		if = {
			limit = {
				scope:enemy_country = { is_country_type = unrecognized }
			}
			add = 0.25
		}
	}			
	
	diplomatic_play_neutrality = {
		value = 10
	}
	
	diplomatic_play_boldness = {
		value = -10
	}
	
	recklessness = {
		value = -0.1
	}
	
	aggression = {
		value = 0.5
		if = {
			limit = { 
				NOT = { is_country_type = unrecognized }
				scope:target_country = { is_country_type = unrecognized } 
			}
			add = 0.5
			
			if = {
				limit = { has_technology_researched = civilizing_mission }
				add = 0.5
			}			
		}
		
		if = {
			limit = { 
				has_technology_researched = nationalism # Just to make sure it doesn't happen immediately in 1836
				country_rank = rank_value:great_power
				navy_size >= 25
				scope:target_country = { 
					exists = c:JAP
					this = c:JAP		
					has_law = law_type:law_isolationism
					gdp >= 5000000
				} 
			}
			add = 5
		}

		# Less aggressive against countries we're just antagonistic against, rather than belligerent/domineering
		if = {
			limit = {
				has_attitude = {
					who = scope:target_country
					attitude = antagonistic
				}					
			}
			multiply = 0.25
		}	

		# More aggressive against ideological enemies, a bit less aggressive against ideological allies
		if = {
			limit = {
				"ai_ideological_opinion(scope:target_country)" < 0
			}
			
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.2
				add = 1
				max = 4.0
			}				
		}	
		else = {
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.05
				add = 1
				min = 0.5
			}			
		}			
	}
	
	building_group_weights = {
		bg_navy = 1.5
	}
	
	colonial_interest_ratio = {
		value = 0.10
	
		if = {
			limit = { navy_size >= 30 }
			add = 0.05
		}
		
		if = {
			limit = { navy_size >= 60 }
			add = 0.05
		}		
		
		if = {
			limit = { navy_size >= 90 }
			add = 0.05
		}	
		
		if = {
			limit = { navy_size >= 120 }
			add = 0.05
		}			
	}
	
	strategic_region_scores = {
		region_japan = { # Great Powers with significant navies should pay attention to Japan
			if = {
				limit = {
					exists = c:JAP
					c:JAP = { has_law = law_type:law_isolationism }
					country_rank = rank_value:great_power
					navy_size >= 25
				}
				add = 1000
			}				
		}	
	}
	
	secret_goal_scores = {
		dominate = {
			if = {
				limit = {
					has_technology_researched = nationalism  # Just to make sure it doesn't happen immediately in 1836
					country_rank = rank_value:great_power
					navy_size >= 25
					scope:target_country = { 
						has_law = law_type:law_isolationism 
						gdp >= 2000000
						capital.region = sr:region_japan												
					} 
				}
				add = 500
			}		
			else_if = {
				limit = {
					has_strategic_adjacency = scope:target_country
					scope:target_country = { 
						has_law = law_type:law_isolationism
						gdp >= 2000000
						NOT = { capital.region = sr:region_japan }	
					}
				}
				add = 100
			}
			
			if = {
				limit = {
					has_strategic_adjacency = scope:target_country
					root.country_rank > scope:target_country.country_rank
					scope:target_country.country_rank < rank_value:major_power
					scope:target_country = {
						NOR = { 
							has_law = law_type:law_free_trade 
							has_law = law_type:law_isolationism
						}
					}
				}
				add = 50
				
				if = {
					limit = {
						scope:target_country = { is_country_type = unrecognized }
					}
					add = 50
				}
			}		
		}		
		conquer = {		
			if = {
				limit = {
					has_strategic_adjacency = scope:target_country
					scope:target_country = { is_country_type = unrecognized }
				}
				add = 50
			}
			if = {
				limit = {
					scope:target_country = { NOT = { is_country_type = unrecognized } }
				}
				add = -50
			}
			
			# Don't attack Japan outright, open them instead
			if = {
				limit = {
					scope:target_country = { 
						has_law = law_type:law_isolationism 
						gdp >= 2000000
						capital.region = sr:region_japan												
					} 
				}
				add = -1000
			}			
		}		
	}

	wargoal_weights = {
		make_protectorate = 1.5	
		make_tributary = 1.5	
	}	
	
	treaty_port_value = {
		if = {
			limit = {
				can_reach_target_state = yes
				scope:target_country = {
					has_law = law_type:law_isolationism
					gdp >= 2000000 # Not worth doing against very small markets
				}
				scope:target_state = { is_incorporated = yes }
			}
			add = {
				value = 50
			
				# More likely to grab a treaty port if we're already enemies in a play, ie they attacked us first
				if = {
					limit = { is_diplomatic_play_enemy_of = scope:target_country }
					multiply = 2.0
				}
			}
		}	
	}
	
	wargoal_scores = {	
		open_market = {
			value = 0
		
			if = {
				limit = {
					country_rank = rank_value:great_power
					can_reach_target_country = yes
					scope:target_country = {
						has_law = law_type:law_isolationism
						gdp >= 5000000 # Not worth doing against small markets
					}
				}
				add = {
					value = 100
				
					# Less interested in open market as a sway or defensive wargoal
					if = {
						limit = { is_diplomatic_play_involved_with = scope:target_country }
						multiply = 0.2
					}
					else_if = { # Very high score for opening Japan
						limit = { 
							scope:target_country = { 
								exists = c:JAP
								this = c:JAP		
								has_law = law_type:law_isolationism 				
							} 	
						}
						multiply = 10
					}
				}
			}
		}		
	}
		
	possible = {
		navy_size >= 25
		is_country_type = recognized
		NOT = { has_law = law_type:law_isolationism }
		OR = {
			country_rank = rank_value:major_power
			country_rank = rank_value:great_power
		}	
	}

	weight = {
		value = 10		

		if = {
			limit = { country_rank = rank_value:great_power }
			add = 10
		}

		if = {
			limit = { 
				exists = c:FRA
				c:FRA = this
				ruler = {
					OR = {
						has_variable = bonapartist_leader
						has_variable = orleanist_leader
					}
				}
			}
			add = 10
		}

		if = {
			limit = {
				exists = c:JAP
				has_strategic_adjacency = c:JAP
				c:JAP = { has_law = law_type:law_isolationism }
			}
			multiply = 2.0
		}	

		if = {
			limit = { navy_size < 50 }
			multiply = 0.5
		}		
		
		if = {
			limit = { navy_size >= 75 }
			multiply = 1.5
		}	
		
		if = {
			limit = { has_law = law_type:law_council_republic }
			multiply = 0.25
		}
	}
}

ai_strategy_unify_germany = {
	icon = "gfx/interface/icons/ai_strategy_icons/unification.dds"
	
	type = diplomatic
	
	undesirable_infamy_level = {
		value = 25
	}
	
	unacceptable_infamy_level = {
		value = 50
	}
	
	ideological_opinion_effect_mult = {
		value = 0.5
	}
	
	wargoal_maneuvers_fraction = {
		value = 0.2
	}		
	
	diplomatic_play_neutrality = {
		value = 0
	}
	
	diplomatic_play_boldness = {
		value = 75
	}

	obligation_value = {
		value = 0
	
		if = {
			limit = { 
				scope:target_country = {			
					OR = {
						country_has_primary_culture = cu:north_german
						country_has_primary_culture = cu:south_german
					}
				}
			}
			add = 25
		}
	}	

	recklessness = {
		value = 0.5
	}
	
	aggression = {
		value = 0.25
		
		if = {
			limit = { 
				scope:target_country = {			
					OR = {
						country_has_primary_culture = cu:north_german
						country_has_primary_culture = cu:south_german
					}
				}
			}
			add = 2.75
		}

		# Less aggressive against countries we're just antagonistic against, rather than belligerent/domineering
		if = {
			limit = {
				has_attitude = {
					who = scope:target_country
					attitude = antagonistic
				}					
			}
			multiply = 0.25
		}	

		# More aggressive against ideological enemies, a bit less aggressive against ideological allies
		if = {
			limit = {
				"ai_ideological_opinion(scope:target_country)" < 0
			}
			
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.2
				add = 1
				max = 4.0
			}				
		}	
		else = {
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.05
				add = 1
				min = 0.5
			}			
		}		
	}

	building_group_weights = {
		bg_army = 1.5
	}
	
	state_value = {
		if = {
			limit = {
				scope:target_state = {
					state_region = {
						OR = {
							is_homeland = cu:north_german
							is_homeland = cu:south_german
						}
					}
				}
				can_reach_target_state = yes					
			}
			add = 100
		}
	}
	
	wargoal_scores = {	
		unification_leadership = {
			value = 1000
		}	
	}
	
	secret_goal_scores = {
		protect = {		
			if = {
				limit = {
					scope:target_country = {
						OR = {
							country_has_primary_culture = cu:north_german
							country_has_primary_culture = cu:south_german
						}
						NOT = { is_unification_candidate = GER }
						OR = { 
							is_supporting_unification_candidate = { who = root country_formation = GER }
							is_subject_of = root
							has_diplomatic_pact = {
								who = scope:target_country
								type = customs_union
							}							
						}						
					}
				}
				add = 1000
			}		
		}		
		dominate = {		
			if = {
				limit = {
					scope:target_country = {
						OR = {
							country_has_primary_culture = cu:north_german
							country_has_primary_culture = cu:south_german
						}					
						NOT = { is_unification_candidate = GER }
						NOR = { 
							is_supporting_unification_candidate = { who = root country_formation = GER }
							is_subject_of = root
							has_diplomatic_pact = {
								who = scope:target_country
								type = customs_union
							}							
						}	
					}
				}
				add = 1000
			}		
		}
		conquer = {				
			if = {
				limit = {
					scope:target_country = {				
						is_unification_candidate =GER
					}
				}
				add = 1000
			}			
		}
	}	

	possible = {
		is_unification_candidate = GER	
		NOT = { country_tier = empire }
	}

	weight = {
		value = 1000
	}
}

ai_strategy_unify_italy = {
	icon = "gfx/interface/icons/ai_strategy_icons/unification.dds"
	
	type = diplomatic
		
	undesirable_infamy_level = {
		value = 25
	}
	
	unacceptable_infamy_level = {
		value = 50
	}
	
	ideological_opinion_effect_mult = {
		value = 0.5
	}
	
	wargoal_maneuvers_fraction = {
		value = 0.2
	}		
	
	diplomatic_play_neutrality = {
		value = 0
	}
	
	diplomatic_play_boldness = {
		value = 75
	}
	
	obligation_value = {
		value = 0
	
		if = {
			limit = { 
				scope:target_country = {
					OR = {
						country_has_primary_culture = cu:north_italian
						country_has_primary_culture = cu:south_italian
					}				
				}
			}
			add = 25
		}
	}		
	
	recklessness = {
		value = 0.5
	}	
	
	aggression = {
		value = 0.25
		
		if = {
			limit = { 
				scope:target_country = {
					OR = {
						country_has_primary_culture = cu:north_italian
						country_has_primary_culture = cu:south_italian
					}	
				}
			}
			add = 2.75
		}

		# Less aggressive against countries we're just antagonistic against, rather than belligerent/domineering
		if = {
			limit = {
				has_attitude = {
					who = scope:target_country
					attitude = antagonistic
				}					
			}
			multiply = 0.25
		}	

		# More aggressive against ideological enemies, a bit less aggressive against ideological allies
		if = {
			limit = {
				"ai_ideological_opinion(scope:target_country)" < 0
			}
			
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.2
				add = 1
				max = 4.0
			}				
		}	
		else = {
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.05
				add = 1
				min = 0.5
			}			
		}		
	}

	building_group_weights = {
		bg_army = 1.5
	}
	
	state_value = {
		if = {
			limit = {
				scope:target_state = {
					state_region = {
						OR = {
							is_homeland = cu:north_italian
							is_homeland = cu:south_italian
						}
					}						
				}	
				can_reach_target_state = yes
			}
			add = 100
		}
	}
	
	wargoal_scores = {
		unification_leadership = {
			value = 1000
		}			
	}	
	
	secret_goal_scores = {
		protect = {		
			if = {
				limit = {
					scope:target_country = {
						OR = {
							country_has_primary_culture = cu:north_italian
							country_has_primary_culture = cu:south_italian
						}
						NOT = { is_unification_candidate = ITA }
						OR = { 
							is_supporting_unification_candidate = { who = root country_formation = ITA }
							is_subject_of = root
							has_diplomatic_pact = {
								who = scope:target_country
								type = customs_union
							}							
						}	
					}
				}
				add = 1000
			}		
		}		
		dominate = {		
			if = {
				limit = {
					scope:target_country = {
						OR = {
							country_has_primary_culture = cu:north_italian
							country_has_primary_culture = cu:south_italian
						}					
						NOR = { 
							is_unification_candidate = ITA
							is_supporting_unification_candidate = { who = root country_formation =ITA }
							is_subject_of = root
							has_diplomatic_pact = {
								who = scope:target_country
								type = customs_union
							}							
						}	
					}
				}
				add = 1000
			}		
		}		
		conquer = {				
			if = {
				limit = {
					scope:target_country = {				
						is_unification_candidate = ITA
					}
				}
				add = 1000
			}			
		}		
	}
		
	possible = {
		is_unification_candidate = ITA	
		NOT = { country_tier = empire }
	}

	weight = {
		value = 1000	
		if = {
			limit = {
				has_variable = risorgimento_anti_unifying_stance
			}
			multiply = 0.01
		}
	}
}

ai_strategy_unify_ethiopia = {
	icon = "gfx/interface/icons/ai_strategy_icons/unification.dds"
	
	type = diplomatic
	
	undesirable_infamy_level = {
		value = 50
	}
	
	unacceptable_infamy_level = {
		value = 100
	}
	
	ideological_opinion_effect_mult = 0.5
	
	wargoal_maneuvers_fraction = {
		value = 0.2
	}		
		
	diplomatic_play_neutrality = {
		value = 0
	}
	
	diplomatic_play_boldness = {
		value = 50
	}
		
	obligation_value = {
		value = 0
	
		if = {
			limit = { 
				scope:target_country = { can_form_nation = ETH }
			}
			add = 25
		}
	}			
		
	recklessness = {
		value = 0.5
	}	
	
	aggression = {
		value = 0.5
		
		if = {
			limit = { 
				scope:target_country = { can_form_nation = ETH }
			}
			add = 2.5
		}

		# Less aggressive against countries we're just antagonistic against, rather than belligerent/domineering
		if = {
			limit = {
				has_attitude = {
					who = scope:target_country
					attitude = antagonistic
				}					
			}
			multiply = 0.25
		}	
		
		# More aggressive against ideological enemies, a bit less aggressive against ideological allies
		if = {
			limit = {
				"ai_ideological_opinion(scope:target_country)" < 0
			}
			
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.2
				add = 1
				max = 4.0
			}				
		}	
		else = {
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.05
				add = 1
				min = 0.5
			}			
		}
	}

	building_group_weights = {
		bg_army = 1.5
	}
	
	state_value = {
		if = {
			limit = {
				scope:target_state = {
					state_region = {
						OR = {
							is_homeland = cu:amhara
							is_homeland = cu:oromo
							is_homeland = cu:tigray
						}					
					}						
				}
				can_reach_target_state = yes
			}
			add = 100
		}	
	}
	
	wargoal_scores = {
		annex_country = {
			if = {
				limit = {
					scope:target_country = {
						can_form_nation = ETH
					}
					can_reach_target_country = yes
				}
				add = 300
			}		
		}	
	}		
	
	secret_goal_scores = {
		befriend = {		
			if = {
				limit = {
					scope:target_country = {
						can_form_nation = ETH
					}
				}
				add = 150
				
				if = {
					limit = {
						can_reach_target_country = no
					}	
					add = 150
				}	
			}
		}				
		conquer = {				
			if = {
				limit = {
					scope:target_country = {
						can_form_nation = ETH
					}
					can_reach_target_country = yes
				}
				add = 500
			}				
		}			
	}	

	possible = {
		NOT = { exists = c:ETH }
		can_form_nation = ETH
	}

	weight = {
		value = 500
		
		if = {
			limit = { NOT = { is_country_type = unrecognized } }
			add = 100
		}		
		
		if = {
			limit = { country_rank = rank_value:unrecognized_regional_power }
			add = 25
		}

		if = {
			limit = { country_rank = rank_value:unrecognized_major_power }
			add = 50
		}		
	}
}

# Ultimate Flavor
ai_strategy_unify_afghanistan = {
	icon = "gfx/interface/icons/ai_strategy_icons/unification.dds"
	
	type = diplomatic
	
	undesirable_infamy_level = {
		value = 50
	}
	
	unacceptable_infamy_level = {
		value = 100
	}
	
	ideological_opinion_effect_mult = {
		value = 0.5
	}
	
	wargoal_maneuvers_fraction = {
		value = 0.2
	}		
		
	diplomatic_play_neutrality = {
		value = 0
	}
	
	diplomatic_play_boldness = {
		value = 50
	}
		
	obligation_value = {
		value = 0
	
		if = {
			limit = { 
				scope:target_country = {
				OR = {
							can_form_nation = AFG
							this = c:DUR
						}
					}
			}
			add = 25
		}
	}			
		
	recklessness = {
		value = 0.5
	}	
	
	aggression = {
		value = 0.5
		
		if = {
			limit = { 
				scope:target_country = {
				OR = {
							can_form_nation = AFG
							this = c:DUR
						}
					}
			}
			add = 2.5
		}

		# Less aggressive against countries we're just antagonistic against, rather than belligerent/domineering
		if = {
			limit = {
				has_attitude = {
					who = scope:target_country
					attitude = antagonistic
				}					
			}
			multiply = 0.25
		}			
		
		# More aggressive against ideological enemies, a bit less aggressive against ideological allies
		if = {
			limit = {
				"ai_ideological_opinion(scope:target_country)" < 0
			}
			
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.2
				add = 1
				max = 4.0
			}				
		}	
		else = {
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.05
				add = 1
				min = 0.5
			}			
		}
	
	}
	
	
	building_group_weights = {
		bg_army = 1.5
	}
	
	wargoal_scores = {
		annex_country = {
			if = {
				limit = {
					scope:target_country = {
						OR = {
							can_form_nation = AFG
							this = c:DUR
						}
					}
					can_reach_target_country = yes
				}
				add = 300
			}		
		}
		conquer_state = {
			if = {
				limit = {
					scope:target_state = {
						state_region = {
							OR = {
								is_homeland = cu:pashtun
								is_homeland = cu:hazara
							}					
						}						
					}
					can_reach_target_state = yes
				}
				add = 100
			}
		}
		return_state = {
			if = {
				limit = {
					scope:target_state = {
						state_region = {
							OR = {
								is_homeland = cu:pashtun
								is_homeland = cu:hazara
							}					
						}						
					}
					can_reach_target_state = yes
				}
				add = 200
			}
		}		
	}		
	
	secret_goal_scores = {
		befriend = {		
			if = {
				limit = {
					scope:target_country = {
						OR = {
							can_form_nation = AFG
							this = c:DUR
						}
					}
				}
				add = 150
				
				if = {
					limit = {
						can_reach_target_country = no
					}	
					add = 150
				}	
			}
		}				
		conquer = {				
			if = {
				limit = {
					scope:target_country = {
						OR = {
							can_form_nation = AFG
							this = c:DUR
						}
					}
					can_reach_target_country = yes
				}
				add = 500
			}				
		}			
	}	

	wargoal_weights = {
		conquer_state = 1.5
		return_state = 2.0
	}	
		
	possible = {
		NOT = { exists = c:AFG }
		OR = {
		can_form_nation = AFG
		this = c:DUR
		}
	}

	weight = {
		value = 1000
				
	}
}

# Persia Resurgence Ultimate Flavor
ai_strategy_form_khorasan = {
	icon = "gfx/interface/icons/ai_strategy_icons/unification.dds"
	
	type = diplomatic
	
	undesirable_infamy_level = {
		value = 25
	}
	
	unacceptable_infamy_level = {
		value = 50
	}
	
	ideological_opinion_effect_mult = {
		value = 0.5
	}
		
	wargoal_maneuvers_fraction = {
		value = 0.2
	}		
		
	diplomatic_play_neutrality = {
		value = 25
	}
	
	diplomatic_play_boldness = {
		value = 75
	}			
		
	recklessness = {
		value = 0.5
	}	
	
	aggression = {
		value = 15
		
		if = {
			limit = { 
				scope:target_country = {
				any_state = {
						has_claim_by = root
					}
				}
			}
			add = 5
		}

		# Less aggressive against countries we're just antagonistic against, rather than belligerent/domineering
		if = {
			limit = {
				has_attitude = {
					who = scope:target_country
					attitude = antagonistic
				}					
			}
			multiply = 0.25
		}			
	}

	building_group_weights = {
		bg_army = 2.0
	}
	
	wargoal_scores = {
	
		conquer_state = {
			if = {
				limit = {
					scope:target_state = {
						NOT = {
						has_claim_by = root
						}
					}
					can_reach_target_state = yes
				}
				add = 100
			}
		}	
		
		return_state = {
			if = {
				limit = {
					scope:target_state = {
						has_claim_by = root						
					}
					can_reach_target_state = yes
				}
				add = 200
			}
		}		
	}		
	
	secret_goal_scores = {
						
		conquer = {				
			if = {
				limit = {
					scope:target_country = {
						OR = {
						this = c:KHI
						this = c:BUK
						this = c:KOK
						this = c:KAL
						this = c:MAK
						this = c:PAN
						this = c:PER
						}
					}
					can_reach_target_country = yes
				}
				add = 1000
			}				
		}
		
	}	
	
	
	wargoal_weights = {
		conquer_state = 1.0
		return_state = 2.0
	}	
		
	possible = {
		NOT = { exists = c:KHO }
		OR = {
		this = c:AFG
		this = c:DUR
		}
	}

	weight = {
		value = 5		
		

		if = {
			limit = {
				root = {
				has_journal_entry = je_khorasan_ascendant
				}
			}
			add = 1000
		}		
	}
}

# Persia Resurgence Ultimate Flavor
ai_strategy_persian_empire = {
	icon = "gfx/interface/icons/ai_strategy_icons/unification.dds"
	
	type = diplomatic
	
	undesirable_infamy_level = {
		value = 25
	}
	
	unacceptable_infamy_level = {
		value = 50
	}
	
	ideological_opinion_effect_mult = {
		value = 0.5
	}	
	wargoal_maneuvers_fraction = {
		value = 0.2
	}		
		
	diplomatic_play_neutrality = {
		value = 25
	}
	
	diplomatic_play_boldness = {
		value = 75
	}			
		
	recklessness = {
		value = 0.5
	}	
	
	aggression = {
		value = 15
		
		if = {
			limit = { 
				scope:target_country = {
				any_state = {
						has_claim_by = root
					}
				}
			}
			add = 5
		}

		# Less aggressive against countries we're just antagonistic against, rather than belligerent/domineering
		if = {
			limit = {
				has_attitude = {
					who = scope:target_country
					attitude = antagonistic
				}					
			}
			multiply = 0.25
		}			
	}

	building_group_weights = {
		bg_army = 2.0
	}
	
	wargoal_scores = {
	
		make_tributary = {				
			if = {
				limit = {
				has_journal_entry = je_shahenshah
					can_reach_target_country = yes
				}
				add = 200
			}				
		}	
		
		return_state = {
			if = {
				limit = {
					scope:target_state = {
						has_claim_by = root						
					}
					can_reach_target_state = yes
				}
				add = 200
			}
		}		
	}		
	
	secret_goal_scores = {
						
		conquer = {				
			if = {
				limit = {
					scope:target_country = {
						any_state = {
						has_claim_by = root
						}
					}
					can_reach_target_country = yes
				}
				add = 1000
			}				
		}

		dominate = {				
			if = {
				limit = {				
				scope:target_country = {
						any_state = {
						NOT = {
						has_claim_by = root
							}
						}
					}					
					can_reach_target_country = yes
				}
				add = 1000
			}				
		}	
	}	
	
	
	wargoal_weights = {
		conquer_state = 1.0
		return_state = 2.0
		dominate = 2.0
	}	
		
	possible = {
		NOT = { exists = c:QAJ }
		this = c:PER
	}

	weight = {
		value = 0		
		

		if = {
			limit = {
				c:PER = {
				has_journal_entry = je_empire_reborn
				}
			}
			add = 1000
		}		
	}
}

ai_strategy_unify_china = {
	icon = "gfx/interface/icons/ai_strategy_icons/unification.dds"
	
	type = diplomatic
	
	undesirable_infamy_level = {
		value = 50
	}
	
	unacceptable_infamy_level = {
		value = 100
	}
	
	ideological_opinion_effect_mult = {
		value = 0.5
	}
	
	wargoal_maneuvers_fraction = {
		value = 0.2
	}		
		
	diplomatic_play_neutrality = {
		value = 0
	}
	
	diplomatic_play_boldness = {
		value = 50
	}
		
	obligation_value = {
		value = 0
	
		if = {
			limit = { 
				scope:target_country = { can_form_nation = CHI }
			}
			add = 25
		}
	}			
		
	recklessness = {
		value = 0.5
	}	
	
	aggression = {
		value = 0.5
		
		if = {
			limit = { 
				scope:target_country = { can_form_nation = CHI }
			}
			add = 2.5
		}

		# Less aggressive against countries we're just antagonistic against, rather than belligerent/domineering
		if = {
			limit = {
				has_attitude = {
					who = scope:target_country
					attitude = antagonistic
				}					
			}
			multiply = 0.25
		}

		# More aggressive against ideological enemies, a bit less aggressive against ideological allies
		if = {
			limit = {
				"ai_ideological_opinion(scope:target_country)" < 0
			}
			
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.2
				add = 1
				max = 4.0
			}				
		}	
		else = {
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.05
				add = 1
				min = 0.5
			}			
		}		
	}

	building_group_weights = {
		bg_army = 1.5
	}
	
	wargoal_scores = {
		annex_country = {
			if = {
				limit = {
					scope:target_country = {
						can_form_nation = CHI
					}
					can_reach_target_country = yes
				}
				add = 300
			}		
		}	
		conquer_state = {
			if = {
				limit = {
					scope:target_state = {				
						state_region = {
							OR = {
								is_homeland = cu:manchu
								is_homeland = cu:han
							}		
						}
					}
					can_reach_target_state = yes
				}
				add = 100
			}
		}
		return_state = {
			if = {
				limit = {
					scope:target_state = {					
						state_region = {
							OR = {
								is_homeland = cu:manchu
								is_homeland = cu:han
							}
						}	
					}
					can_reach_target_state = yes
				}
				add = 200
			}
		}		
	}			
	
	secret_goal_scores = {
		befriend = {		
			if = {
				limit = {
					scope:target_country = {
						can_form_nation = CHI
					}
				}
				add = 150
				
				if = {
					limit = {
						can_reach_target_country = no
					}	
					add = 150
				}	
			}
		}				
		conquer = {				
			if = {
				limit = {
					scope:target_country = {
						can_form_nation = CHI
					}
					can_reach_target_country = yes
				}
				add = 500
			}				
		}			
	}	

	possible = {
		NOT = { exists = c:CHI }
		can_form_nation = CHI	
	}

	weight = {
		value = 50
		
		if = {
			limit = { NOT = { is_country_type = unrecognized } }
			add = 100
		}		
		
		if = {
			limit = { country_rank = rank_value:unrecognized_regional_power }
			add = 25
		}

		if = {
			limit = { country_rank = rank_value:unrecognized_major_power }
			add = 50
		}		
	}
}

ai_strategy_socialism_in_one_country = {
	icon = "gfx/interface/icons/ai_strategy_icons/armed_isolationism.dds"
	
	type = diplomatic

	undesirable_infamy_level = {
		value = 1
	}
	
	unacceptable_infamy_level = {
		value = 25
	}
	
	ideological_opinion_effect_mult = {
		value = 0.75
	}
	
	wargoal_maneuvers_fraction = {
		value = -0.1
	}		
	
	diplomatic_play_neutrality = {
		value = 50
	}
	
	diplomatic_play_boldness = {
		value = 0
	}
	
	recklessness = {
		value = -0.5
	}
	
	aggression = {
		value = 0
	}
	
	building_group_weights = {
		bg_army = 1.25
		bg_technology = 1.25
	}
	
	secret_goal_scores = {
		protect = {
			if = {
				limit = {
					scope:target_country = { has_law = law_type:law_council_republic }
				}
				multiply = 1.5
			}		
			if = {
				limit = {
					has_strategic_adjacency = scope:target_country
					scope:target_country = { has_law = law_type:law_council_republic }
				}
				add = 200
			}	
		}		
		befriend = {		
			if = {
				limit = {
					scope:target_country = { has_law = law_type:law_council_republic }
				}
				add = 200
			}	
		}
	}

	wargoal_weights = {
		conquer_state = 0.0
		make_protectorate = 0.0
		reduce_autonomy = 0.0
		make_tributary = 0.0
	}	
	
	possible = {
		has_law = law_type:law_council_republic
	}
	
	weight = {
		value = 50
		
		if = {
			limit = { is_country_type = unrecognized }
			add = 50
		}
		
		if = {
			limit = { has_law = law_type:law_national_militia }
			add = 50
		}

		if = {
			limit = { has_law = law_type:law_isolationism }
			add = 200
		}	

		if = {
			limit = { country_rank = rank_value:great_power }
			multiply = 0.25
		}			
		
		if = {
			limit = { country_rank = rank_value:major_power }
			multiply = 0.5
		}	
		
		if = {
			limit = { 
				any_country = {
					NOT = {
						THIS = ROOT
					}
					has_strategic_adjacency = ROOT
					has_law = law_type:law_council_republic
					country_rank >= rank_value:great_power
				}
			}
			multiply = 0.05
		}		
		else_if = {
			limit = { 
				any_country = {
					NOT = {
						THIS = ROOT
					}
					has_law = law_type:law_council_republic
					country_rank >= rank_value:great_power
				}
			}
			multiply = 0.25
		}
		else = {
			multiply = 2
		}
	}
}

ai_strategy_world_revolution = {
	icon = "gfx/interface/icons/ai_strategy_icons/revolutionary.dds"
	
	type = diplomatic
	
	undesirable_infamy_level = {
		value = 75
	}
	
	unacceptable_infamy_level = {
		value = 100
	}
	
	ideological_opinion_effect_mult = {
		value = 3
	}
	
	wargoal_maneuvers_fraction = {
		value = 0.25
	}		
	
	diplomatic_play_neutrality = {
		value = 0
	}
	
	diplomatic_play_boldness = {
		value = 75
	}
	
	recklessness = {
		value = 0.5
	}
	
	aggression = {
		value = 1
		
		if = {
			limit = { 
				scope:target_country = { NOT = { has_law = law_type:law_council_republic } } 
			}
			add = 3
		}	

		# Much less aggressive against council republics
		if = {
			limit = {
				scope:target_country = {
					has_law = law_type:law_council_republic	
				}		
			}
			multiply = 0.25
		}	

		# More aggressive against ideological enemies, a bit less aggressive against ideological allies
		if = {
			limit = {
				"ai_ideological_opinion(scope:target_country)" < 0
			}
			
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.2
				add = 1
				max = 4.0
			}				
		}	
		else = {
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.05
				add = 1
				min = 0.5
			}			
		}			
	}

	building_group_weights = {
		bg_army = 1.5
	}
	
	secret_goal_scores = {
		protect = {
			if = {
				limit = {
					scope:target_country = { has_law = law_type:law_council_republic }
				}
				multiply = 1.5
			}		
			if = {
				limit = {
					has_strategic_adjacency = scope:target_country
					scope:target_country = { has_law = law_type:law_council_republic }
				}
				add = 200
			}	
		}		
		befriend = {		
			if = {
				limit = {
					scope:target_country = { has_law = law_type:law_council_republic }
				}
				add = 200
			}	
		}
		dominate = {
			if = {
				limit = {
					has_strategic_adjacency = scope:target_country
					scope:target_country = { NOT = { has_law = law_type:law_council_republic } }
				}
				add = 100
			}
			if = {
				limit = {
					has_strategic_adjacency = scope:target_country
					scope:target_country = { country_rank < root.country_rank }
				}
				multiply = 1.5
			}
		}
		conquer = {
			if = {
				limit = {
					has_strategic_adjacency = scope:target_country
					scope:target_country = { NOT = { has_law = law_type:law_council_republic } }
				}
				add = 50
			}
		}
	}

	wargoal_weights = {
		regime_change = 3.0
		make_protectorate = 1.0
		reduce_autonomy = 1.0
		make_tributary = 1.0
	}	
		
	possible = {
		has_law = law_type:law_council_republic
	}

	weight = {
		value = 25
		
		if = {
			limit = { 
				OR = {
					has_law = law_type:law_professional_army 
					has_law = law_type:law_mass_conscription 
				}
			}
			add = 25
		}

		if = {
			limit = { has_law = law_type:law_isolationism }
			add = -200
		}	

		if = {
			limit = { country_rank = rank_value:great_power }
			multiply = 1.25
		}			
		
		if = {
			limit = { country_rank = rank_value:major_power }
			multiply = 1.10
		}	
		
		if = {
			limit = { 
				any_country = {
					NOT = {
						THIS = ROOT
					}
					has_strategic_adjacency = ROOT
					has_law = law_type:law_council_republic
					country_rank >= rank_value:great_power
				}
			}
			multiply = 1.5
		}		
		else_if = {
			limit = { 
				any_country = {
					NOT = {
						THIS = ROOT
					}
					has_law = law_type:law_council_republic
					country_rank >= rank_value:great_power
				}
			}
			multiply = 1.15
		}
	}
}

ai_strategy_anti_imperialism = {
	icon = "gfx/interface/icons/ai_strategy_icons/protect_region.dds"
	
	type = diplomatic
	
	undesirable_infamy_level = {
		value = 25
	}
	
	unacceptable_infamy_level = {
		value = 50
	}
	
	ideological_opinion_effect_mult = {
		value = 1.5
	}
	
	wargoal_maneuvers_fraction = {
		value = -0.1
	}	
	
	diplomatic_play_neutrality = {
		value = 0
	}
	
	diplomatic_play_boldness = {
		value = -25
	}
	
	recklessness = {
		value = -0.25
	}
	
	aggression = {
		value = 0.25	

		if = {
			limit = {
				scope:target_country = {
					is_diplomatic_play_initiator = yes
					scope:target_country = { is_country_type = recognized } 
					any_enemy_in_diplo_play = {
						is_country_type = unrecognized
					}
				}
			}
			add = 1
		}

		if = {
			limit = { 
				scope:target_country = { NOT = { has_law = law_type:law_council_republic } } 
			}
			multiply = 2
		}

		# Less aggressive against countries we're just antagonistic against, rather than belligerent/domineering
		if = {
			limit = {
				has_attitude = {
					who = scope:target_country
					attitude = antagonistic
				}					
			}
			multiply = 0.1
		}

		# Less aggressive against unrecognized powers
		if = {
			limit = {
				scope:target_country = { 
					is_country_type = unrecognized
					NOT = {
						relations:root <= relations_threshold:poor
					}		 
				}	
			}
			multiply = 0.25
		}

		# More aggressive against colonial powers

		if = {
			limit = {
				scope:target_country = { 
					is_country_type = colonial 
				}	
			}
			multiply = 2
		}

		# More aggressive against ideological enemies, a bit less aggressive against ideological allies
		if = {
			limit = {
				"ai_ideological_opinion(scope:target_country)" < 0
			}
			
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.2
				add = 1
				max = 4.0
			}				
		}	
		else = {
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.05
				add = 1
				min = 0.5
			}			
		}		
	}
	 
	building_group_weights = {
		bg_technology = 1.25
	}
	
	secret_goal_scores = {
		protect = {
			if = {
				limit = {
					scope:target_country = { has_law = law_type:law_council_republic }
				}
				multiply = 1.5
			}		
			if = {
				limit = {
					scope:target_country = { has_law = law_type:law_council_republic }
				}
				add = 50
			}		
			if = {
				limit = {
					scope:target_country = { is_country_type = unrecognized }
				}
				add = 50
			}	
		}		
		befriend = {		
			if = {
				limit = {
					scope:target_country = { has_law = law_type:law_council_republic }
				}
				add = 100
			}	
			if = {
				limit = {
					scope:target_country = { is_country_type = unrecognized }
				}
				add = 50
			}
		}
		antagonize = {
			if = {
				limit = {
					has_strategic_adjacency = scope:target_country
					scope:target_country = { 
						OR = { 
							has_strategy = ai_strategy_economic_imperialism 
							has_strategy = ai_strategy_territorial_expansion 
						}
					}
				}
				add = 50
			}
			if = {
				limit = {
					is_country_type = colonial
				}
				add = 25
			}
		}
	}
	
	wargoal_weights = {
		regime_change = 1.5
		humiliation = 1.5
		liberate_subject = 5.0
		liberate_country = 3.0
	}

	possible = {
		has_law = law_type:law_council_republic
	}
	
	weight = {
		value = 10
		
		if = {
			limit = { country_rank >= rank_value:major_power }
			add = 25
		}
	}
}

ai_strategy_restore_natural_borders = {
	icon = "gfx/interface/icons/ai_strategy_icons/protect_region.dds"
	
	type = diplomatic
	
	undesirable_infamy_level = {
		value = 50
	}
	
	unacceptable_infamy_level = {
		value = 100
	}
	
	ideological_opinion_effect_mult = {
		value = 0.75
	}
	
	wargoal_maneuvers_fraction = {
		value = 0.15
	}		
	
	diplomatic_play_neutrality = {
		value = 25
	}
	
	diplomatic_play_boldness = {
		value = 25
	}
	
	recklessness = {
		value = 0.25
	}
	
	aggression = {
		value = 1
		
		if = {
			limit = { 
				NOT = { is_country_type = unrecognized }
				scope:target_country = { is_country_type = unrecognized } 
			}
			add = 1
		}	

		if = {
			limit = { 
				scope:target_country = { 
					any_scope_state = {
						OR = {
							state_region = s:STATE_NORTH_RHINE
							state_region = s:STATE_RHINELAND
							state_region = s:STATE_ALSACE_LORRAINE
						}
					}
				} 
			}
			add = 3
		}

		# Less aggressive against countries we're just antagonistic against, rather than belligerent/domineering
		if = {
			limit = {
				has_attitude = {
					who = scope:target_country
					attitude = antagonistic
				}					
			}
			multiply = 0.75
		}	

		# More aggressive against ideological enemies, a bit less aggressive against ideological allies
		if = {
			limit = {
				"ai_ideological_opinion(scope:target_country)" < 0
			}
			
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.2
				add = 1
				max = 4.0
			}				
		}	
		else = {
			multiply = {
				value = "ai_ideological_opinion(scope:target_country)"
				multiply = -0.05
				add = 1
				min = 0.5
			}			
		}			
	}

	building_group_weights = {
		bg_army = 1.5
	}
	
	secret_goal_weights = {
		protect = 0.5
		conquer = 1.5
	}

	wargoal_weights = {
		conquer_state = 1.5
		return_state = 1.5
	}

	secret_goal_scores = {
		conquer = {
			if = {
				limit = {
					can_reach_target_country = yes
					has_strategic_adjacency = scope:target_country
					scope:target_country.country_rank <= root.country_rank
				}
				
				if = {
					limit = {
						NOT = { is_country_type = unrecognized }
						scope:target_country = { NOT = { is_country_type = unrecognized } }
					}
					add = 25
				}		
				else_if = {
					limit = {				
						scope:target_country = { is_country_type = unrecognized }						
					}
					add = 50
				}
			}
			if = {
				limit = { 
					scope:target_country = { 
						any_scope_state = {
							OR = {
								state_region = s:STATE_NORTH_RHINE
								state_region = s:STATE_RHINELAND
								state_region = s:STATE_ALSACE_LORRAINE
							}
						}
					} 
				}
				add = 75
			}
		}
	}
		
	possible = {
		always = yes
	}

	weight = {
		value = 10

		if = {
			limit = { 
				c:FRA ?= THIS
				has_journal_entry = je_french_natural_borders
			}
			add = 25
		}

		if = {
			limit = { 
				exists = c:FRA
				c:FRA = this
				ruler = {
					has_variable = bonapartist_leader
				}
			}
			add = 5
		}
			
		if = {
			limit = { ig:ig_armed_forces = { is_powerful = yes } }
			multiply = 1.5
		}			
		
		if = {
			limit = { 
				NOT = {
					c:FRA ?= THIS
				}
			}
			multiply = 0
		}	
		
		if = {
			limit = { has_law = law_type:law_council_republic }
			multiply = 0.5
		}
	}
}