﻿
# Events dealing with Italy

add_namespace = deluge_italy

# Italy is at war with France and gets claims on Savoy, Alpes and Provence

country_event = {
	id = deluge_italy.1
	title = deluge_italy1title
	desc = deluge_italy1desc
	
	picture = GFX_report_event_generic_read_write
	
	fire_only_once = yes
	
	trigger = {
		tag = ITA
		OR = {
			has_war_with = FRA
			has_war_with = FRR
		}
		OR = {
			NOT = { 735 = { is_claimed_by = ITA } }
			NOT = { 32 = { is_claimed_by = ITA } }
			NOT = { 21 = { is_claimed_by = ITA } }
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = deluge_italy1opt

		add_state_claim = 735
		add_state_claim = 32
		add_state_claim = 21
	}
}

# Italy is at war with Austria and gets claims on Tyrol and Slovenia

country_event = {
	id = deluge_italy.2
	title = deluge_italy2title
	desc = deluge_italy2desc
	
	picture = GFX_report_event_generic_read_write
	
	fire_only_once = yes
	
	trigger = {
		tag = ITA
		has_war_with = AUS
		OR = {
			NOT = { 153 = { is_claimed_by = ITA } }
			NOT = { 102 = { is_claimed_by = ITA } }
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = deluge_italy2opt

		add_state_claim = 153
		add_state_claim = 102
	}
}

# Italy is at war with Croatia and gets claim on Dalmatia

country_event = {
	id = deluge_italy.3
	title = deluge_italy3title
	desc = deluge_italy3desc
	
	picture = GFX_report_event_generic_read_write
	
	fire_only_once = yes
	
	trigger = {
		tag = ITA
		has_war_with = CRO
		NOT = { 103 = { is_claimed_by = ITA } }
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = deluge_italy3opt

		add_state_claim = 103
	}
}

# Italy is at war with Albania and gets claims on Albania and Montenegro

country_event = {
	id = deluge_italy.4
	title = deluge_italy4title
	desc = deluge_italy4desc
	
	picture = GFX_report_event_generic_read_write
	
	fire_only_once = yes
	
	trigger = {
		tag = ITA
		has_war_with = ALB
		OR = {
			NOT = { 44 = { is_claimed_by = ITA } }
			NOT = { 105 = { is_claimed_by = ITA } }
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = deluge_italy4opt

		add_state_claim = 44
		add_state_claim = 105
	}
}

# Italy claims Croatia

news_event = {
	id = deluge_italy.5
	title = deluge_italy5title
	desc = deluge_italy5desc
	
	picture = GFX_news_event_020
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy5opta
		trigger = {
			OR = {
				original_tag = ITA
				is_in_faction_with = ITA
			}
		}
	}
	option = {
		name = deluge_italy5optb
		trigger = {
			OR = {
				original_tag = CRO
				is_in_faction_with = CRO
			}
		}
	}
	option = {
		name = deluge_italy5optc
		trigger = {
			NOT = {
				OR = {
					original_tag = ITA
					is_in_faction_with = ITA
					original_tag = CRO
					is_in_faction_with = CRO
				}
			}
		}
	}
}

# Italy claims Albania

news_event = {
	id = deluge_italy.6
	title = deluge_italy6title
	desc = deluge_italy6desc
	
	picture = GFX_news_event_034
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy6opta
		trigger = {
			OR = {
				original_tag = ITA
				is_in_faction_with = ITA
			}
		}
	}
	option = {
		name = deluge_italy6optb
		trigger = {
			OR = {
				original_tag = ALB
				is_in_faction_with = ALB
			}
		}
	}
	option = {
		name = deluge_italy6optc
		trigger = {
			NOT = {
				OR = {
					original_tag = ITA
					is_in_faction_with = ITA
					original_tag = ALB
					is_in_faction_with = ALB
				}
			}
		}
	}
}


# Italy claims Greece

news_event = {
	id = deluge_italy.7
	title = deluge_italy7title
	desc = deluge_italy7desc
	
	picture = GFX_news_event_ast_navy
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy7opta
		trigger = {
			OR = {
				original_tag = ITA
				is_in_faction_with = ITA
			}
		}
	}
	option = {
		name = deluge_italy7optb
		trigger = {
			OR = {
				original_tag = GRE
				is_in_faction_with = GRE
			}
		}
	}
	option = {
		name = deluge_italy7optc
		trigger = {
			NOT = {
				OR = {
					original_tag = ITA
					is_in_faction_with = ITA
					original_tag = GRE
					is_in_faction_with = GRE
				}
			}
		}
	}
}


# Italy claims Ethiopia

news_event = {
	id = deluge_italy.8
	title = deluge_italy8title
	desc = deluge_italy8desc
	
	picture = GFX_news_event_032
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy8opta
		trigger = {
			OR = {
				original_tag = ITA
				is_in_faction_with = ITA
			}
		}
	}
	option = {
		name = deluge_italy8optb
		trigger = {
			OR = {
				original_tag = ETH
				is_in_faction_with = ETH
			}
		}
	}
	option = {
		name = deluge_italy8optc
		trigger = {
			NOT = {
				OR = {
					original_tag = ITA
					is_in_faction_with = ITA
					original_tag = ETH
					is_in_faction_with = ETH
				}
			}
		}
	}
}

