namespace = ep3_laamps_provisions

scripted_trigger domicile_provisions_medium_to_low_trigger = {
	domicile = {
		provisions <= provisions_privation_threshold_start
		provisions > provisions_privation_threshold_low
	}
}
scripted_trigger domicile_provisions_low_to_very_low_trigger = {
	domicile = {
		provisions <= provisions_privation_threshold_low
		provisions > provisions_privation_threshold_very_low
	}
}
scripted_trigger domicile_provisions_very_low_to_zero_trigger = {
	domicile = {
		provisions <= provisions_privation_threshold_very_low
		provisions > provisions_privation_threshold_empty
	}
}

scripted_trigger char_resistant_to_privation_in_desert_trigger = {
	OR = {
		has_trait = desert_warrior
		culture = { has_cultural_parameter = resistant_to_desert_privation }
	}
}
scripted_trigger char_resistant_to_privation_in_mountains_trigger = {
	OR = {
		has_trait = rough_terrain_expert
		culture = { has_cultural_parameter = resistant_to_mountain_privation }
	}
}
scripted_trigger char_resistant_to_privation_in_desert_mountains_trigger = {
	OR = {
		# Desert mountains are especially harsh, so yes, you need both.
		AND = {
			has_trait = desert_warrior
			has_trait = rough_terrain_expert
		}
		culture = {
			has_cultural_parameter = resistant_to_desert_privation
			has_cultural_parameter = resistant_to_mountain_privation
		}
	}
}
scripted_trigger char_resistant_to_privation_in_winter_trigger = {
	OR = {
		has_trait = winter_soldier
		culture = { has_cultural_parameter = resistant_to_winter_privation }
	}
}

scripted_effect apply_privation_event_cooldown_effect = {
	# In a desert.
	if = {
		limit = {
			location = { terrain = desert }
			# Some characters give you a _degree_ of immunity.
			char_resistant_to_privation_in_desert_trigger = no
			scope:host.court_position:quartermaster_camp_officer ?= { char_resistant_to_privation_in_desert_trigger = no }
		}
	}
	# In the mountains.
	else_if = {
		limit = {
			location = { terrain = mountains }
			# Some characters give you a _degree_ of immunity.
			char_resistant_to_privation_in_mountains_trigger = no
			scope:host.court_position:quartermaster_camp_officer ?= { char_resistant_to_privation_in_mountains_trigger = no }
		}
	}
	# In desert mountains.
	else_if = {
		limit = {
			location = { terrain = desert_mountains }
			# Some characters give you a _degree_ of immunity.
			char_resistant_to_privation_in_desert_mountains_trigger = no
			scope:host.court_position:quartermaster_camp_officer ?= { char_resistant_to_privation_in_desert_mountains_trigger = no }
		}
	}
	# In extreme winter.
	else_if = {
		limit = {
			location = { has_province_modifier = winter_harsh_modifier }
			# Some characters give you a _degree_ of immunity.
			char_resistant_to_privation_in_winter_trigger = no
			scope:host.court_position:quartermaster_camp_officer ?= { char_resistant_to_privation_in_winter_trigger = no }
		}
	}
	# Aaaaand if we pass through all those, _then_ add our cooldown.
	else = {
		add_character_flag = {
			flag = provision_events_cooldown
			months = 3
		}
	}
}

# Medium provisions - people are concerned
ep3_laamps_provisions.1000 = {
	type = character_event
	title = ep3_laamps_provisions.1000.t
	desc = ep3_laamps_provisions.1000.desc
	theme = travel
	left_portrait = {
		character = root
		animation = dismissal
	}
	right_portrait = {
		character = scope:concerned
		animation = worry
	}

	trigger = {
		domicile_provisions_medium_to_low_trigger = yes
		NOT = {
			has_character_flag = provision_events_cooldown
		}
		any_courtier_or_guest = {
			age >= 12
			NOT = { has_character_flag = concerned_cooldown }
		}
	}

	immediate = {
		apply_privation_event_cooldown_effect = yes
		random_courtier_or_guest = {
			limit = {
				age >= 12
				NOT = { has_character_flag = concerned_cooldown }
				is_of_major_interest_trigger = { CHARACTER = root }
			}
			alternative_limit = {
				age >= 12
				NOT = { has_character_flag = concerned_cooldown }
				is_of_minor_interest_trigger = { CHARACTER = root }
			}
			alternative_limit = {
				age >= 12
				NOT = { has_character_flag = concerned_cooldown }
			}
			save_scope_as = concerned
			add_character_flag = {
				flag = concerned_cooldown
				months = 12
			}
		}
	}

	#Option A: lose opinion
	option = {
		name = ep3_laamps_provisions.1000.a
		scope:concerned = {
			add_opinion = {
				target = root
				modifier = worried_opinion
				opinion = -15
			}
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_boldness = 1
			}
		}
	}

	#Option B: give them money
	option = {
		name = ep3_laamps_provisions.1000.b
		pay_short_term_gold = {
			target = scope:concerned
			gold = tiny_gold_value
		}
		ai_chance = {
			base = 100
			ai_value_modifier = {
				ai_compassion = 0.5
				ai_greed = -0.5
			}
		}
	}
}

