political_actions = {

	IRQ_nationalise_the_oil = {

		icon = generic_prepare_civil_war

		allowed = {
			original_tag = IRQ
			NOT = { has_dlc = "Graveyard of Empires" }
		}

		visible = {
			
		}

		available = {
			controls_state = 676
			controls_state = 291
			controls_state = 1011
		}
		
		cost = 50

		fire_only_once = yes

		ai_will_do = {
			factor = 0
			modifier = {
				add = 9999
				is_historical_focus_on = yes
				any_country = {
					is_allied_ai = yes
					is_ai = no
				}
				NOT = {
					any_country = {
						is_axis_ai = yes
						is_ai = no
					}
				}
			}
		}

		complete_effect = { #TODO_ASD notification event for England

			add_war_support = 0.1

			ENG = { 
				remove_resource_rights = 676
				remove_resource_rights = 291
				remove_resource_rights = 1010
			}

		}
	}

}	

IRQ_arab_free_legion_cat = {
	IRQ_recruit_arab_free_legion = {
		icon = GFX_decision_generic_prepare_civil_war
	
		allowed = {
			original_tag = IRQ
		}
		
		visible = {
			hidden_trigger = { #Otherwise this will show up in the cancel trigger tooltip
				has_completed_focus = IRQ_arab_free_legion
				OR = {
					has_government = fascism
					has_government = neutrality
				}
			}
			NOT = { 
				FROM = { has_state_flag = IRQ_recruited_arab_legion_here }
				has_war_with = FROM.owner
			}

		}
		available = {
			FROM = {
				NOT = {
					has_state_flag = IRQ_recruited_arab_legion_here
				}
			}
			NOT = { has_country_flag = IRQ_recruiting_arab_legion }
			
			has_equipment = {
				infantry_equipment > 1999
			}	
		}

		target_root_trigger = {
			original_tag = IRQ

		}
		state_target = yes
		targets = { 292 455 454 677 553 907 448 458 459 461 293 294	658 765 656 }
	    target_trigger = {   
	    }
	    on_map_mode = map_and_decisions_view 
		custom_cost_trigger = {
			command_power > 24.9
		}
		custom_cost_text = BRA_decision_cost_cangaceiro
		
		fire_only_once = yes
		days_remove = 30
		cancel_if_not_visible = yes
		complete_effect = {
			add_command_power = -25
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = -2000
			}
			hidden_effect = {
				set_country_flag = IRQ_recruiting_arab_legion
			}
		}
		remove_effect = {
			hidden_effect = {
				clr_country_flag = IRQ_recruiting_arab_legion
				FROM = {
					set_state_flag = IRQ_recruited_arab_legion_here
				}
			}
			capital_scope = {
				IRQ_create_arab_free_legion_div = yes
			}
		}

		cancel_effect = {
			hidden_effect = {
				clr_country_flag = IRQ_recruiting_arab_legion
			}
		}
	}
}

greater_iraq_decision_cat = {
	IRQ_core_state = {
		icon = GFX_decision_infiltrate_state
	
		allowed = {
			original_tag = IRQ
		}
		
		visible = {
			has_completed_focus = IRQ_greater_iraq
		}
		available = {
			NOT = { has_country_flag = IRQ_coring_state_in_progress }
		}

		target_root_trigger = { original_tag = IRQ }

		state_target = any_owned_state
	    
	    target_trigger = {
	        FROM = {
	        	NOT = { is_core_of = ROOT }
	        	is_fully_controlled_by = ROOT
	        	OR = {
	        		is_core_of = KUW
	        		is_core_of = SYR
	        		is_core_of = LEB
	        		is_core_of = PAL
	        		is_core_of = JOR
	        		state = 413
	        	}
	        }
	    }
	    on_map_mode = map_and_decisions_view 
	    cost = 50		
		fire_only_once = yes
		days_remove = 30
		complete_effect = {
			hidden_effect = {
				set_country_flag = { flag = IRQ_coring_state_in_progress value = 1 days = 31 }
			}
		}
		remove_effect = {
			hidden_effect = {
				clr_country_flag = IRQ_coring_state_in_progress
			}
			FROM = {
				add_core_of = ROOT
			}
		}

		cancel_trigger = {
			FROM = {
				NOT = { is_fully_controlled_by = ROOT }
			}
		}

		cancel_effect = {
			hidden_effect = {
				clr_country_flag = IRQ_coring_state_in_progress
			}
		}
	}
}