# Italy has restored the Roman state (communism version)

news_event = {
	id = deluge_italy.9
	title = deluge_italy9title
	desc = deluge_italy9desc
	
	picture = GFX_deluge_mussolini_parade
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy9opta
		trigger = {
			original_tag = ITA
		}
	}
	option = {
		name = deluge_italy9optb
		trigger = {
			NOT = { original_tag = ITA }
			has_government = communism
		}
	}
	option = {
		name = deluge_italy9optc
		trigger = {
			has_government = democratic
		}
	}
	option = {
		name = deluge_italy9optd
		trigger = {
			has_government = neutrality
		}
	}
	option = {
		name = deluge_italy9opte
		trigger = {
			has_government = fascism
		}
	}
}

# Italy has restored the Roman state (democratic version)

news_event = {
	id = deluge_italy.10
	title = deluge_italy10title
	desc = deluge_italy10desc
	
	picture = GFX_deluge_mussolini_parade
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy10opta
		trigger = {
			original_tag = ITA
		}
	}
	option = {
		name = deluge_italy10optb
		trigger = {
			has_government = communism
		}
	}
	option = {
		name = deluge_italy10optc
		trigger = {
			NOT = { original_tag = ITA }
			has_government = democratic
		}
	}
	option = {
		name = deluge_italy10optd
		trigger = {
			has_government = neutrality
		}
	}
	option = {
		name = deluge_italy10opte
		trigger = {
			has_government = fascism
		}
	}
}

# Italy has restored the Roman state (fascism version)

news_event = {
	id = deluge_italy.11
	title = deluge_italy11title
	desc = deluge_italy11desc
	
	picture = GFX_deluge_mussolini_parade
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy11opta
		trigger = {
			original_tag = ITA
		}
	}
	option = {
		name = deluge_italy11optb
		trigger = {
			has_government = communism
		}
	}
	option = {
		name = deluge_italy11optc
		trigger = {
			has_government = democratic
		}
	}
	option = {
		name = deluge_italy11optd
		trigger = {
			has_government = neutrality
		}
	}
	option = {
		name = deluge_italy11opte
		trigger = {
			NOT = { original_tag = ITA }
			has_government = fascism
		}
	}
}

# Italy has created a republic and deposed the king (communism version)

news_event = {
	id = deluge_italy.12
	title = deluge_italy12title
	desc = deluge_italy12desc
	
	picture = GFX_deluge_mussolini_parade
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy12opta
		trigger = {
			original_tag = ITA
		}
	}
	option = {
		name = deluge_italy12optb
		trigger = {
			NOT = { original_tag = ITA }
			has_government = communism
		}
	}
	option = {
		name = deluge_italy12optc
		trigger = {
			has_government = democratic
		}
	}
	option = {
		name = deluge_italy12optd
		trigger = {
			has_government = neutrality
		}
	}
	option = {
		name = deluge_italy12opte
		trigger = {
			has_government = fascism
		}
	}
}

# Italy has created a republic and deposed the king (democratic version)

news_event = {
	id = deluge_italy.13
	title = deluge_italy13title
	desc = deluge_italy13desc
	
	picture = GFX_deluge_mussolini_parade
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy13opta
		trigger = {
			original_tag = ITA
		}
	}
	option = {
		name = deluge_italy13optb
		trigger = {
			has_government = communism
		}
	}
	option = {
		name = deluge_italy13optc
		trigger = {
			NOT = { original_tag = ITA }
			has_government = democratic
		}
	}
	option = {
		name = deluge_italy13optd
		trigger = {
			has_government = neutrality
		}
	}
	option = {
		name = deluge_italy13opte
		trigger = {
			has_government = fascism
		}
	}
}

# Italy has created a republic and deposed the king (fascism version)

news_event = {
	id = deluge_italy.14
	title = deluge_italy14title
	desc = deluge_italy14desc
	
	picture = GFX_deluge_mussolini_parade
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy14opta
		trigger = {
			original_tag = ITA
		}
	}
	option = {
		name = deluge_italy14optb
		trigger = {
			has_government = communism
		}
	}
	option = {
		name = deluge_italy14optc
		trigger = {
			has_government = democratic
		}
	}
	option = {
		name = deluge_italy14optd
		trigger = {
			has_government = neutrality
		}
	}
	option = {
		name = deluge_italy14opte
		trigger = {
			NOT = { original_tag = ITA }
			has_government = fascism
		}
	}
}

# Italy demands Austrian provinces
# Sent to AUS by ITA focus

