add_namespace = iceland

#Swedish-Icelandic Alliance
country_event = {
	id = iceland.1
	title = iceland.1.t
	desc = iceland.1.d
	picture = GFX_report_event_icelandic_flag
	
	is_triggered_only = yes
	
	option = {
		name = iceland.1.o1
		hidden_effect = {
			ICE = { create_faction = northern_alliance }
			ICE = { add_to_faction = SWE }
		}
		ICE = { country_event = { id = diplomatic_response.1 hours = 2 } }
		
		set_country_flag = seeks_icelandic_alliance
		
		ai_chance = { factor = 100 }
	}
	
	option = {
		name = iceland.1.o2
		ICE = { country_event = { id = diplomatic_response.2 hours = 2 } }
		
		ai_chance = { factor = 0 }
	}
}

#Invitation to the Icelandic Alliance
country_event = {
	id = iceland.2
	title = iceland.2.t
	desc = iceland.2.d
	picture = GFX_report_event_icelandic_flag
	
	is_triggered_only = yes
	
	option = {
		name = iceland.2.o1
		
		ICE = { add_to_faction = ROOT }
		ICE = { country_event = { id = diplomatic_response.1 hours = 2 } }
		
		set_country_flag = seeks_icelandic_alliance
		
		ai_chance = { factor = 100 }
	}
	
	option = {
		name = iceland.2.o2
		ICE = { country_event = { id = diplomatic_response.2 hours = 2 } }
		
		ai_chance = { factor = 0 }
	}
}

#Faroe Islands Ultimatum
country_event = {
	id = iceland.3
	title = iceland.3.t
	desc = iceland.3.d
	picture = GFX_report_event_icelandic_flag
	
	is_triggered_only = yes
	
	option = {
		name = iceland.3.o1
		
		ICE = { country_event = { id = iceland.4 hours = 2 } }
		
		ai_chance = { factor = 10 }
	}
	
	option = {
		name = iceland.3.o2
		
		ICE = { country_event = { id = iceland.5 hours = 2 } }
		
		ai_chance = {
			factor = 0
			modifier = {
				is_in_faction = yes
				add = 20
			}
			modifier = {
				has_government = fascist
				add = 10
			}
		}
	}
}

#Faroe Islands Ultimatum Accepted
country_event = {
	id = iceland.4
	title = iceland.4.t
	desc = iceland.4.d
	picture = GFX_report_event_icelandic_flag
	
	is_triggered_only = yes
	
	option = {
		name = iceland.4.o1
		transfer_state = 337
	}
}

#Faroe Islands Ultimatum Rejected
country_event = {
	id = iceland.5
	title = iceland.5.t
	desc = iceland.5.d
	picture = GFX_report_event_icelandic_flag
	
	is_triggered_only = yes
	
	option = {
		name = iceland.5.o1
		add_named_threat = {
			threat = 1.5
			name = threat_ICE_faroe_islands_aggression
		}
		hidden_effect = {
			337 = {
				owner = { ICE = { create_wargoal = { type = take_state_focus generator = { 337 } target = PREV } } }
			}
		}
	}
	
	option = {
		name = iceland.5.o2
		add_stability = -0.05
	}
}

#Greenlandic Independence Ultimatum
country_event = {
	id = iceland.6
	title = iceland.6.t
	desc = iceland.6.d
	picture = GFX_report_event_icelandic_flag
	
	is_triggered_only = yes
	
	option = {
		name = iceland.6.o1
		
		ICE = { country_event = { id = iceland.7 hours = 2 } }
		
		ai_chance = { 
			factor = 10
			modifier = {
				ICE = { is_in_faction = yes }
				add = 10
			}
		}
	}
	
	option = {
		name = iceland.6.o2
		
		ICE = { country_event = { id = iceland.8 hours = 2 } }
		
		ai_chance = {
			factor = 10
			modifier = {
				is_in_faction = no
				add = -20
			}
			modifier = {
				has_government = fascist
				add = 10
			}
			modifier = {
				has_government = nationalist
				add = 10
			}
		}
	}
}

