####################################
######## purchase_colonies #########
####################################

per_purchase_colonies = {
	
	per_purchase_kuwait = {
		icon = GFX_decision_icon_default
		
		available = {
			NOT = { has_idea = purchase_of_colony }
		}
		
		fire_only_once = yes
		#days_re_enable = 5
		
		visible = {
			ROOT = {
				always = yes
			}
		}
		
		cost = 150
		
		complete_effect = {
			ENG = {
				country_event = iran.9
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	per_purchase_syria = {
		icon = GFX_decision_icon_default
		
		available = {
			NOT = { has_idea = purchase_of_colony }
		}
		
		fire_only_once = yes
		#days_re_enable = 5
		
		visible = {
			ROOT = {
				always = yes
			}
		}
		
		cost = 150
		
		complete_effect = {
			
			if = {
				limit = {
					FRA = { owns_state = 680 }
				}
				FRA = { country_event = iran.12 }
			}
			else = {
				random_neighbor_country = { 
					limit = {
						owns_state = 680
					}
					country_event = iran.12
				}
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	per_purchase_jordan = {
		icon = GFX_decision_icon_default
		
		available = {
			NOT = { has_idea = purchase_of_colony }
		}
		
		fire_only_once = yes
		#days_re_enable = 5
		
		visible = {
			ROOT = {
				always = yes
			}
		}
		
		cost = 150
		
		complete_effect = {
			if = {
				limit = {
					ENG = { owns_state = 455 }
				}
				ENG = { country_event = iran.15 }
			}
			else = {
				random_neighbor_country = { 
					limit = {
						owns_state = 455
					}
					country_event = iran.15
				}
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	per_purchase_palestine = {
		icon = GFX_decision_icon_default
		
		available = {
			NOT = { has_idea = purchase_of_colony }
		}
		
		fire_only_once = yes
		#days_re_enable = 5
		
		visible = {
			ROOT = {
				always = yes
			}
		}
		
		cost = 150
		
		complete_effect = {
			if = {
				limit = {
					ENG = { owns_state = 454 }
				}
				ENG = { country_event = iran.18 }
			}
			else = {
				random_neighbor_country = { 
					limit = {
						owns_state = 454
					}
					country_event = iran.18
				}
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
	
	per_purchase_sinai = {
		icon = GFX_decision_icon_default
		
		available = {
			NOT = { has_idea = purchase_of_colony }
		}
		
		fire_only_once = yes
		#days_re_enable = 5
		
		visible = {
			ROOT = {
				always = yes
			}
		}
		
		cost = 150
		
		complete_effect = {
			if = {
				limit = {
					ENG = { owns_state = 453 }
				}
				ENG = { country_event = iran.21 }
			}
			else = {
				random_neighbor_country = { 
					limit = {
						owns_state = 453
					}
					country_event = iran.21
				}
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}

	per_purchase_Aden = {
		icon = GFX_decision_icon_default
		
		available = {
			NOT = { has_idea = purchase_of_colony }
		}
		
		fire_only_once = yes
		#days_re_enable = 5
		
		visible = {
			ROOT = {
				always = yes
			}
		}
		
		cost = 150
		
		complete_effect = {
			if = {
				limit = {
					ENG = { owns_state = 659 }
				}
				ENG = { country_event = iran.24 }
			}
			else = {
				random_neighbor_country = { 
					limit = {
						owns_state = 659
					}
					country_event = iran.24
				}
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}

	per_purchase_gulf = {
		icon = GFX_decision_icon_default
		
		available = {
			NOT = { has_idea = purchase_of_colony }
		}
		
		fire_only_once = yes
		#days_re_enable = 5
		
		visible = {
			ROOT = {
				always = yes
			}
		}
		
		cost = 150
		
		complete_effect = {
			if = {
				limit = {
					ENG = { owns_state = 658 owns_state = 765 }
				}
				ENG = { country_event = iran.27 }
			}
			else = {
				random_neighbor_country = { 
					limit = {
						owns_state = 658
						owns_state = 765
					}
					country_event = iran.27
				}
			}
		}
		
		ai_will_do = {
			factor = 10
		}
	}
}

###########################################
###### planned offensive & execution ######
###########################################

per_planned_offensives = {
	per_prepare_offensive1 = {
		icon = GFX_decision_icon_default

		available = {
			has_manpower > 10000
			num_of_civilian_factories > 10
		}
		
		fire_only_once = no
		#days_re_enable = 5
		
		visible = {
			NOT = { has_idea = planned_offensive1 }
			NOT = { has_idea = planned_offensive2 }
			NOT = { has_idea = planned_offensive3 }
			NOT = { has_idea = planned_offensive4 }
		}
		
		days_remove = 30
		
		cost = 50
		
		modifier = {
			consumer_goods_factor = 0.05
			industrial_capacity_factory = -0.05
			fuel_gain_factor = -0.05
		}
		
		complete_effect = {
			add_manpower = -10000
		}
		
		remove_effect = {
			add_ideas = planned_offensive1
		}
		
		ai_will_do = {
			factor = 0
		}
	}
	
	per_prepare_offensive2 = {
		icon = GFX_decision_icon_default

		available = {
			has_manpower > 20000
			num_of_civilian_factories > 20
		}
		
		fire_only_once = no
		#days_re_enable = 5
		
		visible = {
			has_idea = planned_offensive1
		}
		
		cost = 100
		
		days_remove = 30
		
		complete_effect = {
			add_manpower = -20000
		}
		
		modifier = {
			consumer_goods_factor = 0.075
			industrial_capacity_factory = -0.1
			fuel_gain_factor = -0.1
		}
		
		remove_effect = {
			swap_ideas = { 
				remove_idea = planned_offensive1
				add_idea = planned_offensive2
			}
		}
		
		ai_will_do = {
			factor = 0
		}
	}
	
	per_prepare_offensive3 = {
		icon = GFX_decision_icon_default
		
		available = {
			has_manpower > 30000
			num_of_civilian_factories > 30
		}
		
		fire_only_once = no
		#days_re_enable = 5
		
		visible = {
			has_idea = planned_offensive2
		}
		
		cost = 150
		
		days_remove = 30
		
		modifier = {
			consumer_goods_factor = 0.1
			industrial_capacity_factory = -0.15
			fuel_gain_factor = -0.15
		}
		
		complete_effect = {
			add_manpower = -30000
		}
		
		remove_effect = {
			swap_ideas = { 
				remove_idea = planned_offensive2
				add_idea = planned_offensive3
			}
		}
		
		ai_will_do = {
			factor = 0
		}
	}
	
	per_prepare_offensive4 = {
		icon = GFX_decision_icon_default
		

		available = {
			has_manpower > 40000
			num_of_civilian_factories > 40
		}
		
		fire_only_once = no
		#days_re_enable = 5
		
		visible = {
			has_idea = planned_offensive3
		}
		
		cost = 200
		
		days_remove = 30
		
		modifier = {
			consumer_goods_factor = 0.125
			industrial_capacity_factory = -0.2
			fuel_gain_factor = -0.2
		}
		
		complete_effect = {
			add_manpower = -40000
		}
		
		remove_effect = {
			swap_ideas = { 
				remove_idea = planned_offensive3
				add_idea = planned_offensive4
			}
		}
		
		ai_will_do = {
			factor = 0
		}
	}
}


per_execute_offensive = {
	per_execute_small_offensive = {
		icon = GFX_decision_icon_default

		available = {
			has_war_support > 0.3
		}
		
		fire_only_once = no
		#days_re_enable = 5
		
		visible = {
			has_idea = planned_offensive1
		}
		
		cost = 0
		
		days_remove = 60
		
		complete_effect = {
			remove_ideas = planned_offensive1
		}
		
		remove_effect = {
			add_timed_idea = { idea = small_offensive days = 60}
		}
		
		ai_will_do = {
			factor = 0
		}
	}
	per_execute_medium_offensive = {
		icon = GFX_decision_icon_default

		available = {
			has_war_support > 0.45
		}
		
		fire_only_once = no
		#days_re_enable = 5
		
		visible = {
			has_idea = planned_offensive2
		}
		
		cost = 0
		
		days_remove = 90
		
		complete_effect = {
			remove_ideas = planned_offensive2
		}
		
		remove_effect = {
			add_timed_idea = { idea = medium_offensive days = 90}
		}
		
		ai_will_do = {
			factor = 0
		}
	}
	per_execute_large_offensive = {
		icon = GFX_decision_icon_default
		
		available = {
			has_war_support > 0.6
		}
		
		fire_only_once = no
		#days_re_enable = 5
		
		visible = {
			has_idea = planned_offensive3
		}
		
		cost = 0
		
		days_remove = 120
		
		complete_effect = {
			remove_ideas = planned_offensive3
		}
		
		remove_effect = {
			add_timed_idea = { idea = large_offensive days = 120}
		}
		
		ai_will_do = {
			factor = 0
		}
	}
	per_execute_major_offensive = {
		icon = GFX_decision_icon_default
		
		available = {
			has_war_support > 0.75
		}
		
		fire_only_once = no
		#days_re_enable = 5
		
		visible = {
			has_idea = planned_offensive4
		}
		
		cost = 0
		
		days_remove = 180
		
		complete_effect = {
			remove_ideas = planned_offensive4
		}
		
		remove_effect = {
			add_timed_idea = { idea = major_offensive days = 180}
		}
		
		ai_will_do = {
			factor = 0
		}
	}
}

####################################
###### modernize armed forces ######
####################################

PER_reforming_our_armed_forces_category = {
	per_modernize_our_tanks = {
	
		icon = generic_tank

		allowed = { 
			original_tag = PER
		}
		
		fire_only_once = yes
		
		visible = {
			has_completed_focus = per_industrial_military
		}
		
		available = {
			has_army_experience > 50
			has_tech = mechanised_infantry
			has_tech = main_battle_tank_chassis
			has_tech = tech_maintenance_company
			has_tech = tech_logistics_company
		}

		cost = 100

		ai_will_do = {
			factor = 10
		}

		complete_effect = {

			division_template = {
				name = "Zerehi Novin Brigade"					# Armored Division
				division_names_group = PER_ARM_01
				#template_counter = GFX_unit_mechanized_icon_medium
				regiments = {
					modern_armor = { x = 0 y = 0 }
					modern_armor = { x = 0 y = 1 }
					modern_sp_artillery_brigade = { x = 0 y = 2 }
					modern_sp_artillery_brigade = { x = 0 y = 3 }
					mechanized = { x = 1 y = 0 }
					mechanized = { x = 1 y = 1 }
					mechanized = { x = 1 y = 2 }
					mot_anti_air_brigade = { x = 1 y = 3 }
					mot_anti_air_brigade = { x = 1 y = 4 }
					motorized = { x = 2 y = 0 }
					motorized = { x = 2 y = 1 }
					motorized = { x = 2 y = 2 }
					mot_artillery_brigade = { x = 2 y = 3 }
				}
				
				support = {
					engineer = { x = 0 y = 0 }
					anti_air = { x = 0 y = 1 }
					artillery = { x = 0 y = 2 }
					logistics_company = { x = 0 y = 3 }
					maintenance_company = { x = 0 y = 4 }
				}
			}

			army_experience = -50

			custom_effect_tooltip = per_modernize_our_tank_tt
		}
	}

	per_modernize_our_mech = {
	
		icon = generic_industry

		allowed = { 
			original_tag = PER
		}
		
		fire_only_once = yes
		
		visible = {
			has_completed_focus = per_industrial_military
		}
		
		available = {
			has_army_experience > 50
			has_tech = mechanised_infantry
			has_tech = main_battle_tank_chassis
			has_tech = tech_maintenance_company
			has_tech = tech_logistics_company
		}

		cost = 100

		ai_will_do = {
			factor = 10
		}

		complete_effect = {

			division_template = {
				name = "Mekanizeh Novin Brigade"					# Mechanized Division
				division_names_group = PER_MEC_01
				#template_counter = GFX_unit_mechanized_icon_medium
				regiments = {
					motorized = { x = 0 y = 0 }
					motorized = { x = 0 y = 1 }
					motorized = { x = 0 y = 2 }
					mot_artillery_brigade = { x = 0 y = 3 }
					mot_artillery_brigade = { x = 0 y = 4 }
					mechanized = { x = 1 y = 0 }
					mechanized = { x = 1 y = 1 }
					mechanized = { x = 1 y = 2 }
					mechanized = { x = 1 y = 3 }
					modern_armor = { x = 2 y = 0 }
					modern_armor = { x = 2 y = 1 }
					modern_sp_artillery_brigade = { x = 2 y = 2 }
				}
				
				support = {
					engineer = { x = 0 y = 0 }
					anti_air = { x = 0 y = 1 }
					artillery = { x = 0 y = 2 }
					logistics_company = { x = 0 y = 3 }
					maintenance_company = { x = 0 y = 4 }
				}
			}

			army_experience = -50

			custom_effect_tooltip = per_modernize_our_mech_tt
		}
	}

	per_modernize_our_cavalry = {
	
		icon = generic_cavalry

		allowed = { 
			original_tag = PER
		}
		
		fire_only_once = yes
		
		visible = {
			has_completed_focus = per_industrial_military
		}
		
		available = {
			has_army_experience > 50
			has_tech = tech_maintenance_company
			has_tech = tech_logistics_company
		}

		cost = 100

		ai_will_do = {
			factor = 10
		}

		complete_effect = {

			division_template = {
				name = "Guard Javidan Division"					# Cavalry Division
				division_names_group = PER_CAV_01
		
				regiments = {
					cavalry = { x = 0 y = 0 }
					cavalry = { x = 0 y = 1 }
					cavalry = { x = 0 y = 2 }
					mot_artillery_brigade = { x = 0 y = 3 }
					mot_anti_air_brigade = { x = 0 y = 4 }
					cavalry = { x = 1 y = 0 }
					cavalry = { x = 1 y = 1 }
					cavalry = { x = 1 y = 2 }
					mot_artillery_brigade = { x = 1 y = 3 }
					mot_anti_air_brigade = { x = 1 y = 4 }
					light_armor = { x = 2 y = 0 }
					light_armor = { x = 2 y = 1 }
					medium_sp_artillery_brigade = { x = 2 y = 2 }
				}
			
				support = {
					engineer = { x = 0 y = 0 }
					anti_air = { x = 0 y = 1 }
					artillery = { x = 0 y = 2 }
					logistics_company = { x = 0 y = 3 }
					maintenance_company = { x = 0 y = 4 }
				}
			}
			
			army_experience = -50

			custom_effect_tooltip = per_modernize_our_cavalry_tt
		}
	}

	per_modernize_our_army = {
	
		icon = generic_military

		allowed = { 
			original_tag = PER
		}
		
		fire_only_once = yes
		
		visible = {
			has_completed_focus = per_industrial_military
		}
		
		available = {
			has_army_experience > 50
			has_tech = marines 
			has_tech = tech_mountaineers 
			has_tech = tech_maintenance_company 
			has_tech = tech_logistics_company 
		}

		cost = 100

		ai_will_do = {
			factor = 10
		}

		complete_effect = {

			division_template = {
				name = "Piyade Novin Brigade"		# Infantry Division
				division_names_group = PER_INF_01
				priority = 0
				template_counter = 3
				regiments = {
					infantry = { x = 0 y = 0 }
					infantry = { x = 0 y = 1 }
					infantry = { x = 0 y = 2 }
					artillery_brigade = { x = 0 y = 3 }
					infantry = { x = 1 y = 0 }
					infantry = { x = 1 y = 1 }
					mountaineers = { x = 1 y = 2 }
					artillery_brigade = { x = 1 y = 3 }
					marine = { x = 2 y = 0 }
					marine = { x = 2 y = 1 }
					mountaineers = { x = 2 y = 2 }
					anti_air_brigade = { x = 2 y = 3 }
					light_armor = { x = 3 y = 0 }
				}
				
				support = {
					engineer = { x = 0 y = 0 }
					anti_air = { x = 0 y = 1 }
					artillery = { x = 0 y = 2 }
					logistics_company = { x = 0 y = 3 }
					maintenance_company = { x = 0 y = 4 }
				}
			}

			army_experience = -50

			custom_effect_tooltip = per_modernize_our_army_tt
		}
	}
}

####################################
###### political decisions #########
####################################

PER_the_constitutional_arrows_category = { 

	PER_stability_decision = {
	
		icon = generic

		allowed = { 
			original_tag = PER
		}
		
		fire_only_once = no
		fixed_random_seed = yes
		
		visible = {
			has_completed_focus = per_consolodate_political_power
		}
		
		available = {
			has_stability < 0.9
		}

		modifier = {
			stability_weekly = 0.015

		}

		days_remove = 30
		days_re_enable = 60

		cost = 25

		ai_will_do = {
			factor = 5
			modifier = {
				is_historical_focus_on = yes
				factor = 0
			}
		}

		complete_effect = {
			
		}
	}

	PER_war_support_decision = {
	
		icon = generic

		allowed = { 
			original_tag = PER
		}
		
		fire_only_once = no
		fixed_random_seed = yes
		
		visible = {
			has_completed_focus = per_consolodate_political_power
		}
		
		available = {
			has_war_support > 0.2
			has_war_support < 0.9
		}

		modifier = {
			war_support_weekly = 0.015
		}

		days_remove = 30
		days_re_enable = 60

		cost = 25

		ai_will_do = {
			factor = 5
			modifier = {
				is_historical_focus_on = yes
				factor = 0
			}
		}

		complete_effect = {
			
		}
	}

	PER_nutrality_decision = {
	
		icon = generic

		allowed = { 
			original_tag = PER
		}
		
		fire_only_once = no
		fixed_random_seed = yes
		
		visible = {
			has_completed_focus = per_consolodate_political_power
		}
		
		available = {
			neutrality > 0.3
			neutrality < 0.9
		}

		modifier = {
			neutrality_drift = 0.2
		}

		days_remove = 30
		days_re_enable = 60

		cost = 25

		ai_will_do = {
			factor = 5
			modifier = {
				is_historical_focus_on = yes
				factor = 0
			}
		}

		complete_effect = {
			
		}
	}

	PER_populism_decision = {
	
		icon = generic

		allowed = { 
			original_tag = PER
		}
		
		fire_only_once = no
		fixed_random_seed = yes
		
		visible = {
			has_completed_focus = per_consolodate_political_power
		}
		
		available = {
			has_completed_focus = per_propoganda_campaign
		}

		modifier = {
			weekly_manpower = 500
			mobilization_speed = 0.25
			political_power_factor = 0.1
		}

		days_remove = 30
		days_re_enable = 60

		cost = 50

		ai_will_do = {
			factor = 5
			modifier = {
				is_historical_focus_on = yes
				factor = 0
			}
		}

		complete_effect = {
			
		}
	}

	PER_etatism_decision = {
	
		icon = generic

		allowed = { 
			original_tag = PER
		}
		
		fire_only_once = no
		fixed_random_seed = yes
		
		visible = {
			has_completed_focus = per_consolodate_political_power
		}
		
		available = {
			num_of_factories < 300
			has_completed_focus = per_new_order
		}

		modifier = {
			consumer_goods_factor = -0.05
			production_speed_industrial_complex_factor = 0.15
			production_speed_infrastructure_factor = 0.1
			production_speed_arms_factory_factor = 0.05
			production_speed_dockyard_factor = 0.05
		}

		days_remove = 180
		days_re_enable = 180

		cost = 75

		ai_will_do = {
			factor = 5
			modifier = {
				is_historical_focus_on = yes
				factor = 0
			}
		}

		complete_effect = {
			
		}
	}
}