IRQ_historical_plan = {
	name = "Iraq Historical Plan"
	desc = ""

	allowed = {
		original_tag = IRQ
		has_dlc = "Graveyard of Empires"
	}
	enable = {
		OR = {
			AND = {
				is_historical_focus_on = yes 
				has_game_rule = {
					rule = IRQ_AI_BEHAVIOR
					option = DEFAULT
				}
			}
			has_country_flag = IRQ_AI_RANDOM_HISTORICAL
			has_game_rule = {
				rule = IRQ_ai_behavior
				option = HISTORICAL
			}
			NOT = {
			    AND = {
			        NOT = { has_completed_focus = IRQ_revoke_anglo_iraq_treaty }
			        IRQ = { surrender_progress > 0.1  }
					}	
			}	
		}	
	}
	abort = {
		is_subject = yes 
		has_war = no 
		OR = {
			AND = {
			    has_completed_focus = IRQ_revoke_anglo_iraq_treaty 
			    IRQ = { surrender_progress > 0.1  }
				}
		}			    
	}

	ai_national_focuses = {
		
		#1936
		IRQ_ensure_sunni_dominance # 35
		IRQ_party_of_national_brotherhood
		IRQ_royal_iraqi_army
		IRQ_infantry_focus		
		IRQ_bakr_sidqi_coup
		IRQ_raf_levies_focus

		
		#1937
		IRQ_decouple_from_the_pound
		IRQ_strengthen_the_iraqi_dinar
		IRQ_heavy_industry_investments	 	
		IRQ_assasination_of_sidqi
		IRQ_baghdad_colleges_of_engineering_and_education		
		IRQ_found_the_iraqi_state_railways
		IRQ_purchase_foreign_equipment

		#1938
		IRQ_found_southern_steel_plants		
		IRQ_local_arms_industry
		IRQ_invest_in_ordnance_mountain_howitzers
		IRQ_expand_habbaniya_airbase		
		IRQ_independent_flight_schools
		IRQ_purchase_british_aircraft
		IRQ_al_muthanna_club

		#1939
		IRQ_construct_the_kut_barrage
        IRQ_found_the_state_company_for_iron_and_steel
		IRQ_construct_the_dukan_dam
		IRQ_modernization
		IRQ_purchase_armored_equipment
		IRQ_cavalry_integration		

		#1940
		IRQ_forceful_industrialization
		IRQ_strengthen_mesopotamian_farming
		IRQ_anglo_iraqi_oil_expansion		
		IRQ_refuge_for_the_grand_mufti
		IRQ_finish_the_berlin_baghdad_railway
		IRQ_purchase_mechanized_equipment

		#1941
		IRQ_strengthen_the_golden_square
		IRQ_revoke_anglo_iraq_treaty
		IRQ_fligerfuhrer_irak
		IRQ_restore_regent
		IRQ_refuge_for_the_grand_mufti
		IRQ_suppress_tribal_revolts
		IRQ_anglo_iraqi_oil_expansion
		IRQ_support_the_allied_war_effort
		IRQ_renegotiate_treaty		
		IRQ_allied_training
		IRQ_training
		IRQ_army_research_bonus		

		#1942
		IRQ_extensive_irrigation_projects
		IRQ_rural_electrification
		IRQ_fighter_training
		IRQ_kurdish_outreach
		IRQ_establish_iraqi_coastal_defense_force
		IRQ_create_repair_yards
		
		#1943
		IRQ_form_the_independent_mechanized_brigade
		IRQ_expand_oil_production
		IRQ_scavenging
		IRQ_expand_camel_corps
		IRQ_invite_foreign_advisors
		IRQ_purchase_small_ships
		
		#1944
		IRQ_fighter_training
		IRQ_air_research_bonus
		IRQ_naval_air_support
		IRQ_bomber_training

	}

	focus_factors = {
		
	}

	research = {

	}

	ideas = {

	}

	# Keep small, as it is used as a factor for some things (such as research needs)
	# Recommended around 1.0. Useful for relation between plans
	weight = {
		factor = 1.0
		modifier = {
			factor = 1.0
		}
	}

}

#EAI_iraq_restore_regent = {
#	name = "restore regent"
#	desc = ""
#
#	enable = {
#		original_tag = IRQ
#		has_dlc = "Graveyard of Empires"
#		OR = {
#			AND = {
#				is_historical_focus_on = yes
#				has_game_rule = {
#					rule = IRQ_AI_BEHAVIOR
#					option = DEFAULT
#				}
#			}
#		}
#
#		date > 1941.1.1
#
#		NOT = { has_completed_focus = IRQ_restore_regent }
#
#		IRQ = { has_capitulated = yes  }
#
#		NOT = {
#			ENG = { has_capitulated = yes }
#		}
#	}
#	abort = {
#		OR = {
#			AND = {
#				NOT = {
#					AND = {
#						date > 1941.1.1
#
#						NOT = { has_completed_focus = IRQ_restore_regent }
#
#						IRQ = { has_capitulated = yes  }
#
#						NOT = {
#							ENG = { has_capitulated = yes }
#						}
#					}
#				}
#			}
#		}
#	}
#
#	ai_national_focuses = {
#		IRQ_restore_regent # Become Puppet
#	}
#	focus_factors = {
#		IRQ_restore_regent = 10000
#	}
#}

EAI_iraq_restore_regent_surrender_progress = {
	name = "restore regent"
	desc = ""

	enable = {
		original_tag = IRQ
		has_dlc = "Graveyard of Empires"
		OR = {
			AND = {
				is_historical_focus_on = yes
				has_game_rule = {
					rule = IRQ_AI_BEHAVIOR
					option = DEFAULT
				}
			}
		}

		date > 1941.1.1

		NOT = { has_completed_focus = IRQ_restore_regent }

		IRQ = { surrender_progress > 0.1  }

		NOT = {
			ENG = { has_capitulated = yes }
		}
	}
	abort = {
		OR = {
		    IRQ = { surrender_progress < 0.1  }
			AND = {
				NOT = {
					AND = {
						date > 1941.1.1

						NOT = { has_completed_focus = IRQ_restore_regent }

						NOT = {
							ENG = { has_capitulated = yes }
						}
					}
				}
			}
		}
	}

	ai_national_focuses = {
		IRQ_restore_regent # Become Puppet
	}
	focus_factors = {
		IRQ_restore_regent = 10000
	}
}