country_event = {
	id = deluge_italy.15
	title = deluge_italy15title
	desc = deluge_italy15desc
	
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes
	
	option = { # Accede to the demands in full
		name = deluge_italy15opta
		
		ITA = { country_event = deluge_italy.16 }
		
		add_named_threat = { threat = -3 name = deluge_appeasement_threat }
		
		diplomatic_relation = {
			country = ITA
			relation = non_aggression_pact
			active = yes
		}
		
		if = {
			limit = {
				owns_state = 39
			}
			ITA = { transfer_state = 39 }
		}
		if = {
			limit = {
				owns_state = 153
			}
			ITA = { transfer_state = 153 }
		}
		if = {
			limit = {
				owns_state = 736
			}
			ITA = { transfer_state = 736 }
		}
		if = {
			limit = {
				owns_state = 102
			}
			ITA = { transfer_state = 102 }
		}
		
		ai_chance = {
			factor = 1
			
			modifier = {
				factor = 2
				is_in_faction = no
			}
			
			modifier = {
				factor = 2
				has_government = democratic
			}
			
			modifier = {
				factor = 0.5
				is_in_faction_with = POL
			}
			
			modifier = {
				factor = 0.5
				is_in_faction_with = FRA
			}
			
			modifier = {
				factor = 0.1
				ITA = {
					NOT = {
						OR = {
							is_in_faction_with = POL
							is_in_faction_with = FRA
							is_in_faction_with = ENG
						}
					}
				}
			}
						
			modifier = {
				factor = 2
				has_war = yes
			}
			
			modifier = {
				factor = 5
				any_enemy_country = {
					is_major = yes
				}
			}
			
			modifier = {
				factor = 0.1
				is_historical_focus_on = yes
			}
		}
	}
	option = { # Offer only South Tyrol
		name = deluge_italy15optb
		
		trigger = {
			owns_state = 39
		}
		
		ITA = {
			country_event = deluge_italy.18
			transfer_state = 39
		}
		
		add_named_threat = { threat = -1 name = deluge_appeasement_threat }
		
		diplomatic_relation = {
			country = ITA
			relation = non_aggression_pact
			active = yes
		}
		
		ai_chance = {
			factor = 5
			
			modifier = {
				factor = 2
				ITA = {
					is_in_faction_with = FRA
				}
			}
			
			modifier = {
				factor = 2
				ITA = {
					is_in_faction_with = POL
				}
			}
			
			modifier = {
				factor = 2
				ITA = {
					is_in_faction_with = ENG
				}
			}
			
			modifier = {
				factor = 2
				ITA = {
					is_in_faction_with = SPR
				}
			}
			
			modifier = {
				factor = 2
				ITA = {
					is_in_faction_with = WGR
				}
			}
			
			modifier = {
				factor = 2
				ITA = {
					is_in_faction_with = GER
				}
			}
			
			modifier = {
				factor = 5
				is_in_faction = no
			}
			
			modifier = {
				factor = 2
				has_government = neutrality
			}
			
			modifier = {
				factor = 2
				has_war = yes
			}
			
			modifier = {
				factor = 5
				any_enemy_country = {
					is_major = yes
				}
			}
		}
	}
	option = { # Never!
		name = deluge_italy15optc
		
		custom_effect_tooltip = tooltip_they_may_declare_war
		
		ITA = {
			country_event = deluge_italy.20
		}
		
		ai_chance = {
			factor = 1
			
			modifier = {
				factor = 2
				has_government = fascism
			}
			
			modifier = {
				factor = 3
				is_in_faction_with = POL
			}
			
			modifier = {
				factor = 3
				is_in_faction_with = FRA
			}
			
			modifier = {
				factor = 2
				ITA = {
					NOT = { is_in_faction_with = POL }
				}
			}
			
			modifier = {
				factor = 2
				ITA = {
					NOT = { is_in_faction_with = FRA }
				}
			}
			
			modifier = {
				factor = 2
				has_war = no
			}
			
			modifier = {
				factor = 5
				is_historical_focus_on = yes
			}
		}
	}
}

# Austria has capitulated to the Italian demands

country_event = {
	id = deluge_italy.16
	title = deluge_italy16title
	desc = deluge_italy16desc
	
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy16opt
	
		add_political_power = 75
		
		news_event = deluge_italy.17
	}
}

# News event for the transfer of southern Austria to Italy

news_event = {
	id = deluge_italy.17
	title = deluge_italy17title
	desc = deluge_italy17desc
	
	picture = GFX_news_event_009
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy17opta
		trigger = {
			OR = {
				original_tag = ITA
				is_in_faction_with = ITA
			}
		}
	}
	option = {
		name = deluge_italy17optb
		trigger = {
			OR = {
				original_tag = AUS
				is_in_faction_with = AUS
			}
		}
	}
	option = {
		name = deluge_italy17optc
		trigger = {
			NOT = {
				OR = {
					original_tag = ITA
					is_in_faction_with = ITA
					original_tag = AUS
					is_in_faction_with = AUS
				}
			}
		}
	}
}

# Austria cedes South Tyrol to pacify Italy

