namespace = test_court_events

test_court_events.1 = {
	type = court_event
	title = test_court_events.1.t
	desc = test_court_events.1.desc
	left_portrait = root
	right_portrait = root.primary_heir

	theme = stewardship_wealth_focus
	orphan = yes

	court_scene = {
		button_position_character = primary_heir
		roles = {
			primary_heir = {
				group = event_group
			}
			primary_spouse = { 
				group = event_group
				animation = flirtation
			}
		}
	}

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

	immediate = {
		save_scope_as = stress_character # For stress widget
		add_gold = 1337
	}

	option = { 
		name = test_court_events.1.a
		primary_heir = { add_prestige = 42 }
	}
	option = { 
		name = test_court_events.1.b
		add_piety = 420
	}
}

test_court_events.2 = {
	type = court_event
	title = test_court_events.1.t
	desc = test_court_events.1.desc
	left_portrait = root
	right_portrait = root.primary_heir

	theme = stewardship_wealth_focus
	orphan = yes

	court_scene = {
		button_position_character = scope:person_1
		roles = {
			scope:person_1 = event_group
			scope:person_2 = event_group
			scope:person_3 = event_group
		}
	}

	immediate = {
		random_courtier_or_guest = {
			limit = {
				not = {
					has_variable = in_debug_court_event
				}
			}
			save_scope_as = person_1
			set_variable = in_debug_court_event
		}
		random_courtier_or_guest = {
			limit = {
				nor = {
					this = scope:person_1
					has_variable = in_debug_court_event
				}
			}
			save_scope_as = person_2
			set_variable = in_debug_court_event
		}
		random_courtier_or_guest = {
			limit = {
				nor = {
					this = scope:person_1
					this = scope:person_2
					has_variable = in_debug_court_event
				}
			}
			save_scope_as = person_3
			set_variable = in_debug_court_event
		}
		add_gold = 1337
	}

	option = { 
		name = test_court_events.1.a
		scope:person_1 = { add_prestige = 42 }
	}
	option = { 
		name = test_court_events.1.b
		add_piety = 420
	}

	after = {
		scope:person_1 = { remove_variable = in_debug_court_event }
		scope:person_2 = { remove_variable = in_debug_court_event }
		scope:person_3 = { remove_variable = in_debug_court_event }
	}
}

test_court_events.3 = {
	type = court_event
	title = test_court_events.1.t
	desc = test_court_events.1.desc
	left_portrait = root
	right_portrait = root.primary_heir

	theme = stewardship_wealth_focus
	orphan = yes

	court_scene = {
		button_position_character = primary_heir
		roles = {
			primary_heir = {
				group = event_group
			}
			primary_spouse = { 
				group = event_group
				animation = flirtation
			}
		}
	}

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

	immediate = {
		save_scope_as = stress_character # For stress widget
		add_gold = 1337
	}

	option = { 
		name = test_court_events.1.a
		add_gold = 1337
		add_prestige = 50
		add_piety = 50
		primary_heir = {
			add_gold = 1337
			add_prestige = 50
			add_piety = 50
		}
		random_list = {
			5 = {
				add_dread = 10
			}
			5 = {
				primary_heir = { add_dread = 10 }
			}
		}
	}
}