# Low provisions - MaA take a hit
ep3_laamps_provisions.1010 = {
	type = character_event
	title = ep3_laamps_provisions.1010.t
	desc = ep3_laamps_provisions.1010.desc
	theme = travel
	left_portrait = {
		character = root
		animation = worry
	}

	trigger = {
		domicile_provisions_low_to_very_low_trigger = yes
		current_military_strength >= 100
		NOT = {
			has_character_flag = provision_events_cooldown
		}
	}

	immediate = {
		apply_privation_event_cooldown_effect = yes
	}

	#Option A:
	option = {
		name = ep3_laamps_provisions.1010.a
		# 15% of your MaA desert
		every_maa_regiment = {
			limit = {
				maa_current_troops_count >= 7
			}
			change_maa_troops_count = {
				value = {
					value = this.maa_current_troops_count
					multiply = -0.15
				}
			}
		}
		stress_impact = {
			base = minor_stress_impact_gain
		}
	}
}

# Low provisions - someone leaves
ep3_laamps_provisions.1020 = {
	type = character_event
	title = ep3_laamps_provisions.1020.t
	desc = ep3_laamps_provisions.1020.desc
	theme = travel
	left_portrait = {
		character = root
		animation = disapproval
	}
	right_portrait = {
		character = scope:leaver
		animation = rage
	}

	trigger = {
		domicile_provisions_low_to_very_low_trigger = yes
		NOT = {
			has_character_flag = provision_events_cooldown
		}
		any_courtier_or_guest = {
			is_available_ai_adult = yes
			NOR = {
				is_close_family_of = root
				has_any_court_position = yes
			}
		}
	}

	immediate = {
		apply_privation_event_cooldown_effect = yes
		random_courtier_or_guest = {
			limit = {
				is_available_ai_adult = yes
				NOR = {
					is_close_family_of = root
					has_any_court_position = yes
				}
			}
			save_scope_as = leaver
		}
	}

	#Option A:
	option = {
		name = ep3_laamps_provisions.1020.a
		current_travel_plan ?= { remove_character = scope:leaver }
		scope:leaver = { move_to_pool = yes }
		stress_impact = {
			base = medium_stress_impact_gain
		}
	}
}

# Very Low provisions - someone important leaves
ep3_laamps_provisions.1025 = {
	type = character_event
	title = ep3_laamps_provisions.1025.t
	desc = ep3_laamps_provisions.1025.desc
	theme = travel
	left_portrait = {
		character = root
		animation = disapproval
	}
	right_portrait = {
		character = scope:leaver
		animation = rage
	}

	trigger = {
		domicile_provisions_very_low_to_zero_trigger = yes
		NOT = {
			has_character_flag = provision_events_cooldown
		}
		any_courtier_or_guest = {
			is_available_ai_adult = yes
			OR = {
				is_close_family_of = root
				has_any_court_position = yes
			}
		}
	}

	immediate = {
		apply_privation_event_cooldown_effect = yes
		random_courtier_or_guest = {
			limit = {
				OR = {
					is_close_family_of = root
					has_any_court_position = yes
				}
			}
			save_scope_as = leaver
		}
	}

	#Option A:
	option = {
		name = ep3_laamps_provisions.1025.a
		current_travel_plan ?= { remove_character = scope:leaver }
		scope:leaver = { move_to_pool = yes }
		every_courtier_or_guest = {
			custom = every_follower_custom
			add_opinion = {
				target = root
				modifier = starving_opinion
				opinion = -15
			}
		}
		stress_impact = {
			base = major_stress_impact_gain
		}
	}
}

