﻿namespace = break_out_of_prison_ongoing

# Scouting the Grounds
break_out_of_prison_ongoing.0001 = {
	type = character_event
	title = break_out_of_prison_ongoing.0001.t
	desc = break_out_of_prison_ongoing.0001.desc
	theme = break_out_of_prison_scheme
	override_background = {
		reference = market
	}
	override_sound = {
		reference = "event:/DLC/EP2/SFX/Events/Travel/ep2_evn_travel_end_neutral"
	}
	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:owner.court_position:smuggler_court_position
		animation = thinking
	}
	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		scope:scheme = {
			NOT = { has_variable = had_event_ongoing_0001 }
		}
	}

	immediate = {
		scope:owner.court_position:smuggler_court_position = {
			save_scope_as = smuggler
		}
	}

	option = { # Focus on entrances and exits
		name = break_out_of_prison_ongoing.0001.a
		scope:scheme = {
			add_scheme_modifier = {
				type = break_out_of_prison_entrance_and_exits
			}
		}
	}

	option = { # Focus on the hiding spots
		name = break_out_of_prison_ongoing.0001.b
		scope:scheme = {
			add_scheme_modifier = {
				type = break_out_of_prison_hiding_spots
			}
		}
	}

	option = { # Map out a rough layout
		name = break_out_of_prison_ongoing.0001.c
		scope:scheme = {
			add_scheme_modifier = {
				type = break_out_of_prison_map_layout
			}
		}
	}
}

# The Key Takeaway
break_out_of_prison_ongoing.0002 = {
	type = character_event
	title = break_out_of_prison_ongoing.0002.t
	desc = break_out_of_prison_ongoing.0002.desc
	theme = break_out_of_prison_scheme
	override_background = {
		reference = dungeon
	}
	override_sound = {
		reference = "event:/SFX/Events/Themes/sfx_event_theme_type_prison"
	}
	left_portrait = {
		character = root
		animation = thinking
	}
	right_portrait = {
		character = scope:owner.court_position:smuggler_court_position
		animation = scheme
	}

	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		scope:scheme = {
			NOT = { has_variable = had_event_ongoing_0002 }
		}
	}

	immediate = {
		scope:scheme = {
			set_variable = {
				name = had_event_ongoing_0002
				value = yes
			}
		}
		scope:owner.court_position:smuggler_court_position = {
			save_scope_as = smuggler
		}
	}

	option = { # Steal the key
		name = break_out_of_prison_ongoing.0002.a
		stress_impact = {
			just = medium_stress_impact_gain
		}
		add_piety = -50
		scope:scheme = {
			add_scheme_modifier = {
				type = break_out_of_prison_stole_key
			}
		}
	}

	option = { # Bribe the guards
		name = break_out_of_prison_ongoing.0002.b
		stress_impact = {
			greedy = medium_stress_impact_gain
		}
		remove_short_term_gold = 50
		scope:scheme = {
			add_scheme_modifier = {
				type = break_out_of_prison_bribed_guards
			}
		}
	}

	option = { # Go with the flow
		name = break_out_of_prison_ongoing.0002.c
		stress_impact = {
			deceitful = medium_stress_impact_gain
		}
		scope:scheme = {
			add_scheme_modifier = {
				type = break_out_of_prison_went_with_the_flow
			}
		}
	}
}

# Getting the Band Together
break_out_of_prison_ongoing.0003 = {
	type = character_event
	title = break_out_of_prison_ongoing.0003.t
	desc = break_out_of_prison_ongoing.0003.desc
	theme = break_out_of_prison_scheme
	left_portrait = {
		character = root
		animation = interested
	}

	widget = {
		gui = "event_window_widget_scheme"
		container = "custom_widgets_container"
	}

	trigger = {
		scope:scheme = {
			NOT = { has_variable = had_event_ongoing_0003 }
		}
	}

	immediate = {
		scope:scheme = {
			set_variable = {
				name = had_event_ongoing_0003
				value = yes
			}
		}
		scope:owner.court_position:smuggler_court_position= {
			save_scope_as = smuggler
		}
	}

	option = { # A thieving sort will do
		name = break_out_of_prison_ongoing.0003.a
		remove_short_term_gold = 25
		scope:scheme = {
			add_scheme_modifier = {
				type = break_out_of_prison_hire_thief
			}
		}
	}

	option = { # Perhaps a locksmith, just in case
		name = break_out_of_prison_ongoing.0003.b
		remove_short_term_gold = 75
		scope:scheme = {
			add_scheme_modifier = {
				type = break_out_of_prison_hire_locksmith
			}
		}
	}

	option = { # Some muscle is always a good backup plan
		name = break_out_of_prison_ongoing.0003.c
		add_prestige = -25
		scope:scheme = {
			add_scheme_modifier = {
				type = break_out_of_prison_hire_muscle
			}
		}
	}
}