country_event = {
	id = deluge_italy.18
	title = deluge_italy18title
	desc = deluge_italy18desc
	
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy18opta
	
		add_political_power = 25
		
		news_event = deluge_italy.19
		
		ai_chance = {
			factor = 5
			
			modifier = {
				factor = 2
				has_government = democratic
			}
			modifier = {
				factor = 2
				AUS = {
					is_in_faction_with = POL
				}
			}
			modifier = {
				factor = 2
				AUS = {
					is_in_faction_with = FRA
				}
			}
			modifier = {
				factor = 2
				has_war = yes
			}
			
			modifier = {
				factor = 5
				any_enemy_country = {
					is_major = yes
				}
			}
		}
	}
	
	option = {
		name = deluge_italy18optb
	
		add_political_power = -75
		
		if = { limit = { NOT = { owns_state = 153 } }
			create_wargoal = {
				type = take_claimed_state
				target = FROM
				generator = { 153 102 }
			}
		}
		
		if = { limit = { NOT = { owns_state = 736 } }
			create_wargoal = {
				type = take_core_state
				target = FROM
				generator = { 736 }
			}
		}
		
		if = {
			limit = {
				has_government = communism
			}
			add_timed_idea = { idea = deluge_anti-war_sentiment_democratic_idea days = 365 }
		}
		
		if = {
			limit = {
				NOT = { has_government = communism }
			}
			add_timed_idea = { idea = deluge_anti-war_sentiment_communism_idea days = 365 }
		}
		
		news_event = deluge_italy.19
		
		ai_chance = {
			factor = 1
			
			modifier = {
				factor = 5
				is_historical_focus_on = yes
			}
		}
	}
}

# News event for the transfer of South Tyrol to Italy
# Leaves open the possibility of Italy attacking for more

news_event = {
	id = deluge_italy.19
	title = deluge_italy19title
	desc = deluge_italy19desc
	
	picture = GFX_news_event_009
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy19opta
		trigger = {
			OR = {
				original_tag = ITA
				is_in_faction_with = ITA
			}
		}
	}
	option = {
		name = deluge_italy19optb
		trigger = {
			OR = {
				original_tag = AUS
				is_in_faction_with = AUS
			}
		}
	}
	option = {
		name = deluge_italy19optc
		trigger = {
			NOT = {
				OR = {
					original_tag = ITA
					is_in_faction_with = ITA
					original_tag = AUS
					is_in_faction_with = AUS
				}
			}
		}
	}
}

# Austria has refused to cede any land and Italy has an excuse to go to war

country_event = {
	id = deluge_italy.20
	title = deluge_italy20title
	desc = deluge_italy20desc
	
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy20opt
			
		if = { limit = { NOT = { owns_state = 153 } }
			create_wargoal = {
				type = take_claimed_state
				target = FROM
				generator = { 153 102 }
			}
		}
		
		if = { limit = { NOT = { owns_state = 736 } }
			create_wargoal = {
				type = take_core_state
				target = FROM
				generator = { 39 736 }
			}
		}
				
		news_event = deluge_italy.21
	}
}

# News event for Austrian refusal to cede any land

news_event = {
	id = deluge_italy.21
	title = deluge_italy21title
	desc = deluge_italy21desc
	
	picture = GFX_news_event_009
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy21opta
		trigger = {
			OR = {
				original_tag = ITA
				is_in_faction_with = ITA
			}
		}
	}
	option = {
		name = deluge_italy21optb
		trigger = {
			OR = {
				original_tag = AUS
				is_in_faction_with = AUS
			}
		}
	}
	option = {
		name = deluge_italy21optc
		trigger = {
			NOT = {
				OR = {
					original_tag = ITA
					is_in_faction_with = ITA
					original_tag = AUS
					is_in_faction_with = AUS
				}
			}
		}
	}
}

# Italy wants control over Malta and can choose either diplomacy or a lightning raid to seize it