# Very Low provisions - MaA are hit hard/desertions
ep3_laamps_provisions.1030 = {
	type = character_event
	title = ep3_laamps_provisions.1030.t
	desc = ep3_laamps_provisions.1030.desc
	theme = travel
	left_portrait = {
		character = root
		animation = worry
	}

	trigger = {
		domicile_provisions_very_low_to_zero_trigger = yes
		NOT = {
			has_character_flag = provision_events_cooldown
		}
	}

	immediate = {
		apply_privation_event_cooldown_effect = yes
	}

	#Option A:
	option = {
		name = ep3_laamps_provisions.1030.a
		# 35% of your MaA desert
		every_maa_regiment = {
			limit = {
				maa_current_troops_count >= 3
			}
			change_maa_troops_count = {
				value = {
					value = this.maa_current_troops_count
					multiply = -0.35
				}
			}
		}
		every_courtier_or_guest = {
			custom = every_follower_custom
			add_opinion = {
				target = root
				modifier = starving_opinion
				opinion = -15
			}
		}
		stress_impact = {
			base = major_stress_impact_gain
		}
	}
}

# Very Low provisions - You get sick
ep3_laamps_provisions.1040 = {
	type = character_event
	title = ep3_laamps_provisions.1040.t
	desc = ep3_laamps_provisions.1040.desc
	theme = travel
	left_portrait = {
		character = root
		animation = sick
	}

	trigger = {
		domicile_provisions_very_low_to_zero_trigger = yes
		NOR = {
			has_character_flag = provision_events_cooldown
			has_trait = ill
		}
	}

	immediate = {
		apply_privation_event_cooldown_effect = yes
	}

	#Option A:
	option = {
		name = ep3_laamps_provisions.1040.a
		contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes }
		every_courtier_or_guest = {
			custom = every_follower_custom
			add_opinion = {
				target = root
				modifier = starving_opinion
				opinion = -15
			}
		}
		stress_impact = {
			base = major_stress_impact_gain
		}
	}
}

