﻿namespace = HRT_nibelungen
#################################
#
# Holy Roman Triumph - Nibelungenlied
#
#################################

# A Legend Retold
HRT_nibelungen.0001 = {
	type = character_event
	title = HRT_nibelungen.0001.t
	desc = HRT_nibelungen.0001.desc
	theme = legend
	override_background = { reference = throne_room }

	left_portrait = {
		character = root
		animation = idle
	}
	right_portrait = {
		character = scope:poet
		animation = thinking
	}

	immediate = {
		random_court_position_holder = {
			type = court_poet_court_position
			save_scope_as = poet
		}
	}

	option = { # Such commendable bravery!
		name = HRT_nibelungen.0001.a
		trigger_event = HRT_nibelungen.0002
		custom_tooltip = HRT_nibelungen.0001.tt
		add_prestige = 10
		stress_impact = {
			brave = miniscule_stress_impact_loss
			craven = miniscule_stress_impact_gain
		}
	}
	
	option = { # Unchecked ambition can lead to unforeseen consequences.
		name = HRT_nibelungen.0001.b
		trigger_event = HRT_nibelungen.0002
		custom_tooltip = HRT_nibelungen.0001.tt
		add_piety = 10
		stress_impact = {
			content = miniscule_stress_impact_loss
			ambitious = minor_stress_impact_gain
		}
	}
}

# The Deed for a Queen
HRT_nibelungen.0002 = {
	type = character_event
	title = HRT_nibelungen.0002.t
	desc = HRT_nibelungen.0002.desc
	theme = legend
	override_background = { reference = throne_room }

	left_portrait = {
		character = root
		animation = schadenfreude
	}
	right_portrait = {
		character = scope:poet
		animation = throne_room_conversation_1
	}

	immediate = { }

	option = { # Deception is a path I avoid.
		name = HRT_nibelungen.0002.a
		trigger_event = HRT_nibelungen.0003
		custom_tooltip = HRT_nibelungen.0001.tt
		add_piety = 10
		stress_impact = {
			honest = miniscule_stress_impact_loss
			callous = minor_stress_impact_gain
			sadistic = miniscule_stress_impact_gain
		}
	}
	
	option = { # The pursuit of power often requires cunning.
		name = HRT_nibelungen.0002.b
		trigger_event = HRT_nibelungen.0003
		custom_tooltip = HRT_nibelungen.0001.tt
		add_dread = 3
		stress_impact = {
			callous = miniscule_stress_impact_loss
			honest = minor_stress_impact_gain
		}
	}
}

# Betrayal and Tragedy
HRT_nibelungen.0003 = {
	type = character_event
	title = HRT_nibelungen.0003.t
	desc = HRT_nibelungen.0003.desc
	theme = legend
	override_background = { reference = throne_room }

	left_portrait = {
		character = root
		animation = personality_vengeful
	}
	right_portrait = {
		character = scope:poet
		animation = throne_room_conversation_2
	}

	immediate = { }

	option = { # I shall reserve judgment.
		name = HRT_nibelungen.0003.a
		trigger_event = HRT_nibelungen.0004
		custom_tooltip = HRT_nibelungen.0001.tt
		add_piety = 5
		add_prestige = 5
		stress_impact = {
			just = miniscule_stress_impact_loss
			patient = miniscule_stress_impact_loss
			vengeful = miniscule_stress_impact_gain
			sadistic = miniscule_stress_impact_gain
		}
	}
	
	option = { # Revenge is a dish best served cold.
		name = HRT_nibelungen.0003.b
		trigger_event = HRT_nibelungen.0004
		custom_tooltip = HRT_nibelungen.0001.tt
		add_dread = 3
		add_prestige = 5
		stress_impact = {
			vengeful = miniscule_stress_impact_loss
			sadistic = miniscule_stress_impact_loss
			wrathful = miniscule_stress_impact_loss
			compassionate = minor_stress_impact_gain
		}
	}
}