country_event = {
	id = deluge_italy.22
	title = deluge_italy22title
	desc = deluge_italy22desc
	
	picture = GFX_deluge_malta
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy22opta
		
		trigger = {
			has_war = no
		}
		
		ENG = { country_event = deluge_italy.23 }
		
		add_named_threat = { threat = -1 name = deluge_pacifism_threat }
		
		ai_chance = {
			factor = 2
			
			modifier = {
				factor = 2
				has_government = democratic
			}
			
			modifier = {
				factor = 2
				ENG = {
					has_government = democratic
				}
			}
			
			modifier = {
				factor = 2
				has_government = communism
				ENG = {
					has_government = communism
				}
			}
			
			modifier = {
				factor = 2
				has_government = democratic
				ENG = {
					has_government = democratic
				}
			}
			
			modifier = {
				factor = 2
				has_government = neutrality
				ENG = {
					has_government = neutrality
				}
			}
			
			modifier = {
				factor = 2
				has_government = fascism
				ENG = {
					has_government = fascism
				}
			}
			
			modifier = {
				factor = 2
				ENG = {
					is_in_faction_with = SPR
				}
			}
			
			modifier = {
				factor = 2
				ENG = {
					is_in_faction_with = AUS
				}
			}
			
			modifier = {
				factor = 2
				ENG = {
					is_in_faction_with = FRA
				}
			}
			
			modifier = {
				factor = 2
				ENG = {
					is_in_faction_with = SOV
				}
			}
			
			modifier = {
				factor = 2
				ENG = {
					is_in_faction_with = POL
				}
			}
		}
	}
	
	option = {
		name = deluge_italy22optb
			
		add_named_threat = { threat = 5 name = italy_claims_malta }
		
		remove_opinion_modifier = { target = ENG modifier = great_war_alliance_modifier }
		
		navy_experience = 50
		army_experience = 25
		air_experience = 25
		
		custom_effect_tooltip = tooltip_defence_malta

		hidden_effect = {
			if = {
				limit = {
					NOT = {
						ENG = {
							divisions_in_state = {
								state = 116
								size > 0
							}
						}
					}
				}
				random_list = {
					95 = {
						add_manpower = -50
						ENG = { country_event = deluge_italy.27 } # Success
					}
					5 = {
						add_manpower = -300
						ENG = { country_event = deluge_italy.29 } # Failure
					}
				}
			}
			
			if = {
				limit = {
					ENG = {
						divisions_in_state = {
							state = 116
							size > 0
						}
					}
					NOT = {
						ENG = {
							divisions_in_state = {
								state = 116
								size > 1
							}
						}
					}
				}
				random_list = {
					80 = {
						add_manpower = -150
						ENG = { country_event = deluge_italy.27 } # Success
					}
					20 = {
						add_manpower = -500
						ENG = { country_event = deluge_italy.29 } # Failure
					}
				}
			}
			
			if = {
				limit = {
					ENG = {
						divisions_in_state = {
							state = 116
							size > 1
						}
					}
					NOT = {
						ENG = {
							divisions_in_state = {
								state = 116
								size > 2
							}
						}
					}
				}
				random_list = {
					60 = {
						add_manpower = -300
						ENG = { country_event = deluge_italy.27 } # Success
					}
					40 = {
						add_manpower = -1200
						ENG = { country_event = deluge_italy.29 } # Failure
					}
				}
			}
			
			if = {
				limit = {
					ENG = {
						divisions_in_state = {
							state = 116
							size > 2
						}
					}
					NOT = {
						ENG = {
							divisions_in_state = {
								state = 116
								size > 4
							}
						}
					}
				}
				random_list = {
					40 = {
						add_manpower = -1000
						ENG = { country_event = deluge_italy.27 } # Success
					}
					60 = {
						add_manpower = -3000
						ENG = { country_event = deluge_italy.29 } # Failure
					}
				}
			}
					
			if = {
				limit = {
					ENG = {
						divisions_in_state = {
							state = 116
							size > 4
						}
					}
					NOT = {
						ENG = {
							divisions_in_state = {
								state = 116
								size > 6
							}
						}
					}
				}
				random_list = {
					20 = {
						add_manpower = -2000
						ENG = { country_event = deluge_italy.27 } # Success
					}
					80 = {
						add_manpower = -6000
						ENG = { country_event = deluge_italy.29 } # Failure
					}
				}
			}
					
			if = {
				limit = {
					ENG = {
						divisions_in_state = {
							state = 116
							size > 6
						}
					}
				}
				random_list = {
					5 = {
						add_manpower = -3000
						ENG = { country_event = deluge_italy.27 } # Success
					}
					95 = {
						add_manpower = -12000
						ENG = { country_event = deluge_italy.29 } # Failure
					}
				}
			}
		}
		
		ai_chance = {
			factor = 1
			
			modifier = {
				factor = 2
				has_government = fascism
			}
			
			modifier = {
				factor = 3
				is_historical_focus_on = yes
				ENG = {
					is_ai = no
				}
			}
			
			modifier = {
				factor = 2
				ENG = { has_war = yes }
			}
			
			modifier = {
				factor = 5
				ENG = {
					any_enemy_country = {
						is_major = yes
					}
				}
			}
		}
	}
}

# Britain receives Italy's request to join the Commonwealth in exchange for Malta

country_event = {
	id = deluge_italy.23
	title = deluge_italy23title
	desc = deluge_italy23desc
	
	picture = GFX_deluge_malta
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy23opta

		hidden_effect = {
			if = {
				limit = {
					ITA = {
						is_faction_leader = yes
					}
				}
				every_country = {
					limit = {
						is_in_faction_with = ITA
					}
					remove_from_faction = THIS
				}
			}
		}
		
		add_to_faction = ITA
		
		ITA = {
			transfer_state = 116
			add_ai_strategy = {
				type = alliance
				id = "ENG"
				value = 9999
			}
		}

		add_political_power = 75
		
		hidden_effect = {
			ITA = { country_event = deluge_italy.24 }
		}
		
		ai_chance = {
			factor = 1
		}
	}
	
	option = {
		name = deluge_italy23optb
		
		news_event = deluge_italy.26
		
		ai_chance = {
			factor = 0
		}
	}
}

