namespace = dvg_carlshavn

# Ask for Scandinavian help?
dvg_carlshavn.1 = {
	type = country_event
	placement = ROOT

	title = dvg_carlshavn.1.t
	desc = dvg_carlshavn.1.d
	flavor = dvg_carlshavn.1.f

	event_image = {
		video = "gfx/event_pictures/asia_westerners_arriving.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/southamerica/war_civilians"

	icon = "gfx/interface/icons/event_icons/event_fire.dds"

	duration = 3

	trigger = {
	}
	
	immediate = {
	}
	
	# Yes!
	option = {
		name = dvg_carlshavn.1.a
		default_option = yes
		c:SCA = {
			trigger_event = { id = dvg_carlshavn.2 }
		}
		ai_chance = {
			base = 1
		}
	}
	# No need!
	option = {
		name = dvg_carlshavn.1.b
		ai_chance = {
			base = 0
		}
	}
}

# Yaluo asks for help.
dvg_carlshavn.2 = {
	type = country_event
	placement = ROOT

	title = dvg_carlshavn.2.t
	desc = dvg_carlshavn.2.d
	flavor = dvg_carlshavn.2.f

	event_image = {
		video = "gfx/event_pictures/southamerica_war_civilians.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/southamerica/war_civilians"

	icon = "gfx/interface/icons/event_icons/event_fire.dds"

	duration = 3

	trigger = {
	}
	
	immediate = {
	}
	
	# Naw we good 
	option = {
		name = dvg_carlshavn.2.a
		default_option = yes
		c:YLO = {
			trigger_event = { id = dvg_carlshavn.3 days = 30 }
		}
		ai_chance = {
			base = 0.1
		}
	}
	# We should propose that the become our protectorate!
	option = {
		name = dvg_carlshavn.2.l
		trigger = {
			NOT = {
				c:YLO = {
					owns_entire_state_region = STATE_XINXIANG
				}
			}
		}
		c:YLO = {
			trigger_event = { id = dvg_carlshavn.40 days = 30 }
		}
		ai_chance = {
			base = 0.3
		}
	}
	# We should propose that we give yaluo arms in exchange for yongjia
	option = {
		name = dvg_carlshavn.2.g
		c:YLO = {
			trigger_event = { id = dvg_carlshavn.50 days = 30 }
		}
		ai_chance = {
			base = 0.3
		}
	}
#	# We should propose that we blockade mianjin in exchange for yongjia
#	option = {
#		name = dvg_carlshavn.2.e
#		c:YLO = {
#			trigger_event = { id = dvg_carlshavn.60 days = 30 }
#		}
#		ai_chance = {
#			base = 0.3
#		}
#	}
#	# We should propose that a neutral river basin be established! only if guli are independent
#	option = {
#		name = dvg_carlshavn.2.b
#		trigger = { 
#			NOT = {
#				c:YLO = {
#					owns_entire_state_region = STATE_YONGLING
#				}
#			}
#		}
#		c:YLO = {
#			trigger_event = { id = dvg_carlshavn.70 days = 30 }
#		}
#		ai_chance = {
#			base = 0.2
#		}
#	}
}

# Scandinavia refuses!
dvg_carlshavn.3 = {
	type = country_event
	placement = ROOT

	title = dvg_carlshavn.3.t
	desc = dvg_carlshavn.3.d
	flavor = dvg_carlshavn.3.f

	event_image = {
		video = "gfx/event_pictures/southamerica_war_civilians.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/southamerica/war_civilians"

	icon = "gfx/interface/icons/event_icons/event_fire.dds"

	duration = 3

	trigger = {
	}
	
	immediate = {
	}
	
	# Oh well, we are on our own then
	option = {
		name = dvg_carlshavn.3.a
		default_option = yes
		ai_chance = {
			base = 1
		}
	}
}

# Scandinavia offers us protectorate status!
dvg_carlshavn.40 = {
	type = country_event
	placement = ROOT

	title = dvg_carlshavn.40.t
	desc = dvg_carlshavn.40.d
	flavor = dvg_carlshavn.40.f

	event_image = {
		video = "gfx/event_pictures/southamerica_war_civilians.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/southamerica/war_civilians"

	icon = "gfx/interface/icons/event_icons/event_fire.dds"

	duration = 3

	trigger = {
	}
	
	immediate = {
	}
	
	# Outrageous!
	option = {
		name = dvg_carlshavn.3.a
		default_option = yes
		c:SCA = {
			trigger_event = { id = dvg_carlshavn.41 days = 30 }
		}
		ai_chance = {
			base = 0.99
		}
	}
	# We have no choice.
	option = {
		name = dvg_carlshavn.3.a
		default_option = yes
		custom_tooltip = {
			text = dvg_will_become_protectorate_tt
			c:SCA = {
				trigger_event = { id = dvg_carlshavn.42 days = 30 }
			}
		}
		ai_chance = {
			base = 0.01
		}
	}
}

# Yaluo declines protectorate status!
dvg_carlshavn.41 = {
	type = country_event
	placement = ROOT

	title = dvg_carlshavn.41.t
	desc = dvg_carlshavn.41.d
	flavor = dvg_carlshavn.41.f

	event_image = {
		video = "gfx/event_pictures/southamerica_war_civilians.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/southamerica/war_civilians"

	icon = "gfx/interface/icons/event_icons/event_fire.dds"

	duration = 3

	trigger = {
	}
	
	immediate = {
	}
	
	# It was a stretch anyway.
	option = {
		name = dvg_carlshavn.41.a
		default_option = yes
		ai_chance = {
			base = 1
		}
	}
}

# Yaluo accepts protectorate status!
dvg_carlshavn.42 = {
	type = country_event
	placement = ROOT

	title = dvg_carlshavn.42.t
	desc = dvg_carlshavn.42.d
	flavor = dvg_carlshavn.42.f

	event_image = {
		video = "gfx/event_pictures/southamerica_war_civilians.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/southamerica/war_civilians"

	icon = "gfx/interface/icons/event_icons/event_fire.dds"

	duration = 3

	trigger = {
	}
	
	immediate = {
	}
	
	# A surprise to be sure, but a welcome one!
	option = {
		name = dvg_carlshavn.42.a
		default_option = yes
		hidden_effect = {
			c:SCA = {
				create_diplomatic_pact = {
					country = c:YLO
					type = protectorate
				}
			}
		}
		ai_chance = {
			base = 1
		}
	}
}

# Scandinavia offers arms for 2 years in exchange for yongjia
dvg_carlshavn.50 = {
	type = country_event
	placement = ROOT

	title = dvg_carlshavn.50.t
	desc = dvg_carlshavn.50.d
	flavor = dvg_carlshavn.50.f

	event_image = {
		video = "gfx/event_pictures/southamerica_war_civilians.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/southamerica/war_civilians"

	icon = "gfx/interface/icons/event_icons/event_fire.dds"

	duration = 3

	trigger = {
	}
	
	immediate = {
	}
	
	# We accept!
	option = {
		name = dvg_carlshavn.50.a
		default_option = yes
		c:SCA = {
			trigger_event = { id = dvg_carlshavn.52 days = 30 }
		}
		add_modifier = {
			name = dvg_scandinavian_arms
			days = 700
		}
		hidden_effect = {
			set_variable = dvg_yongjia_given
		}
		ai_chance = {
			base = 0.44
		}
	}
	# We can offer lesser concessions instead
	option = {
		name = dvg_carlshavn.50.b
		default_option = yes
		custom_tooltip = {
			text = dvg_will_become_protectorate_tt
			c:SCA = {
				trigger_event = { id = dvg_carlshavn.53 days = 30 }
			}
		}
		ai_chance = {
			base = 0.45
		}
	}
	# We will not take their offer!
	option = {
		name = dvg_carlshavn.50.l
		default_option = yes
		custom_tooltip = {
			text = dvg_will_become_protectorate_tt
			c:SCA = {
				trigger_event = { id = dvg_carlshavn.51 days = 30 }
			}
		}
		ai_chance = {
			base = 0.11
		}
	}
}

# Yaluo declines assistance!
dvg_carlshavn.51 = {
	type = country_event
	placement = ROOT

	title = dvg_carlshavn.51.t
	desc = dvg_carlshavn.51.d
	flavor = dvg_carlshavn.51.f

	event_image = {
		video = "gfx/event_pictures/southamerica_war_civilians.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/southamerica/war_civilians"

	icon = "gfx/interface/icons/event_icons/event_fire.dds"

	duration = 3

	trigger = {
	}
	
	immediate = {
	}
	
	# They asked for it though?
	option = {
		name = dvg_carlshavn.51.a
		default_option = yes
		ai_chance = {
			base = 1
		}
	}
}

# Yaluo accepts assistance for yongjia!
dvg_carlshavn.52 = {
	type = country_event
	placement = ROOT

	title = dvg_carlshavn.52.t
	desc = dvg_carlshavn.52.d
	flavor = dvg_carlshavn.52.f

	event_image = {
		video = "gfx/event_pictures/southamerica_war_civilians.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/southamerica/war_civilians"

	icon = "gfx/interface/icons/event_icons/event_fire.dds"

	duration = 3

	trigger = {
	}
	
	immediate = {
	}
	
	# Good!
	option = {
		name = dvg_carlshavn.52.a
		default_option = yes
		custom_tooltip = {
			text = dvg_yongjia_allowed_scandi_tt
			set_variable = dvg_yongjia
		}
		ai_chance = {
			base = 1
		}
	}
}

# Yaluo offers reduced concessions
dvg_carlshavn.53 = {
	type = country_event
	placement = ROOT

	title = dvg_carlshavn.53.t
	desc = dvg_carlshavn.53.d
	flavor = dvg_carlshavn.53.f

	event_image = {
		video = "gfx/event_pictures/southamerica_war_civilians.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/southamerica/war_civilians"

	icon = "gfx/interface/icons/event_icons/event_fire.dds"

	duration = 3

	trigger = {
	}
	
	immediate = {
	}
	
	# No deal!
	option = {
		name = dvg_carlshavn.53.a
		default_option = yes
		c:YLO = {
			trigger_event = { id = dvg_carlshavn.54 days = 30 }
		}
		ai_chance = {
			base = 0.3
		}
	}
	# Acceptable
	option = {
		name = dvg_carlshavn.53.a
		default_option = yes
		c:YLO = {
			trigger_event = { id = dvg_carlshavn.55 days = 30 }
		}
		add_modifier = {
			name = dvg_yaluo_gun_payments_receive
			days = 700
		}
		ai_chance = {
			base = 0.7
		}
	}
}

# Scandinavia says no!
dvg_carlshavn.54 = {
	type = country_event
	placement = ROOT

	title = dvg_carlshavn.54.t
	desc = dvg_carlshavn.54.d
	flavor = dvg_carlshavn.54.f

	event_image = {
		video = "gfx/event_pictures/southamerica_war_civilians.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/southamerica/war_civilians"

	icon = "gfx/interface/icons/event_icons/event_fire.dds"

	duration = 3

	trigger = {
	}
	
	immediate = {
	}
	
	# Unfortunate
	option = {
		name = dvg_carlshavn.54.a
		default_option = yes
		ai_chance = {
			base = 1
		}
	}
}

# Scandinavia says yes!
dvg_carlshavn.55 = {
	type = country_event
	placement = ROOT

	title = dvg_carlshavn.55.t
	desc = dvg_carlshavn.55.d
	flavor = dvg_carlshavn.55.f

	event_image = {
		video = "gfx/event_pictures/southamerica_war_civilians.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/southamerica/war_civilians"

	icon = "gfx/interface/icons/event_icons/event_fire.dds"

	duration = 3

	trigger = {
	}
	
	immediate = {
	}
	
	# Good
	option = {
		name = dvg_carlshavn.55.a
		default_option = yes
		add_modifier = {
			name = dvg_scandinavian_arms
			days = 700
		}
		add_modifier = {
			name = dvg_yaluo_gun_payments
			days = 700
		}
		ai_chance = {
			base = 1
		}
	}
}