namespace = story_event_legends

###################################
# Legend Ending Events
# 0001 - 0100
###################################

#Heroic Ending Story Event
story_event_legends.0001 = {
	type = character_event
	window = fullscreen_event
	title = story_event_legends.0001.t
	desc = {
		desc = story_event_legends.0001.desc.intro
		first_valid = {
			triggered_desc = {
				trigger = { 
					scope:promoted_legend = { has_legend_chapter = famous_deed }
				}
				desc = story_event_legends.0001.desc.famous_deed
			}
			triggered_desc = {
				trigger = {
					scope:promoted_legend = { has_legend_chapter = battle }
				}
				desc = story_event_legends.0001.desc.battle
			}
			triggered_desc = {
				trigger = {
					scope:promoted_legend = { has_legend_chapter = hunt }
				}
				desc = story_event_legends.0001.desc.hunt
			}
			desc = story_event_legends.0001.desc.fallback
		}
		desc = story_event_legends.0001.desc.outro
	}
	theme = legend
	override_background = { reference = ce1_fullscreen_heroic_legend }
	override_sound = { reference = "event:/DLC/FP4/SFX/UI/Unique/sfx_ui_spread_legend" }

	immediate = {
		play_music_cue = mx_cue_legend
		set_variable = {
			name = finished_legend_var
			value = scope:promoted_legend
		}
		scope:promoted_legend = { set_variable = my_legend_var }
	}
	option = {
		name = story_event_legends.0001.a
		clicksound = "event:/DLC/FP2/SFX/UI/fp2_struggle_start_select"
	}
}

#Legitimizing Ending Story Event
story_event_legends.0002 = {
	type = character_event
	window = fullscreen_event
	title = story_event_legends.0002.t
	desc = {
		desc = story_event_legends.0002.desc.intro
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:promoted_legend = { has_legend_chapter = famous_deed }
				}
				desc = story_event_legends.0002.desc.famous_deed
			}
			triggered_desc = {
				trigger = {
					scope:promoted_legend = { has_legend_chapter = battle }
				}
				desc = story_event_legends.0002.desc.battle
			}
			desc = story_event_legends.0002.desc.fallback
		}
		desc = story_event_legends.0002.desc.outro
	}
	theme = legend
	override_background = { reference = ce1_fullscreen_legitimizing_legend }
	override_sound = { reference = "event:/DLC/FP4/SFX/UI/Unique/sfx_ui_spread_legend" }

	immediate = {
		play_music_cue = mx_cue_legend
		set_variable = {
			name = finished_legend_var
			value = scope:promoted_legend
		}
		scope:promoted_legend = { set_variable = my_legend_var }
	}
	
	option = {
		name = story_event_legends.0002.a
		clicksound = "event:/DLC/FP2/SFX/UI/fp2_struggle_start_select"
	}
}

#Holy Ending Story Event
story_event_legends.0003 = {
	type = character_event
	window = fullscreen_event
	title = story_event_legends.0003.t
	desc = {
		desc = story_event_legends.0003.desc.intro
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:promoted_legend = { has_legend_chapter = famous_deed }
				}
				desc = story_event_legends.0001.desc.famous_deed
			}
			desc = story_event_legends.0001.desc.fallback
		}
		desc = story_event_legends.0003.desc.outro
	}
	theme = legend
	override_background = { reference = ce1_fullscreen_holy_legend }
	override_sound = { reference = "event:/DLC/FP4/SFX/UI/Unique/sfx_ui_spread_legend" }

	immediate = {
		play_music_cue = mx_cue_legend
		set_variable = {
			name = finished_legend_var
			value = scope:promoted_legend
		} 
		scope:promoted_legend = { set_variable = my_legend_var }
	}
	
	option = {
		name = story_event_legends.0003.a
		clicksound = "event:/DLC/FP2/SFX/UI/fp2_struggle_start_select"
	}
}