# Hidden event to create the right FROM

country_event = {
	id = deluge_italy.24
	title = deluge_italy24title
	desc = deluge_italy24desc
	
	picture = GFX_deluge_malta
	
	hidden = yes
	
	is_triggered_only = yes
	
	option = {
		name = Okay
		news_event = deluge_italy.25
	}
}

# News event for Italy joining the Commonwealth in exchange for Malta

news_event = {
	id = deluge_italy.25
	title = deluge_italy25title
	desc = deluge_italy25desc
	
	picture = GFX_news_event_009
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy25opta
		trigger = {
			OR = {
				original_tag = ENG
				original_tag = ITA
				is_in_faction_with = ENG
			}
		}
	}
	option = {
		name = deluge_italy25optb
		trigger = {
			NOT = {
				OR = {
					original_tag = ENG
					original_tag = ITA
					is_in_faction_with = ENG
				}
			}
		}
	}
}

# News event for Britain snubbing Italy

news_event = {
	id = deluge_italy.26
	title = deluge_italy26title
	desc = deluge_italy26desc
	
	picture = GFX_news_event_009
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy26opta
		trigger = {
			OR = {
				original_tag = ENG
				is_in_faction_with = ENG
			}
		}
	}
	option = {
		name = deluge_italy26optb
		trigger = {
			OR = {
				original_tag = ITA
				is_in_faction_with = ITA
			}
		}
	}
	option = {
		name = deluge_italy26optc
		trigger = {
			NOT = {
				OR = {
					original_tag = ENG
					original_tag = ITA
					is_in_faction_with = ENG
					is_in_faction_with = ITA
				}
			}
		}
	}
}

# Italy chooses to assault Malta and the raid is successful
# Britain can choose to go to war but AI will always accept the loss

country_event = {
	id = deluge_italy.27
	title = deluge_italy27title
	desc = deluge_italy27desc
	
	picture = GFX_deluge_malta
	
	is_triggered_only = yes
	
	immediate = {
		116 = {
			damage_building = { type = infrastructure damage = 2 }
			damage_building = { type = naval_base damage = 2 province = 12003 }
			damage_building = { type = coastal_bunker damage = 2 province = 12003 }
		}
		ITA = {
			transfer_state = 116
		}
	}
	
	option = {
		name = deluge_italy27opta
		
		remove_opinion_modifier = { target = ITA modifier = great_war_alliance_modifier }
		
		116 = {
			remove_building = {
				type = infrastructure
				level = 1
			}
			remove_building = {
				type = naval_base
				level = 1
				province = 12003
			}
			remove_building = {
				type = coastal_bunker
				level = 1
				province = 12003
			}
		}
		
		add_state_claim = 116
			
		create_wargoal = {
			type = take_claimed_state
			target = FROM
			generator = { 116 }
		}
		
		hidden_effect = {
			news_event = deluge_italy.28
		}
		
		ai_chance = {
			factor = 1
			
			modifier = {
				factor = 2
				has_government = fascism
			}
			
			modifier = {
				factor = 0
				is_historical_focus_on = no
			}
			
			modifier = {
				factor = 0
				has_war = yes
			}
		}
	}
	
	option = {
		name = deluge_italy27optb
		
		remove_opinion_modifier = { target = ITA modifier = great_war_alliance_modifier }
		
		add_political_power = 50
		
		hidden_effect = {
			news_event = deluge_italy.28
		}
		
		ai_chance = {
			factor = 10
		}
	}
}

# News event for a successful invasion of Malta

news_event = {
	id = deluge_italy.28
	title = deluge_italy28title
	desc = deluge_italy28desc
	
	picture = GFX_deluge_malta_large
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy28opta
		trigger = {
			OR = {
				original_tag = ENG
				is_in_faction_with = ENG
			}
		}
	}
	option = {
		name = deluge_italy28optb
		trigger = {
			OR = {
				original_tag = ITA
				is_in_faction_with = ITA
			}
		}
	}
	option = {
		name = deluge_italy28optc
		trigger = {
			NOT = {
				OR = {
					original_tag = ENG
					original_tag = ITA
					is_in_faction_with = ENG
					is_in_faction_with = ITA
				}
			}
		}
	}
}

# Italy chooses to assault Malta and the invasion fails

country_event = {
	id = deluge_italy.29
	title = deluge_italy29title
	desc = deluge_italy29desc
	
	picture = GFX_deluge_malta
	
	is_triggered_only = yes
	
	immediate = {
		116 = {
			damage_building = { type = infrastructure damage = 1 }
			damage_building = { type = naval_base damage = 1 province = 12003 }
			damage_building = { type = coastal_bunker damage = 1 province = 12003 }
		}
	}
	
	option = {
		name = deluge_italy29opt
		
		remove_opinion_modifier = { target = ITA modifier = great_war_alliance_modifier }
		
		hidden_effect = {
			news_event = deluge_italy.30
		}
	}
}