# The Echoes of the Past
HRT_nibelungen.0004 = {
	type = character_event
	title = HRT_nibelungen.0004.t
	desc = HRT_nibelungen.0004.desc
	theme = legend
	override_background = { reference = throne_room }

	left_portrait = {
		character = root
		animation = personality_greedy
	}
	right_portrait = {
		character = scope:poet
		animation = throne_room_conversation_4
	}

	immediate = {
		add_character_flag = HRT_nibelungen_searching
	}

	option = { # We shall uncover this legendary hoard.
		name = HRT_nibelungen.0004.a
		custom_tooltip = HRT_nibelungen.0004.tt
		add_prestige = 10
		open_view_data = {
			view = activity_list_detail_host_window
			data = activity_type:HRT_nibelungen_activity_search
			player = root
		}
		stress_impact = {
			ambitious = miniscule_stress_impact_loss
			diligent = miniscule_stress_impact_loss
			lazy = miniscule_stress_impact_gain
			cynical = miniscule_stress_impact_gain
		}
	}
	
	option = { # The true wealth lies in the lessons of the tale.
		name = HRT_nibelungen.0004.b
		custom_tooltip = HRT_nibelungen.0004.tt
		add_dread = 3
		add_piety = 10
		stress_impact = {
			content = miniscule_stress_impact_loss
			diligent = miniscule_stress_impact_gain
		}
	}
}

HRT_nibelungen.0011 = {
	type = activity_event
	title = HRT_nibelungen.0011.t
	desc = HRT_nibelungen.0011.desc
	theme = legend
	override_background = { reference = ep2_travel_bridge }
	
	left_portrait = {
		character = root
		animation = lantern
	}

	immediate = {
		scope:activity = {
			activity_location = { save_scope_as = location }
		}
	}
	
	option = { # Board draft boats and embark
		name = HRT_nibelungen.0011.a
		custom_tooltip = HRT_nibelungen.0011.a.tt
		custom_tooltip = HRT_nibelungen.0011.a.tt2
		hidden_effect = {
			random_list = {
				10 = {	# Nothing
					trigger_event = {
						id = HRT_nibelungen.0021
						days = { 10 20 }
					}
				}
				20 = {	# Accident
					trigger_event = {
						id = HRT_nibelungen.0022
						days = { 10 20 }
					}
				}
				50 = {	# Minor Treasure
					trigger_event = {
						id = HRT_nibelungen.0023
						days = { 10 20 }
					}	
				}
				220 = {	# Prize
					trigger_event = {
						id = HRT_nibelungen.0024
						days = { 10 20 }
					}
				}
			}
		}
	}
	option = { # Search along the banks
		name = HRT_nibelungen.0011.b
		custom_tooltip = HRT_nibelungen.0011.b.tt
		custom_tooltip = HRT_nibelungen.0011.b.tt2
		hidden_effect = {
			random_list = {
				40 = {	# Nothing
					trigger_event = {
						id = HRT_nibelungen.0031
						days = { 10 20 }
					}
				}
				10 = {	# Accident
					trigger_event = {
						id = HRT_nibelungen.0032
						days = { 10 20 }
					}
				}
				40 = {	# Minor Treasure
					trigger_event = {
						id = HRT_nibelungen.0033
						days = { 10 20 }
					}	
				}
				10 = {	# Prize
					trigger_event = {
						id = HRT_nibelungen.0024
						days = { 10 20 }
					}
				}
			}
		}
	}
	option = { # Explore the Vineyard-Cloaked Hills
		name = HRT_nibelungen.0011.c
		custom_tooltip = HRT_nibelungen.0011.c.tt
		custom_tooltip = HRT_nibelungen.0011.c.tt2
		hidden_effect = {
			random_list = {
				50 = {	# Nothing
					trigger_event = {
						id = HRT_nibelungen.0041
						days = { 10 20 }
					}
				}
				5 = {	# Accident
					trigger_event = {
						id = HRT_nibelungen.0042
						days = { 10 20 }
					}
				}
				40 = {	# Minor Treasure
					trigger_event = {
						id = HRT_nibelungen.0043
						days = { 10 20 }
					}	
				}
				5 = {	# Prize
					trigger_event = {
						id = HRT_nibelungen.0024
						days = { 10 20 }
					}
				}
			}
		}
	}
}

