﻿add_namespace = denmark

#denmark.1-200		Succession, Starting, General Information and Flavour Events
#denmark.201-500	Political and War Events
#denmark.501-700	Economy and Trade Events
#denmark.701-900	Military Events
#denmark.901-999	Parliamentary Events

##### SUCCESSION, STARTING, GENERAL INFO AND FLAVOUR EVENTS (denmark.1-200) #####

### SUCCESSION EVENTS (denmark.1-10) ###

#Death of Frederick VII
country_event = {
	id = denmark.1
	title = denmark.1.t
	desc = denmark.1.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	trigger = {
		#date > 1863.11.15
		has_idea = DEN_Frederick_VII
	}
		
	option = {
		name = denmark.1.a
		ai_chance = { base = 100 }
		custom_effect_tooltip = DEN_succession_effect_tt_1
		hidden_effect = {
			swap_ideas = { 
				remove_idea = DEN_Frederick_VII 
				add_idea = DEN_Christian_IX 
			}
			DEN_christian_ix = {
				add_country_leader_role = {
					country_leader = {
						expire = "1907.1.1"
						desc = "POLITICS_GENERIC_EOANB_DESC"
						ideology = constit_monarch
						traits = {
							#
						}
					}
				}
				promote_character = yes
				promote_character = constit_monarch
			}
			retire_character = DEN_frederick_vii
			if = {
				limit = {
					HLS = {
						is_puppet_of = DEN
						has_country_leader = {
							name = "Frederick VII"
							ruling_only = yes
						}
					}
				}
				HLS = {
					HLS_christian_ix = {
						add_country_leader_role = {
							promote_leader = yes
							country_leader = {
								expire = "1907.1.1"
								desc = "POLITICS_GENERIC_EOANB_DESC"
								ideology = constit_monarch
								traits = {
									#
								}
							}
						}
						add_country_leader_role = {
							country_leader = {
								expire = "1907.1.1"
								desc = "POLITICS_GENERIC_EOANB_DESC"
								ideology = conserv
								traits = {
									#
								}
							}
						}
						promote_character = constit_monarch
						promote_character = conserv
					}
					retire_character = HLS_frederick_vii
					swap_ideas = {
						remove_idea = DEN_Frederick_VII 
						add_idea = DEN_Christian_IX 
					}
				}
			}
			else_if = {
				limit = {
					HLS = {
						is_puppet_of = DEN
						has_country_leader = {
							name = "Frederick VII"
							ruling_only = no
						}
					}
				}
				HLS = {
					HLS_christian_ix = {
						add_country_leader_role = {
							country_leader = {
								expire = "1907.1.1"
								desc = "POLITICS_GENERIC_EOANB_DESC"
								ideology = constit_monarch
								traits = {
									#
								}
							}
						}
						add_country_leader_role = {
							country_leader = {
								expire = "1907.1.1"
								desc = "POLITICS_GENERIC_EOANB_DESC"
								ideology = conserv
								traits = {
									#
								}
							}
						}
						promote_character = yes
						promote_character = constit_monarch
						promote_character = conserv
					}
					retire_character = HLS_frederick_vii
					swap_ideas = {
						remove_idea = DEN_Frederick_VII 
						add_idea = DEN_Christian_IX 
					}
				}
			}
			if = {
				limit = {
					SCH = {
						is_puppet_of = DEN
						has_country_leader = {
							name = "Frederick VII"
							ruling_only = yes
						}
					}
				}
				SCH = {
					SCH_christian_ix = {
						add_country_leader_role = {
							promote_leader = yes
							country_leader = {
								expire = "1907.1.1"
								desc = "POLITICS_GENERIC_EOANB_DESC"
								ideology = constit_monarch
								traits = {
									#
								}
							}
						}
						add_country_leader_role = {
							country_leader = {
								expire = "1907.1.1"
								desc = "POLITICS_GENERIC_EOANB_DESC"
								ideology = conserv
								traits = {
									#
								}
							}
						}
						promote_character = constit_monarch
						promote_character = conserv
					}
					retire_character = SCH_frederick_vii
					swap_ideas = {
						remove_idea = DEN_Frederick_VII 
						add_idea = DEN_Christian_IX 
					}
				}
			}
			else_if = {
				limit = {
					SCH = {
						is_puppet_of = DEN
						has_country_leader = {
							name = "Frederick VII"
							ruling_only = no
						}
					}
				}
				SCH = {
					SCH_christian_ix = {
						add_country_leader_role = {
							country_leader = {
								expire = "1907.1.1"
								desc = "POLITICS_GENERIC_EOANB_DESC"
								ideology = constit_monarch
								traits = {
									#
								}
							}
						}
						add_country_leader_role = {
							country_leader = {
								expire = "1907.1.1"
								desc = "POLITICS_GENERIC_EOANB_DESC"
								ideology = conserv
								traits = {
									#
								}
							}
						}
						promote_character = yes
						promote_character = constit_monarch
						promote_character = conserv
					}
					retire_character = SCH_frederick_vii
					swap_ideas = {
						remove_idea = DEN_Frederick_VII 
						add_idea = DEN_Christian_IX 
					}
				}
			}
		}
	}
}

#Death of Christian IX
country_event = {
	id = denmark.2
	title = denmark.2.t
	desc = denmark.2.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	trigger = {
		#date > 1906.01.29
		has_idea = DEN_Christian_IX
	}
		
	option = {
		name = denmark.2.a
		ai_chance = { base = 100 }
		custom_effect_tooltip = DEN_succession_effect_tt_2
		hidden_effect = {
			swap_ideas = {
				remove_idea = DEN_Christian_IX 
				add_idea = DEN_Frederick_VIII 
			}
			DEN_frederick_viii = {
				add_country_leader_role = {
					country_leader = {
						expire = "1913.1.1"
						desc = "POLITICS_GENERIC_EOANB_DESC"
						ideology = constit_monarch
						traits = {
							#
						}
					}
				}
				promote_character = yes
				promote_character = constit_monarch
			}
			retire_character = DEN_christian_ix
		}
	}
}

#Death of Frederick VIII
country_event = {
	id = denmark.3
	title = denmark.3.t
	desc = denmark.3.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	trigger = {
		#date > 1912.05.14
		has_idea = DEN_Frederick_VIII
	}
		
	option = {
		name = denmark.3.a
		ai_chance = { base = 100 }
		custom_effect_tooltip = DEN_succession_effect_tt_3
		hidden_effect = {
			swap_ideas = { 
				remove_idea = DEN_Frederick_VIII 
				add_idea = DEN_Christian_X 
			}
			DEN_christian_x = {
				add_country_leader_role = {
					country_leader = {
						expire = "1948.1.1"
						desc = "POLITICS_GENERIC_EOANB_DESC"
						ideology = constit_monarch
						traits = {
							#
						}
					}
				}
				promote_character = yes
				promote_character = constit_monarch
			}
			retire_character = DEN_frederick_viii
		}
	}
}

### STARTING EVENTS (denmark.11-15) ###

#Foreign Relations of the Kingdom of Denmark
country_event = {
	id = denmark.11
	title = denmark.11.t
	desc = denmark.11.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = denmark.11.a
		ai_chance = { base = 100 }
	}
}

### GENERAL INFO AND FLAVOUR EVENTS (denmark.16-200) ###

#The Danish Population Boom
country_event = {
	id = denmark.16
	title = denmark.16.t
	desc = denmark.16.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = denmark.16.a
		ai_chance = { base = 100 }
	}
}

##### POLITICAL AND WAR EVENTS (denmark.201-500) #####

### DOMESTIC POLITICS EVENTS (denmark.201-300) ###

#Statsminister Carl Christoffer Georg Andræ Retires
country_event = {
	id = denmark.201
	title = denmark.201.t
	desc = denmark.201.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	#Carl Christian Hall Takes Over
	option = {
		name = denmark.201.a
		ai_chance = { base = 100 }
		complete_national_focus = DEN_focus_carl_christian_halls_presidency
		DEN_carl_christian_hall = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					desc = "DEN_CARL_CHRISTIAN_HALL_LEADER_DESC"
					ideology = market_liberal
					expire = "1931.1.1"
				}
			}
		}
		retire_character = DEN_carl_christoffer_georg_andrae
		add_popularity = {
			ideology = centrism
			popularity = 0.05
		}
	}
}

#The Eider Policy
country_event = {
	id = denmark.202
	title = denmark.202.t
	desc = denmark.202.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = denmark.202.a
		ai_chance = { base = 100 }
		add_war_support = 0.03
	}
}

#The 1858 Folketing Elections - Calculating Results (Hidden)
country_event = {
	id = denmark.203
	title = denmark.203.t
	desc = denmark.203.d
		
	is_triggered_only = yes
	fire_only_once = yes
	hidden = yes
	
	immediate = {
		if = {
			limit = {
				is_historical_focus_on = no
				centrism < 0.4
			}
			random_list = {
				25 = {
					set_country_flag = DEN_1858_elections_social_liberals_victorious_flag
				}
				20 = {
					set_country_flag = DEN_1858_elections_liberals_victorious_flag
				}
				5 = {
					set_country_flag = DEN_1858_elections_conservatives_victorious_flag
				}
				50 = {
					set_country_flag = DEN_1858_elections_historical_flag
				}
			}
		}
		else_if = {
			limit = {
				is_historical_focus_on = no
				centrism > 0.399
			}
			random_list = {
				65 = {
					set_country_flag = DEN_1858_elections_liberals_victorious_flag
				}
				35 = {
					set_country_flag = DEN_1858_elections_historical_flag
				}
			}
		}
		country_event = { id = denmark.204 }
	}
}

#The 1858 Folketing Elections - Results (June 1858)
country_event = {
	id = denmark.204
	title = denmark.204.t
	desc = {
		trigger = {
			OR = {
				is_historical_focus_on = yes
				has_country_flag = DEN_1858_elections_historical_flag
			}
		}
		text = denmark.204.d_historical
	}
	desc = {
		trigger = {
			is_historical_focus_on = no
			has_country_flag = DEN_1858_elections_social_liberals_victorious_flag
		}
		text = denmark.204.d_althistory_social_liberals
	}
	desc = {
		trigger = {
			is_historical_focus_on = no
			has_country_flag = DEN_1858_elections_liberals_victorious_flag
		}
		text = denmark.204.d_althistory_liberals
	}
	desc = {
		trigger = {
			is_historical_focus_on = no
			has_country_flag = DEN_1858_elections_conservatives_victorious_flag
		}
		text = denmark.204.d_althistory_conservatives
	}
		
	is_triggered_only = yes
	fire_only_once = yes
	
	immediate = {
		hidden_effect = {
			complete_national_focus = DEN_focus_the_1858_elections
		}
	}
	
	option = {
		name = denmark.204.a
		ai_chance = { base = 100 }
		if = {
			limit = {
				OR = {
					is_historical_focus_on = yes
					has_country_flag = DEN_1858_elections_historical_flag
				}
			}
			set_popularities = {
				ideology_social_liberalism = 35
				centrism = 40
				traditional_conservatism = 20
				social_egalitarianism = 3
				autocracy = 2
			}
			if = {
				limit = {
					has_government = centrism
				}
				add_political_power = 50
				add_stability = 0.02
			}
			else = {
				add_political_power = -10
				add_stability = -0.01
			}
		}
		else_if = {
			limit = {
				has_country_flag = DEN_1858_elections_social_liberals_victorious_flag
			}
			set_popularities = {
				ideology_social_liberalism = 40
				centrism = 35
				traditional_conservatism = 20
				social_egalitarianism = 3
				autocracy = 2
			}
			if = {
				limit = {
					has_government = ideology_social_liberalism
				}
				add_political_power = 50
				add_stability = 0.02
			}
			else = {
				add_political_power = -10
				add_stability = -0.01
			}
		}
		else_if = {
			limit = {
				has_country_flag = DEN_1858_elections_liberals_victorious_flag
			}
			set_popularities = {
				ideology_social_liberalism = 30
				centrism = 45
				traditional_conservatism = 20
				social_egalitarianism = 3
				autocracy = 2
			}
			if = {
				limit = {
					has_government = centrism
				}
				add_political_power = 75
				add_stability = 0.03
			}
			else = {
				add_political_power = -20
				add_stability = -0.02
			}
		}
		else_if = {
			limit = {
				has_country_flag = DEN_1858_elections_conservatives_victorious_flag
			}
			set_popularities = {
				ideology_social_liberalism = 30
				centrism = 25
				traditional_conservatism = 40
				social_egalitarianism = 3
				autocracy = 2
			}
			if = {
				limit = {
					has_government = traditional_conservatism
				}
				add_political_power = 75
				add_stability = 0.03
			}
			else = {
				add_political_power = -20
				add_stability = -0.02
			}
		}
		hidden_effect = {
			clr_country_flag = DEN_1858_elections_social_liberals_victorious_flag
			clr_country_flag = DEN_1858_elections_liberals_victorious_flag
			clr_country_flag = DEN_1858_elections_conservatives_victorious_flag
			clr_country_flag = DEN_1858_elections_historical_flag
			compute_national_vote = yes
		}
	}
}

#The Social Liberal Government
country_event = {
	id = denmark.205
	title = denmark.205.t
	desc = denmark.205.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = denmark.205.a
		ai_chance = { base = 100 }
		activate_mission_tooltip = DEN_mission_overcome_political_obstacles
		hidden_effect = {
			activate_mission = DEN_mission_overcome_political_obstacles
		}
	}
}

#The Liberal Government
country_event = {
	id = denmark.206
	title = denmark.206.t
	desc = denmark.206.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = denmark.206.a
		ai_chance = { base = 100 }
		add_war_support = 0.01
	}
}

#The Conservative Government
country_event = {
	id = denmark.207
	title = denmark.207.t
	desc = denmark.207.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = denmark.207.a
		ai_chance = { base = 100 }
		add_stability = 0.01
	}
}

#Carl Christian Hall in Difficulties (18 Nov 1859)
country_event = {
	id = denmark.208
	title = denmark.208.t
	desc = denmark.208.d
	
	is_triggered_only = yes
	fire_only_once = yes
	
	trigger = {
		has_government = centrism
	}
	
	option = {
		name = denmark.208.a
		ai_chance = { base = 100 }
		add_political_power = -25
		add_stability = -0.01
		hidden_effect = {
			country_event = { id = denmark.209 days = 14 }
		}
	}
}