united_arab_republic_cat = {
	united_arab_rep_core_state = {
		icon = GFX_decision_infiltrate_state
	
		allowed = {
			original_tag = IRQ
		}
		
		visible = {
			has_completed_focus = IRQ_proclaim_united_arab_republic
		}
		available = {
			NOT = { has_country_flag = IRQ_coring_state_in_progress }
		}
		state_target = any_owned_state
	    target_trigger = {
	        FROM = {
	        	NOT = { is_core_of = ROOT }
	        	is_owned_and_controlled_by = ROOT
	        	OR = {
	        		#Middle East:
	        		region = 28
	        		region = 232
	        		region = 196
	        		region = 236
	        		region = 237
	        		region = 238
	        		#And North Africa:
	        		region = 225
	        		region = 126
	        		region = 182
	        		region = 128
	        	}
	        }
	    }
	    on_map_mode = map_and_decisions_view 
	    cost = 50		
		fire_only_once = yes
		days_remove = 30
		complete_effect = {
			hidden_effect = {
				set_country_flag = { flag = IRQ_coring_state_in_progress value = 1 days = 31 }
			}
		}
		remove_effect = {
			hidden_effect = {
				clr_country_flag = IRQ_coring_state_in_progress
			}
			FROM = {
				add_core_of = ROOT
			}
		}

		cancel_trigger = {
			NOT = {
				FROM = {
					is_fully_controlled_by = ROOT
				}
			} 
		}

		cancel_effect = {
			hidden_effect = {
				clr_country_flag = IRQ_coring_state_in_progress
			}
		}
	}
}


hashemite_federation_cat = {
	IRQ_invite_to_federation = {
		icon = GFX_decision_infiltrate_state
	
		allowed = {
			original_tag = IRQ
		}
		
		visible = {
			has_completed_focus = IRQ_expand_membership
			OR = {
				has_government = democratic
				has_government = neutrality
			}
		}
		available = {
			NOT = { has_country_flag = IRQ_inviting_to_federation_in_progress }
			FROM = {
				OWNER = {
					NOT = {
						has_country_flag = IRQ_has_permanently_rejected_fed
					}
				}
			}
		}
		state_target = middle_east
	    target_trigger = {
	        FROM = {
	        	is_capital = yes
	        	OWNER = {
	        		is_subject = no
	        		exists = yes
	        		NOT = {
	        			original_tag = ROOT
	        			has_war_with = ROOT
	        		}
	        	}
	        	OR = {
	        		region = 28
	        		region = 232
	        		region = 237
	        		region = 196
	        		region = 236
	        		region = 238
					region = 240
	        	}
	        }
	    }
	    on_map_mode = map_and_decisions_view 
	    cost = 25
		fire_only_once = yes
		days_remove = 30
		complete_effect = {
			set_country_flag = { flag = IRQ_inviting_to_federation_in_progress value = 1 days = 31 }
		}
		remove_effect = {
			clr_country_flag = IRQ_inviting_to_federation_in_progress
			FROM = {
				OWNER = {
					country_event = {
						id = IRQ_political_events.26
						hours = 1
					}
				}
			}
			custom_effect_tooltip = generic_higher_opinion_tt
		}

		cancel_trigger = {
			FROM = {
				OWNER = {
					OR = {
						exists = no
						is_subject = yes
						has_war_with = ROOT
					}
				}
			} 
		}

		cancel_effect = {
			hidden_effect = {
				clr_country_flag = IRQ_inviting_to_federation_in_progress
			}
		}
	}
	IRQ_invite_to_federation_africa = {
		icon = GFX_decision_infiltrate_state
	
		allowed = {
			original_tag = IRQ
		}
		
		visible = {
			has_completed_focus = IRQ_expand_membership
			OR = {
				has_government = democratic
				has_government = neutrality
			}
		}
		available = {
			NOT = { has_country_flag = IRQ_inviting_to_federation_in_progress }
			FROM = {
				OWNER = {
					NOT = {
						has_country_flag = IRQ_has_permanently_rejected_fed
					}
				}
			}
		}
		state_target = africa
	    target_trigger = {
	        FROM = {
	        	is_capital = yes
	        	OWNER = {
	        		is_subject = no
	        		exists = yes
	        		NOT = {
	        			original_tag = ROOT
	        			has_war_with = ROOT
	        		}
	        	}
	        	OR = {
	        		region = 128 
					region = 225
					region = 126
					region = 182
	        	}
	        }
	    }
	    on_map_mode = map_and_decisions_view 
	    cost = 25
		fire_only_once = yes
		days_remove = 30
		complete_effect = {
			set_country_flag = IRQ_inviting_to_federation_in_progress
		}
		remove_effect = {
			clr_country_flag = IRQ_inviting_to_federation_in_progress
			FROM = {
				OWNER = {
					country_event = {
						id = IRQ_political_events.26
						hours = 1
					}
				}
			}
			custom_effect_tooltip = generic_higher_opinion_tt
		}

		cancel_trigger = {
			FROM = {
				OWNER = {
					OR = {
						exists = no
						is_subject = yes
						has_war_with = ROOT
					}
				}
			} 
		}

		cancel_effect = {
			hidden_effect = {
				clr_country_flag = IRQ_inviting_to_federation_in_progress
			}
		}
	}
}

