SYR_nuke_civil_war = {
	SYR_declare_victory = {
			available = {
				tag = SYR
				HTS = { exists = no }	
				FSA = { exists = no }
				ISS = { exists = no }	
				has_global_flag = SYR_nuke_civil_war
			}
			modifier = {
			}
			ai_will_do = {
				factor = 100
			}
			fire_only_once = yes
			days_remove = 5
			cost = 0
			
		remove_effect = {
				if = { 
					limit = {
					has_global_flag = ISR_arabs_defeated
					has_global_flag = SYR_nuke_civil_war
					}
				news_event = { id = Samsonnews.12 hours = 6 }
				add_ideas = {
				SYR_devistated_economy
				SYR_war_exhaustion
				}
				remove_ideas = {
				SYR_devistated_economy_3
				}
				every_state = {
					limit = {
					is_core_of = SYR
					}
					remove_core_of = HTS
					remove_core_of = FSA
					remove_core_of = ISS
				}
				every_state = {
					limit = {
					is_core_of = IRQ
					}
					remove_core_of = ISS
				}
			}
			else_if = {
			limit = {
					has_global_flag = SYR_nuke_civil_war
					}
				news_event = { id = Samsonnews.6  hours = 6 }
				add_ideas = {
				SYR_syrian_economic_renewal
				SYR_army_of_lions_idea
				}
				remove_ideas = {
				SYR_devistated_economy_3
				}
				every_state = {
					limit = {
					is_core_of = SYR
					}
					remove_core_of = HTS
					remove_core_of = FSA
					remove_core_of = ISS
				}
				every_state = {
					limit = {
					is_core_of = IRQ
					}
					remove_core_of = ISS
				}
			}
		}
	}
	HTS_declare_victory = {
			available = {
				tag = HTS
				SYR = { exists = no }	
				FSA = { exists = no }
				ISS = { exists = no }	
				has_global_flag = SYR_nuke_civil_war
			}
			modifier = {
			}
			ai_will_do = {
				factor = 100
			}
			fire_only_once = yes
			days_remove = 5
			cost = 0
			
		remove_effect = {
				if = { 
					limit = {
					has_global_flag = ISR_arabs_defeated
					has_global_flag = SYR_nuke_civil_war
					}
				clr_global_flag = SYR_nuke_civil_war
				if = {
				limit = { has_government = authoritarian_democrat }
				add_ideas = arab_league_member
				news_event = { id = Samsonnews.13 hours = 6 }
				}
				if = {
				limit = { has_government = nationalist }
				change_government_type_theocracy = yes
				news_event = { id = Samsonnews.14 hours = 6 }
				}
				every_state = {
					limit = {
					is_core_of = SYR
					}
					remove_core_of = HTS
					remove_core_of = FSA
					remove_core_of = ISS
				}
				every_state = {
					limit = {
					is_core_of = IRQ
					}
					remove_core_of = ISS
					}
				}
				
				else_if = { 
					limit = {
					has_global_flag = SYR_nuke_civil_war
					}
				clr_global_flag = SYR_nuke_civil_war
				if = {
				limit = { has_government = authoritarian_democrat }
				add_ideas = arab_league_member
				add_ideas = PAL_mournful_ummah
				news_event = { id = Samsonnews.8 hours = 6 }
				}
				if = {
				limit = { has_government = nationalist }
				change_government_type_theocracy = yes
				news_event = { id = Samsonnews.9 hours = 6 }
				}
				every_state = {
					limit = {
					is_core_of = SYR
					}
					remove_core_of = HTS
					remove_core_of = FSA
					remove_core_of = ISS
				}
				every_state = {
					limit = {
					is_core_of = IRQ
					}
					remove_core_of = ISS
					}
				}
			}
		}
	FSA_declare_victory = {
			available = {
				tag = FSA
				HTS = { exists = no }	
				SYR = { exists = no }
				ISS = { exists = no }	
				has_global_flag = SYR_nuke_civil_war
			}
			modifier = {
			}
			ai_will_do = {
				factor = 100
			}
			fire_only_once = yes
			days_remove = 5
			cost = 0
			
		remove_effect = {
			if = { 
					limit = {
					has_global_flag = ISR_arabs_defeated
					has_global_flag = SYR_nuke_civil_war
					}
			news_event = { id = Samsonnews.15 hours = 6 }
			clr_global_flag = SYR_nuke_civil_war
			set_capital = {
				  state = 1032
				  remember_old_capital = no
				}
				FSA = {
					change_government_type_presidential_republic = yes
					add_ideas = arab_league_member
					add_ideas = ZZZ_capitalist_economy
				}
				every_state = {
					limit = {
					is_core_of = FSA
					}
					remove_core_of = HTS
					remove_core_of = SYR
					remove_core_of = ISS
				}
				every_state = {
					limit = {
					is_core_of = IRQ
					}
					remove_core_of = ISS
					}
				}
				
				else_if = { 
					limit = {
					has_global_flag = SYR_nuke_civil_war
					}
					news_event = { id = Samsonnews.7 hours = 6 }
			clr_global_flag = SYR_nuke_civil_war
			set_capital = {
				  state = 1032
				  remember_old_capital = no
				}
				FSA = {
					change_government_type_presidential_republic = yes
					add_ideas = arab_league_member
					add_ideas = ZZZ_capitalist_economy
				}
				every_state = {
					limit = {
					is_core_of = FSA
					}
					remove_core_of = HTS
					remove_core_of = SYR
					remove_core_of = ISS
				}
				every_state = {
					limit = {
					is_core_of = IRQ
					}
					remove_core_of = ISS
					}
				}
			}
		}
	ISS_declare_victory = {
			available = {
				tag = ISS
				HTS = { exists = no }	
				FSA = { exists = no }
				SYR = { exists = no }	
				has_global_flag = SYR_nuke_civil_war
			}
			modifier = {
			}
			ai_will_do = {
				factor = 100
			}
			fire_only_once = yes
			days_remove = 5
			cost = 0
			
		remove_effect = {
				if = { 
					limit = {
					has_global_flag = ISR_arabs_defeated
					has_global_flag = SYR_nuke_civil_war
					}
				news_event = { id = Samsonnews.16 hours = 6 }
				clr_global_flag = SYR_nuke_civil_war
				ISS = {
					change_government_type_military_dictatorship = yes
					add_ideas = ZZZ_military_controlled_economy
				}
				set_capital = {
				  state = 1032
				  remember_old_capital = no
				}
				every_state = {
					limit = {
					is_core_of = ISS
					}
					remove_core_of = HTS
					remove_core_of = FSA
					remove_core_of = SYR
					}
				ISS = { country_event = { id = jordan.2 days = 120 } }
			}
			
			else_if = { 
					limit = {
					has_global_flag = SYR_nuke_civil_war
					}
					news_event = { id = Samsonnews.10 hours = 6 }
				clr_global_flag = SYR_nuke_civil_war
				ISS = {
					change_government_type_military_dictatorship = yes
					add_ideas = ZZZ_military_controlled_economy
				}
				set_capital = {
				  state = 1032
				  remember_old_capital = no
				}
				every_state = {
					limit = {
					is_core_of = ISS
					}
					remove_core_of = HTS
					remove_core_of = FSA
					remove_core_of = SYR
					}
				ISS = { country_event = { id = jordan.2 days = 120 } }
			}
		}
	}
}