#Carl Eduard Rotwitt Takes Office as Statsminister (2 Dec 1859)
country_event = {
	id = denmark.209
	title = denmark.209.t
	desc = denmark.209.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	trigger = {
		has_government = centrism
	}
	
	option = {
		name = denmark.209.a
		ai_chance = { base = 100 }
		add_political_power = -25
		add_stability = -0.01
		add_popularity = { ideology = ideology_social_liberalism popularity = 0.03 }
		set_politics = { ruling_party = ideology_social_liberalism }
		DEN_carl_eduard_rotwitt = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					expire = "1931.1.1"
					desc = "POLITICS_GENERIC_EOANB_DESC"
					ideology = ideology_sub_social_liberal
					traits = {
						#
					}
				}
			}
		}
		remove_country_leader_role = {
			character = DEN_jens_andersen_hansen
			ideology = ideology_sub_social_liberal
		}
		hidden_effect = {
			country_event = { id = denmark.210 days = 68 }
		}
	}
}

#Death of Carl Eduard Rotwitt (8 Feb 1860)
country_event = {
	id = denmark.210
	title = denmark.210.t
	desc = denmark.210.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	trigger = {
		has_government = ideology_social_liberalism
		has_country_leader = {
			character = DEN_carl_eduard_rotwitt
			ruling_only = yes
		}
	}
	
	option = {
		name = denmark.210.a
		ai_chance = { base = 100 }
		add_political_power = -25
		add_stability = -0.01
		DEN_interim_government = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					desc = "POLITICS_GENERIC_INTERIM_EOANB_DESC"
					ideology = ideology_sub_social_liberal
					expire = "1931.1.1"
				}
			}
		}
		retire_character = DEN_carl_eduard_rotwitt
		if = {
			limit = {
				NOT = { has_completed_focus = DEN_focus_prepare_social_liberal_policies }
			}
			unlock_national_focus = DEN_focus_prepare_social_liberal_policies
		}
		hidden_effect = {
			country_event = { id = denmark.211 days = 16 }
		}
	}
}

#Carl Christian Hall Takes over as Statsminister (24 Feb 1860)
country_event = {
	id = denmark.211
	title = denmark.211.t
	desc = denmark.211.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = denmark.211.a
		ai_chance = { base = 100 }
		set_politics = { ruling_party = centrism }
		add_popularity = { ideology = centrism popularity = 0.01 }
		hidden_effect = {
			remove_country_leader_role = {
				character = DEN_interim_government
				ideology = ideology_sub_social_liberal
			}
			DEN_jens_andersen_hansen = {
				add_country_leader_role = {
					country_leader = {
						desc = "POLITICS_GENERIC_EOANB_DESC"
						ideology = ideology_sub_social_liberal
						expire = "1878.1.1"
					}
				}
				promote_character = yes
				promote_character = ideology_sub_social_liberal
			}
		}
	}
}

#The Social Liberal Government Fails to Gain Sufficient Support
country_event = {
	id = denmark.212
	title = denmark.212.t
	desc = denmark.212.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = denmark.212.a
		ai_chance = { base = 100 }
		add_stability = -0.1
		decrease_ps_by_two = yes
		add_popularity = { ideology = ideology_social_liberalism popularity = -0.15 }
		DEN_interim_government = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					desc = "POLITICS_GENERIC_INTERIM_EOANB_DESC"
					ideology = ideology_sub_social_liberal
					expire = "1931.1.1"
				}
			}
		}
		remove_country_leader_role = {
			character = DEN_jens_andersen_hansen
			ideology = ideology_sub_social_liberal
		}
		if = {
			limit = {
				has_idea = DEN_anton_frederik_tscherning
			}
			remove_ideas = DEN_anton_frederik_tscherning
		}
		if = {
			limit = {
				has_idea = DEN_advisor_jens_andersen_hansen
			}
			remove_ideas = DEN_advisor_jens_andersen_hansen
		}
		hidden_effect = {
			country_event = { id = denmark.213 days = 55 }
		}
	}
}

#Calculating Folketing Re-Election after Social Liberals' Failure (Hidden)
country_event = {
	id = denmark.213
	title = denmark.213.t
	desc = denmark.213.d
		
	is_triggered_only = yes
	fire_only_once = yes
	hidden = yes
	
	immediate = {
		random_list = {
			45 = {
				set_country_flag = DEN_reelections_national_liberals_victorious_flag
			}
			35 = {
				set_country_flag = DEN_reelections_conservatives_victorious_flag
			}
			20 = {
				set_country_flag = DEN_reelections_tied_flag
			}
		}
		country_event = { id = denmark.214 days = 1 }
	}
}

#Folketing Re-Elections - Results
country_event = {
	id = denmark.214
	title = denmark.214.t
	desc = denmark.214.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	immediate = {
		hidden_effect = {
			unlock_national_focus = DEN_focus_the_1861_elections
		}
	}
	
	#The National Liberals are Victorious
	option = {
		name = denmark.214.a
		ai_chance = { base = 100 }
		trigger = {	has_country_flag = DEN_reelections_national_liberals_victorious_flag }
		add_popularity = { ideology = centrism popularity = 0.15 }
		add_popularity = { ideology = traditional_conservatism popularity = 0.03 }
		add_popularity = { ideology = ideology_social_liberalism popularity = -0.02 }
		set_politics = { ruling_party = centrism }
		DEN_carl_christian_hall = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					desc = "DEN_CARL_CHRISTIAN_HALL_LEADER_DESC"
					ideology = market_liberal
					expire = "1931.1.1"
				}
			}
		}
		remove_country_leader_role = {
			character = DEN_interim_government
			ideology = ideology_sub_social_liberal
		}
		hidden_effect = {
			clr_country_flag = DEN_reelections_national_liberals_victorious_flag
			compute_national_vote = yes
		}
	}
	
	#The Conservatives are Victorious
	option = {
		name = denmark.214.b
		ai_chance = { base = 100 }
		trigger = {	has_country_flag = DEN_reelections_conservatives_victorious_flag }
		add_popularity = { ideology = traditional_conservatism popularity = 0.15 }
		add_popularity = { ideology = centrism popularity = 0.03 }
		add_popularity = { ideology = ideology_social_liberalism popularity = -0.02 }
		set_politics = { ruling_party = traditional_conservatism }
		DEN_christian_albrecht_bluhme = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					desc = "POLITICS_GENERIC_EOANB_DESC"
					ideology = conserv
					expire = "1867.1.1"
				}
			}
		}
		remove_country_leader_role = {
			character = DEN_interim_government
			ideology = ideology_sub_social_liberal
		}
		hidden_effect = {
			clr_country_flag = DEN_reelections_conservatives_victorious_flag
			compute_national_vote = yes
		}
	}
	
	#It's a close call...
	option = {
		name = denmark.214.c
		ai_chance = { base = 100 }
		trigger = {	has_country_flag = DEN_reelections_tied_flag }
		add_popularity = { ideology = centrism popularity = 0.08 }
		add_popularity = { ideology = traditional_conservatism popularity = 0.1 }
		add_popularity = { ideology = ideology_social_liberalism popularity = -0.02 }
		country_event = { id = denmark.215 days = 5 }
		hidden_effect = {
			clr_country_flag = DEN_reelections_tied_flag
			compute_national_vote = yes
		}
	}
}

#Who Should Lead the New Government?
country_event = {
	id = denmark.215
	title = denmark.215.t
	desc = denmark.215.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	#The National Liberals
	option = {
		name = denmark.215.a
		ai_chance = { base = 90 }
		add_popularity = { ideology = centrism popularity = 0.02 }
		set_politics = { ruling_party = centrism }
		DEN_carl_christian_hall = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					desc = "DEN_CARL_CHRISTIAN_HALL_LEADER_DESC"
					ideology = market_liberal
					expire = "1931.1.1"
				}
			}
		}
		remove_country_leader_role = {
			character = DEN_interim_government
			ideology = ideology_sub_social_liberal
		}
		hidden_effect = {
			compute_national_vote = yes
		}
	}
	
	#The Conservatives
	option = {
		name = denmark.215.b
		ai_chance = { base = 10 }
		add_popularity = { ideology = traditional_conservatism popularity = 0.03 }
		set_politics = { ruling_party = traditional_conservatism }
		DEN_christian_albrecht_bluhme = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					desc = "POLITICS_GENERIC_EOANB_DESC"
					ideology = conserv
					expire = "1867.1.1"
				}
			}
		}
		remove_country_leader_role = {
			character = DEN_interim_government
			ideology = ideology_sub_social_liberal
		}
		hidden_effect = {
			compute_national_vote = yes
		}
	}
}

### FOREIGN POLITICS, COLONIAL, AND WAR EVENTS (denmark.301-500) ###

#The United States - Uniform Exchange with Denmark?
country_event = {
	id = denmark.301
	title = denmark.301.t
	desc = denmark.301.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	#Agree
	option = {
		name = denmark.301.a
		ai_chance = { base = 100 }
		DEN = { country_event = { id = denmark.302 days = 30 } }
		add_equipment_to_stockpile = {
			type = uniform_equipment
			amount = -100
			producer = USA
		}
		add_equipment_to_stockpile = {
			type = uniform_equipment
			amount = 100
			producer = DEN
		}
	}
	
	#Reject
	option = {
		name = denmark.301.b
		ai_chance = { base = 0 }
		DEN = { country_event = { id = denmark.303 days = 30 } }
		add_political_power = -10
	}
}

#Denmark - Uniform Exchange with the US Agreed
country_event = {
	id = denmark.302
	title = denmark.302.t
	desc = denmark.302.d
		
	is_triggered_only = yes
	fire_only_once = yes
		
	option = {
		name = denmark.302.a
		ai_chance = { base = 100 }
		add_equipment_to_stockpile = {
			type = uniform_equipment
			amount = 100
			producer = USA
		}
		hidden_effect = {
			DEN = { country_event = { id = denmark.304 days = 30 } }
		}
	}
}

#Denmark - Uniform Exchange with the US Rejected
country_event = {
	id = denmark.303
	title = denmark.303.t
	desc = denmark.303.d
		
	is_triggered_only = yes
	fire_only_once = yes
		
	option = {
		name = denmark.303.a
		ai_chance = { base = 100 }
		add_political_power = -10
		add_equipment_to_stockpile = {
			type = uniform_equipment
			amount = 100
			producer = DEN
		}
		add_opinion_modifier = {
			target = USA
			modifier = DEN_USA_UNIFORM_EXCHANGE_REJECTED_REL
		}
		reverse_add_opinion_modifier = {
			target = USA
			modifier = DEN_USA_UNIFORM_EXCHANGE_REJECTED_REL 
		}
	}
}

#Denmark - Uniform Exchange Sparks Friendship
country_event = {
	id = denmark.304
	title = denmark.304.t
	desc = denmark.304.d
		
	is_triggered_only = yes
	fire_only_once = yes
		
	option = {
		name = denmark.304.a
		ai_chance = { base = 100 }
		add_opinion_modifier = {
			target = USA
			modifier = DEN_USA_UNIFORM_EXCHANGE_AGREED_REL
		}
		USA = { country_event = { id = denmark.305 } }
		hidden_effect = {
			DEN = { country_event = { id = denmark.306 days = 30 } }
			USA = { country_event = { id = denmark.306 days = 30 } }
		}
	}
}

#USA - Uniform Exchange Sparks Friendship
country_event = {
	id = denmark.305
	title = denmark.305.t
	desc = denmark.305.d
		
	is_triggered_only = yes
	fire_only_once = yes
		
	option = {
		name = denmark.305.a
		ai_chance = { base = 100 }
		add_opinion_modifier = {
			target = DEN
			modifier = DEN_USA_UNIFORM_EXCHANGE_AGREED_REL
		}
	}
}

#DEN/USA - Uniform Exchange Drives Military Research Forward
country_event = {
	id = denmark.306
	title = denmark.306.t
	desc = denmark.306.d
		
	is_triggered_only = yes
		
	option = {
		name = denmark.306.a
		ai_chance = { base = 100 }
		add_tech_bonus = { bonus = 0.25 uses = 1 category = tech_category_uniforms }
		hidden_effect = {
			country_event = { id = denmark.307 days = 365 }
		}
	}
}

#DEN/USA - Uniform Exchange Inspires Innovation
country_event = {
	id = denmark.307
	title = denmark.307.t
	desc = denmark.307.d
		
	is_triggered_only = yes
		
	option = {
		name = denmark.307.a
		ai_chance = { base = 100 }
		add_tech_bonus = { bonus = 0.25 uses = 1 category = tech_category_uniforms }
	}
}

#Alexander III and Princess Dagmar
country_event = {
	id = denmark.308
	title = denmark.308.t
	desc = denmark.308.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	#Send the message
	option = {
		name = denmark.308.a
		ai_chance = { base = 100 }
		hidden_effect = {
			RUS = { country_event = { days = 7 id = denmark.309 } }
		}
	}
	
	#Leave it be
	option = {
		name = denmark.308.b
		ai_chance = { base = 0 }
		add_political_power = -25
	}
}

#RUS - Danish Marriage Proposal
country_event = {
	id = denmark.309
	title = denmark.309.t
	desc = denmark.309.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	#We agree
	option = { 
		name = denmark.309.a
		add_opinion_modifier = { target = RUS modifier = royal_marriage }
		reverse_add_opinion_modifier = { target = RUS modifier = royal_marriage }
	}
	
	#We reject their offer
	option = { 
		name = denmark.309.b
		add_political_power = -10
	}
}

#State of the Danish Colonies
country_event = {
	id = denmark.401
	title = denmark.401.t
	desc = {
		trigger = { owns_state = 1307 }
		text = denmark.401.d_nicobars
	}
	desc = {
		trigger = { NOT = { owns_state = 1307 } }
		text = denmark.401.d_no_nicobars
	}
	
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = denmark.401.a
		ai_chance = { base = 100 }
	}
}

#DEN - Colonial Expansion in the Caribbean?
country_event = {
	id = denmark.402
	title = denmark.402.t
	desc = denmark.402.d
	
	is_triggered_only = yes
	fire_only_once = yes
	
	#Yes
	option = {
		name = denmark.402.a
		ai_chance = {
			base = 0
			modifier = {
				add = 25
				is_historical_focus_on = no
			}
		}
		SWE = { country_event = { id = denmark.403 days = 5 } }
	}
	
	#No
	option = {
		name = denmark.402.b
		ai_chance = {
			base = 100
			modifier = {
				add = -25
				is_historical_focus_on = no
			}
		}
	}
}

#SWE - Denmark Asks to Buy St. Barthélemy
country_event = {
	id = denmark.403
	title = denmark.403.t
	desc = denmark.403.d
	
	is_triggered_only = yes
	fire_only_once = yes
	
	#Accept
	option = {
		name = denmark.403.a
		ai_chance = { base = 80 }
		add_political_power = 10
		DEN = { country_event = { id = denmark.404 days = 5 } }
	}
	
	#Reject
	option = {
		name = denmark.403.b
		ai_chance = { base = 20 }
		add_political_power = -10
		DEN = { country_event = { id = denmark.405 days = 5 } }
	}
}