# Draft Boats
HRT_nibelungen.0021 = { # Nothing
	type = activity_event
	title = HRT_nibelungen.0021.t
	desc = {
		random_valid = {
			desc = HRT_nibelungen.0021.desc.a
			desc = HRT_nibelungen.0021.desc.b
			desc = HRT_nibelungen.0021.desc.c
			desc = HRT_nibelungen.0021.desc.d
		}
	}
	theme = legend
	override_background = { reference = fp1_ocean }
	
	left_portrait = {
		character = root
		animation = boredom
	}

	immediate = {
	}
	
	option = { # ok
		name = HRT_nibelungen.0021.a
	}

	after = {
		scope:activity = {
			hidden_effect = { skip_activity_phase = yes }
		}
	}
}
HRT_nibelungen.0022 = { # Accident
	type = activity_event
	title = HRT_nibelungen.0021.t
	desc = {
		random_valid = {
			desc = HRT_nibelungen.0022.desc.a
			desc = HRT_nibelungen.0022.desc.b
			desc = HRT_nibelungen.0022.desc.c
		}
	}
	theme = legend
	override_background = { reference = fp1_ocean }
	
	left_portrait = {
		character = root
		animation = pain
	}
	right_portrait = {
		character = scope:attendant
		animation = disbelief
	}

	immediate = {
		increase_wounds_no_death_effect = {
			REASON = no
		}
		scope:activity = {
			random_attending_character = {
				limit = {
					NOT = { this = scope:host }
					is_physically_able_ai_adult = yes
					location = scope:province
				}
				save_scope_as = attendant
			}
		}
	}
	
	option = { # ok
		name = HRT_nibelungen.0022.a
	}

	after = {
		scope:activity = {
			hidden_effect = { skip_activity_phase = yes }
		}
	}
}
HRT_nibelungen.0023 = { # Minor Treasure
	type = activity_event
	title = HRT_nibelungen.0021.t
	desc = {
		random_valid = {
			desc = HRT_nibelungen.0023.desc.a
			desc = HRT_nibelungen.0023.desc.b
			desc = HRT_nibelungen.0023.desc.c
			desc = HRT_nibelungen.0023.desc.d
		}
	}
	theme = legend
	override_background = { reference = fp1_ocean }
	
	left_portrait = {
		character = root
		animation = steward
	}
	right_portrait = {
		character = scope:attendant
		animation = throne_room_applaud_1
	}
	artifact = {
		target = scope:new_trinket
		position = lower_left_portrait
		trigger = { exists = scope:new_trinket }
	}

	immediate = {
		random_list = {
			10 = { add_gold = minor_gold_value add_prestige = 5 }
			10 = { add_gold = medium_gold_value add_prestige = 10 }
			10 = { add_gold = major_gold_value add_prestige = 15 }
			10 = {
				generate_trinket_effect = {
					TRINKET_RECEIVER = root
					TRINKET_GIVER = root
					GRAB_ALL_TRINKETS = yes
					HISTORY_TYPE = discovered
				}
				add_prestige = 20
			}
		}
		scope:activity = {
			random_attending_character = {
				limit = {
					NOT = { this = scope:host }
					is_physically_able_ai_adult = yes
					location = scope:province
				}
				save_scope_as = attendant
			}
		}
	}
	
	option = { # ok
		name = HRT_nibelungen.0023.a
		complete_activity_intent = yes
	}

	after = {
		scope:activity = {
			hidden_effect = { skip_activity_phase = yes }
		}
	}
}
HRT_nibelungen.0024 = { # Price
	type = activity_event
	title = HRT_nibelungen.0024.t
	desc = HRT_nibelungen.0024.desc
	theme = legend
	
	left_portrait = {
		character = root
		animation = war_over_win
	}
	right_portrait = {
		character = scope:attendant
		animation = celebrate_spear
	}
	artifact = {
		target = scope:epic
		position = lower_left_portrait
	}

	immediate = {
		play_music_cue = "mx_cue_low_key_positive"
		HRT_nibelungen_create_artifact_valkyr_helmet_effect = { OWNER = root }
		add_character_flag =  HRT_nibelungen_found_price
		add_gold = massive_gold_value
		add_prestige = massive_prestige_value
		title:c_aachen = {
			set_variable = {
				name = HRT_nibelungen_helmet_found
				value = yes
			}
		}
		scope:activity = {
			random_attending_character = {
				limit = {
					NOT = { this = scope:host }
					is_physically_able_ai_adult = yes
					location = scope:province
				}
				save_scope_as = attendant
			}
		}
	}
	
	option = { # ok
		name = HRT_nibelungen.0024.a
		complete_activity_intent = yes
	}

	after = {
		scope:activity = {
			hidden_effect = { skip_activity_phase = yes }
		}
	}
}

