﻿#########################
#	AC mod - events		#
#########################

add_namespace = ai_strategy

#sets countries not to build unit unless at war, being justified on, is Salafist or high world tension
country_event = {
	id = ai_strategy.1
	
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		log = "[GetDateText]: [This.GetName]: ai_strategy.1 imediate effect executed"
		IF = {
			limit = {
				OR = {
					any_other_country = {
						OR = {
							NOT = {
								is_justifying_wargoal_against = this
								has_wargoal_against = this
							}
						}
					}
					has_war = no
					threat < 0.30
					is_bad_salafist = no
				}
			}
			add_ai_strategy = { type = role_ratio id = L_Inf value = -500 }
			add_ai_strategy = { type = role_ratio id = infantry value = -500 }
			add_ai_strategy = { type = role_ratio id = garrison value = -500 }
			add_ai_strategy = { type = role_ratio id = mechanized value = -500 }
			add_ai_strategy = { type = role_ratio id = armor value = -500 }
			add_ai_strategy = { type = role_ratio id = marines value = -500 }
			add_ai_strategy = { type = role_ratio id = Air_assault value = -500 }
			add_ai_strategy = { type = role_ratio id = Air_Inf value = -500 }
			add_ai_strategy = { type = role_ratio id = Special_Forces value = -500 }
		}
	}
	option = { name = ai_strategy.1.a log = "[GetDateText]: [This.GetName]: ai_strategy.1.a option executed" }
}

#sets African relations AI strategy on init
country_event = {
	id = ai_strategy.2
	
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = { is_african_nation = yes }
			log = "[GetDateText]: [This.GetName]: ai_strategy.1 imediate effect executed"
			add_ai_strategy = { type = befriend id = "HAM" value = 15 }
			add_ai_strategy = { type = befriend id = "GAH" value = 15 }
			add_ai_strategy = { type = befriend id = "SIE" value = 15 }
			add_ai_strategy = { type = befriend id = "MOR" value = 15 }
			add_ai_strategy = { type = befriend id = "ALG" value = 15 }
			add_ai_strategy = { type = befriend id = "TUN" value = 15 }
			add_ai_strategy = { type = befriend id = "MAU" value = 15 }
			add_ai_strategy = { type = befriend id = "MAL" value = 15 }
			add_ai_strategy = { type = befriend id = "SEN" value = 15 }
			add_ai_strategy = { type = befriend id = "GAM" value = 15 }
			add_ai_strategy = { type = befriend id = "GUB" value = 15 }
			add_ai_strategy = { type = befriend id = "GUI" value = 15 }
			add_ai_strategy = { type = befriend id = "CDI" value = 15 }
			add_ai_strategy = { type = befriend id = "BFA" value = 15 }
			add_ai_strategy = { type = befriend id = "BEN" value = 15 }
			add_ai_strategy = { type = befriend id = "TOG" value = 15 }
			add_ai_strategy = { type = befriend id = "NIG" value = 15 }
			add_ai_strategy = { type = befriend id = "NGR" value = 15 }
			add_ai_strategy = { type = befriend id = "CAM" value = 15 }
			add_ai_strategy = { type = befriend id = "CAR" value = 15 }
			add_ai_strategy = { type = befriend id = "CHA" value = 15 }
			add_ai_strategy = { type = befriend id = "SUD" value = 15 }
			add_ai_strategy = { type = befriend id = "SSU" value = 15 }
			add_ai_strategy = { type = befriend id = "ERI" value = 15 }
			add_ai_strategy = { type = befriend id = "DJI" value = 15 }
			add_ai_strategy = { type = befriend id = "SOM" value = 15 }
			add_ai_strategy = { type = befriend id = "EGU" value = 15 }
			add_ai_strategy = { type = befriend id = "SAO" value = 15 }
			add_ai_strategy = { type = befriend id = "KEN" value = 15 }
			add_ai_strategy = { type = befriend id = "UGA" value = 15 }
			add_ai_strategy = { type = befriend id = "TNZ" value = 15 }
			add_ai_strategy = { type = befriend id = "GAB" value = 15 }
			add_ai_strategy = { type = befriend id = "CNG" value = 15 }
			add_ai_strategy = { type = befriend id = "RWA" value = 15 }
			add_ai_strategy = { type = befriend id = "BUR" value = 15 }
			add_ai_strategy = { type = befriend id = "DRC" value = 15 }
			add_ai_strategy = { type = befriend id = "AGL" value = 15 }
			add_ai_strategy = { type = befriend id = "ZAM" value = 15 }
			add_ai_strategy = { type = befriend id = "MLW" value = 15 }
			add_ai_strategy = { type = befriend id = "MOZ" value = 15 }
			add_ai_strategy = { type = befriend id = "ZIM" value = 15 }
			add_ai_strategy = { type = befriend id = "BOT" value = 15 } 
			add_ai_strategy = { type = befriend id = "SWA" value = 15 }
			add_ai_strategy = { type = befriend id = "LES" value = 15 }
			add_ai_strategy = { type = befriend id = "SML" value = 15 }
			add_ai_strategy = { type = befriend id = "MAD" value = 15 }
			add_ai_strategy = { type = befriend id = "COM" value = 15 }
			add_ai_strategy = { type = befriend id = "MRT" value = 15 }
			add_ai_strategy = { type = befriend id = "SEY" value = 15 }
			add_ai_strategy = { type = befriend id = "STH" value = 15 }
			add_ai_strategy = { type = befriend id = "VER" value = 15 }
			add_ai_strategy = { type = befriend id = "CNR" value = 15 }
			add_ai_strategy = { type = befriend id = "NAM" value = 15 }
			add_ai_strategy = { type = befriend id = "SHA" value = 15 }
			add_ai_strategy = { type = befriend id = "ETH" value = 15 }
			add_ai_strategy = { type = befriend id = "SAF" value = 15 }
			add_ai_strategy = { type = befriend id = "LBA" value = 15 }
			add_ai_strategy = { type = befriend id = "EGY" value = 15 }
		}
	}
	option = { name = ai_strategy.2.a log = "[GetDateText]: [This.GetName]: ai_strategy.2.a option executed" }	
}