﻿add_namespace = italy

# Egypt requests Libya
country_event = {
	id = italy.1000
	title = italy.1000.t
	desc = italy.1000.d
 
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes
	
	option = {
		name = italy.1000.a
		ai_chance = { 
			factor = 100
	    }
		EGY = {
			transfer_state = 273
			transfer_state = 661
			transfer_state = 662
			transfer_state = 663 
			transfer_state = 448
			transfer_state = 449
			transfer_state = 450
			transfer_state = 451
		}
		hidden_effect = {
			news_event = { hours = 6 id = news.1007 }
			add_threat = 4
		}
	}
	option = {
		name = italy.1000.b
	}
}
#Rebels Re-occupy Ethiopia
country_event = {
	id = italy.1001
	title = italy.1001.t
	desc = italy.1001.d
 
	picture = GFX_report_event_fascist_militia
	
	is_triggered_only = yes
	
	option = {
		name = italy.1001.a
		ai_chance = { 
			factor = 1
			modifier = {
				OR = {
					if = {
						limit = {
							NOT = {
								ITA = {
									OR = {
										has_full_control_of_state = 550
										has_full_control_of_state = 268
										has_full_control_of_state = 269
										has_full_control_of_state = 559
										has_full_control_of_state = 547
										has_full_control_of_state = 549
										has_full_control_of_state = 551
									}
								}
							}
						}
					}
					has_capitulated = yes
				}
				factor = 0
			}
	    }
		add_stability = -0.05
		hidden_effect = {
			ETH = {
				transfer_state = 271
				load_oob = ETH_reoccupation
				set_popularities = {
					communism = 100
				}
				set_politics = {
					ruling_party = communism
				}
				add_ideas = arab_socialist_movement
				add_country_leader_trait = triumphant_revolutionary
			}
			add_threat = 2
			EGY = {
				add_to_faction = ETH
			}
		}
		if = {
			limit = {
				ITA = {
					OR = {
						has_full_control_of_state = 550
						has_full_control_of_state = 268
						has_full_control_of_state = 269
						has_full_control_of_state = 559
						has_full_control_of_state = 547
						has_full_control_of_state = 549
						has_full_control_of_state = 551
					}
				}
			}
			ITA = {
				declare_war_on = {
					target = ETH
					type = annex_everything
				}
			}
		}
		hidden_effect = {
			news_event = { hours = 12 id = news.1008 }
		}
	}
	option = {
		name = italy.1001.b
		ai_chance = { 
			factor = 1
			modifier = {
				OR = {
					if = {
						limit = {
							NOT = {
								ITA = {
									OR = {
										has_full_control_of_state = 550
										has_full_control_of_state = 268
										has_full_control_of_state = 269
										has_full_control_of_state = 559
										has_full_control_of_state = 547
										has_full_control_of_state = 549
										has_full_control_of_state = 551
									}
								}
							}
						}
					}
					has_capitulated = yes
				}
				factor = 0
			}
	    }
		add_stability = -0.05
		hidden_effect = {
			ETH = {
				transfer_state = 271
				load_oob = ETH_reoccupation
				set_popularities = {
					communism = 100
				}
				set_politics = {
					ruling_party = communism
				}
				add_ideas = arab_socialist_movement
				add_country_leader_trait = triumphant_revolutionary
			}
			add_threat = 4
			EGY = {
				add_to_faction = ETH
			}
		}
		if = {
			limit = {
				ITA = {
					OR = {
						has_full_control_of_state = 550
						has_full_control_of_state = 268
						has_full_control_of_state = 269
						has_full_control_of_state = 559
						has_full_control_of_state = 547
						has_full_control_of_state = 549
						has_full_control_of_state = 551
					}
				}
			}
			ITA = {
				declare_war_on = {
					target = ETH
					type = annex_everything
				}
			}
		}
		ITA = {
			create_wargoal = {
				type = annex_everything
				target = EGY
			}
		}
		hidden_effect = {
			news_event = { hours = 12 id = news.1008 }
		}
	}
	option = {
		name = italy.1001.c
		ai_chance = { 
			factor = 0
			modifier = {
				OR = {
					if = {
						limit = {
							ITA = {
								OR = {
									has_full_control_of_state = 550
									has_full_control_of_state = 268
									has_full_control_of_state = 269
									has_full_control_of_state = 559
									has_full_control_of_state = 547
									has_full_control_of_state = 549
									has_full_control_of_state = 551
								}
							}
						}
					}
					has_capitulated = no
				}
				factor = 1
			}
	    }
		add_stability = -0.02
		hidden_effect = {
			ETH = {
				transfer_state = 271
				load_oob = ETH_reoccupation
				set_popularities = {
					communism = 100
				}
				set_politics = {
					ruling_party = communism
				}
				add_ideas = arab_socialist_movement
				add_country_leader_trait = triumphant_revolutionary
			}
			add_threat = 1
			EGY = {
				add_to_faction = ETH
			}
		}
		ITA = {
			create_wargoal = {
				type = annex_everything
				target = ETH
			}
		}
		hidden_effect = {
			news_event = { hours = 12 id = news.1008 }
		}
	}
}
#Egypt Surrenders Territory
country_event = {
	id = italy.1002
	title = italy.1002.t
	desc = italy.1002.d
 
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes
	
	option = {
		name = italy.1002.a
		ai_chance = { 
			factor = 100
	    }
		ITA = {
			annex_country = {
				target = EGY
				transfer_troops = yes
			}
		}
	}
}