# Very Low provisions - someone dies/pet dies
ep3_laamps_provisions.1050 = {
	type = character_event
	title = ep3_laamps_provisions.1050.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					has_variable = story_cycle_horse_name
				}
				desc = ep3_laamps_provisions.1050.desc_pet_horse
			}
			triggered_desc = {
				trigger = {
					has_variable = story_cycle_dog_name
				}
				desc = ep3_laamps_provisions.1050.desc_pet_dog
			}
			triggered_desc = {
				trigger = {
					has_variable = story_cycle_cat_name
				}
				desc = ep3_laamps_provisions.1050.desc_pet_cat
			}
			desc = ep3_laamps_provisions.1050.desc_pet_no
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:pet_story
				}
				desc = ep3_laamps_provisions.1050.desc_pet
			}
			desc = ep3_laamps_provisions.1050.desc_follower
		}
	}
	theme = death
	left_portrait = {
		character = root
		animation = crying
	}
	right_portrait = {
		trigger = {
			exists = scope:dead
		}
		character = scope:dead
		animation = dead
	}

	trigger = {
		domicile_provisions_very_low_to_zero_trigger = yes
		NOT = {
			has_character_flag = provision_events_cooldown
		}
		OR = {
			any_owned_story = { type = story_cycle_pet_cat }
			any_owned_story = { type = story_cycle_pet_dog }
			any_owned_story = { type = story_cycle_martial_lifestyle_warhorse }
			any_courtier_or_guest = {
				is_available_ai = yes
			}
		}
	}

	immediate = {
		apply_privation_event_cooldown_effect = yes
		random_owned_story = {
			type = story_cycle_martial_lifestyle_warhorse
			save_scope_as = pet_story
		}
		if = {
			limit = {
				NOT = { exists = scope:pet_story }
			}
			random_owned_story = {
				type = story_cycle_pet_dog
				save_scope_as = pet_story
			}
		}
		if = {
			limit = {
				NOT = { exists = scope:pet_story }
			}
			random_owned_story = {
				type = story_cycle_pet_cat
				save_scope_as = pet_story
			}
		}
		if = {
			limit = {
				NOT = { exists = scope:pet_story }
			}
			random_courtier_or_guest = {
				limit = {
					is_available_ai = yes
				}
				weight = {
					base = 1
					modifier = {	
						is_of_major_or_minor_interest_trigger = { CHARACTER = root }
						add = 9
					}
					modifier = {
						is_player_heir_of = root
						factor = 0
					}
					modifier = {
						is_adult = yes
						add = 4
					}
					modifier = {
						health <= 4
						add = 1
					}
					modifier = {
						health <= 3
						add = 1.5
					}
					modifier = {
						health <= 2.5
						add = 2
					}
					modifier = {
						health <= 2
						add = 3.5
					}
					modifier = {
						health <= 1.5
						add = 5
					}
				}
				save_scope_as = dead
			}
		}
		scope:dead ?= {
			death = {
				death_reason = death_starved
			}
		}
	}

	#Option A:
	option = {
		name = {
			trigger = {
				exists = scope:dead
			}
			text = ep3_laamps_provisions.1050.a_1
		}
		name = ep3_laamps_provisions.1050.a
		if = {
			limit = {
				exists = scope:pet_story
			}
			scope:pet_story = { end_story = yes }
			custom_tooltip = ep3_laamps_provisions.1050.a_tt
		}
		every_courtier_or_guest = {
			custom = every_follower_custom
			add_opinion = {
				target = root
				modifier = starving_opinion
				opinion = -15
			}
		}
		stress_impact = {
			base = major_stress_impact_gain
		}
		ai_chance = {
			base = 100
		}
	}

	#Option B: cannibal only
	option = {
		trigger = {
			exists = scope:dead
			is_cannibal_trigger = yes
		}
		name = ep3_laamps_provisions.1050.b
		every_courtier_or_guest = {
			limit = {
				NOT = { has_trait = cannibal }
			}
			custom = every_follower_custom
			add_opinion = {
				target = root
				modifier = absolutely_horrified_opinion
				opinion = -30
			}
		}
		ai_chance = {
			# If available, do it
			base = 500
		}
	}

	#Option C: become cannibal
	option = {
		trigger = {
			exists = scope:dead
			is_cannibal_trigger = no
		}
		name = ep3_laamps_provisions.1050.c
		add_secret = { type = secret_cannibal }
		ai_chance = {
			base = 0
		}
	}

	#Option D: eat the pet... :(
	option = {
		trigger = {
			NOT = { exists = scope:dead }
		}
		name = ep3_laamps_provisions.1050.d
		custom_tooltip = ep3_laamps_provisions.1050.d.tt
		if = {
			limit = {
				scope:pet_story = {
					story_type = story_cycle_martial_lifestyle_warhorse
				}
			}
			domicile = {
				change_provisions = miniscule_provisions_gain
			}
		}
		else = {
			domicile = {
				change_provisions = {
					value = miniscule_provisions_gain
					multiply = 0.5
				}
			}
		}
		scope:pet_story = { end_story = yes }
		stress_impact = {
			base = medium_stress_impact_gain
		}
		ai_chance = {
			base = 0
			modifier = {
				has_trait = callous
				add = 10
			}
			modifier = {
				has_trait = sadistic
				add = 10
			}
			modifier = {
				has_trait = cannibal
				add = 10
			}
		}
	}
}

# Very Low provisions - a pestilence spreads
ep3_laamps_provisions.1060 = {
	type = character_event
	title = ep3_laamps_provisions.1060.t
	desc = ep3_laamps_provisions.1060.desc
	theme = travel
	left_portrait = {
		character = root
		animation = worry
	}

	trigger = {
		domicile_provisions_very_low_to_zero_trigger = yes
		NOR = {
			has_character_flag = provision_events_cooldown
			has_game_rule = epidemic_frequency_disabled
		}
		location = {
			NOR = {
				any_province_epidemic = { }
				has_variable = epidemic_cooldown_general
			}
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			is_ai = yes
			factor = 0.2
		}
	}

	immediate = {
		apply_privation_event_cooldown_effect = yes
	}

	#Option A:
	option = {
		name = ep3_laamps_provisions.1060.a
		location = {
			create_epidemic_outbreak = {
				type = typhus
				intensity = minor
			}
		}
		random_courtier_or_guest = {
			limit = { can_contract_disease_trigger = { DISEASE = typhus } }
			contract_disease_effect = { DISEASE = typhus TREATMENT_EVENT = no }
		}
		# 25% of your MaA die
		every_maa_regiment = {
			limit = {
				maa_current_troops_count >= 4
			}
			change_maa_troops_count = {
				value = {
					value = this.maa_current_troops_count
					multiply = -0.25
				}
			}
		}
		every_courtier_or_guest = {
			custom = every_follower_custom
			add_opinion = {
				target = root
				modifier = starving_opinion
				opinion = -15
			}
		}
		stress_impact = {
			base = major_stress_impact_gain
		}
	}
}