#Greenlandic Independence Ultimatum Accepted
country_event = {
	id = iceland.7
	title = iceland.7.t
	desc = iceland.7.d
	picture = GFX_report_event_icelandic_flag
	
	is_triggered_only = yes
	
	option = {
		name = iceland.7.o1
		set_autonomy = {
			target = GRN
			autonomy_state = autonomy_free
		}
	}
}

#Greenlandic Independence Ultimatum Rejected
country_event = {
	id = iceland.8
	title = iceland.8.t
	desc = iceland.8.d
	picture = GFX_report_event_icelandic_flag
	
	is_triggered_only = yes
	
	option = {
		name = iceland.8.o1
	}
}

#Asking to join CSTO
country_event = {
	id = iceland.9
	title = iceland.2.t
	desc = iceland.1.d
	picture = GFX_report_event_icelandic_flag
	
	is_triggered_only = yes
	
	option = {
		name = iceland.1.o1
		
		SOV = { add_to_faction = ICE }
		ICE = { country_event = { id = diplomatic_response.1 hours = 2 } }
		
		ai_chance = { 
			factor = 100
		}
	}
	
	option = {
		name = iceland.1.o2
		
		ICE = { country_event = { id = diplomatic_response.2 hours = 2 } }
		
		ai_chance = {
			factor = 0
		}
	}
}

#Alliance with China
country_event = {
	id = iceland.10
	title = iceland.2.t
	desc = iceland.1.d
	picture = GFX_report_event_icelandic_flag
	
	is_triggered_only = yes
	
	option = {
		name = iceland.1.o1
		
		PRC = { add_to_faction = ICE }
		ICE = { country_event = { id = diplomatic_response.1 hours = 2 } }
		
		ai_chance = { 
			factor = 100
		}
	}
	
	option = {
		name = iceland.1.o2
		
		ICE = { country_event = { id = diplomatic_response.2 hours = 2 } }
		
		ai_chance = {
			factor = 0
		}
	}
}

#Iceland Surrenders
country_event = {
	id = iceland.11
	title = iceland.11.t
	desc = iceland.11.d
	picture = GFX_report_event_icelandic_flag
	
	is_triggered_only = yes
	
	option = {
		name = iceland.11.o1
		ROOT = { puppet = {
    target = ICE
    end_wars = yes } }
	}
}

#2008 crash
country_event = {
	id = iceland.12
	title = iceland.12.t
	desc = iceland.12.d
	picture = GFX_report_event_icelandic_flag
	
	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2008.09.15
	}
	
	fire_only_once = yes
	
	option = {
		name = iceland.12.o1
		add_stability = -0.2
		add_ideas = ICE_aftermath_of_2008
		set_country_flag = ICE_broken_economy
		mark_focus_tree_layout_dirty = yes
	}
}

#Panama Papers
country_event = {
	id = iceland.13
	title = iceland.13.t
	desc = iceland.13.d
	picture = GFX_report_event_icelandic_flag
	
	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2016.04.03
		has_country_flag = ICE_sigmundur_in_progress
	}
	
	fire_only_once = yes
	
	option = {
		name = iceland.13.o1
		add_ideas = ICE_panama_outrage
		set_country_flag = ICE_panama_papers
	}
}

#New Danelaw
country_event = {
	id = iceland.14
	title = iceland.14.t
	desc = iceland.14.d
	picture = GFX_report_event_icelandic_flag
	
	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		owns_state = 126
		NOT = { country_exists = ENG }
	}
	
	fire_only_once = yes
	
	option = { #Create a new Danelaw
		name = iceland.14.o1
	119 = { remove_core_of = ENG }
	120 = { remove_core_of = ENG }
	136 = { remove_core_of = ENG }
	121 = { remove_core_of = ENG }
	133 = { remove_core_of = ENG }
	122 = { remove_core_of = ENG }
	1173 = { remove_core_of = ENG }
	131 = { remove_core_of = ENG }
	130 = { remove_core_of = ENG }
	132 = { remove_core_of = ENG }
	129 = { remove_core_of = ENG }
	128 = { remove_core_of = ENG }
	release_puppet = ENG
	ENG = { set_cosmetic_tag = ENG_danelaw }
	}
	
	option = { #Occupy London
		name = iceland.14.o2
	add_political_power = -100
	add_stability = -0.1	
	add_war_support = -0.1
	set_country_flag = ENG_denied_autonomy
	}
}