# News event for a failed invasion of Malta

news_event = {
	id = deluge_italy.30
	title = deluge_italy30title
	desc = deluge_italy30desc
	
	picture = GFX_deluge_malta_large
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy30opta
		trigger = {
			OR = {
				original_tag = ENG
				is_in_faction_with = ENG
			}
		}
	}
	option = {
		name = deluge_italy30optb
		trigger = {
			OR = {
				original_tag = ITA
				is_in_faction_with = ITA
			}
		}
	}
	option = {
		name = deluge_italy30optc
		trigger = {
			NOT = {
				OR = {
					original_tag = ENG
					original_tag = ITA
					is_in_faction_with = ENG
					is_in_faction_with = ITA
				}
			}
		}
	}
}

# Italy demands French provinces
# Sent to FRA by ITA focus

country_event = {
	id = deluge_italy.31
	title = deluge_italy31title
	desc = deluge_italy31desc
	
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes
	
	option = { # Accede to the demands in full
		name = deluge_italy31opta
		
		ITA = { country_event = deluge_italy.32 }
		
		add_named_threat = { threat = -5 name = deluge_appeasement_threat }
		
		diplomatic_relation = {
			country = ITA
			relation = non_aggression_pact
			active = yes
		}
		
		if = {
			limit = {
				owns_state = 1
			}
			ITA = { transfer_state = 1 }
		}
		if = {
			limit = {
				owns_state = 158
			}
			ITA = { transfer_state = 158 }
		}
		if = {
			limit = {
				owns_state = 735
			}
			ITA = { transfer_state = 735 }
		}
		if = {
			limit = {
				owns_state = 21
			}
			ITA = { transfer_state = 21 }
		}
		if = {
			limit = {
				owns_state = 32
			}
			ITA = { transfer_state = 32 }
		}
		
		ai_chance = {
			factor = 1

			modifier = {
				factor = 2
				ic_ratio = { tag = ITA ratio > 1.2 }
			}
			
			modifier = {
				factor = 2
				has_government = democratic
			}
			
			modifier = {
				factor = 0.5
				is_in_faction_with = SPR
			}
			
			modifier = {
				factor = 0.5
				is_in_faction_with = WGR
			}
			
			modifier = {
				factor = 0.1
				ITA = {
					NOT = {
						OR = {
							is_in_faction_with = POL
							is_in_faction_with = FRA
							is_in_faction_with = ENG
						}
					}
				}
			}
			
			modifier = {
				factor = 2
				has_war = yes
			}
			
			modifier = {
				factor = 5
				any_enemy_country = {
					is_major = yes
				}
			}
			
			modifier = {
				factor = 0.1
				is_historical_focus_on = yes
			}
		}
	}
	option = { # Offer Piedmont
		name = deluge_italy31optb
		
		trigger = {
			owns_state = 158
		}
		
		ITA = {
			country_event = deluge_italy.34
			transfer_state = 158
		}
		
		add_named_threat = { threat = -1 name = deluge_appeasement_threat }
		
		diplomatic_relation = {
			country = ITA
			relation = non_aggression_pact
			active = yes
		}
		
		ai_chance = {
			factor = 5
			
			modifier = {
				factor = 2
				ITA = {
					is_in_faction_with = AUS
				}
			}
			
			modifier = {
				factor = 2
				ITA = {
					is_in_faction_with = POL
				}
			}
			
			modifier = {
				factor = 2
				ITA = {
					is_in_faction_with = ENG
				}
			}
			
			modifier = {
				factor = 2
				ITA = {
					is_in_faction_with = SPR
				}
			}
			
			modifier = {
				factor = 2
				ITA = {
					is_in_faction_with = WGR
				}
			}
			
			modifier = {
				factor = 2
				ITA = {
					is_in_faction_with = GER
				}
			}
			
			modifier = {
				factor = 2
				has_government = neutrality
			}
			
			modifier = {
				factor = 2
				has_war = yes
			}
			
			modifier = {
				factor = 5
				any_enemy_country = {
					is_major = yes
				}
			}
		}
	}
	option = { # Never!
		name = deluge_italy31optc
		
		custom_effect_tooltip = tooltip_they_may_declare_war
		
		ITA = {
			country_event = deluge_italy.36
		}
		
		ai_chance = {
			factor = 1
			
			modifier = {
				factor = 2
				ic_ratio = { tag = ITA ratio < 0.7 }
			}
			
			modifier = {
				factor = 2
				has_government = fascism
			}
			
			modifier = {
				factor = 3
				is_in_faction_with = SPR
			}
			
			modifier = {
				factor = 3
				is_in_faction_with = WGR
			}
			
			modifier = {
				factor = 2
				ITA = {
					NOT = {
						OR = {
							is_in_faction_with = POL
							is_in_faction_with = SOV
							is_in_faction_with = ENG
						}
					}
				}
			}
			
			modifier = {
				factor = 2
				has_war = no
			}
			
			modifier = {
				factor = 5
				is_historical_focus_on = yes
			}
		}
	}
}