IRQ_flood_the_plains_cat = {
	
	IRQ_flood_the_plains = {

		icon = hol_inundate_water_lines

		allowed = {
			original_tag = IRQ
		}

		available = {
			has_war = yes
			ROOT = {
				controls_province = 2097 #Just Baghdad
			}
		}

		cost = 50

		fire_only_once = yes

		days_remove = 120

		highlight_states = {
			highlight_state_targets = { state = 291 state = 1011 }
			highlight_provinces = {
				12839
				3795
				12046
				7994
				10876
				2097
				###
				2089
				8001
				2004
				12726
				7977
			}
			highlight_only_provinces = yes
		}

		modifier = {
		}

		visible = {
			IRQ = { has_completed_focus = IRQ_construct_the_kut_barrage }
		}
		
		complete_effect = {
			291 = {
				add_province_modifier = {
					static_modifiers = { flooded }
					province = {
						id = 12839
						id = 3795
						id = 12046
						id = 7994
						id = 10876
						id = 2097
					}
				}
				damage_building = {
					type = infrastructure
					damage = 2
				}
				damage_building = {
					type = industrial_complex
					damage = 0.5
				}
				damage_building = {
					type = arms_factory
					damage = 0.5
				}
			}
			1011 = {
				add_province_modifier = {
					static_modifiers = { flooded }
					province = {
						id = 2089
						id = 8001
						id = 2004
						id = 12726
						id = 7977
					}
				}
				damage_building = {
					type = infrastructure
					damage = 2
				}
				damage_building = {
					type = industrial_complex
					damage = 0.5
				}
				damage_building = {
					type = arms_factory
					damage = 0.5
				}
			}
		}
		
		remove_effect = {
			custom_effect_tooltip = remove_flooding_tt
			hidden_effect = {
				291 = {
					remove_province_modifier = {
						static_modifiers = { flooded }
						province = {
							id = 12839
							id = 3795
							id = 12046
							id = 7994
							id = 10876
							id = 2097
						}
					}
				}
				1011 = {
					remove_province_modifier = {
						static_modifiers = { flooded }
						province = {
							id = 2089
							id = 8001
							id = 2004
							id = 12726
							id = 7977
						}
					}
				}
			}
		}
		
		ai_will_do = {
			modifier = {
				add = 50
				surrender_progress > 0.15 #Should kick in if Basrah/Najaf are occupied
			}
		}

	}
}