###########################
# Iceland Parties Events
###########################

add_namespace = Ice_party

#New Force founded
country_event = {
	id = Ice_party.1
	title = Ice_party.1.t
	desc = Ice_party.1.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2002.05.09
	}
	
	fire_only_once = yes

	option = {
		name = Ice_party.1.a
		set_party_name = {
			ideology = reactionary
			long_name = "Nýtt Afl"
			name = "New Force"
		}
		add_popularity = { ideology = conservative popularity = -0.01 }
		add_popularity = { ideology = reactionary popularity = 0.01 }
		set_country_flag = ICE_new_force_exists
	}
	
}

#New Force disbanded
country_event = {
	id = Ice_party.2
	title = Ice_party.2.t
	desc = Ice_party.2.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2006.05.12
		NOT = { has_government = reactionary }
		reactionary < 0.05
	}
	
	fire_only_once = yes

	option = {
		name = Ice_party.2.a
		add_popularity = { ideology = market_liberal popularity = party_popularity@reactionary }
		add_popularity = { ideology = reactionary popularity = -1 }
		retire_character = ICE_jon_magnusson
		clr_country_flag = ICE_new_force_exists
	}
	
}

#Dawn founded
country_event = {
	id = Ice_party.3
	title = Ice_party.3.t
	desc = Ice_party.3.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2012.03.18
		NOT = { has_government = market_liberal }
		market_liberal < 0.05
	}
	
	fire_only_once = yes

	option = {
		name = Ice_party.3.a
		set_party_name = {
			ideology = market_liberal
			long_name = "Dögun"
			name = "Dawn"
		}
		retire_character = ICE_sigurjon_thordarsson
		set_country_flag = ICE_T_exists
	}
	
}

#Pirates founded
country_event = {
	id = Ice_party.4
	title = Ice_party.4.t
	desc = Ice_party.4.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2012.11.24
	}
	
	fire_only_once = yes

	option = {
		name = Ice_party.4.a
	add_popularity = { ideology = market_liberal popularity = 0.01 }
	set_country_flag = ICE_P_exists
	}
	
}

#People's Front founded
country_event = {
	id = Ice_party.5
	title = Ice_party.5.t
	desc = Ice_party.5.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2013.02.18
	}
	
	fire_only_once = yes

	option = {
		name = Ice_party.5.a
		set_party_name = {
			ideology = communist
			long_name = "Alþýðufylkingin"
			name = "People's Front of Iceland"
		}
		add_popularity = { ideology = communist popularity = 0.01 }
		set_country_flag = ICE_R_exists
	}
	
}

#National Front founded
country_event = {
	id = Ice_party.6
	title = Ice_party.6.t
	desc = Ice_party.6.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2016.01.18
	}
	
	fire_only_once = yes

	option = {
		name = Ice_party.6.a
		set_party_name = {
			ideology = nationalist
			long_name = "Íslenska þjóðfylkingin"
			name = "Icelandic National Front"
		}
		add_popularity = { ideology = nationalist popularity = 0.01 }
		set_country_flag = ICE_E_exists
	}
	
}

#People's Party founded
country_event = {
	id = Ice_party.7
	title = Ice_party.7.t
	desc = Ice_party.7.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2016.01.27
	}
	
	fire_only_once = yes

	option = {
		name = Ice_party.7.a
		add_popularity = { ideology = social_democrat popularity = 0.01 }
		set_country_flag = ICE_F2_exists
	}
	
}

#Reform Party founded
country_event = {
	id = Ice_party.8
	title = Ice_party.8.t
	desc = Ice_party.8.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2016.05.24
	}
	
	fire_only_once = yes

	option = {
		name = Ice_party.8.a
		add_popularity = { ideology = social_liberal popularity = 0.01 }
		add_popularity = { ideology = conservative popularity = -0.01 }
		set_country_flag = ICE_C_exists
	}
	
}

#Socialist Party founded
country_event = {
	id = Ice_party.9
	title = Ice_party.9.t
	desc = Ice_party.9.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2017.05.01
	}
	
	fire_only_once = yes

	option = {
		name = Ice_party.9.a
		set_party_name = {
			ideology = democratic_socialist
			long_name = "Sósíalistaflokkur Íslands"
			name = "Icelandic Socialist Party"
		}
		add_popularity = { ideology = democratic_socialist popularity = 0.01 }
		promote_character = {
		character = ICE_gunnar_smari_egilsson
		ideology = democratic_socialist_ideology }
		set_country_flag = ICE_J_exists
	}
	
}