# Banks
HRT_nibelungen.0031 = { # Nothing
	type = activity_event
	title = HRT_nibelungen.0021.t
	desc = {
		random_valid = {
			desc = HRT_nibelungen.0031.desc.a
			desc = HRT_nibelungen.0031.desc.b
			desc = HRT_nibelungen.0031.desc.c
			desc = HRT_nibelungen.0031.desc.d
		}
	}
	theme = legend
	override_background = { reference = ep2_travel_bridge }
	
	left_portrait = {
		character = root
		animation = boredom
	}

	immediate = {
	}
	
	option = { # ok
		name = HRT_nibelungen.0021.a
	}

	after = {
		scope:activity = {
			hidden_effect = { skip_activity_phase = yes }
		}
	}
}
HRT_nibelungen.0032 = { # Accident
	type = activity_event
	title = HRT_nibelungen.0021.t
	desc = {
		random_valid = {
			desc = HRT_nibelungen.0032.desc.a
			desc = HRT_nibelungen.0032.desc.b
			desc = HRT_nibelungen.0032.desc.c
			desc = HRT_nibelungen.0032.desc.d
		}
	}
	theme = legend
	override_background = { reference = ep2_travel_bridge }
	
	left_portrait = {
		character = root
		animation = pain
	}
	right_portrait = {
		character = scope:attendant
		animation = disbelief
	}

	immediate = {
		increase_wounds_no_death_effect = {
			REASON = no
		}
		scope:activity = {
			random_attending_character = {
				limit = {
					NOT = { this = scope:host }
					is_physically_able_ai_adult = yes
					location = scope:province
				}
				save_scope_as = attendant
			}
		}
	}
	
	option = { # ok
		name = HRT_nibelungen.0022.a
	}

	after = {
		scope:activity = {
			hidden_effect = { skip_activity_phase = yes }
		}
	}
}
HRT_nibelungen.0033 = { # Minor Treasure
	type = activity_event
	title = HRT_nibelungen.0021.t
	desc = {
		random_valid = {
			desc = HRT_nibelungen.0033.desc.a
			desc = HRT_nibelungen.0033.desc.b
			desc = HRT_nibelungen.0033.desc.c
			desc = HRT_nibelungen.0033.desc.d
		}
	}
	theme = legend
	override_background = { reference = ep2_travel_bridge }
	
	left_portrait = {
		character = root
		animation = steward
	}
	right_portrait = {
		character = scope:attendant
		animation = throne_room_applaud_1
	}
	artifact = {
		target = scope:new_trinket
		position = lower_left_portrait
		trigger = { exists = scope:new_trinket }
	}

	immediate = {
		random_list = {
			10 = { add_gold = minor_gold_value add_prestige = 5 }
			10 = { add_gold = medium_gold_value add_prestige = 10 }
			10 = { add_gold = major_gold_value add_prestige = 15 }
			10 = {
				generate_trinket_effect = {
					TRINKET_RECEIVER = root
					TRINKET_GIVER = root
					GRAB_ALL_TRINKETS = yes
					HISTORY_TYPE = discovered
				}
				add_prestige = 20
			}
		}
		scope:activity = {
			random_attending_character = {
				limit = {
					NOT = { this = scope:host }
					is_physically_able_ai_adult = yes
					location = scope:province
				}
				save_scope_as = attendant
			}
		}
	}
	
	option = { # ok
		name = HRT_nibelungen.0023.a
		complete_activity_intent = yes
	}

	after = {
		scope:activity = {
			hidden_effect = { skip_activity_phase = yes }
		}
	}
}