IRQ_Syrian_occupation = {
	IRQ_release_syria = {
			available = {
			OR = {
				tag = IRQ
				tag = ABK
				tag = KUR
				tag = FIA
				}
				SYR = { exists = no }	
				ISS = { exists = no }	
			}
			modifier = {
			}
			ai_will_do = {
				factor = 100
			}
			fire_only_once = yes
			days_remove = 5
			cost = 0
			
		remove_effect = {
				every_state = {
					limit = {
					is_core_of = ABK
					is_core_of = IRQ
					is_core_of = KUR
					is_core_of = FIA
					}
					remove_core_of = ISS
				}
				every_state = {
					limit = {
					is_core_of = ISS
					}
					add_core_of = SYR
				}
				release = SYR
				clr_global_flag = IRQ_syrian_occupation
			}
		}
	BUK_integrate_syria = {
			available = {
				tag = BUK
				ISS = { exists = no }	
			}
			modifier = {
			}
			ai_will_do = {
				factor = 100
			}
			fire_only_once = yes
			days_remove = 5
			cost = 0
			
		remove_effect = {
				if = { 
					limit = {
					has_global_flag = ISR_arabs_defeated
					}
				every_state = {
					limit = {
					is_core_of = ISS
					}
					add_core_of = BUK
				}
				every_state = {
					limit = {
					is_core_of = BUK
					}
					remove_core_of = ISS
				}
				news_event = { id = Samsonnews.17 hours = 6 }
				set_cosmetic_tag = BUK_UAR
				clr_global_flag = IRQ_syrian_occupation
				BUK = {
					change_government_type_personalistic_dictatorship = yes
					add_ideas = ZZZ_mixed_economy
				}
				if = {
				limit = { country_exists = LEB }
				BUK = {
					country_event = {
						id = jordan.4
						days = 20
						}
					}
				}
			}
			
			else_if = { 
					limit = {
					has_global_flag = ISR_samson_used_flag
					}
				every_state = {
					limit = {
					is_core_of = ISS
					}
					add_core_of = BUK
				}
				every_state = {
					limit = {
					is_core_of = BUK
					}
					remove_core_of = ISS
				}
				news_event = { id = Samsonnews.11 hours = 6 }
				set_cosmetic_tag = BUK_UAR
				clr_global_flag = IRQ_syrian_occupation
				BUK = {
					change_government_type_personalistic_dictatorship = yes
					add_ideas = ZZZ_mixed_economy
				}
				if = {
				limit = { country_exists = LEB }
				BUK = {
					country_event = {
						id = jordan.4
						days = 20
						}
					}
				}
			}
		}
	}
}