# ZERO provisions - chance to die or develop very bad modifiers/traits
ep3_laamps_provisions.1070 = {
	type = character_event
	title = ep3_laamps_provisions.1070.t
	desc = ep3_laamps_provisions.1070.desc
	theme = death
	left_portrait = {
		character = root
		animation = sick_stomach
	}

	trigger = {
		domicile.provisions <= provisions_privation_threshold_empty
		NOT = {
			has_character_flag = provision_events_cooldown
		}
		# give them a chance to stop first
		current_travel_plan = {
			has_variable = 1080_no_provisions_stop
		}
	}

	immediate = {
		apply_privation_event_cooldown_effect = yes
		# 50% of your MaA die/desert
		every_maa_regiment = {
			limit = {
				maa_current_troops_count >= 2
			}
			change_maa_troops_count = {
				value = {
					value = this.maa_current_troops_count
					multiply = -0.5
				}
			}
		}
		every_courtier_or_guest = {
			custom = every_follower_custom
			add_opinion = {
				target = root
				modifier = starving_opinion
				opinion = -25
			}
		}
	}

	#Option A: 
	option = {
		name = ep3_laamps_provisions.1070.a
		random_list = {
			1 = {
				# die
				custom_tooltip = ep3_laamps_provisions.1070.a1
				hidden_effect = {
					death = {
						death_reason = death_starved
					}
				}
			}
			1 = {
				# bad health modifier
				trigger = {
					NOT = { has_character_modifier = weak_stomach_modifier }
				}
				custom_tooltip = ep3_laamps_provisions.1070.a2
				hidden_effect = {
					send_interface_toast = {
						type = event_toast_effect_bad
						title = ep3_laamps_provisions.1070.tt
						left_icon = root
						add_character_modifier = weak_stomach_modifier
					}
				}
			}
			1 = {
				# lose prowess
				trigger = {
					prowess >= 2
				}
				custom_tooltip = ep3_laamps_provisions.1070.a3
				hidden_effect = {
					send_interface_toast = {
						type = event_toast_effect_bad
						title = ep3_laamps_provisions.1070.tt
						left_icon = root
						add_prowess_skill = -2
					}
				}
			}
			1 = {
				# become cannibal
				trigger = {
					NOR = {
						has_trait = cannibal
						any_secret = {
							type = secret_cannibal
						}
					}
				}
				custom_tooltip = ep3_laamps_provisions.1070.a4
				hidden_effect = {
					send_interface_toast = {
						type = event_toast_effect_bad
						title = ep3_laamps_provisions.1070.tt
						left_icon = root
						add_trait = cannibal
					}
				}
			}
			1 = {
				# other bad health modifier
				trigger = {
					NOR = {
						has_trait = disfigured
						has_character_modifier = hunger_sickness_modifier
					}
				}
				custom_tooltip = ep3_laamps_provisions.1070.a5
				hidden_effect = {
					send_interface_toast = {
						type = event_toast_effect_bad
						title = ep3_laamps_provisions.1070.tt
						left_icon = root
						add_character_modifier = hunger_sickness_modifier
						add_trait = disfigured
					}
				}
			}
			1 = {
				# become lunatic
				trigger = {
					NOR = {
						has_trait = lunatic_1
						has_trait = lunatic_genetic
					}
				}
				custom_tooltip = ep3_laamps_provisions.1070.a6
				hidden_effect = {
					send_interface_toast = {
						type = event_toast_effect_bad
						title = ep3_laamps_provisions.1070.tt
						left_icon = root
						add_trait = lunatic_1
					}
				}
			}
			1 = {
				# become blind
				trigger = {
					NOT = {
						has_trait = blind
					}
				}
				custom_tooltip = ep3_laamps_provisions.1070.a7
				hidden_effect = {
					send_interface_toast = {
						type = event_toast_effect_bad
						title = ep3_laamps_provisions.1070.tt
						left_icon = root
						add_trait = blind
					}
				}
			}
			1 = {
				# become infirm
				trigger = {
					NOT = {
						has_trait = infirm
					}
				}
				custom_tooltip = ep3_laamps_provisions.1070.a8
				hidden_effect = {
					send_interface_toast = {
						type = event_toast_effect_bad
						title = ep3_laamps_provisions.1070.tt
						left_icon = root
						add_trait = infirm
					}
				}
			}
		}
		stress_impact = {
			base = massive_stress_impact_gain
		}
	}
}