#Dawn Disbanded
country_event = {
	id = Ice_party.10
	title = Ice_party.10.t
	desc = Ice_party.10.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2012.11.24
		NOT = { has_government = market_liberal }
		market_liberal < 0.1
		NOT = { has_country_flag = ICE_O_exists }
	}
	
	fire_only_once = yes

	option = {
		name = Ice_party.10.a
		set_party_name = {
			ideology = market_liberal
			long_name = "Píratar"
			name = "Pirate Party"
		}
	retire_character = ICE_andrea_johanna_olafsdottir
	promote_character = {
		character = ICE_pirate_party
		ideology = Pirates }
	}
}

#Dawn disbanded with LibDems existing
country_event = {
	id = Ice_party.11
	title = Ice_party.10.t
	desc = Ice_party.10.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2012.11.24
		NOT = { has_government = market_liberal }
		market_liberal < 0.1
		has_country_flag = ICE_O_exists
	}
	
	fire_only_once = yes

	option = {
		name = Ice_party.10.a
		set_party_name = {
			ideology = market_liberal
			long_name = "Píratar"
			name = "Pirate Party"
		}
	retire_character = ICE_andrea_johanna_olafsdottir
	promote_character = {
		character = ICE_pirate_party
		ideology = Pirates }
	}
	option = {
		name = Ice_party.10.b
		set_party_name = {
			ideology = market_liberal
			long_name = "Frjálslyndi Lýðræðisflokkurinn"
			name = "Liberal Democratic Party"
		}
	retire_character = ICE_andrea_johanna_olafsdottir
	promote_character = {
		character = ICE_gudmundur_franklin_jonsson
		ideology = market_liberal_ideology }
	}
}

#LibDems founded
country_event = {
	id = Ice_party.12
	title = Ice_party.12.t
	desc = Ice_party.12.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2020.10.14
	}
	
	fire_only_once = yes

	option = {
		name = Ice_party.12.a
	add_popularity = { ideology = market_liberal popularity = 0.01 }
	set_country_flag = ICE_O_exists
	}
	
}

#Centre Party founded
country_event = {
	id = Ice_party.13
	title = Ice_party.13.t
	desc = Ice_party.13.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2017.09.24
		has_country_flag = ICE_sigmundur_kicked
	}
	
	fire_only_once = yes

	option = {
		name = Ice_party.13.a
		set_party_name = {
			ideology = reactionary
			long_name = "Miðflokkurinn"
			name = "Centre Party"
		}
		add_popularity = { ideology = reactionary popularity = 0.01 }
		set_country_flag = ICE_M_exists
	}
	
}

###########################
# Iceland Leader Succession Events
###########################

add_namespace = Ice_leader

country_event = {
	id = Ice_leader.1
	title = Ice_leader.1.t
	desc = Ice_leader.1.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2005.10.16
		NOT = { has_government = conservative }
	}
	
	fire_only_once = yes

	option = {
		name = Ice_leader.1.a
		retire_character = ICE_david_oddson
	}
}

country_event = {
	id = Ice_leader.2
	title = Ice_leader.2.t
	desc = Ice_leader.2.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2009.03.29
		NOT = { has_government = conservative }
	}
	
	fire_only_once = yes

	option = {
		name = Ice_leader.2.a
		retire_character = ICE_geir_haarde
	}
}

country_event = {
	id = Ice_leader.3
	title = Ice_leader.3.t
	desc = Ice_leader.3.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2006.06.15
		NOT = { has_government = social_liberal }
	}
	
	fire_only_once = yes

	option = {
		name = Ice_leader.3.a
		retire_character = ICE_halldor_asgrimsson
	}
}

country_event = {
	id = Ice_leader.4
	title = Ice_leader.4.t
	desc = Ice_leader.4.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2007.05.24
		NOT = { has_government = social_liberal }
	}
	
	fire_only_once = yes

	option = {
		name = Ice_leader.4.a
		retire_character = ICE_jon_sigurdsson
	}
}