SOV_Syrian_Iron_dome = {
	SOV_setup_syrian_sam_sites = {
		visible = {
			has_country_flag = SOV_building_Syrian_ID
		}
		ai_will_do = {
			base = 25
		}
		icon = GFX_PRC_rocket_strike
		cancel_if_not_visible = yes
		fire_only_once = yes
		available = {
			has_country_flag = SOV_building_Syrian_ID
		}
		remove_effect = {
			SYR = {
				1032 = {
					add_building_construction = {
						type = anti_air_building
						level = 3
						instant_build = yes
					}
				}
				1033 = {
					add_building_construction = {
						type = anti_air_building
						level = 2
						instant_build = yes
					}
				}
				554 = {
					add_building_construction = {
						type = anti_air_building
						level = 2
						instant_build = yes
					}
				}
				1108 = {
					add_building_construction = {
						type = anti_air_building
						level = 1
						instant_build = yes
					}
				}
				1034 = {
					add_building_construction = {
						type = anti_air_building
						level = 1
						instant_build = yes
					}
				}
			}
			set_country_flag = SOV_syrian_sam_built
		}
		days_remove = 200
		cost = 80
	}
	
	SOV_build_up_syrian_airports = {
		visible = {
			has_country_flag = SOV_building_Syrian_ID
		}
		ai_will_do = {
			base = 25
		}
		icon = GFX_decision_generic_air
		cancel_if_not_visible = yes
		fire_only_once = yes
		available = {
				has_country_flag = SOV_syrian_sam_built
		}
		remove_effect = {
			SYR = {
				1032 = {
					add_building_construction = {
						type = air_base
						level = 5
						instant_build = yes
					}
				}
				677 = {
					add_building_construction = {
						type = air_base
						level = 4
						instant_build = yes
					}
				}
				680 = {
					add_building_construction = {
						type = air_base
						level = 3
						instant_build = yes
					}
				}
				hidden_effect = {
				if = {
						limit = {
							NOT = {
								has_dlc = "By Blood Alone"
							}
						}
						add_equipment_to_stockpile = {
							type = small_plane_cas_airframe_1
							amount = 200
							producer = SOV
							variant_name = "Su-25"
							}
							add_equipment_to_stockpile = {
								type = small_plane_cas_airframe_1
								amount = 400
								producer = SOV
								variant_name = "Su-25"
							}
						 }
						 else_if = {
						 	limit = {
						 		has_dlc = "By Blood Alone"
						 	}
						 	load_oob = "SYR_air_help_bba"
						 }
					}
			}
			set_country_flag = SOV_syrian_airports_built
		}
		days_remove = 200
		cost = 80
	}
	
	SOV_build_syrian_ews = {
		visible = {
			has_country_flag = SOV_building_Syrian_ID
		}
		ai_will_do = {
			base = 25
		}
		icon = GFX_decision_generic_radar
		cancel_if_not_visible = yes
		fire_only_once = yes
		available = {
				has_country_flag = SOV_syrian_airports_built
		}
		remove_effect = {
			SYR = {
				hidden_effect = {
				set_technology = {
				radio = 1
				}
				set_technology = {
				radio_detection = 1
				}
				set_technology = {
				decimetric_radar = 1
				}
			}
				1032 = {
					add_building_construction = {
						type = radar_station
						level = 3
						instant_build = yes
					}
				}
				1033 = {
					add_building_construction = {
						type = radar_station
						level = 3
						instant_build = yes
					}
				}
				1028 = {
					add_building_construction = {
						type = radar_station
						level = 3
						instant_build = yes
					}
				}
				1108 = {
					add_building_construction = {
						type = radar_station
						level = 3
						instant_build = yes
					}
				}
			}
			clr_country_flag = SOV_building_Syrian_ID
			set_global_flag = SOV_syrian_ID_finished
			custom_effect_tooltip = SOV_syrian_ID_finished_tt
		}
		days_remove = 200
		cost = 80
	}
}