#DEN - Sweden Agrees to Sell St. Barthélemy
country_event = {
	id = denmark.404
	title = denmark.404.t
	desc = denmark.404.d
	
	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = denmark.404.a
		ai_chance = { base = 100 }
		SWE = { country_event = { id = denmark.406 } }
		add_timed_idea = { idea = DEN_idea_colonial_acquisitions days = 1095 }
		transfer_state = 1328
		set_temp_variable = {
			eoanb_prestige_change = 1
		}
		eoanb_change_prestige_score = yes
	}
}

#DEN - Sweden Rejects the Offer for St. Barthélemy
country_event = {
	id = denmark.405
	title = denmark.405.t
	desc = denmark.405.d
	
	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = denmark.405.a
		ai_chance = { base = 100 }
		add_political_power = -10
	}
}

#SWE - Deal for St. Barthélemy Finalized
country_event = {
	id = denmark.406
	title = denmark.406.t
	desc = denmark.406.d
	
	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = denmark.406.a
		ai_chance = { base = 100 }
		add_timed_idea = { idea = DEN_idea_denmark_bought_our_land days = 1095 }
	}
}

#German Conscripts Deserted
country_event = {
	id = denmark.451
	title = denmark.451.t
	desc = denmark.451.d
		
	is_triggered_only = yes
	fire_only_once = yes
		
	option = {
		name = denmark.451.a
		add_timed_idea = {
			idea = DEN_idea_german_conscripts_desert
			days = 60
		}
	}
}

#PRS - Danish Naval Blockade
country_event = {
	id = denmark.452
	title = denmark.452.t
	desc = denmark.452.d
		
	is_triggered_only = yes
	fire_only_once = yes

	#Leave them, focus on land war
	option = {
		name = denmark.452.a
		add_ideas = DEN_idea_pomerania_blockade
	}
}

##### ECONOMY AND TRADE EVENTS (denmark.501-700) #####

#Improve Infrastructure on Bornholm?
country_event = {
	id = denmark.501
	title = denmark.501.t
	desc = denmark.501.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	#Do nothing
	option = {
		name = denmark.501.a
		ai_chance = { base = 25 }
		add_political_power = 20
	}
	
	#Invest in the port
	option = {
		name = denmark.501.b
		ai_chance = { base = 25	}
		add_political_power = -20
		add_timed_idea = { idea = DEN_idea_infrastructure_projects_helstaten days = 60 }
		hidden_effect = {
			set_country_flag = DEN_infrastructure_projects_helstaten_port_flag
			country_event = { id = denmark.502 days = 60 }
		}
	}
	
	#Invest in the road network
	option = {
		name = denmark.501.c
		ai_chance = { base = 25	}
		add_political_power = -20
		add_timed_idea = { idea = DEN_idea_infrastructure_projects_helstaten days = 300 }
		hidden_effect = {
			set_country_flag = DEN_infrastructure_projects_helstaten_roads_flag
			country_event = { id = denmark.502 days = 300 }
		}
	}
	
	#Invest in both the port and the road network
	option = {
		name = denmark.501.e
		ai_chance = { base = 25	}
		add_political_power = -40
		add_timed_idea = { idea = DEN_idea_infrastructure_projects_helstaten days = 360 }
		hidden_effect = {
			set_country_flag = DEN_infrastructure_projects_helstaten_both_flag
			country_event = { id = denmark.502 days = 360 }
		}
	}
}

