﻿###########################
# Italian Events
###########################

add_namespace = italy

# Boltons agree to (Hornwood puppet)
country_event = {
	id = italy.1
	title = italy.1.t
	desc = italy.1.d
	picture = GFX_report_event_royal_parade
	
	is_triggered_only = yes
	
	option = {
		name = italy.1.a

		hidden_effect = {
#			country_event = { days = 1 id = news.22 }
		}
	}
}

# Boltons demand annexation
country_event = {
	id = italy.2
	title = italy.2.t
	desc = italy.2.d
	picture = GFX_report_event_albanian_partisans
	
	is_triggered_only = yes
	
	option = { # Agree
		name = italy.2.a

		ITA = {
			country_event = { days = 1 id = italy.10 }
		}

		hidden_effect = {
#			country_event = { days = 1 id = news.23 }
		}
	}

	option = { # End talks
		name = italy.2.b

		ITA = {
			country_event = { hours = 1 id = italy.7 }
		}

		unlock_national_focus = STR_embargo_bolton

		hidden_effect = {
#			country_event = { days = 1 id = news.23 }
		}
	}
}

# Starks offer Hornwood as puppet
country_event = {
	id = italy.3
	title = italy.3.t
	desc = italy.3.d
	picture = GFX_report_event_albanian_king_zog
	
	is_triggered_only = yes
	
	option = { # Agree
		name = italy.3.a
		ai_chance = {
			base = 40
		}

		ARM = { transfer_state = 113 }
		puppet = ARM

		FIN = { remove_state_core = 113 }
		ITA = { remove_state_claim = 694 }

		ITA = {
#			add_opinion_modifier = { target = ITA modifier = ita_diplomacy_focus }
			if = {
				limit = { FIN = { has_government = fascism } }
				add_timed_idea = { idea = fascist_influence days = 735 }
			}
			if = {
				limit = { FIN = { has_government = democratic } }
				add_timed_idea = { idea = democratic_influence days = 735 }
			}
			if = {
				limit = { FIN = { has_government = communism } }
				add_timed_idea = { idea = communist_influence days = 735 }
			}
		}

		hidden_effect = {
			FIN = { country_event = { days = 1 id = italy.1 } }
		}

#		custom_effect_tooltip = GAME_OVER_TT
	}

	option = { # Demand full land
		name = italy.3.b
		ai_chance = {
			factor = 20 
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

		FIN = {
			country_event = { days = 1 id = italy.2 }
		}
	}
}

# Boltons offer deal
country_event = {
	id = italy.4
	title = italy.4.t
	desc = italy.4.d
	picture = GFX_report_event_bunker_01
	
	is_triggered_only = yes
	
	option = {
		name = italy.4.a 	#sounds good
		ai_chance = { factor = 15 }
		ITA = {
			country_event = { days = 1 id = italy.5 }
		}
	}
	option = {
		name = italy.4.b 	#offer puppet
		ai_chance = { factor = 25 }
		ITA = {
			country_event = { days = 1 id = italy.6 }
		}
	}
	option = {
		name = italy.4.c 	#walk out
		ai_chance = { factor = 5 }
		ITA = {
			country_event = { days = 1 id = italy.7 }
		}
	}
}


# Starks agree to give Hornwood
country_event = {
	id = italy.5
	title = italy.5.t
	desc = italy.5.d
	picture = GFX_report_event_german_italian_pact
	
	is_triggered_only = yes
	
	option = {
		name = italy.5.a	#sounds good
		ai_chance = { factor = 10 }
#		ITA = {
#			country_event = { days = 1 id = italy.6 }
#		}
		ITA = { transfer_state = 113 }
		FIN = { remove_state_core = 113 }
		ITA = { remove_state_claim = 392 }
		ITA = { add_state_core = 113 }

		if = {
			limit = { has_idea = BLT_flay_tradition }
			remove_ideas = BLT_flay_tradition
		}
	}
	
	option = {
		name = italy.5.b	#no way 
		ai_chance = { factor = 0 }
		FIN = {
			country_event = { days = 1 id = italy.7 }
		}
	}
}

# Starks insist on puppet Hornwood
country_event = {
	id = italy.6
	title = italy.6.t
	desc = italy.6.d
	picture = GFX_report_event_physics_lab_01

	is_triggered_only = yes
	
	option = {
		name = italy.6.a
		ai_chance = { factor = 10 }

		ARM = { transfer_state = 113 }
		puppet = ARM

		FIN = { remove_state_core = 113 }
		ITA = { remove_state_claim = 392 }
	}

	option = {
		name = italy.6.b
		ai_chance = { factor = 0 }

		FIN = {
			country_event = { days = 1 id = italy.7 }
		}
	}
}

# Starks wont negotiate further // Starks walk out of deal
country_event = {
	id = italy.7
	title = italy.7.t
	desc = italy.7.d
	picture = GFX_report_event_albanian_partisans

	is_triggered_only = yes
	
	option = {
		name = italy.7.a
		add_political_power = -50
	}
}

# French national focus - French asks Italy to join french faction // Boltons insist on deal
country_event = {
	id = italy.8
	title = italy.8.t
	desc = italy.8.d
	picture = GFX_report_event_german_parade_paris

	is_triggered_only = yes
	
	option = {
		name = italy.8.a
		FRA = {
			if = {
				limit = { is_in_faction = no }
				set_rule = { can_create_factions = yes }
				create_faction = "domination_francaise"
			}
		}
		FRA = {	add_to_faction = ITA }
		ITA = {
			add_ai_strategy = {
				type = alliance
				id = "FRA"
				value = 200
			}
		}
		hidden_effect = {
			news_event = { hours = 6 id = news.181 }
		}
	}
	option = {
		name = italy.8.b
		ai_chance = { factor = 0 }
		FRA = {
			add_opinion_modifier = { target = ITA modifier = ITA_FRA_woo_italy_reject }
		}	
		hidden_effect = {
			news_event = { hours = 6 id = news.183 }
		}
	}
}

# Request Balearic Islands from Spain // Starks offer monetary compensation and resource rights - final offer
country_event = {
	id = italy.9
	title = italy.9.t
	desc = italy.9.d
	picture = GFX_report_event_merchant_ship_01

	is_triggered_only = yes
	
	option = {
		name = italy.9.a
		country_event = { id = italy.10 }
		effect_tooltip = {
			ITA = { transfer_state = 177 }
			remove_opinion_modifier = { target = ITA modifier = ita_supported_spain_civil_war }
		}

		hidden_effect = {
			news_event = { id = news.190 }
		}
	}
	option = {
		name = italy.9.b
		ai_chance = { factor = 0 }
		country_event = { id = italy.11 }
		effect_tooltip = {
			ITA = { add_state_claim = 177 }
		}
	}
}

# Starks Give Up Hornwood
country_event = {
	id = italy.10
	title = italy.10.t
	desc = italy.10.d
	picture = GFX_report_event_merchant_ship_01

	is_triggered_only = yes
	
	option = {
		name = italy.10.a
		ITA = { transfer_state = 113 }
		FIN = { remove_state_core = 113 }
		ITA = { remove_state_claim = 694 }
		ITA = { 
			set_politics = {
				ruling_party = democratic
				elections_allowed = no
			}
		}

		hidden_effect = {
			FIN = { country_event = { hours = 1 id = italy.1 } }
			add_opinion_modifier = { target = FIN modifier = ceeded_hornwood } 
			add_popularity = {
				ideology = democratic
				popularity = 0.50
			}
		}
	}
	option = {
		name = italy.10.b
		ai_chance = { factor = 0 }
	}
}

# Spain Refuses to Give Up Islands
country_event = {
	id = italy.11
	title = italy.11.t
	desc = italy.11.d
	picture = GFX_report_event_merchant_ship_01

	is_triggered_only = yes
	
	option = {
		name = italy.11.a
		ITA = { add_state_claim = 177 }
	}
}

# Germany want to claim Slovenia from Yugoslavia - fate of Hornwood?
country_event = {
	id = italy.12
	title = italy.12.t
	desc = italy.12.d
	picture = GFX_report_event_hitler_croatia_handshake

	is_triggered_only = yes
	
	option = {
		ai_chance = {
			factor = 33
			modifier = {
				factor = 3
				has_army_size = { size > 75 }
			}
		}
		name = italy.12.a
		ITA = {
			add_political_power = -100
			if = { limit = { is_faction_leader = yes }
				add_to_faction = YUG
				YUG = {
					add_ai_strategy = {
						type = alliance
						id = "ITA"
						value = 200
					}
				}
			}
			if = {
				limit = { 
					OR = {
						AND = {
							is_faction_leader = no
							is_in_faction = yes
						}
						is_in_faction = no
					}
				}
				create_faction = italy_empire_faction
				add_to_faction = YUG
				YUG = {
					add_ai_strategy = {
						type = alliance
						id = "ITA"
						value = 200
					}
				}
			}			
		}
		GER = { country_event = { id = germany.96 hours = 6 } }
	}	
	option = {
		ai_chance = {
			factor = 100
		}	
		name = italy.12.b
		YUG = {
			add_opinion_modifier = { target = ITA modifier = western_betrayal }
			country_event = { id = yugoslavia.5 hours = 6 }
		}
	}
}

# Italy (First Ljubljana Award) from german focus
country_event = {
	id = italy.13
	title = italy.13.t
	desc = { 
		text = italy.13.d_dalmatia_montenegro
		trigger = {
#			has_completed_focus = ITA_slovenia_dalmatia_claims
			owns_state = 44
		}
	}
	desc = { 
		text = italy.13.d_dalmatia
		trigger = {
#			has_completed_focus = ITA_slovenia_dalmatia_claims
			NOT = { owns_state = 44 }
		}
	}
	desc = { 
		text = italy.13.d_montenegro
		trigger = {
#			NOT = { has_completed_focus = ITA_slovenia_dalmatia_claims }
			owns_state = 44
		}
	}
 
	picture = GFX_report_event_vienna_award_negotiations
	
	is_triggered_only = yes
	
	option = {
		name = italy.13.a
		if = {
#			limit = { has_completed_focus = ITA_slovenia_dalmatia_claims }
			ITA = { transfer_state = 103 }
		}
		if = {
			limit = { owns_state = 44 }
			ITA = { transfer_state = 105 }
		}		
	}
}


# Italy Germany rejects demands for Vichy territory
country_event = {
	id = italy.14
	title = italy.14.t
	desc = italy.14.d
 
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes
	
	option = {
		ai_chance = { factor = 25 }
		name = italy.14.a
		GER = { 
			remove_from_faction = ITA 
			country_event = germany.105
		}
	}

	option = {
		ai_chance = { factor = 75 }
		name = italy.14.b
		FIN = { change_tag_from = ITA }

	}
}


# Italy Germany accepts demands for Vichy territory
country_event = {
	id = italy.15
	title = italy.15.t
	desc = { 
		text = italy.15.d
		trigger = {
			has_global_flag = ITA_claims_on_france_735
			has_global_flag = ITA_claims_on_france_1
		}
	}
	desc = { 
		text = italy.15.d_Corsica
		trigger = {
			NOT = { has_global_flag = ITA_claims_on_france_735 }
			has_global_flag = ITA_claims_on_france_1
		}
	}
 
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes
	
	option = {
		name = italy.15.a
		if = {
			limit = { has_global_flag = ITA_claims_on_france_735 }
			ITA = { transfer_state = 735 }
		}
		if = {
			limit = { has_global_flag = ITA_claims_on_france_1 }
			ITA = { transfer_state = 1 }
		}		
	}
}

# Stark invest
country_event = {
	id = italy.16
	title = italy.16.t
	desc = italy.16.desc
 
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes
	
	option = {
		name = italy.16.a

		if = {
			limit = { 
				ITA = { has_country_flag = STARK_industrial_investments }
			}
			random_owned_controlled_state = {
				limit = {
					ROOT = { has_full_control_of_state = PREV }
					free_building_slots = {
						building = industrial_complex
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		}

		if = {
			limit = { 
				ITA = { has_country_flag = STARK_military_investments }
			}
			random_owned_controlled_state = {
				limit = {
					is_coastal = yes
					free_building_slots = {
						building = dockyard
						size > 1
						include_locked = yes
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard
					level = 1
					instant_build = yes
				}
			}
		}
	}
}

# Lannisters want deal with Boltons
country_event = {
	id = italy.17
	title = italy.17.t
	desc = italy.17.d
 
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes
	
	option = {
		name = italy.17.a
		HOL = {	add_to_faction = ITA }
		hidden_effect = {
		if = {
			limit = {
				FIN = { owns_state = 392 }
				FIN = { owns_state = 113 }
			}

			add_state_claim = 392
			add_state_claim = 113
		}
		declare_war_on = {
			target = FIN
			type = annex_everything
		}
		}
		add_state_claim = 127
		add_state_claim = 126
		add_state_claim = 694

	}
	option = {
		name = italy.17.b
		FIN = {
			country_event = { id = finland.13 hours = 6 }
		}
	}
	option = {
		name = italy.17.c
		ai_chance = { factor = 0 }
	}
}

# Puppet or annex Hornwood?
country_event = {
	id = italy.18
	title = italy.18.t
	desc = italy.18.desc
 
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes
	
	option = {
		name = italy.18.a
		ITA = { add_state_core = 113 }
		hidden_effect = {

		}

	}
	option = {
		name = italy.18.b
		ITA = {
			release = ARM
			set_autonomy = {
				target = ARM
				autonomous_state = autonomy_puppet
			}
		}
	}
}

# Puppet or annex Widow's watch?
country_event = {
	id = italy.19
	title = italy.19.t
	desc = italy.19.desc
 
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes
	
	option = {
		name = italy.19.a
		ITA = { add_state_core = 135 }
		hidden_effect = {

		}

	}
	option = {
		name = italy.19.b
		ITA = {
			release = EST
			set_autonomy = {
				target = EST
				autonomous_state = autonomy_puppet
			}
		}
	}
}

#Japan propose NAP to ROOT
country_event = {
	id = italy.20
	title = italy.20.t
	desc = italy.20.desc
	picture = GFX_report_event_japan_europe_pact

	is_triggered_only = yes
	
	#Accept NAP
	option = {
		name = italy.20.a
		ai_chance = {
			base = 10
		}
		diplomatic_relation = {
			country = FROM
			relation = non_aggression_pact
			active = yes
		}
		FROM = { country_event = { id = italy.21 days = 1 } }
	}


	#Refuse NAP
	option = {
		name = italy.20.b
		ai_chance = {
			base = 0
		}
		FROM = { country_event = { id = italy.22 days = 1 } }	
	}
}

#Japan propose NAP to ROOT
country_event = {
	id = italy.21
	title = italy.21.t
	desc = italy.21.desc
	picture = GFX_report_event_japan_europe_pact

	is_triggered_only = yes
	
	option = {
		name = italy.21.a
		ai_chance = {
			base = 10
		}
		effect_tooltip = {
			diplomatic_relation = {
				country = FROM
				relation = non_aggression_pact
				active = yes
			}
		}
	}
}

#Japan propose NAP to ROOT
country_event = {
	id = italy.22
	title = italy.22.t
	desc = italy.22.desc
	picture = GFX_report_event_japan_europe_pact

	is_triggered_only = yes
	
	option = {
		name = italy.22.a
		ai_chance = {
			base = 10
		}
	}
}

#RIP Roose
country_event = {
	id = italy.23
	title = italy.23.t
	desc = italy.23.desc
	picture = GFX_report_event_hitler_croatia_handshake

	is_triggered_only = yes
	
	option = {
		name = italy.23.a
		ai_chance = {
			base = 10
		}
		kill_ideology_leader = neutrality
		if = {
			limit = {
				ITA = { has_completed_focus = BLT_MarryFreyGirl }
			}
			kill_ideology_leader = democratic
		}
	}
}

#Lord of Dreadfort
country_event = {
	id = italy.24
	title = italy.24.t
	desc = italy.24.desc
	picture = GFX_report_event_bul_prince_simeon

	trigger = {
		tag = ITA
		ITA = { has_completed_focus = BLT_MarryFreyGirl }
		ITA = {
			has_country_leader = {
				character = BOL_roose
				ruling_only = yes
			}
		}
	}

	mean_time_to_happen = {
		days = 270
	}

#	is_triggered_only = yes
	
	option = {
		name = italy.24.a
		ai_chance = {
			base = 10
		}
		activate_mission = BLT_dew_it_ramsay
		set_global_flag = BLT_anheirisborn
	}
}

#Baby Bolton
country_event = {
	id = italy.25
	title = italy.25.t
	desc = italy.25.desc
	picture = GFX_report_event_bul_prince_simeon

	is_triggered_only = yes
	
	option = {
		name = italy.25.a
		ai_chance = {
			base = 10
		}
		add_political_power = 50
		set_global_flag = BLT_heirisnotdead
		add_popularity = {
			ideology = fascism
			popularity = -0.50
		}
	}
}