# France has capitulated to the Italian demands

country_event = {
	id = deluge_italy.32
	title = deluge_italy32title
	desc = deluge_italy32desc
	
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy33opt
	
		add_political_power = 75
		
		news_event = deluge_italy.33
	}
}

# News event for the transfer of Savoy, Piedmont and Corsica to Italy

news_event = {
	id = deluge_italy.33
	title = deluge_italy33title
	desc = deluge_italy33desc
	
	picture = GFX_news_event_009
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy33opta
		trigger = {
			OR = {
				original_tag = ITA
				is_in_faction_with = ITA
			}
		}
	}
	option = {
		name = deluge_italy33optb
		trigger = {
			OR = {
				original_tag = FRA
				is_in_faction_with = FRA
			}
		}
	}
	option = {
		name = deluge_italy33optc
		trigger = {
			NOT = {
				OR = {
					original_tag = ITA
					is_in_faction_with = ITA
					original_tag = FRA
					is_in_faction_with = FRA
				}
			}
		}
	}
}

# France cedes Piedmont to pacify Italy

country_event = {
	id = deluge_italy.34
	title = deluge_italy34title
	desc = deluge_italy34desc
	
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy34opta
	
		add_political_power = 25
		
		news_event = deluge_italy.35
		
		ai_chance = {
			factor = 5
			
			modifier = {
				factor = 2
				has_government = democratic
			}
			modifier = {
				factor = 2
				FRA = {
					is_in_faction_with = WGR
				}
			}
			modifier = {
				factor = 2
				FRA = {
					is_in_faction_with = SPR
				}
			}
			modifier = {
				factor = 2
				has_war = yes
			}
			
			modifier = {
				factor = 5
				any_enemy_country = {
					is_major = yes
				}
			}
		}
	}
	
	option = {
		name = deluge_italy34optb
	
		add_political_power = -75
		
		if = { limit = { NOT = { owns_state = 735 } }
			create_wargoal = {
				type = take_claimed_state
				target = FROM
				generator = { 735 21 32 }
			}
		}
		
		if = { limit = { NOT = { owns_state = 1 } }
			create_wargoal = {
				type = take_core_state
				target = FROM
				generator = { 1 }
			}
		}
		
		if = {
			limit = {
				has_government = communism
			}
			add_timed_idea = { idea = deluge_anti-war_sentiment_democratic_idea days = 365 }
		}
		
		if = {
			limit = {
				NOT = { has_government = communism }
			}
			add_timed_idea = { idea = deluge_anti-war_sentiment_communism_idea days = 365 }
		}
		
		news_event = deluge_italy.35
		
		ai_chance = {
			factor = 1
			
			modifier = {
				factor = 5
				is_historical_focus_on = yes
			}
		}
	}
}

# News event for the transfer of Piedmont to Italy
# Leaves open the possibility of Italy attacking for more

news_event = {
	id = deluge_italy.35
	title = deluge_italy35title
	desc = deluge_italy35desc
	
	picture = GFX_news_event_009
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy35opta
		trigger = {
			OR = {
				original_tag = ITA
				is_in_faction_with = ITA
			}
		}
	}
	option = {
		name = deluge_italy35optb
		trigger = {
			OR = {
				original_tag = FRA
				is_in_faction_with = FRA
			}
		}
	}
	option = {
		name = deluge_italy19optc
		trigger = {
			NOT = {
				OR = {
					original_tag = ITA
					is_in_faction_with = ITA
					original_tag = FRA
					is_in_faction_with = FRA
				}
			}
		}
	}
}

# France has refused to cede any land and Italy has an excuse to go to war

country_event = {
	id = deluge_italy.36
	title = deluge_italy36title
	desc = deluge_italy36desc
	
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy36opt
			
		if = { limit = { NOT = { owns_state = 735 } }
			create_wargoal = {
				type = take_claimed_state
				target = FROM
				generator = { 735 21 32 }
			}
		}
		
		if = { limit = { NOT = { owns_state = 1 } }
			create_wargoal = {
				type = take_core_state
				target = FROM
				generator = { 1 158 }
			}
		}
		
		news_event = deluge_italy.37
	}
}

# News event for French refusal to cede any land

news_event = {
	id = deluge_italy.37
	title = deluge_italy37title
	desc = deluge_italy37desc
	
	picture = GFX_news_event_009
	
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = deluge_italy37opta
		trigger = {
			OR = {
				original_tag = ITA
				is_in_faction_with = ITA
			}
		}
	}
	option = {
		name = deluge_italy37optb
		trigger = {
			OR = {
				original_tag = FRA
				is_in_faction_with = FRA
			}
		}
	}
	option = {
		name = deluge_italy37optc
		trigger = {
			NOT = {
				OR = {
					original_tag = ITA
					is_in_faction_with = ITA
					original_tag = FRA
					is_in_faction_with = FRA
				}
			}
		}
	}
}