# ZERO provisions - JUST STOP!
ep3_laamps_provisions.1080 = {
	type = character_event
	title = ep3_laamps_provisions.1080.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = scope:complainer
				}
				desc = ep3_laamps_provisions.1080.desc_companion
			}
			desc = ep3_laamps_provisions.1080.desc_alone
		}
	}
	theme = travel
	left_portrait = {
		character = root
		animation = disapproval
	}
	right_portrait = {
		trigger = {
			exists = scope:complainer
		}
		character = scope:complainer
		animation = sick_stomach
	}

	trigger = {
		domicile.provisions <= provisions_privation_threshold_empty
		current_travel_plan = {
			NOT = {
				has_variable = 1080_no_provisions_stop
			}
		}
	}

	immediate = {
		current_travel_plan = {
			set_variable = 1080_no_provisions_stop
			hidden_effect = {
				pause_travel_plan = yes
			}
		}
		random_courtier_or_guest = {
			limit = {
				is_available_ai_adult = yes
			}
			weight = {
				base = 1
				modifier = {
					is_of_minor_interest_trigger = { CHARACTER = root }
					add = 100
				}
				modifier = {
					is_of_major_interest_trigger = { CHARACTER = root }
					add = 1000
				}
			}
			save_scope_as = complainer
		}
		location = {
			if = {
				limit = { is_sea_province = yes }
				ordered_neighboring_province = {
					limit = { exists = county }
					alternative_limit = {
						any_neighboring_province = { exists = county }
					}
					alternative_limit = {
						any_neighboring_province = {
							any_neighboring_province = { exists = county }
						}
					}
					order_by = {
						value = 0
						subtract = "squared_distance(root.location)"
					}
					if = {
						limit = { exists = county }
						save_scope_as = landfall
					}
					else = {
						ordered_neighboring_province = {
							limit = { exists = county }
							alternative_limit = {
								any_neighboring_province = { exists = county }
							}
							order_by = {
								value = 0
								subtract = "squared_distance(root.location)"
							}
							if = {
								limit = { exists = county }
								save_scope_as = landfall
							}
							else = {
								ordered_neighboring_province = {
									limit = { exists = county }
									order_by = {
										value = 0
										subtract = "squared_distance(root.location)"
									}
									save_scope_as = landfall
								}
							}
						}
					}
				}
			}
		}
	}

	#Option A: we press on
	option = {
		name = ep3_laamps_provisions.1080.a
		current_travel_plan = {
			resume_travel_plan = yes
		}
		every_courtier_or_guest = {
			custom = every_follower_custom
			add_opinion = {
				target = root
				modifier = starving_opinion
				opinion = -25
			}
		}
		
		# Special, for the AI - start starving or succeed!?
		if = {
			limit = {
				is_ai = yes
			}
			random = {
				chance = {
					value = 10
					add = root.sum_of_all_skills_value
				}
				domicile = {
					change_provisions = max_provisions
				}
			}
		}
		ai_chance = {
			base = 100
		}
	}

	#Option B: take a break
	option = {
		name = ep3_laamps_provisions.1080.b
		trigger = {
			custom_tooltip = {
				text = ep3_laamps_provisions.1080.sea
				location = {
					is_sea_province = no
				}
			}
		}
		show_as_unavailable = {
			always = yes
		}
		#inform about moving the domicile
		show_as_tooltip = {
			domicile = {
				move_domicile = root.location
			}
		}
		current_travel_plan = {
			abort_travel_plan = yes
		}
		ai_chance = {
			base = 0
		}
	}

	#Option C: make land!!!!!!!
	option = {
		name = ep3_laamps_provisions.1080.c
		trigger = { exists = scope:landfall }
		add_internal_flag = special
		custom_tooltip = {
			text = ep3_laamps_provisions.1080.c.tt
			current_travel_plan = { 
				if = {
					limit = { can_cancel = yes }
					cancel_travel_plan = yes
				}
			}
			start_travel_plan = {
				destination = scope:landfall
				travel_with_domicile = yes
				return_trip = no
				players_use_planner = no
			}
		}
		ai_chance = {
			base = 0
		}
	}
}