#Bornholm Infrastructure Development Finished
country_event = {
	id = denmark.502
	title = denmark.502.t
	desc = denmark.502.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = denmark.502.a
		ai_chance = { base = 100 }
		if = {
			limit = {
				has_country_flag = DEN_infrastructure_projects_helstaten_port_flag
			}
			37 = {
				add_building_construction = {
					type = naval_base
					level = 2
					instant_build = yes
					province = 6361
				}
			}
			hidden_effect = {
				clr_country_flag = DEN_infrastructure_projects_helstaten_port_flag
			}
		}
		else_if = {
			limit = {
				has_country_flag = DEN_infrastructure_projects_helstaten_roads_flag
			}
			37 = {
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			hidden_effect = {
				clr_country_flag = DEN_infrastructure_projects_helstaten_roads_flag
			}
		}
		else_if = {
			limit = {
				has_country_flag = DEN_infrastructure_projects_helstaten_both_flag
			}
			37 = {
				add_building_construction = {
					type = naval_base
					level = 2
					instant_build = yes
					province = 6361
				}
			}
			37 = {
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			hidden_effect = {
				clr_country_flag = DEN_infrastructure_projects_helstaten_both_flag
			}
		}
	}
}

#Improve Infrastructure on Iceland?
country_event = {
	id = denmark.503
	title = denmark.503.t
	desc = denmark.503.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	#Do nothing
	option = {
		name = denmark.503.a
		ai_chance = { base = 25 }
		add_political_power = 25
	}
	
	#Invest in the Reykjavík port
	option = {
		name = denmark.503.b
		ai_chance = { base = 25	}
		add_political_power = -25
		add_timed_idea = { idea = DEN_idea_infrastructure_projects_helstaten days = 90 }
		hidden_effect = {
			set_country_flag = DEN_infrastructure_projects_helstaten_port_flag
			country_event = { id = denmark.504 days = 90 }
		}
	}
	
	#Invest in the road network
	option = {
		name = denmark.503.c
		ai_chance = { base = 25	}
		add_political_power = -25
		add_timed_idea = { idea = DEN_idea_infrastructure_projects_helstaten days = 360 }
		hidden_effect = {
			set_country_flag = DEN_infrastructure_projects_helstaten_roads_flag
			country_event = { id = denmark.504 days = 360 }
		}
	}
	
	#Invest in both the port and the road network
	option = {
		name = denmark.503.e
		ai_chance = { base = 25	}
		add_political_power = -50
		add_timed_idea = { idea = DEN_idea_infrastructure_projects_helstaten days = 450 }
		hidden_effect = {
			set_country_flag = DEN_infrastructure_projects_helstaten_both_flag
			country_event = { id = denmark.504 days = 450 }
		}
	}
}

#Iceland Infrastructure Development Finished
country_event = {
	id = denmark.504
	title = denmark.504.t
	desc = denmark.504.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = denmark.504.a
		ai_chance = { base = 100 }
		if = {
			limit = {
				has_country_flag = DEN_infrastructure_projects_helstaten_port_flag
			}
			100 = {
				add_building_construction = {
					type = naval_base
					level = 2
					instant_build = yes
					province = 12674
				}
			}
			hidden_effect = {
				clr_country_flag = DEN_infrastructure_projects_helstaten_port_flag
			}
		}
		else_if = {
			limit = {
				has_country_flag = DEN_infrastructure_projects_helstaten_roads_flag
			}
			100 = { add_extra_state_shared_building_slots = 1 }
			100 = {
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			hidden_effect = {
				clr_country_flag = DEN_infrastructure_projects_helstaten_roads_flag
			}
		}
		else_if = {
			limit = {
				has_country_flag = DEN_infrastructure_projects_helstaten_both_flag
			}
			100 = { add_extra_state_shared_building_slots = 1 }
			100 = {
				add_building_construction = {
					type = naval_base
					level = 2
					instant_build = yes
					province = 12674
				}
			}
			100 = {
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			hidden_effect = {
				clr_country_flag = DEN_infrastructure_projects_helstaten_both_flag
			}
		}
	}
}

#Improve Infrastructure on the Faroe Islands?
country_event = {
	id = denmark.505
	title = denmark.505.t
	desc = denmark.505.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	#Do nothing
	option = {
		name = denmark.505.a
		ai_chance = { base = 25 }
		add_political_power = 10
	}
	
	#Invest in the Tórshavn port
	option = {
		name = denmark.505.b
		ai_chance = { base = 25	}
		add_political_power = -10
		add_timed_idea = { idea = DEN_idea_infrastructure_projects_helstaten days = 60 }
		hidden_effect = {
			set_country_flag = DEN_infrastructure_projects_helstaten_port_flag
			country_event = { id = denmark.506 days = 60 }
		}
	}
	
	#Invest in the road network
	option = {
		name = denmark.505.c
		ai_chance = { base = 25	}
		add_political_power = -10
		add_timed_idea = { idea = DEN_idea_infrastructure_projects_helstaten days = 240 }
		hidden_effect = {
			set_country_flag = DEN_infrastructure_projects_helstaten_roads_flag
			country_event = { id = denmark.506 days = 240 }
		}
	}
	
	#Invest in both the port and the road network
	option = {
		name = denmark.505.e
		ai_chance = { base = 25	}
		add_political_power = -20
		add_timed_idea = { idea = DEN_idea_infrastructure_projects_helstaten days = 300 }
		hidden_effect = {
			set_country_flag = DEN_infrastructure_projects_helstaten_both_flag
			country_event = { id = denmark.506 days = 300 }
		}
	}
}

#Faroe Islands Infrastructure Development Finished
country_event = {
	id = denmark.506
	title = denmark.506.t
	desc = denmark.506.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = denmark.506.a
		ai_chance = { base = 100 }
		if = {
			limit = {
				has_country_flag = DEN_infrastructure_projects_helstaten_port_flag
			}
			337 = {
				add_building_construction = {
					type = naval_base
					level = 2
					instant_build = yes
					province = 13003
				}
			}
			hidden_effect = {
				clr_country_flag = DEN_infrastructure_projects_helstaten_port_flag
			}
		}
		else_if = {
			limit = {
				has_country_flag = DEN_infrastructure_projects_helstaten_roads_flag
			}
			337 = { add_extra_state_shared_building_slots = 1 }
			337 = {
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			hidden_effect = {
				clr_country_flag = DEN_infrastructure_projects_helstaten_roads_flag
			}
		}
		else_if = {
			limit = {
				has_country_flag = DEN_infrastructure_projects_helstaten_both_flag
			}
			337 = { add_extra_state_shared_building_slots = 1 }
			337 = {
				add_building_construction = {
					type = naval_base
					level = 2
					instant_build = yes
					province = 13003
				}
			}
			337 = {
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			hidden_effect = {
				clr_country_flag = DEN_infrastructure_projects_helstaten_both_flag
			}
		}
	}
}

#Improve Infrastructure in Greenland?
country_event = {
	id = denmark.507
	title = denmark.507.t
	desc = denmark.507.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	#Do nothing
	option = {
		name = denmark.507.a
		ai_chance = { base = 25 }
		add_political_power = 20
	}
	
	#Invest in the Godthåb port
	option = {
		name = denmark.507.b
		ai_chance = { base = 25	}
		add_political_power = -20
		add_timed_idea = { idea = DEN_idea_infrastructure_projects_helstaten days = 120 }
		hidden_effect = {
			set_country_flag = DEN_infrastructure_projects_helstaten_port_flag
			country_event = { id = denmark.508 days = 120 }
		}
	}
	
	#Invest in the road network
	option = {
		name = denmark.507.c
		ai_chance = { base = 25	}
		add_political_power = -20
		add_timed_idea = { idea = DEN_idea_infrastructure_projects_helstaten days = 480 }
		hidden_effect = {
			set_country_flag = DEN_infrastructure_projects_helstaten_roads_flag
			country_event = { id = denmark.508 days = 480 }
		}
	}
	
	#Invest in both the port and the road network
	option = {
		name = denmark.507.e
		ai_chance = { base = 25	}
		add_political_power = -40
		add_timed_idea = { idea = DEN_idea_infrastructure_projects_helstaten days = 600 }
		hidden_effect = {
			set_country_flag = DEN_infrastructure_projects_helstaten_both_flag
			country_event = { id = denmark.508 days = 600 }
		}
	}
}

#Greenland Infrastructure Development Finished
country_event = {
	id = denmark.508
	title = denmark.508.t
	desc = denmark.508.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = denmark.508.a
		ai_chance = { base = 100 }
		if = {
			limit = {
				has_country_flag = DEN_infrastructure_projects_helstaten_port_flag
			}
			101 = {
				add_building_construction = {
					type = naval_base
					level = 2
					instant_build = yes
					province = 10245
				}
			}
			hidden_effect = {
				clr_country_flag = DEN_infrastructure_projects_helstaten_port_flag
			}
		}
		else_if = {
			limit = {
				has_country_flag = DEN_infrastructure_projects_helstaten_roads_flag
			}
			101 = { add_extra_state_shared_building_slots = 1 }
			101 = {
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			hidden_effect = {
				clr_country_flag = DEN_infrastructure_projects_helstaten_roads_flag
			}
		}
		else_if = {
			limit = {
				has_country_flag = DEN_infrastructure_projects_helstaten_both_flag
			}
			101 = { add_extra_state_shared_building_slots = 1 }
			101 = {
				add_building_construction = {
					type = naval_base
					level = 2
					instant_build = yes
					province = 10245
				}
			}
			101 = {
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			hidden_effect = {
				clr_country_flag = DEN_infrastructure_projects_helstaten_both_flag
			}
		}
	}
}

#SWE - Denmark Asks to Import our Wood
country_event = {
	id = denmark.509
	title = denmark.509.t
	desc = denmark.509.d
		
	is_triggered_only = yes
	
	option = {
		name = denmark.509.a
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				NOT = {
					any_owned_state = {
						has_resources_amount = {
							resource = wood
							amount > 6
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				NOT = {
					any_owned_state = {
						has_resources_amount = {
							resource = wood
							amount > 12
						}
					}
				}
			}
		}
		custom_effect_tooltip = DEN_SWE_trade_accepted_effect_tt
		DEN = { country_event = { id = denmark.510 } }
	}
	
	option = {
		name = denmark.509.b
		ai_chance = {
			base = 0
			modifier = {
				add = 100
				NOT = {
					any_owned_state = {
						has_resources_amount = {
							resource = wood
							amount > 6
						}
					}
				}
			}
			modifier = {
				add = 50
				NOT = {
					any_owned_state = {
						has_resources_amount = {
							resource = wood
							amount > 12
						}
					}
				}
			}
		}
		custom_effect_tooltip = DEN_SWE_trade_denied_effect_tt
		DEN = { country_event = { id = denmark.511 } }
	}
	
	option = {
		name = denmark.509.c
		ai_chance = { base = 0 }
		hidden_effect = {
			DEN = {
				set_country_flag = DEN_sweden_denies_all_wood_trade_flag
			}
		}
		custom_effect_tooltip = DEN_SWE_wood_trade_denied_forever_effect_tt
		DEN = { country_event = { id = denmark.511 } }
	}
}

#DEN - Sweden Would Welcome our Trade for Wood
country_event = {
	id = denmark.510
	title = denmark.510.t
	desc = denmark.510.d
		
	is_triggered_only = yes
	
	option = {
		name = denmark.510.a
		ai_chance = { base = 100 }
		unlock_decision_tooltip = DEN_decision_import_swedish_wood
		if = {
			limit = {
				has_opinion_modifier = DEN_SWE_WOOD_TRADE_DENIED_REL
			}
			remove_opinion_modifier = { target = SWE modifier = DEN_SWE_WOOD_TRADE_DENIED_REL }
			SWE = { remove_opinion_modifier = { target = DEN modifier = DEN_SWE_WOOD_TRADE_DENIED_REL } }
		}
		hidden_effect = {
			set_country_flag = DEN_sweden_accepts_wood_trade_flag
			clr_country_flag = DEN_asking_for_swedish_wood_flag
		}
	}
}

#DEN - Sweden Denies our Wood Trade
country_event = {
	id = denmark.511
	title = {
		trigger = { NOT = { has_country_flag = DEN_sweden_denies_all_wood_trade_flag } }
		text = denmark.511.t_denied
	}
	title = {
		trigger = { has_country_flag = DEN_sweden_denies_all_wood_trade_flag }
		text = denmark.511.t_denied_categorically
	}
	desc = {
		trigger = { NOT = { has_country_flag = DEN_sweden_denies_all_wood_trade_flag } }
		text = denmark.511.d_denied
	}
	desc = {
		trigger = { has_country_flag = DEN_sweden_denies_all_wood_trade_flag }
		text = denmark.511.d_denied_categorically
	}
		
	is_triggered_only = yes
	
	option = {
		name = denmark.511.a
		ai_chance = { base = 100 }
		if = {
			limit = {
				NOT = { has_country_flag = DEN_sweden_denies_all_wood_trade_flag }
			}
			add_opinion_modifier = { target = SWE modifier = DEN_SWE_WOOD_TRADE_DENIED_REL }
			reverse_add_opinion_modifier = { target = SWE modifier = DEN_SWE_WOOD_TRADE_DENIED_REL }
		}
		else = {
			add_opinion_modifier = { target = SWE modifier = DEN_SWE_WOOD_TRADE_DENIED_CATEGORICALLY_REL }
			reverse_add_opinion_modifier = { target = SWE modifier = DEN_SWE_WOOD_TRADE_DENIED_CATEGORICALLY_REL }
		}
		hidden_effect = {
			clr_country_flag = DEN_asking_for_swedish_wood_flag
		}
	}
}

#SWE - Denmark Asks to Import our Iron
country_event = {
	id = denmark.512
	title = denmark.512.t
	desc = denmark.512.d
		
	is_triggered_only = yes
	
	option = {
		name = denmark.512.a
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				NOT = {
					any_owned_state = {
						has_resources_amount = {
							resource = iron
							amount > 6
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				NOT = {
					any_owned_state = {
						has_resources_amount = {
							resource = iron
							amount > 12
						}
					}
				}
			}
		}
		custom_effect_tooltip = DEN_SWE_trade_accepted_effect_tt
		DEN = { country_event = { id = denmark.513 } }
	}
	
	option = {
		name = denmark.512.b
		ai_chance = {
			base = 0
			modifier = {
				add = 100
				NOT = {
					any_owned_state = {
						has_resources_amount = {
							resource = iron
							amount > 6
						}
					}
				}
			}
			modifier = {
				add = 50
				NOT = {
					any_owned_state = {
						has_resources_amount = {
							resource = iron
							amount > 12
						}
					}
				}
			}
		}
		custom_effect_tooltip = DEN_SWE_trade_denied_effect_tt
		DEN = { country_event = { id = denmark.514 } }
	}
	
	option = {
		name = denmark.512.c
		ai_chance = { base = 0 }
		hidden_effect = {
			DEN = {
				set_country_flag = DEN_sweden_denies_all_iron_trade_flag
			}
		}
		custom_effect_tooltip = DEN_SWE_iron_trade_denied_forever_effect_tt
		DEN = { country_event = { id = denmark.514 } }
	}
}

#DEN - Sweden Would Welcome our Trade for Iron
country_event = {
	id = denmark.513
	title = denmark.513.t
	desc = denmark.513.d
		
	is_triggered_only = yes
	
	option = {
		name = denmark.513.a
		ai_chance = { base = 100 }
		unlock_decision_tooltip = DEN_decision_import_swedish_iron
		if = {
			limit = {
				has_opinion_modifier = DEN_SWE_IRON_TRADE_DENIED_REL
			}
			remove_opinion_modifier = { target = SWE modifier = DEN_SWE_IRON_TRADE_DENIED_REL }
			SWE = { remove_opinion_modifier = { target = DEN modifier = DEN_SWE_IRON_TRADE_DENIED_REL } }
		}
		hidden_effect = {
			set_country_flag = DEN_sweden_accepts_iron_trade_flag
			clr_country_flag = DEN_asking_for_swedish_iron_flag
		}
	}
}

#DEN - Sweden Denies our Iron Trade
country_event = {
	id = denmark.514
	title = {
		trigger = { NOT = { has_country_flag = DEN_sweden_denies_all_iron_trade_flag } }
		text = denmark.514.t_denied
	}
	title = {
		trigger = { has_country_flag = DEN_sweden_denies_all_iron_trade_flag }
		text = denmark.514.t_denied_categorically
	}
	desc = {
		trigger = { NOT = { has_country_flag = DEN_sweden_denies_all_iron_trade_flag } }
		text = denmark.514.d_denied
	}
	desc = {
		trigger = { has_country_flag = DEN_sweden_denies_all_iron_trade_flag }
		text = denmark.514.d_denied_categorically
	}
		
	is_triggered_only = yes
	
	option = {
		name = denmark.514.a
		ai_chance = { base = 100 }
		if = {
			limit = {
				NOT = { has_country_flag = DEN_sweden_denies_all_iron_trade_flag }
			}
			add_opinion_modifier = { target = SWE modifier = DEN_SWE_IRON_TRADE_DENIED_REL }
			reverse_add_opinion_modifier = { target = SWE modifier = DEN_SWE_IRON_TRADE_DENIED_REL }
		}
		else = {
			add_opinion_modifier = { target = SWE modifier = DEN_SWE_IRON_TRADE_DENIED_CATEGORICALLY_REL }
			reverse_add_opinion_modifier = { target = SWE modifier = DEN_SWE_IRON_TRADE_DENIED_CATEGORICALLY_REL }
		}
		hidden_effect = {
			clr_country_flag = DEN_asking_for_swedish_iron_flag
		}
	}
}

#Importing Wood from Sweden
country_event = {
	id = denmark.515
	title = denmark.515.t
	desc = denmark.515.d
		
	is_triggered_only = yes
	
	immediate = {
		hidden_effect = {
			if = {
				limit = {
					NOT = { has_variable = DEN_swedish_trade_expenses }
				}
				set_variable = { DEN_swedish_trade_expenses = 0 }
			}
			if = {
				limit = {
					NOT = { has_dynamic_modifier = { modifier = dynmod_DEN_swedish_trade } }
				}
				add_dynamic_modifier = { modifier = dynmod_DEN_swedish_trade }
			}
		}
	}
	
	option = {
		name = denmark.515.a
		trigger = {
			SWE = {
				any_owned_state = {
					has_resources_amount = {
						resource = wood
						amount > 5
					}
				}
			}
		}
		ai_chance = { base = 0 }
		set_temp_variable = { DEN_swedish_trade_additional_cost_temp = 0.01 }
		custom_effect_tooltip = DEN_swedish_trade_effect_tt
		add_to_variable = { DEN_swedish_trade_expenses = 0.01 }
		force_update_dynamic_modifier = yes
		37 = {
			add_resource = {
				type = wood
				amount = 3
			}
		}
		hidden_effect = {
			set_country_flag = DEN_swedish_wood_imported_3_flag
			SWE = {
				set_country_flag = SWE_denmark_imports_3_wood
				country_event = { id = denmark.516 }
			}
		}
	}
	
	option = {
		name = denmark.515.b
		trigger = {
			SWE = {
				any_owned_state = {
					has_resources_amount = {
						resource = wood
						amount > 8
					}
				}
			}
		}
		ai_chance = { base = 0 }
		set_temp_variable = { DEN_swedish_trade_additional_cost_temp = 0.02 }
		custom_effect_tooltip = DEN_swedish_trade_effect_tt
		add_to_variable = { DEN_swedish_trade_expenses = 0.02 tooltip = money_expenses }
		force_update_dynamic_modifier = yes
		37 = {
			add_resource = {
				type = wood
				amount = 6
			}
		}
		hidden_effect = {
			set_country_flag = DEN_swedish_wood_imported_6_flag
			SWE = {
				set_country_flag = SWE_denmark_imports_6_wood
				country_event = { id = denmark.516 }
			}
		}
	}
	
	option = {
		name = denmark.515.c
		trigger = {
			SWE = {
				any_owned_state = {
					has_resources_amount = {
						resource = wood
						amount > 11
					}
				}
			}
		}
		ai_chance = { base = 100 }
		set_temp_variable = { DEN_swedish_trade_additional_cost_temp = 0.03 }
		custom_effect_tooltip = DEN_swedish_trade_effect_tt
		add_to_variable = { DEN_swedish_trade_expenses = 0.03 tooltip = money_expenses }
		force_update_dynamic_modifier = yes
		37 = {
			add_resource = {
				type = wood
				amount = 9
			}
		}
		hidden_effect = {
			set_country_flag = DEN_swedish_wood_imported_9_flag
			SWE = {
				set_country_flag = SWE_denmark_imports_9_wood
				country_event = { id = denmark.516 }
			}
		}
	}
	
	option = {
		name = denmark.515.e
		trigger = {
			SWE = {
				any_owned_state = {
					has_resources_amount = {
						resource = wood
						amount > 14
					}
				}
			}
		}
		ai_chance = { base = 0 }
		set_temp_variable = { DEN_swedish_trade_additional_cost_temp = 0.04 }
		custom_effect_tooltip = DEN_swedish_trade_effect_tt
		add_to_variable = { DEN_swedish_trade_expenses = 0.04 tooltip = money_expenses }
		force_update_dynamic_modifier = yes
		37 = {
			add_resource = {
				type = wood
				amount = 12
			}
		}
		hidden_effect = {
			set_country_flag = DEN_swedish_wood_imported_12_flag
			SWE = {
				set_country_flag = SWE_denmark_imports_12_wood
				country_event = { id = denmark.516 }
			}
		}
	}
	
	option = {
		name = denmark.515.f
		trigger = {
			SWE = {
				any_owned_state = {
					has_resources_amount = {
						resource = wood
						amount > 17
					}
				}
			}
		}
		ai_chance = { base = 0 }
		set_temp_variable = { DEN_swedish_trade_additional_cost_temp = 0.05 }
		custom_effect_tooltip = DEN_swedish_trade_effect_tt
		add_to_variable = { DEN_swedish_trade_expenses = 0.05 tooltip = money_expenses }
		force_update_dynamic_modifier = yes
		37 = {
			add_resource = {
				type = wood
				amount = 15
			}
		}
		hidden_effect = {
			set_country_flag = DEN_swedish_wood_imported_15_flag
			SWE = {
				set_country_flag = SWE_denmark_imports_15_wood
				country_event = { id = denmark.516 }
			}
		}
	}
}

#SWE - Denmark Imports our Wood
country_event = {
	id = denmark.516
	title = denmark.516.t
	desc = denmark.516.d
		
	is_triggered_only = yes
	
	immediate = {
		hidden_effect = {
			if = {
				limit = {
					NOT = { has_variable = SWE_danish_trade_income }
				}
				set_variable = { SWE_danish_trade_income = 0 }
			}
			if = {
				limit = {
					NOT = { has_dynamic_modifier = { modifier = dynmod_SWE_danish_trade } }
				}
				add_dynamic_modifier = { modifier = dynmod_SWE_danish_trade }
			}
		}
	}
	
	option = {
		name = denmark.516.a
		ai_chance = { base = 100 }
		if = {
			limit = {
				has_country_flag = SWE_denmark_imports_3_wood
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = 0.01 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = 0.01 tooltip = money_income }
			force_update_dynamic_modifier = yes
			random_owned_state = {
				limit = {
					has_resources_amount = {
						resource = wood
						amount > 5
					}
				}
				add_resource = {
					type = wood
					amount = -3
				}
				hidden_effect = {
					set_state_flag = SWE_danish_trade_3_wood
				}
			}
			hidden_effect = {
				clr_country_flag = SWE_denmark_imports_3_wood
			}
		}
		else_if = {
			limit = {
				has_country_flag = SWE_denmark_imports_6_wood
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = 0.02 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = 0.02 tooltip = money_income }
			force_update_dynamic_modifier = yes
			random_owned_state = {
				limit = {
					has_resources_amount = {
						resource = wood
						amount > 8
					}
				}
				add_resource = {
					type = wood
					amount = -6
				}
				hidden_effect = {
					set_state_flag = SWE_danish_trade_6_wood
				}
			}
			hidden_effect = {
				clr_country_flag = SWE_denmark_imports_6_wood
			}
		}
		else_if = {
			limit = {
				has_country_flag = SWE_denmark_imports_9_wood
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = 0.03 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = 0.03 tooltip = money_income }
			force_update_dynamic_modifier = yes
			random_owned_state = {
				limit = {
					has_resources_amount = {
						resource = wood
						amount > 11
					}
				}
				add_resource = {
					type = wood
					amount = -9
				}
				hidden_effect = {
					set_state_flag = SWE_danish_trade_9_wood
				}
			}
			hidden_effect = {
				clr_country_flag = SWE_denmark_imports_9_wood
			}
		}
		else_if = {
			limit = {
				has_country_flag = SWE_denmark_imports_12_wood
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = 0.04 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = 0.04 tooltip = money_income }
			force_update_dynamic_modifier = yes
			random_owned_state = {
				limit = {
					has_resources_amount = {
						resource = wood
						amount > 14
					}
				}
				add_resource = {
					type = wood
					amount = -12
				}
				hidden_effect = {
					set_state_flag = SWE_danish_trade_12_wood
				}
			}
			hidden_effect = {
				clr_country_flag = SWE_denmark_imports_12_wood
			}
		}
		else_if = {
			limit = {
				has_country_flag = SWE_denmark_imports_15_wood
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = 0.05 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = 0.05 tooltip = money_income }
			force_update_dynamic_modifier = yes
			random_owned_state = {
				limit = {
					has_resources_amount = {
						resource = wood
						amount > 17
					}
				}
				add_resource = {
					type = wood
					amount = -15
				}
				hidden_effect = {
					set_state_flag = SWE_danish_trade_15_wood
				}
			}
			hidden_effect = {
				clr_country_flag = SWE_denmark_imports_15_wood
			}
		}
	}
}

#Importing Iron from Sweden
country_event = {
	id = denmark.517
	title = denmark.517.t
	desc = denmark.517.d
		
	is_triggered_only = yes
	
	immediate = {
		hidden_effect = {
			if = {
				limit = {
					NOT = { has_variable = DEN_swedish_trade_expenses }
				}
				set_variable = { DEN_swedish_trade_expenses = 0 }
			}
			if = {
				limit = {
					NOT = { has_dynamic_modifier = { modifier = dynmod_DEN_swedish_trade } }
				}
				add_dynamic_modifier = { modifier = dynmod_DEN_swedish_trade }
			}
		}
	}
	
	option = {
		name = denmark.517.a
		trigger = {
			SWE = {
				any_owned_state = {
					has_resources_amount = {
						resource = iron
						amount > 5
					}
				}
			}
		}
		ai_chance = { base = 0 }
		set_temp_variable = { DEN_swedish_trade_additional_cost_temp = 0.01 }
		custom_effect_tooltip = DEN_swedish_trade_effect_tt
		add_to_variable = { DEN_swedish_trade_expenses = 0.01 tooltip = money_expenses }
		force_update_dynamic_modifier = yes
		37 = {
			add_resource = {
				type = iron
				amount = 3
			}
		}
		hidden_effect = {
			set_country_flag = DEN_swedish_iron_imported_3_flag
			SWE = {
				set_country_flag = SWE_denmark_imports_3_iron
				country_event = { id = denmark.518 }
			}
		}
	}
	
	option = {
		name = denmark.517.b
		trigger = {
			SWE = {
				any_owned_state = {
					has_resources_amount = {
						resource = iron
						amount > 8
					}
				}
			}
		}
		ai_chance = { base = 100 }
		set_temp_variable = { DEN_swedish_trade_additional_cost_temp = 0.02 }
		custom_effect_tooltip = DEN_swedish_trade_effect_tt
		add_to_variable = { DEN_swedish_trade_expenses = 0.02 tooltip = money_expenses }
		force_update_dynamic_modifier = yes
		37 = {
			add_resource = {
				type = iron
				amount = 6
			}
		}
		hidden_effect = {
			set_country_flag = DEN_swedish_iron_imported_6_flag
			SWE = {
				set_country_flag = SWE_denmark_imports_6_iron
				country_event = { id = denmark.518 }
			}
		}
	}
	
	option = {
		name = denmark.517.c
		trigger = {
			SWE = {
				any_owned_state = {
					has_resources_amount = {
						resource = iron
						amount > 11
					}
				}
			}
		}
		ai_chance = { base = 0 }
		set_temp_variable = { DEN_swedish_trade_additional_cost_temp = 0.03 }
		custom_effect_tooltip = DEN_swedish_trade_effect_tt
		add_to_variable = { DEN_swedish_trade_expenses = 0.03 tooltip = money_expenses }
		force_update_dynamic_modifier = yes
		37 = {
			add_resource = {
				type = iron
				amount = 9
			}
		}
		hidden_effect = {
			set_country_flag = DEN_swedish_iron_imported_9_flag
			SWE = {
				set_country_flag = SWE_denmark_imports_9_iron
				country_event = { id = denmark.518 }
			}
		}
	}
	
	option = {
		name = denmark.517.e
		trigger = {
			SWE = {
				any_owned_state = {
					has_resources_amount = {
						resource = iron
						amount > 14
					}
				}
			}
		}
		ai_chance = { base = 0 }
		set_temp_variable = { DEN_swedish_trade_additional_cost_temp = 0.04 }
		custom_effect_tooltip = DEN_swedish_trade_effect_tt
		add_to_variable = { DEN_swedish_trade_expenses = 0.04 tooltip = money_expenses }
		force_update_dynamic_modifier = yes
		37 = {
			add_resource = {
				type = iron
				amount = 12
			}
		}
		hidden_effect = {
			set_country_flag = DEN_swedish_iron_imported_12_flag
			SWE = {
				set_country_flag = SWE_denmark_imports_12_iron
				country_event = { id = denmark.518 }
			}
		}
	}
	
	option = {
		name = denmark.517.f
		trigger = {
			SWE = {
				any_owned_state = {
					has_resources_amount = {
						resource = iron
						amount > 17
					}
				}
			}
		}
		ai_chance = { base = 0 }
		set_temp_variable = { DEN_swedish_trade_additional_cost_temp = 0.05 }
		custom_effect_tooltip = DEN_swedish_trade_effect_tt
		add_to_variable = { DEN_swedish_trade_expenses = 0.05 tooltip = money_expenses }
		force_update_dynamic_modifier = yes
		37 = {
			add_resource = {
				type = iron
				amount = 15
			}
		}
		hidden_effect = {
			set_country_flag = DEN_swedish_iron_imported_15_flag
			SWE = {
				set_country_flag = SWE_denmark_imports_15_iron
				country_event = { id = denmark.518 }
			}
		}
	}
}

#SWE - Denmark Imports our Iron
country_event = {
	id = denmark.518
	title = denmark.518.t
	desc = denmark.518.d
		
	is_triggered_only = yes
	
	immediate = {
		hidden_effect = {
			if = {
				limit = {
					NOT = { has_variable = SWE_danish_trade_income }
				}
				set_variable = { SWE_danish_trade_income = 0 }
			}
			if = {
				limit = {
					NOT = { has_dynamic_modifier = { modifier = dynmod_SWE_danish_trade } }
				}
				add_dynamic_modifier = { modifier = dynmod_SWE_danish_trade }
			}
		}
	}
	
	option = {
		name = denmark.518.a
		ai_chance = { base = 100 }
		if = {
			limit = {
				has_country_flag = SWE_denmark_imports_3_iron
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = 0.01 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = 0.01 tooltip = money_income }
			force_update_dynamic_modifier = yes
			random_owned_state = {
				limit = {
					has_resources_amount = {
						resource = iron
						amount > 5
					}
				}
				add_resource = {
					type = iron
					amount = -3
				}
				hidden_effect = {
					set_state_flag = SWE_danish_trade_3_iron
				}
			}
			hidden_effect = {
				clr_country_flag = SWE_denmark_imports_3_iron
			}
		}
		else_if = {
			limit = {
				has_country_flag = SWE_denmark_imports_6_iron
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = 0.02 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = 0.02 tooltip = money_income }
			force_update_dynamic_modifier = yes
			random_owned_state = {
				limit = {
					has_resources_amount = {
						resource = iron
						amount > 8
					}
				}
				add_resource = {
					type = iron
					amount = -6
				}
				hidden_effect = {
					set_state_flag = SWE_danish_trade_6_iron
				}
			}
			hidden_effect = {
				clr_country_flag = SWE_denmark_imports_6_iron
			}
		}
		else_if = {
			limit = {
				has_country_flag = SWE_denmark_imports_9_iron
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = 0.03 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = 0.03 tooltip = money_income }
			force_update_dynamic_modifier = yes
			random_owned_state = {
				limit = {
					has_resources_amount = {
						resource = iron
						amount > 11
					}
				}
				add_resource = {
					type = iron
					amount = -9
				}
				hidden_effect = {
					set_state_flag = SWE_danish_trade_9_iron
				}
			}
			hidden_effect = {
				clr_country_flag = SWE_denmark_imports_9_iron
			}
		}
		else_if = {
			limit = {
				has_country_flag = SWE_denmark_imports_12_iron
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = 0.04 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = 0.04 tooltip = money_income }
			force_update_dynamic_modifier = yes
			random_owned_state = {
				limit = {
					has_resources_amount = {
						resource = iron
						amount > 14
					}
				}
				add_resource = {
					type = iron
					amount = -12
				}
				hidden_effect = {
					set_state_flag = SWE_danish_trade_12_iron
				}
			}
			hidden_effect = {
				clr_country_flag = SWE_denmark_imports_12_iron
			}
		}
		else_if = {
			limit = {
				has_country_flag = SWE_denmark_imports_15_iron
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = 0.05 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = 0.05 tooltip = money_income }
			force_update_dynamic_modifier = yes
			random_owned_state = {
				limit = {
					has_resources_amount = {
						resource = iron
						amount > 17
					}
				}
				add_resource = {
					type = iron
					amount = -15
				}
				hidden_effect = {
					set_state_flag = SWE_danish_trade_15_iron
				}
			}
			hidden_effect = {
				clr_country_flag = SWE_denmark_imports_15_iron
			}
		}
	}
}

#SWE - Denmark Cancels Trade Deal for Wood
country_event = {
	id = denmark.519
	title = denmark.519.t
	desc = denmark.519.d
		
	is_triggered_only = yes
	
	option = {
		name = denmark.519.a
		ai_chance = { base = 100 }
		if = {
			limit = {
				any_owned_state = {
					has_state_flag = SWE_danish_trade_3_wood
				}
			}
			random_owned_state = {
				limit = {
					has_state_flag = SWE_danish_trade_3_wood
				}
				add_resource = {
					type = wood
					amount = 3
				}
				hidden_effect = {
					clr_state_flag = SWE_danish_trade_3_wood
				}
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = -0.01 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = -0.01 tooltip = money_income }
			force_update_dynamic_modifier = yes
		}
		else_if = {
			limit = {
				any_owned_state = {
					has_state_flag = SWE_danish_trade_6_wood
				}
			}
			random_owned_state = {
				limit = {
					has_state_flag = SWE_danish_trade_6_wood
				}
				add_resource = {
					type = wood
					amount = 6
				}
				hidden_effect = {
					clr_state_flag = SWE_danish_trade_6_wood
				}
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = -0.02 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = -0.02 tooltip = money_income }
			force_update_dynamic_modifier = yes
		}
		else_if = {
			limit = {
				any_owned_state = {
					has_state_flag = SWE_danish_trade_9_wood
				}
			}
			random_owned_state = {
				limit = {
					has_state_flag = SWE_danish_trade_9_wood
				}
				add_resource = {
					type = wood
					amount = 9
				}
				hidden_effect = {
					clr_state_flag = SWE_danish_trade_9_wood
				}
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = -0.03 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = -0.03 tooltip = money_income }
			force_update_dynamic_modifier = yes
		}
		else_if = {
			limit = {
				any_owned_state = {
					has_state_flag = SWE_danish_trade_12_wood
				}
			}
			random_owned_state = {
				limit = {
					has_state_flag = SWE_danish_trade_12_wood
				}
				add_resource = {
					type = wood
					amount = 12
				}
				hidden_effect = {
					clr_state_flag = SWE_danish_trade_12_wood
				}
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = -0.04 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = -0.04 tooltip = money_income }
			force_update_dynamic_modifier = yes
		}
		else_if = {
			limit = {
				any_owned_state = {
					has_state_flag = SWE_danish_trade_15_wood
				}
			}
			random_owned_state = {
				limit = {
					has_state_flag = SWE_danish_trade_15_wood
				}
				add_resource = {
					type = wood
					amount = 15
				}
				hidden_effect = {
					clr_state_flag = SWE_danish_trade_15_wood
				}
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = -0.05 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = -0.05 tooltip = money_income }
			force_update_dynamic_modifier = yes
		}
		hidden_effect = {
			if = {
				limit = {
					check_variable = { var = SWE_danish_trade_income value = 0 compare = equals }
				}
				clear_variable = SWE_danish_trade_income
				remove_dynamic_modifier = { modifier = dynmod_SWE_danish_trade }
			}
		}
	}
}

#SWE - Denmark Cancels Trade Deal for Iron
country_event = {
	id = denmark.520
	title = denmark.520.t
	desc = denmark.520.d
		
	is_triggered_only = yes
	
	option = {
		name = denmark.520.a
		ai_chance = { base = 100 }
		if = {
			limit = {
				any_owned_state = {
					has_state_flag = SWE_danish_trade_3_iron
				}
			}
			random_owned_state = {
				limit = {
					has_state_flag = SWE_danish_trade_3_iron
				}
				add_resource = {
					type = iron
					amount = 3
				}
				hidden_effect = {
					clr_state_flag = SWE_danish_trade_3_iron
				}
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = -0.01 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = -0.01 tooltip = money_income }
			force_update_dynamic_modifier = yes
		}
		else_if = {
			limit = {
				any_owned_state = {
					has_state_flag = SWE_danish_trade_6_iron
				}
			}
			random_owned_state = {
				limit = {
					has_state_flag = SWE_danish_trade_6_iron
				}
				add_resource = {
					type = iron
					amount = 6
				}
				hidden_effect = {
					clr_state_flag = SWE_danish_trade_6_iron
				}
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = -0.02 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = -0.02 tooltip = money_income }
			force_update_dynamic_modifier = yes
		}
		else_if = {
			limit = {
				any_owned_state = {
					has_state_flag = SWE_danish_trade_9_iron
				}
			}
			random_owned_state = {
				limit = {
					has_state_flag = SWE_danish_trade_9_iron
				}
				add_resource = {
					type = iron
					amount = 9
				}
				hidden_effect = {
					clr_state_flag = SWE_danish_trade_9_iron
				}
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = -0.03 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = -0.03 tooltip = money_income }
			force_update_dynamic_modifier = yes
		}
		else_if = {
			limit = {
				any_owned_state = {
					has_state_flag = SWE_danish_trade_12_iron
				}
			}
			random_owned_state = {
				limit = {
					has_state_flag = SWE_danish_trade_12_iron
				}
				add_resource = {
					type = iron
					amount = 12
				}
				hidden_effect = {
					clr_state_flag = SWE_danish_trade_12_iron
				}
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = -0.04 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = -0.04 tooltip = money_income }
			force_update_dynamic_modifier = yes
		}
		else_if = {
			limit = {
				any_owned_state = {
					has_state_flag = SWE_danish_trade_15_iron
				}
			}
			random_owned_state = {
				limit = {
					has_state_flag = SWE_danish_trade_15_iron
				}
				add_resource = {
					type = iron
					amount = 15
				}
				hidden_effect = {
					clr_state_flag = SWE_danish_trade_15_iron
				}
			}
			set_temp_variable = { SWE_danish_trade_additional_income_temp = -0.05 }
			custom_effect_tooltip = SWE_danish_trade_effect_tt
			add_to_variable = { SWE_danish_trade_income = -0.05 tooltip = money_income }
			force_update_dynamic_modifier = yes
		}
		hidden_effect = {
			if = {
				limit = {
					check_variable = { var = SWE_danish_trade_income value = 0 compare = equals }
				}
				clear_variable = SWE_danish_trade_income
				remove_dynamic_modifier = { modifier = dynmod_SWE_danish_trade }
			}
		}
	}
}

#SIA/TSH/JAP - Sign a Treaty of Friendship, Commerce, and Navigation with Denmark?
country_event = {
	id = denmark.521
	title = denmark.521.t
	desc = denmark.521.d
		
	is_triggered_only = yes
	
	#Sign the treaty
	option = {
		name = denmark.521.a
		ai_chance = { base = 95 }
		add_political_power = 10
		add_opinion_modifier = {
			target = DEN
			modifier = medium_increase
		}
		reverse_add_opinion_modifier = {
			target = DEN
			modifier = medium_increase 
		}
		hidden_effect = {
			DEN = { country_event = { id = denmark.522 days = 21 } }
		}
	}
	
	#Reject the treaty
	option = {
		name = denmark.521.b
		ai_chance = {
			base = 5
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		add_opinion_modifier = {
			target = DEN
			modifier = small_decrease
		}
		reverse_add_opinion_modifier = {
			target = DEN
			modifier = small_decrease 
		}
		hidden_effect = {
			DEN = { country_event = { id = denmark.523 days = 21 } }
		}
	}
}

#Denmark - FROM Signs Friendship Treaty
country_event = {
	id = denmark.522
	title = denmark.522.t
	desc = denmark.522.d
		
	is_triggered_only = yes

	option = {
		name = denmark.522.a
		ai_chance = { base = 100 }
		if = {
			limit = {
				FROM = { tag = SIA }
			}
			unlock_decision_tooltip = DEN_decision_trade_with_siam
			hidden_effect = {
				set_country_flag = DEN_treaty_with_siam_signed_flag
			}
		}
		else_if = {
			limit = {
				FROM = {
					OR = {
						tag = TSH
						tag = JAP
					}
				}
			}
			unlock_decision_tooltip = DEN_decision_trade_with_japan
			hidden_effect = {
				set_country_flag = DEN_treaty_with_japan_signed_flag
			}
		}
	}
}

#Denmark - FROM Rejects Friendship Treaty
country_event = {
	id = denmark.523
	title = denmark.523.t
	desc = denmark.523.d
		
	is_triggered_only = yes

	option = {
		name = denmark.523.a
		ai_chance = { base = 100 }
		add_political_power = -10
	}
}

#SIA/TSH/JAP - Sign a Trade Treaty with Denmark?
country_event = {
	id = denmark.524
	title = denmark.524.t
	desc = denmark.524.d
		
	is_triggered_only = yes
	
	#Sign the treaty
	option = {
		name = denmark.524.a
		ai_chance = { base = 95 }
		add_political_power = 10
		add_opinion_modifier = {
			target = DEN
			modifier = medium_increase
		}
		reverse_add_opinion_modifier = {
			target = DEN
			modifier = medium_increase 
		}
		add_timed_idea = { idea = DEN_idea_foreign_trade_treaty days = 730 }
		hidden_effect = {
			DEN = { country_event = { id = denmark.525 days = 21 } }
		}
	}
	
	#Reject the treaty
	option = {
		name = denmark.524.b
		ai_chance = {
			base = 5
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		add_opinion_modifier = {
			target = DEN
			modifier = small_decrease
		}
		reverse_add_opinion_modifier = {
			target = DEN
			modifier = small_decrease 
		}
		hidden_effect = {
			DEN = { country_event = { id = denmark.526 days = 21 } }
		}
	}
}

#Denmark - FROM Signs Trade Treaty
country_event = {
	id = denmark.525
	title = denmark.525.t
	desc = denmark.525.d
		
	is_triggered_only = yes

	option = {
		name = denmark.525.a
		ai_chance = { base = 100 }
		if = {
			limit = {
				NOT = { has_idea = DEN_idea_foreign_trade_treaty }
			}
			add_timed_idea = { idea = DEN_idea_foreign_trade_treaty days = 730 }
		}
		else = {
			modify_timed_idea = { idea = DEN_idea_foreign_trade_treaty days = 730 }
		}
	}
}

#Denmark - FROM Rejects Trade Treaty
country_event = {
	id = denmark.526
	title = denmark.526.t
	desc = denmark.526.d
		
	is_triggered_only = yes

	option = {
		name = denmark.526.a
		ai_chance = { base = 100 }
		add_political_power = -10
	}
}

#The Copenhagen Trade Crisis
country_event = {
	id = denmark.527
	title = denmark.527.t
	desc = denmark.527.d
		
	is_triggered_only = yes

	option = {
		name = denmark.527.a
		ai_chance = { base = 100 }
		modify_timed_idea = {
			idea = Panic_of_1857_4
			days = -30
		}
	}
}

#Befriend the Hanseatic Cities
country_event = {
	id = denmark.601
	title = denmark.601.t
	desc = denmark.601.d
		
	is_triggered_only = yes
	fire_only_once = yes
	
	#Trade with Hamburg
	option = {
		name = denmark.601.a
		ai_chance = { base = 100 }
		set_country_flag = DEN_Hamburg_Trade
		add_opinion_modifier = {
			target = HAM
			modifier = medium_increase
		}
		reverse_add_opinion_modifier = {
			target = HAM
			modifier = medium_increase 
		}
	}
	
	#Trade with Lübeck
	option = {
		name = denmark.601.b
		ai_chance = { base = 0 }
		set_country_flag = DEN_Lubeck_Trade
		add_opinion_modifier = {
			target = LCK
			modifier = medium_increase
		}
		reverse_add_opinion_modifier = {
			target = LCK
			modifier = medium_increase 
		}
	}
}

##### MILITARY EVENTS (denmark.701-900) #####

### GENERAL AND ADMIRAL EVENTS (denmark.701-750) ###

### ARMY EVENTS (denmark.751-825) ###

#Krigsministre Lundbye's Reforms
country_event = {
	id = denmark.751
	title = denmark.751.t
	desc = denmark.751.d
		
	fire_only_once = yes
	is_triggered_only = yes
		
	option = {
		name = denmark.751.a
		DEN_carl_lundbye = {
			add_corps_commander_role = {
				traits = { bearer_of_artillery }
				skill = 2
					attack_skill = 1
					defense_skill = 2
					planning_skill = 2
					logistics_skill = 2
			}
		}
		add_advisor_role = {
			character = DEN_carl_lundbye
			advisor = {
				slot = army_chief
				cost = 50
				idea_token = DEN_carl_lundbye_army_chief
				traits = {
					army_chief_defensive_2
				}
			}
		}
		add_command_power = -20
	}
}

#Development of Espingoles
country_event = {
	id = denmark.752
	title = denmark.752.t
	desc = denmark.752.d
		
	fire_only_once = yes
	is_triggered_only = yes
		
	option = {
		name = denmark.752.a
		add_political_power = 10
		add_war_support = 0.01
		add_tech_bonus = { ahead_reduction = 1 uses = 1 category = artillery }
		hidden_effect = {
			set_technology = {
				gatling_gun = 1
			}
		}
	}
}

### NAVY EVENTS (denmark.826-900) ###

#Armored Schooners from English Dockyards Ready for Commission
country_event = {
	id = denmark.826
	title = denmark.826.t
	desc = denmark.826.d
		
	fire_only_once = yes
	is_triggered_only = yes
		
	option = {
		name = denmark.826.a
		custom_effect_tooltip = DEN_event_order_armored_schooners_abroad_tt
		navy_experience = 5
		hidden_effect = {
			create_equipment_variant = {
				name = "Armored Schooner"
				type = ship_hull_gunboat_2
				name_group = DEN_GB_HISTORICAL
				parent_version = 0
				modules = {
					fixed_ship_battery_slot = ship_cannon_battery_1
					fixed_ship_fire_control_system_slot = fire_control_system_0
					fixed_ship_engine_slot = ship_engine_steam_screw_gunboat
					fixed_ship_secondaries_slot = empty
					fixed_ship_armor_slot = ship_armor_capital_hardwood_0
					mid_1_custom_slot = empty
					mid_2_custom_slot = empty
					rear_1_custom_slot = empty
				}
			}
			load_oob = DEN_armored_schooners_foreign
		}
	}
}

#Armored Schooners from Danish Dockyards Ready for Commission
country_event = {
	id = denmark.827
	title = denmark.827.t
	desc = denmark.827.d
		
	fire_only_once = yes
	is_triggered_only = yes
		
	option = {
		name = denmark.827.a
		custom_effect_tooltip = DEN_event_order_armored_schooners_domestically_tt
		navy_experience = 5
		hidden_effect = {
			create_equipment_variant = {
				name = "Armored Schooner"
				type = ship_hull_gunboat_2
				name_group = DEN_GB_HISTORICAL
				parent_version = 0
				modules = {
					fixed_ship_battery_slot = ship_cannon_battery_1
					fixed_ship_fire_control_system_slot = fire_control_system_0
					fixed_ship_engine_slot = ship_engine_steam_screw_gunboat
					fixed_ship_secondaries_slot = empty
					fixed_ship_armor_slot = ship_armor_capital_hardwood_0
					mid_1_custom_slot = empty
					mid_2_custom_slot = empty
					rear_1_custom_slot = empty
				}
			}
			load_oob = DEN_armored_schooners_domestic
		}
	}
}

#The Rolf Krake is Ready for Commission
country_event = {
	id = denmark.828
	title = denmark.828.t
	desc = denmark.828.d
		
	fire_only_once = yes
	is_triggered_only = yes
		
	option = {
		name = denmark.828.a
		custom_effect_tooltip = DEN_event_order_rolf_krake_tt
		navy_experience = 5
		hidden_effect = {
			create_equipment_variant = {
				name = "Rolf Krake"
				type = ship_hull_ironclad_0
				name_group = DEN_IC_HISTORICAL
				parent_version = 0
				modules = {
					fixed_ship_battery_slot = ship_module_ram_0
					fixed_ship_fire_control_system_slot = fire_control_system_0
					fixed_ship_engine_slot = ship_engine_steam_screw_cruiser
					fixed_ship_armor_slot = ship_armor_capital_hardwood_1
					mid_1_custom_slot = ship_armor_capital_hardwood_1
					mid_2_custom_slot = ship_armor_capital_hardwood_1
					front_1_custom_slot = ship_armor_capital_hardwood_1
					rear_1_custom_slot = ship_turret_heavy_0
				}
			}
			load_oob = DEN_rolf_krake
		}
	}
}

#Dannebrog Refitted as an Ironclad
country_event = {
	id = denmark.829
	title = denmark.829.t
	desc = denmark.829.d
		
	fire_only_once = yes
	is_triggered_only = yes
		
	option = {
		name = denmark.829.a
		custom_effect_tooltip = DEN_event_refit_dannebrog_tt
		navy_experience = 5
		hidden_effect = {
			create_equipment_variant = {
				name = "Dannebrog"
				type = ship_hull_ironclad_0
				name_group = DEN_IC_HISTORICAL
				parent_version = 0
				modules = {
					fixed_ship_battery_slot = ship_cannon_battery_1
					fixed_ship_fire_control_system_slot = fire_control_system_0
					fixed_ship_engine_slot = ship_engine_steam_screw_cruiser
					fixed_ship_armor_slot = ship_armor_capital_hardwood_1
					mid_1_custom_slot = ship_armor_capital_hardwood_1
					mid_2_custom_slot = ship_armor_capital_hardwood_1
					front_1_custom_slot = ship_armor_capital_hardwood_1
					rear_1_custom_slot = ship_cannon_battery_1
				}
			}
			load_oob = DEN_dannebrog_ironclad
		}
	}
}

#Screw Frigates Ready for Commission
country_event = {
	id = denmark.830
	title = denmark.830.t
	desc = denmark.830.d
		
	fire_only_once = yes
	is_triggered_only = yes
		
	option = {
		name = denmark.830.a
		custom_effect_tooltip = DEN_event_order_screw_frigates_tt
		navy_experience = 5
		hidden_effect = { load_oob = DEN_screw_frigates }
	}
}

#The Importance of our Atlantic Naval Bases
country_event = {
	id = denmark.831
	title = denmark.831.t
	desc = denmark.831.d
		
	fire_only_once = yes
	is_triggered_only = yes
		
	option = {
		name = denmark.831.a
		navy_experience = 5
		unlock_decision_tooltip = DEN_decision_fortify_atlantic_naval_bases
		hidden_effect = {
			set_country_flag = DEN_atlantic_naval_base_flag
		}
	}
}

##### PARLIAMENTARY EVENTS (denmark.901-999) #####

#Vote on the New Business Act
country_event = {
	id = denmark.901
	title = denmark.901.t
	desc = denmark.901.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	immediate = {
		set_variable = {
			var = current_reform_id
			value = 26.1
		}
	
		reset_approval_arrays = yes
		set_1_approval_highly_agree = yes
		set_2_approval_disagree = yes
		set_3_approval_neutral = yes
		set_4_approval_highly_agree = yes
	
		set_vote_eco = yes
		compute_voting_approval = yes
	
		compute_number_seats_tot = yes
		compute_number_seats_approve_est = yes
	}

	#Let's vote in a month
	option = {
		name = denmark.901.a
		ai_chance = { base = 100 }
		
		country_event = {
			id = denmark.902
			days = 31
		}
	}

	#Abandon the idea
	#option = {
	#	name = denmark.901.b
	#	ai_chance = { base = 0 }
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#}
}

#Results of the Vote on the New Business Act
country_event = {
	id = denmark.902
	title = denmark.902.t
	desc = denmark.902.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	#immediate = {
	#	hidden_effect = {
	#		calculate_vote_result = yes
	#	}
	#}

	#It's a success!
	option = {
		name = denmark.902.a
		#trigger = {
		#	has_country_flag = eoanb_reform_vote_success
		#}
		#clr_country_flag = eoanb_reform_vote_success
		#enact_voted_reform = yes

		add_ideas = DEN_idea_new_buisness_act
		add_political_power = 25
		
		if = {
			limit = {
				has_government = traditional_conservatism
			}
			add_popularity = { ideology = traditional_conservatism popularity = -0.01 }
			add_popularity = { ideology = centrism popularity = 0.01 }
		}
		if = {
			limit = {
				has_government = centrism
			}
			add_popularity = { ideology = traditional_conservatism popularity = 0.01 }
			add_popularity = { ideology = centrism popularity = -0.01 }
		}
		
		set_variable = {
			var = current_reform_id
			value = 0
		}
	}

	#It's a failure...
	#option = {
	#	name = denmark.902.b
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_failure
	#	}
	#	clr_country_flag = eoanb_reform_vote_failure
	#	
	#	add_political_power = -50
	#	if = {
	#		limit = {
	#			has_government = traditional_conservatism
	#		}
	#		add_popularity = { ideology = traditional_conservatism popularity = -0.01 }
	#		add_popularity = { ideology = centrism popularity = 0.01 }
	#	}
	#	if = {
	#		limit = {
	#			has_government = centrism
	#		}
	#		add_popularity = { ideology = traditional_conservatism popularity = 0.01 }
	#		add_popularity = { ideology = centrism popularity = -0.01 }
	#	}
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
    #}

	#This is somehow worse than a failure...
	#option = {
	#	name = denmark.902.c
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_tie
	#	}
	#	clr_country_flag = eoanb_reform_vote_tie
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#}
}

#Vote on the Stöðulög Act
country_event = {
	id = denmark.903
	title = denmark.903.t
	desc = denmark.903.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	immediate = {
		set_variable = {
			var = current_reform_id
			value = 26.2
		}
	
		reset_approval_arrays = yes
		set_1_approval_highly_agree = yes
		set_2_approval_disagree = yes
		set_3_approval_neutral = yes
		set_4_approval_highly_agree = yes
	
		set_vote_eco = yes
		compute_voting_approval = yes
	
		compute_number_seats_tot = yes
		compute_number_seats_approve_est = yes
	}

	#Let's vote in a month
	option = {
		name = denmark.903.a
		ai_chance = { base = 100 }
		
		country_event = {
			id = denmark.904
			days = 31
		}
	}

	#Abandon the idea
	#option = {
	#	name = denmark.917.b
	#	ai_chance = { base = 0 }
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#}
}

#Results of the Vote on the Stöðulög Act
country_event = {
	id = denmark.904
	title = denmark.904.t
	desc = denmark.904.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	#immediate = {
	#	hidden_effect = {
	#		calculate_vote_result = yes
	#	}
	#}

	#It's a success!
	option = {
		name = denmark.904.a
		#trigger = {
		#	has_country_flag = eoanb_reform_vote_success
		#}
		#clr_country_flag = eoanb_reform_vote_success
		#enact_voted_reform = yes
	
		swap_ideas = {
			remove_idea = DEN_idea_icelandic_independence_movement_1
			add_idea = DEN_idea_icelandic_independence_movement_2
		}
		ICE = { add_state_core = 100 }
		add_political_power = 25
		add_stability = 0.025

		if = {
			limit = {
				has_government = traditional_conservatism
			}
			add_popularity = { ideology = traditional_conservatism popularity = -0.01 }
			add_popularity = { ideology = centrism popularity = 0.01 }
		}
		if = {
			limit = {
				has_government = centrism
			}
			add_popularity = { ideology = traditional_conservatism popularity = 0.01 }
			add_popularity = { ideology = centrism popularity = -0.01 }
		}
		
		set_variable = {
			var = current_reform_id
			value = 0
		}
	}

	#It's a failure...
	#option = {
	#	name = denmark.904.b
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_failure
	#	}
	#	clr_country_flag = eoanb_reform_vote_failure
	#	
	#	add_political_power = -50
	#	if = {
	#		limit = {
	#			has_government = traditional_conservatism
	#		}
	#		add_popularity = { ideology = traditional_conservatism popularity = -0.01 }
	#		add_popularity = { ideology = centrism popularity = 0.01 }
	#	}
	#	if = {
	#		limit = {
	#			has_government = centrism
	#		}
	#		add_popularity = { ideology = traditional_conservatism popularity = 0.01 }
	#		add_popularity = { ideology = centrism popularity = -0.01 }
	#	}
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
    #}

	#This is somehow worse than a failure...
	#option = {
	#	name = denmark.904.c
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_tie
	#	}
	#	clr_country_flag = eoanb_reform_vote_tie
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#}
}

#Vote on the Holmen Naval Base Act
country_event = {
	id = denmark.905
	title = denmark.905.t
	desc = denmark.905.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	immediate = {
		set_variable = {
			var = current_reform_id
			value = 26.3
		}
	
		reset_approval_arrays = yes
		set_1_approval_highly_agree = yes
		set_2_approval_agree = yes
		set_3_approval_neutral = yes
		set_4_approval_highly_disagree = yes
	
		set_vote_war = yes
		compute_voting_approval = yes
	
		compute_number_seats_tot = yes
		compute_number_seats_approve_est = yes
	}

	#Let's vote in a month
	option = {
		name = denmark.905.a
		ai_chance = { base = 100 }
		
		country_event = {
			id = denmark.906
			days = 31
		}
	}

	#Abandon the idea
	#option = {
	#	name = denmark.913.b
	#	ai_chance = { base = 0 }
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#	
	#	hidden_effect = {
	#		clr_country_flag = DEN_navy_reform_ongoing_flag
	#	}
	#}
}

#Results of Vote on the Holmen Naval Base Act
country_event = {
	id = denmark.906
	title = denmark.906.t
	desc = denmark.906.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	# immediate = {
	# 	hidden_effect = {
	# 		calculate_vote_result = yes
	# 	}
	# }

	#It's a success!
	option = {
		name = denmark.906.a
		#trigger = {
		#	has_country_flag = eoanb_reform_vote_success
		#}
		#clr_country_flag = eoanb_reform_vote_success
		#enact_voted_reform = yes

		add_political_power = 25
		37 = {
			add_extra_state_shared_building_slots = 1
			add_building_construction = { type = naval_base level = 1 instant_build = yes province = 6287 }
		}
		unlock_decision_tooltip = DEN_decision_holmen_naval_port_expansion
		hidden_effect = {
			set_country_flag = DEN_holmen_naval_port_expansion_ready_flag
			clr_country_flag = DEN_navy_reform_ongoing_flag
		}

		if = {
			limit = {
				has_government = traditional_conservatism
			}
			add_popularity = { ideology = traditional_conservatism popularity = -0.01 }
			add_popularity = { ideology = centrism popularity = 0.01 }
		}
		if = {
			limit = {
				has_government = centrism
			}
			add_popularity = { ideology = traditional_conservatism popularity = 0.01 }
			add_popularity = { ideology = centrism popularity = -0.01 }
		}
	
		set_variable = {
			var = current_reform_id
			value = 0
		}
	}

	#It's a failure...
	#option = {
	#	name = denmark.906.b
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_failure
	#	}
	#	clr_country_flag = eoanb_reform_vote_failure
	#
	#	add_political_power = -50
	#	if = {
	#		limit = {
	#			has_government = traditional_conservatism
	#		}
	#		add_popularity = { ideology = traditional_conservatism popularity = -0.01 }
	#		add_popularity = { ideology = centrism popularity = 0.01 }
	#	}
	#	if = {
	#		limit = {
	#			has_government = centrism
	#		}
	#		add_popularity = { ideology = traditional_conservatism popularity = 0.01 }
	#		add_popularity = { ideology = centrism popularity = -0.01 }
	#	}
	#	
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
    #}

	#This is somehow worse than a failure...
	#option = {
	#	name = denmark.906.c
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_tie
	#	}
	#	clr_country_flag = eoanb_reform_vote_tie
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#}
}

#Vote on the Wartime Infantry Battalion Duplication Bill
country_event = {
	id = denmark.907
	title = denmark.907.t
	desc = denmark.907.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	immediate = {
		set_variable = {
			var = current_reform_id
			value = 26.4
		}
	
		reset_approval_arrays = yes
		set_1_approval_highly_agree = yes
		set_2_approval_agree = yes
		set_3_approval_neutral = yes
		set_4_approval_highly_disagree = yes
	
		set_vote_war = yes
		compute_voting_approval = yes
	
		compute_number_seats_tot = yes
		compute_number_seats_approve_est = yes
	}

	#Let's vote in a month
	option = {
		name = denmark.907.a
		ai_chance = { base = 100 }
		
		country_event = {
			id = denmark.908
			days = 31
		}
	}

	#Abandon the idea
	#option = {
	#	name = denmark.907.b
	#	ai_chance = { base = 0 }
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#	
	#	hidden_effect = {
	#		clr_country_flag = DEN_army_reform_ongoing_flag
	#	}
	#}
}

#Results of Vote on the Wartime Infantry Battalion Duplication Bill
country_event = {
	id = denmark.908
	title = denmark.908.t
	desc = denmark.908.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	# immediate = {
	# 	hidden_effect = {
	# 		calculate_vote_result = yes
	# 	}
	# }

	#It's a success!
	option = {
		name = denmark.908.a
		#trigger = {
		#	has_country_flag = eoanb_reform_vote_success
		#}
		#clr_country_flag = eoanb_reform_vote_success
		#enact_voted_reform = yes
		
		custom_effect_tooltip = DEN_parl_vote_wartime_battalion_duplication_effect_tt
		add_political_power = 25
		hidden_effect = {
			set_country_flag = DEN_wartime_battalion_duplication_flag
			clr_country_flag = DEN_army_reform_ongoing_flag
		}
		
		if = {
			limit = {
				has_government = traditional_conservatism
			}
			add_popularity = { ideology = traditional_conservatism popularity = -0.01 }
			add_popularity = { ideology = centrism popularity = 0.01 }
		}
		if = {
			limit = {
				has_government = centrism
			}
			add_popularity = { ideology = traditional_conservatism popularity = 0.01 }
			add_popularity = { ideology = centrism popularity = -0.01 }
		}
		
		set_variable = {
			var = current_reform_id
			value = 0
		}
	}

	#It's a failure...
	#option = {
	#	name = denmark.908.b
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_failure
	#	}
	#	clr_country_flag = eoanb_reform_vote_failure
	#	
	#	add_political_power = -50
	#	if = {
	#		limit = {
	#			has_government = traditional_conservatism
	#		}
	#		add_popularity = { ideology = traditional_conservatism popularity = -0.01 }
	#		add_popularity = { ideology = centrism popularity = 0.01 }
	#	}
	#	if = {
	#		limit = {
	#			has_government = centrism
	#		}
	#		add_popularity = { ideology = traditional_conservatism popularity = 0.01 }
	#		add_popularity = { ideology = centrism popularity = -0.01 }
	#	}
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
    #}

	#This is somehow worse than a failure...
	#option = {
	#	name = denmark.908.c
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_tie
	#	}
	#	clr_country_flag = eoanb_reform_vote_tie
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#}
}

#Vote on the Danish Conscription Act
country_event = {
	id = denmark.909
	title = denmark.909.t
	desc = denmark.909.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	immediate = {
		set_variable = {
			var = current_reform_id
			value = 26.5
		}
	
		reset_approval_arrays = yes
		set_1_approval_highly_agree = yes
		set_2_approval_agree = yes
		set_3_approval_disagree = yes
		set_4_approval_highly_disagree = yes
	
		set_vote_war = yes
		compute_voting_approval = yes
	
		compute_number_seats_tot = yes
		compute_number_seats_approve_est = yes
	}

	#Let's vote in a month
	option = {
		name = denmark.909.a
		ai_chance = { base = 100 }
		
		country_event = {
			id = denmark.910
			days = 31
		}
	}

	#Abandon the idea
	#option = {
	#	name = denmark.907.b
	#	ai_chance = { base = 0 }
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#	
	#	hidden_effect = {
	#		clr_country_flag = DEN_army_reform_ongoing_flag
	#	}
	#}
}

#Results of the Vote on the Danish Conscription Act
country_event = {
	id = denmark.910
	title = denmark.910.t
	desc = denmark.910.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	# immediate = {
	# 	hidden_effect = {
	# 		calculate_vote_result = yes
	# 	}
	# }

	#It's a success!
	option = {
		name = denmark.910.a
		#trigger = {
		#	has_country_flag = eoanb_reform_vote_success
		#}
		#clr_country_flag = eoanb_reform_vote_success
		#enact_voted_reform = yes
		
		add_political_power = 25
		if = {
			limit = {
				has_idea = limited_conscription
			}
			swap_ideas = { remove_idea = limited_conscription add_idea = extensive_conscription }
		}
		else_if = {
			limit = {
				has_idea = early_conscription
			}
			swap_ideas = { remove_idea = early_conscription add_idea = limited_conscription }
		}
		else_if = {
			limit = {
				has_idea = volunteer_only
			}
			swap_ideas = { remove_idea = volunteer_only add_idea = early_conscription }
		}
		hidden_effect = {
			clr_country_flag = DEN_army_reform_ongoing_flag
		}

		if = {
			limit = {
				has_government = traditional_conservatism
			}
			add_popularity = { ideology = traditional_conservatism popularity = -0.01 }
			add_popularity = { ideology = centrism popularity = 0.01 }
		}
		if = {
			limit = {
				has_government = centrism
			}
			add_popularity = { ideology = traditional_conservatism popularity = 0.01 }
			add_popularity = { ideology = centrism popularity = -0.01 }
		}
		
		set_variable = {
			var = current_reform_id
			value = 0
		}
	}

	#It's a failure...
	#option = {
	#	name = denmark.910.b
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_failure
	#	}
	#	clr_country_flag = eoanb_reform_vote_failure
	#	
	#	add_political_power = -50
	#	if = {
	#		limit = {
	#			has_government = traditional_conservatism
	#		}
	#		add_popularity = { ideology = traditional_conservatism popularity = -0.01 }
	#		add_popularity = { ideology = centrism popularity = 0.01 }
	#	}
	#	if = {
	#		limit = {
	#			has_government = centrism
	#		}
	#		add_popularity = { ideology = traditional_conservatism popularity = 0.01 }
	#		add_popularity = { ideology = centrism popularity = -0.01 }
	#	}
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
    #}

	#This is somehow worse than a failure...
	#option = {
	#	name = denmark.910.c
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_tie
	#	}
	#	clr_country_flag = eoanb_reform_vote_tie
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#}
}

#Vote on the Danish Army Budget Act
country_event = {
	id = denmark.911
	title = denmark.911.t
	desc = denmark.911.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	immediate = {
		set_variable = {
			var = current_reform_id
			value = 26.6
		}
	
		reset_approval_arrays = yes
		set_1_approval_highly_agree = yes
		set_2_approval_highly_agree = yes
		set_3_approval_disagree = yes
		set_4_approval_highly_disagree = yes
	
		set_vote_war = yes
		compute_voting_approval = yes
	
		compute_number_seats_tot = yes
		compute_number_seats_approve_est = yes
	}

	#Let's vote in a month
	option = {
		name = denmark.911.a
		ai_chance = { base = 100 }
		
		country_event = {
			id = denmark.912
			days = 31
		}
	}

	#Abandon the idea
	#option = {
	#	name = denmark.907.b
	#	ai_chance = { base = 0 }
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#	
	#	hidden_effect = {
	#		clr_country_flag = DEN_army_reform_ongoing_flag
	#	}
	#}
}

#Results of the Vote on the Danish Army Budget Act
country_event = {
	id = denmark.912
	title = denmark.912.t
	desc = denmark.912.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	# immediate = {
	# 	hidden_effect = {
	# 		calculate_vote_result = yes
	# 	}
	# }

	#It's a success!
	option = {
		name = denmark.912.a
		#trigger = {
		#	has_country_flag = eoanb_reform_vote_success
		#}
		#clr_country_flag = eoanb_reform_vote_success
		#enact_voted_reform = yes
		
		add_political_power = 25
		if = {
			limit = {
				has_idea = army_spending_level_3
			}
			swap_ideas = { remove_idea = army_spending_level_3 add_idea = army_spending_level_4 }
		}
		else_if = {
			limit = {
				has_idea = army_spending_level_2
			}
			swap_ideas = { remove_idea = army_spending_level_2 add_idea = army_spending_level_3 }
		}
		else_if = {
			limit = {
				has_idea = army_spending_level_1
			}
			swap_ideas = { remove_idea = army_spending_level_1 add_idea = army_spending_level_2 }
		}
		hidden_effect = {
			clr_country_flag = DEN_army_reform_ongoing_flag
		}
		
		if = {
			limit = {
				has_government = traditional_conservatism
			}
			add_popularity = { ideology = traditional_conservatism popularity = -0.01 }
			add_popularity = { ideology = centrism popularity = 0.01 }
		}
		if = {
			limit = {
				has_government = centrism
			}
			add_popularity = { ideology = traditional_conservatism popularity = 0.01 }
			add_popularity = { ideology = centrism popularity = -0.01 }
		}
		
		set_variable = {
			var = current_reform_id
			value = 0
		}
	}

	#It's a failure...
	#option = {
	#	name = denmark.912.b
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_failure
	#	}
	#	clr_country_flag = eoanb_reform_vote_failure
	#	
	#	add_political_power = -50
	#	if = {
	#		limit = {
	#			has_government = traditional_conservatism
	#		}
	#		add_popularity = { ideology = traditional_conservatism popularity = -0.01 }
	#		add_popularity = { ideology = centrism popularity = 0.01 }
	#	}
	#	if = {
	#		limit = {
	#			has_government = centrism
	#		}
	#		add_popularity = { ideology = traditional_conservatism popularity = 0.01 }
	#		add_popularity = { ideology = centrism popularity = -0.01 }
	#	}
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
    #}

	#This is somehow worse than a failure...
	#option = {
	#	name = denmark.912.c
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_tie
	#	}
	#	clr_country_flag = eoanb_reform_vote_tie
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#}
}

#Vote on the Danish Navy Budget Act
country_event = {
	id = denmark.913
	title = denmark.913.t
	desc = denmark.913.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	immediate = {
		set_variable = {
			var = current_reform_id
			value = 26.7
		}
	
		reset_approval_arrays = yes
		set_1_approval_highly_agree = yes
		set_2_approval_agree = yes
		set_3_approval_neutral = yes
		set_4_approval_highly_disagree = yes
	
		set_vote_war = yes
		compute_voting_approval = yes
	
		compute_number_seats_tot = yes
		compute_number_seats_approve_est = yes
	}

	#Let's vote in a month
	option = {
		name = denmark.913.a
		ai_chance = { base = 100 }
		
		country_event = {
			id = denmark.914
			days = 31
		}
	}

	#Abandon the idea
	#option = {
	#	name = denmark.913.b
	#	ai_chance = { base = 0 }
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#	
	#	hidden_effect = {
	#		clr_country_flag = DEN_navy_reform_ongoing_flag
	#	}
	#}
}

#Results of the Vote on the Danish Navy Budget Act
country_event = {
	id = denmark.914
	title = denmark.914.t
	desc = denmark.914.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	# immediate = {
	# 	hidden_effect = {
	# 		calculate_vote_result = yes
	# 	}
	# }

	#It's a success!
	option = {
		name = denmark.914.a
		#trigger = {
		#	has_country_flag = eoanb_reform_vote_success
		#}
		#clr_country_flag = eoanb_reform_vote_success
		#enact_voted_reform = yes

		add_political_power = 25
		if = {
			limit = {
				has_idea = navy_spending_level_3
			}
			swap_ideas = { remove_idea = navy_spending_level_3 add_idea = navy_spending_level_4 }
		}
		else_if = {
			limit = {
				has_idea = navy_spending_level_2
			}
			swap_ideas = { remove_idea = navy_spending_level_2 add_idea = navy_spending_level_3 }
		}
		else_if = {
			limit = {
				has_idea = navy_spending_level_1
			}
			swap_ideas = { remove_idea = navy_spending_level_1 add_idea = navy_spending_level_3 }
		}
		hidden_effect = {
			clr_country_flag = DEN_navy_reform_ongoing_flag
		}
		
		if = {
			limit = {
				has_government = traditional_conservatism
			}
			add_popularity = { ideology = traditional_conservatism popularity = -0.01 }
			add_popularity = { ideology = centrism popularity = 0.01 }
		}
		if = {
			limit = {
				has_government = centrism
			}
			add_popularity = { ideology = traditional_conservatism popularity = 0.01 }
			add_popularity = { ideology = centrism popularity = -0.01 }
		}
	
		set_variable = {
			var = current_reform_id
			value = 0
		}
	}

	#It's a failure...
	#option = {
	#	name = denmark.914.b
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_failure
	#	}
	#	clr_country_flag = eoanb_reform_vote_failure
	#
	#	add_political_power = -50
	#	if = {
	#		limit = {
	#			has_government = traditional_conservatism
	#		}
	#		add_popularity = { ideology = traditional_conservatism popularity = -0.01 }
	#		add_popularity = { ideology = centrism popularity = 0.01 }
	#	}
	#	if = {
	#		limit = {
	#			has_government = centrism
	#		}
	#		add_popularity = { ideology = traditional_conservatism popularity = 0.01 }
	#		add_popularity = { ideology = centrism popularity = -0.01 }
	#	}
	#	
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
    #}

	#This is somehow worse than a failure...
	#option = {
	#	name = denmark.914.c
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_tie
	#	}
	#	clr_country_flag = eoanb_reform_vote_tie
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#}
}

#Vote on the Peasants Emancipation Act
country_event = {
	id = denmark.915
	title = denmark.915.t
	desc = denmark.915.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	immediate = {
		set_variable = {
			var = current_reform_id
			value = 26.8
		}
	
		reset_approval_arrays = yes
		set_1_approval_highly_disagree = yes
		set_2_approval_highly_disagree = yes
		set_3_approval_neutral = yes
		set_4_approval_highly_agree = yes
	
		set_vote_dem = yes
		compute_voting_approval = yes
	
		compute_number_seats_tot = yes
		compute_number_seats_approve_est = yes
	}

	#Let's vote in a month
	option = {
		name = denmark.915.a
		ai_chance = { base = 100 }
		
		country_event = {
			id = denmark.916
			days = 31
		}
	}

	#Abandon the idea
	#option = {
	#	name = denmark.915.b
	#	ai_chance = { base = 0 }
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#}
}

#Results of the Vote on the Peasants Emancipation Act
country_event = {
	id = denmark.916
	title = denmark.916.t
	desc = denmark.916.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	#immediate = {
	#	hidden_effect = {
	#		calculate_vote_result = yes
	#	}
	#}

	#It's a success!
	option = {
		name = denmark.916.a
		#trigger = {
		#	has_country_flag = eoanb_reform_vote_success
		#}
		#clr_country_flag = eoanb_reform_vote_success
		#enact_voted_reform = yes
	
		add_political_power = 25
		increase_legitimacy_by_five = yes
		if = {
			limit = {
				NOT = { has_variable = political_legitimacy_equilibrium_custom }
			}
			set_variable = { political_legitimacy_equilibrium_custom = 0.05 }
		}
		else = {
			add_to_variable = {
				political_legitimacy_equilibrium_custom = 0.05
			}
		}
		add_popularity = { ideology = social_egalitarianism popularity = 0.05 }
		
		set_variable = {
			var = current_reform_id
			value = 0
		}
	}

	#It's a failure...
	#option = {
	#	name = denmark.916.b
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_failure
	#	}
	#	clr_country_flag = eoanb_reform_vote_failure
	#
	#	decrease_legitimacy_by_two = yes
	#	if = {
	#		limit = {
	#			NOT = { has_variable = political_legitimacy_equilibrium_custom }
	#		}
	#		set_variable = { political_legitimacy_equilibrium_custom = -0.02 }
	#	}
	#	else = {
	#		add_to_variable = {
	#			political_legitimacy_equilibrium_custom = -0.02
	#		}
	#	}
	#	add_popularity = { ideology = social_egalitarianism popularity = -0.02 }
	#	add_political_power = -25
	#	
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
    #}

	#This is somehow worse than a failure...
	#option = {
	#	name = denmark.916.c
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_tie
	#	}
	#	clr_country_flag = eoanb_reform_vote_tie
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#}
}

#Vote on the Freedom of Trade Act
country_event = {
	id = denmark.917
	title = denmark.917.t
	desc = denmark.917.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	immediate = {
		set_variable = {
			var = current_reform_id
			value = 26.9
		}
	
		reset_approval_arrays = yes
		set_1_approval_highly_agree = yes
		set_2_approval_disagree = yes
		set_3_approval_disagree = yes
		set_4_approval_highly_disagree = yes
	
		set_vote_eco = yes
		compute_voting_approval = yes
	
		compute_number_seats_tot = yes
		compute_number_seats_approve_est = yes
	}

	#Let's vote in a month
	option = {
		name = denmark.917.a
		ai_chance = { base = 100 }
		
		country_event = {
			id = denmark.918
			days = 31
		}
	}

	#Abandon the idea
	#option = {
	#	name = denmark.917.b
	#	ai_chance = { base = 0 }
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#}
}

#Results of the Vote on the Freedom of Trade Act
country_event = {
	id = denmark.918
	title = denmark.918.t
	desc = denmark.918.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	#immediate = {
	#	hidden_effect = {
	#		calculate_vote_result = yes
	#	}
	#}

	#It's a success!
	option = {
		name = denmark.918.a
		#trigger = {
		#	has_country_flag = eoanb_reform_vote_success
		#}
		#clr_country_flag = eoanb_reform_vote_success
		#enact_voted_reform = yes
		
		if = {
			limit = {
				has_idea = limited_exports
			}
			swap_ideas = { remove_idea = limited_exports add_idea = free_trade }
		}
		else_if = {
			limit = {
				has_idea = export_focus
			}
			swap_ideas = { remove_idea = export_focus add_idea = free_trade }
		}
		add_popularity = { ideology = centrism popularity = 0.02 }
		
		set_variable = {
			var = current_reform_id
			value = 0
		}
	}

	#It's a failure...
	#option = {
	#	name = denmark.918.b
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_failure
	#	}
	#	clr_country_flag = eoanb_reform_vote_failure
	#
	#	decrease_legitimacy_by_one = yes
	#	if = {
	#		limit = {
	#			NOT = { has_variable = political_legitimacy_equilibrium_custom }
	#		}
	#		set_variable = { political_legitimacy_equilibrium_custom = -0.01 }
	#	}
	#	else = {
	#		add_to_variable = {
	#			political_legitimacy_equilibrium_custom = -0.01
	#		}
	#	}
	#	add_popularity = { ideology = centrism popularity = -0.03 }
	#	add_political_power = -25
	#	
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
    #}

	#This is somehow worse than a failure...
	#option = {
	#	name = denmark.918.c
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_tie
	#	}
	#	clr_country_flag = eoanb_reform_vote_tie
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#}
}

#Vote on the Protection of the Helstaten
country_event = {
	id = denmark.919
	title = denmark.919.t
	desc = denmark.919.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	immediate = {
		set_variable = {
			var = current_reform_id
			value = 26.10
		}
	
		reset_approval_arrays = yes
		set_1_approval_highly_disagree = yes
		set_2_approval_highly_agree = yes
		set_3_approval_highly_disagree = yes
		set_4_approval_agree = yes
	
		set_vote_war = yes
		compute_voting_approval = yes
	
		compute_number_seats_tot = yes
		compute_number_seats_approve_est = yes
	}

	#Let's vote in a month
	option = {
		name = denmark.919.a
		ai_chance = { base = 100 }
		
		country_event = {
			id = denmark.920
			days = 31
		}
	}

	#Abandon the idea
	#option = {
	#	name = denmark.919.b
	#	ai_chance = { base = 0 }
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#}
}

#Results of the Vote on the Protection of the Helstaten
country_event = {
	id = denmark.920
	title = denmark.920.t
	desc = denmark.920.d
	picture = GFX_report_event_danish_parliament

	is_triggered_only = yes

	#immediate = {
	#	hidden_effect = {
	#		calculate_vote_result = yes
	#	}
	#}

	#It's a success!
	option = {
		name = denmark.920.a
		#trigger = {
		#	has_country_flag = eoanb_reform_vote_success
		#}
		#clr_country_flag = eoanb_reform_vote_success
		#enact_voted_reform = yes
	
		increase_ps_by_one = yes
		add_ideas = DEN_idea_the_helstaten
		add_stability = 0.05
		if = {
			limit = {
				58 = { is_claimed_by = DEN }
				1032 = { is_claimed_by = DEN }
			}
			remove_state_claim = 58
			remove_state_claim = 1032
		}
		every_country = {
			limit = {
				is_part_of_the_german_confederation = yes
			}
			add_opinion_modifier = { target = DEN modifier = DEN_PROTECT_THE_HELSTATEN_IDEA_REL }
			reverse_add_opinion_modifier = { target = DEN modifier = DEN_PROTECT_THE_HELSTATEN_IDEA_REL }
		}
		
		set_variable = {
			var = current_reform_id
			value = 0
		}
	}

	#It's a failure...
	#option = {
	#	name = denmark.920.b
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_failure
	#	}
	#	clr_country_flag = eoanb_reform_vote_failure
	#
	#	decrease_legitimacy_by_three = yes
	#	if = {
	#		limit = {
	#			NOT = { has_variable = political_legitimacy_equilibrium_custom }
	#		}
	#		set_variable = { political_legitimacy_equilibrium_custom = -0.03 }
	#	}
	#	else = {
	#		add_to_variable = {
	#			political_legitimacy_equilibrium_custom = -0.03
	#		}
	#	}
	#	add_popularity = { ideology = traditional_conservatism popularity = -0.03 }
	#	add_political_power = -50
	#	
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
    #}

	#This is somehow worse than a failure...
	#option = {
	#	name = denmark.920.c
	#	trigger = {
	#		has_country_flag = eoanb_reform_vote_tie
	#	}
	#	clr_country_flag = eoanb_reform_vote_tie
	#
	#	set_variable = {
	#		var = current_reform_id
	#		value = 0
	#	}
	#}
}