# Vineyard
HRT_nibelungen.0041 = { # Nothing
	type = activity_event
	title = HRT_nibelungen.0021.t
	desc = {
		random_valid = {
			desc = HRT_nibelungen.0041.desc.a
			desc = HRT_nibelungen.0041.desc.b
			desc = HRT_nibelungen.0041.desc.c
			desc = HRT_nibelungen.0041.desc.d
		}
	}
	theme = legend
	override_background = { reference = ep2_travel_settlement_farm }
	
	left_portrait = {
		character = root
		animation = boredom
	}

	immediate = {
	}
	
	option = { # ok
		name = HRT_nibelungen.0021.a
	}

	after = {
		scope:activity = {
			hidden_effect = { skip_activity_phase = yes }
		}
	}
}
HRT_nibelungen.0042 = { # Accident
	type = activity_event
	title = HRT_nibelungen.0021.t
	desc = {
		random_valid = {
			desc = HRT_nibelungen.0042.desc.a
			desc = HRT_nibelungen.0042.desc.b
			desc = HRT_nibelungen.0042.desc.c
			desc = HRT_nibelungen.0042.desc.d
		}
	}
	theme = legend
	override_background = { reference = ep2_travel_settlement_farm }
	
	left_portrait = {
		character = root
		animation = pain
	}
	right_portrait = {
		character = scope:attendant
		animation = disbelief
	}

	immediate = {
		increase_wounds_no_death_effect = {
			REASON = no
		}
		scope:activity = {
			random_attending_character = {
				limit = {
					NOT = { this = scope:host }
					is_physically_able_ai_adult = yes
					location = scope:province
				}
				save_scope_as = attendant
			}
		}
	}
	
	option = { # ok
		name = HRT_nibelungen.0022.a
	}

	after = {
		scope:activity = {
			hidden_effect = { skip_activity_phase = yes }
		}
	}
}
HRT_nibelungen.0043 = { # Minor Treasure
	type = activity_event
	title = HRT_nibelungen.0021.t
	desc = {
		random_valid = {
			desc = HRT_nibelungen.0043.desc.a
			desc = HRT_nibelungen.0043.desc.b
			desc = HRT_nibelungen.0043.desc.c
			desc = HRT_nibelungen.0043.desc.d
		}
	}
	theme = legend
	override_background = { reference = ep2_travel_settlement_farm }
	
	left_portrait = {
		character = root
		animation = steward
	}
	right_portrait = {
		character = scope:attendant
		animation = throne_room_applaud_1
	}
	artifact = {
		target = scope:new_trinket
		position = lower_left_portrait
		trigger = { exists = scope:new_trinket }
	}

	immediate = {
		random_list = {
			10 = { add_gold = minor_gold_value add_prestige = 5 }
			10 = { add_gold = medium_gold_value add_prestige = 10 }
			10 = { add_gold = major_gold_value add_prestige = 15 }
			10 = {
				generate_trinket_effect = {
					TRINKET_RECEIVER = root
					TRINKET_GIVER = root
					GRAB_ALL_TRINKETS = yes
					HISTORY_TYPE = discovered
				}
				add_prestige = 20
			}
		}
		scope:activity = {
			random_attending_character = {
				limit = {
					NOT = { this = scope:host }
					is_physically_able_ai_adult = yes
					location = scope:province
				}
				save_scope_as = attendant
			}
		}
	}
	
	option = { # ok
		name = HRT_nibelungen.0023.a
		complete_activity_intent = yes
	}

	after = {
		scope:activity = {
			hidden_effect = { skip_activity_phase = yes }
		}
	}
}