country_event = {
	id = Ice_leader.5
	title = Ice_leader.5.t
	desc = Ice_leader.5.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2008.11.17
		NOT = { has_government = social_liberal }
	}
	
	fire_only_once = yes

	option = {
		name = Ice_leader.5.a
		retire_character = ICE_gudni_agustsson
	}
}

country_event = {
	id = Ice_leader.6
	title = Ice_leader.6.t
	desc = Ice_leader.6.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2009.01.18
		NOT = { has_government = social_liberal }
	}
	
	fire_only_once = yes

	option = {
		name = Ice_leader.6.a
		retire_character = ICE_valgerdur_sverrisdottir
		set_country_flag = ICE_sigmundur_in_progress
	}
}

country_event = {
	id = Ice_leader.7
	title = Ice_leader.7.t
	desc = Ice_leader.7.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2005.05.24
		NOT = { has_government = social_democrat }
	}
	
	fire_only_once = yes

	option = {
		name = Ice_leader.7.a
		retire_character = ICE_ossur_skarpheðinsson
	}
}

country_event = {
	id = Ice_leader.8
	title = Ice_leader.8.t
	desc = Ice_leader.8.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2009.02.01
		NOT = { has_government = social_democrat }
	}
	
	fire_only_once = yes

	option = {
		name = Ice_leader.8.a
		retire_character = ICE_ingibjorg_solrun_gisladottir
	}
}

country_event = {
	id = Ice_leader.9
	title = Ice_leader.9.t
	desc = Ice_leader.9.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2013.05.23
		NOT = { has_government = social_democrat }
	}
	
	fire_only_once = yes

	option = {
		name = Ice_leader.9.a
		retire_character = ICE_johanna_sigurdardottir
	}
}

country_event = {
	id = Ice_leader.10
	title = Ice_leader.10.t
	desc = Ice_leader.10.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2016.06.03
		NOT = { has_government = social_democrat }
	}
	
	fire_only_once = yes

	option = {
		name = Ice_leader.10.a
		retire_character = ICE_arni_pall_arnason
	}
}

country_event = {
	id = Ice_leader.11
	title = Ice_leader.11.t
	desc = Ice_leader.11.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2016.10.31
		NOT = { has_government = social_democrat }
	}
	
	fire_only_once = yes

	option = {
		name = Ice_leader.11.a
		retire_character = ICE_oddny_gudbjorg_hardardottir
	}
}

country_event = {
	id = Ice_leader.12
	title = Ice_leader.12.t
	desc = Ice_leader.12.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2013.02.24
		NOT = { has_government = progressive }
	}
	
	fire_only_once = yes

	option = {
		name = Ice_leader.12.a
		retire_character = ICE_steingrimur_j_sigfusson
	}
}

country_event = {
	id = Ice_leader.13
	title = Ice_leader.13.t
	desc = Ice_leader.13.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2003.05.21
		NOT = { has_government = market_liberal }
	}
	
	fire_only_once = yes

	option = {
		name = Ice_leader.13.a
		retire_character = ICE_sverrir_hermannsson
	}
}

country_event = {
	id = Ice_leader.14
	title = Ice_leader.14.t
	desc = Ice_leader.14.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2010.03.20
		NOT = { has_government = market_liberal }
	}
	
	fire_only_once = yes

	option = {
		name = Ice_leader.14.a
		retire_character = ICE_gudjon_arnar_kristjansson
	}
}

country_event = {
	id = Ice_leader.15
	title = Ice_leader.15.t
	desc = Ice_leader.15.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2017.10.20
		NOT = { has_government = nationalist }
	}
	
	fire_only_once = yes

	option = {
		name = Ice_leader.15.a
		retire_character = ICE_helgi_helgason
	}
}

country_event = {
	id = Ice_leader.16
	title = Ice_leader.16.t
	desc = Ice_leader.16.desc

	#is_triggered_only = yes
	trigger = {
		original_tag = ICE
		date > 2017.10.12
		NOT = { has_government = social_liberal }
	}
	
	fire_only_once = yes

	option = {
		name = Ice_leader.16.a
		retire_character = ICE_benedikt_johannesson
		set_country_flag = ICE_benedikt_gone
	}
}