﻿#DB Events for Pilgrimages

namespace = db_pilgrimage_decision

db_pilgrimage_decision.1001 = {
	type = character_event
	title = db_pilgrimage.1001.t
	desc = {
    	first_valid = {
    		triggered_desc = {
    		    trigger = { has_trait = cynical }
    		   desc = db_pilgrimage.1001.desc_cynical
    		}
    		triggered_desc = {
    		    trigger = {
					NOT = {
						has_trait = cynical
					}
				}
    		    desc = db_pilgrimage.1001.desc
    		}
    	}
    }
	theme = dragon_of_the_north
	override_background = { reference = ivarstead }

	immediate = {
		root = { set_variable = { name = db_high_hrothgar_tablets value = 1 } }
		current_travel_plan = {
			delay_travel_plan = {
				days = 30 
			}
		}
	}
	
	left_portrait = {
		character = root
		animation = happiness
	}
	
	option = {
		name = db_pilgrimage.1001.a
		give_pilgrim_trait_or_xp_effect = yes
		pilgrimage_arrival_stress_loss_effect = yes
		trigger_event = db_pilgrimage_decision.0001
	}
	
	option = {
		name = db_pilgrimage.1001.b
		trigger = {
			OR = {
				has_trait = dragonborn
				AND = {
					OR = {
						learning >= 20
						has_trait = education_learning_4
						has_trait = education_learning_5
					}	
					OR = {
						faith = { has_doctrine = doctrine_pantheon_nord }
						faith = { has_doctrine = doctrine_pantheon_atmoran_totems }
					}
				}
			}
		}
		give_pilgrim_trait_or_xp_effect = yes
		pilgrimage_arrival_stress_loss_effect = yes
		add_trait = thuum_mastery
		trigger_event = db_pilgrimage_decision.0001
	}
}


db_pilgrimage_decision.0001 = {
	type = character_event
	title = db_pilgrimage.0001.t
	desc = db_pilgrimage.0001.desc
	theme = dragon_of_the_north
	override_background = { reference = tablets }
	
	left_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	trigger = {
		root.var:db_high_hrothgar_tablets = 1
	}
	
	immediate = {
		root = { change_variable = { name = db_high_hrothgar_tablets add = 1 } }
	}
	
	option = {
		name = db_pilgrimage.0001.a
		add_piety = minor_piety_gain
		stress_impact = {
			patient = minor_stress_impact_loss
			humble = minor_stress_impact_loss
		}
	}
	option = {
		name = db_pilgrimage.0001.b
		add_prestige = minor_prestige_gain
		stress_impact = {
			ambitious = minor_stress_impact_loss
			humble = miniscule_stress_impact_gain
		}
	}
	option = {
		name = db_pilgrimage.0001.c
		trigger = {
			OR = {
				learning >= 15
				has_trait = thuum_mastery
			}
		}
		add_piety = minor_piety_gain
		add_learning_lifestyle_xp = minor_lifestyle_xp
		if = {
			limit = {
				has_trait = thuum_mastery
				has_trait_xp = {
					trait = thuum_mastery
					value <= 20
				}
			}
			add_trait_xp = {
				trait = thuum_mastery
				value = 4
			}
		}
	}
	after = {
		trigger_event = db_pilgrimage_decision.0002
	}
}

db_pilgrimage_decision.0002 = {
	type = character_event
	title = db_pilgrimage.0002.t
	desc = db_pilgrimage.0002.desc
	theme = dragon_of_the_north
	override_background = { reference = tablets }
	
	left_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	trigger = {
		root.var:db_high_hrothgar_tablets = 2
	}
	
	immediate = {
		root = { change_variable = { name = db_high_hrothgar_tablets add = 1 } }
	}
	option = {
		name = db_pilgrimage.0002.a
		add_piety = minor_piety_gain
		stress_impact = {
			patient = minor_stress_impact_loss
			humble = minor_stress_impact_loss
			callous = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0002.b
		add_prestige = minor_prestige_gain
		stress_impact = {
			ambitious = minor_stress_impact_loss
			arrogant = minor_stress_impact_loss
		}
	}
	option = {
		name = db_pilgrimage.0002.c
		trigger = {
			OR = {
				learning >= 15
				has_trait = thuum_mastery
			}
		}
		add_piety = minor_piety_gain
		add_learning_lifestyle_xp = minor_lifestyle_xp
		if = {
			limit = {
				has_trait = thuum_mastery
				has_trait_xp = {
					trait = thuum_mastery
					value <= 20
				}
			}
			add_trait_xp = {
				trait = thuum_mastery
				value = 4
			}
		}
	}
	after = {
		hidden_effect = {
			random_list = {
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_wolfs } }
						trigger_event = db_pilgrimage_decision.0011
					}
					else = { trigger_event = db_pilgrimage_decision.0003 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_kyn } }
						trigger_event = db_pilgrimage_decision.0012
					}
					else = { trigger_event = db_pilgrimage_decision.0003 }
				}
				70 = { trigger_event = db_pilgrimage_decision.0003 }
			}
		}
	}
}
db_pilgrimage_decision.0003 = {
	type = character_event
	title = db_pilgrimage.0003.t
	desc = db_pilgrimage.0003.desc
	theme = dragon_of_the_north
	override_background = { reference = tablets }
	
	left_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	trigger = {
		root.var:db_high_hrothgar_tablets = 3
	}
	
	immediate = {
		root = { change_variable = { name = db_high_hrothgar_tablets add = 1 } }
	}
	option = {
		name = db_pilgrimage.0003.a
		add_prestige = minor_prestige_gain
		stress_impact = {
			brave = minor_stress_impact_loss
			craven = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0003.b
		trigger = {
			OR = {
				learning >= 15
				has_trait = thuum_mastery
			}
		}
		add_piety = minor_piety_gain
		if = {
			limit = {
				has_trait = thuum_mastery
				has_trait_xp = {
					trait = thuum_mastery
					value <= 20
				}
			}
			add_trait_xp = {
				trait = thuum_mastery
				value = 4
			}
		}
		stress_impact = {
			compassionate = minor_stress_loss
			melancholic = minor_stress_loss
			callous = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0003.c
		stress_impact = {
			cynical = minor_stress_loss
			patient = minor_stress_loss
			zealous = minor_stress_gain
		}
	}
	after = {
		hidden_effect = {
			random_list = {
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_wolfs } }
						trigger_event = db_pilgrimage_decision.0011
					}
					else = { trigger_event = db_pilgrimage_decision.0004 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_kyn } }
						trigger_event = db_pilgrimage_decision.0012
					}
					else = { trigger_event = db_pilgrimage_decision.0004 }
				}
				70 = { trigger_event = db_pilgrimage_decision.0004 }
			}
		}
	}
}

db_pilgrimage_decision.0004 = {
	type = character_event
	title = db_pilgrimage.0004.t
	desc = db_pilgrimage.0004.desc
	theme = dragon_of_the_north
	override_background = { reference = tablets }
	
	left_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	trigger = {
		root.var:db_high_hrothgar_tablets = 4
	}
	
	immediate = {
		root = { change_variable = { name = db_high_hrothgar_tablets add = 1 } }
	}
	option = {
		name = db_pilgrimage.0004.a
		add_piety = minor_piety_gain
		if = {
			limit = { has_trait = p_dv_kynareth }
			add_piety = minor_piety_gain
		}
		stress_impact = {
			zealous = minor_stress_loss
			compassionate = minor_stress_loss
			cynical = minor_stress_gain
			p_dv_kynareth = medium_stress_loss
		}
	}
	option = {
		name = db_pilgrimage.0004.b
		trigger = {
			OR = {
				learning >= 15
				has_trait = thuum_mastery
			}
		}
		add_learning_lifestyle_xp = minor_lifestyle_xp
		if = {
			limit = {
				has_trait = thuum_mastery
				has_trait_xp = {
					trait = thuum_mastery
					value <= 20
				}
			}
			add_trait_xp = {
				trait = thuum_mastery
				value = 4
			}
		}
		stress_impact = {
			patient = minor_stress_loss
			scholar = minor_stress_loss
		}
	}
	option = {
		name = db_pilgrimage.0004.c
		add_prestige = minor_prestige_gain
		stress_impact = {
			brave = minor_stress_loss
			wrathful = minor_stress_loss
			craven = minor_stress_gain
		}
	}
	after = {
		hidden_effect = {
			random_list = {
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_wolfs } }
						trigger_event = db_pilgrimage_decision.0011
					}
					else = { trigger_event = db_pilgrimage_decision.0005 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_kyn } }
						trigger_event = db_pilgrimage_decision.0012
					}
					else = { trigger_event = db_pilgrimage_decision.0005 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_pilgrim } }
						trigger_event = db_pilgrimage_decision.0014
					}
					else = { trigger_event = db_pilgrimage_decision.0005 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_snowstorm } }
						trigger_event = db_pilgrimage_decision.0015
					}
					else = { trigger_event = db_pilgrimage_decision.0005 }
				}
				70 = { trigger_event = db_pilgrimage_decision.0005 }
			}
		}
	}
}

db_pilgrimage_decision.0005 = {
	type = character_event
	title = db_pilgrimage.0005.t
	desc = db_pilgrimage.0005.desc
	theme = dragon_of_the_north
	override_background = { reference = tablets }
	
	left_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	trigger = {
		root.var:db_high_hrothgar_tablets = 5
	}
	
	immediate = {
		root = { change_variable = { name = db_high_hrothgar_tablets add = 1 } }
	}
	option = {
		name = db_pilgrimage.0005.a
		add_prestige = minor_prestige_gain
		stress_impact = {
			ambitious = minor_stress_loss
			arrogant = minor_stress_loss
			craven = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0005.b
		add_piety = minor_piety_gain
		stress_impact = {
			compassionate = minor_stress_loss
			just = minor_stress_loss
			callous = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0005.c
		trigger = {
			OR = {
				learning >= 15
				has_trait = thuum_mastery
			}
		}
		add_learning_lifestyle_xp = minor_lifestyle_xp
		if = {
			limit = { 
				has_trait = thuum_mastery
				has_trait_xp = {
					trait = thuum_mastery
					value <= 20
				}
			}
			add_trait_xp = {
				trait = thuum_mastery
				value = 4
			}
		}
	}
	after = {
		hidden_effect = {
			random_list = {
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_wolfs } }
						trigger_event = db_pilgrimage_decision.0011
					}
					else = { trigger_event = db_pilgrimage_decision.0006 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_kyn } }
						trigger_event = db_pilgrimage_decision.0012
					}
					else = { trigger_event = db_pilgrimage_decision.0006 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_pilgrim } }
						trigger_event = db_pilgrimage_decision.0014
					}
					else = { trigger_event = db_pilgrimage_decision.0006 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_snowstorm } }
						trigger_event = db_pilgrimage_decision.0015
					}
					else = { trigger_event = db_pilgrimage_decision.0006 }
				}
				70 = { trigger_event = db_pilgrimage_decision.0006 }
			}
		}
	}
}

db_pilgrimage_decision.0006 = {
	type = character_event
	title = db_pilgrimage.0006.t
	desc = db_pilgrimage.0006.desc
	theme = dragon_of_the_north
	override_background = { reference = tablets }
	
	left_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	trigger = {
		root.var:db_high_hrothgar_tablets = 6
	}
	
	immediate = {
		root = { change_variable = { name = db_high_hrothgar_tablets add = 1 } }
	}
	option = {
		name = db_pilgrimage.0006.a
		add_prestige = minor_prestige_gain
		if = {
			limit = { has_trait = conqueror }
			add_prestige = minor_prestige_gain
		}
		stress_impact = {
			ambitious = minor_stress_loss
			brave = minor_stress_loss
			content = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0006.b
		trigger = {
			OR = {
				learning >= 15
				has_trait = thuum_mastery
			}
		}
		add_learning_lifestyle_xp = minor_lifestyle_xp
		if = {
			limit = {
				has_trait = thuum_mastery
				has_trait_xp = {
					trait = thuum_mastery
					value <= 20
				}
			}
			add_trait_xp = {
				trait = thuum_mastery
				value = 4
			}
		}
		stress_impact = {
			patient = minor_stress_loss
			wrathful = minor_stress_loss
		}
	}
	
	after = {
		hidden_effect = {
			random_list = {
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_wolfs } }
						trigger_event = db_pilgrimage_decision.0011
					}
					else = { trigger_event = db_pilgrimage_decision.0007 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_kyn } }
						trigger_event = db_pilgrimage_decision.0012
					}
					else = { trigger_event = db_pilgrimage_decision.0007 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_pilgrim } }
						trigger_event = db_pilgrimage_decision.0014
					}
					else = { trigger_event = db_pilgrimage_decision.0007 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_snowstorm } }
						trigger_event = db_pilgrimage_decision.0015
					}
					else = { trigger_event = db_pilgrimage_decision.0007 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_troll } }
						trigger_event = db_pilgrimage_decision.0016
					}
					else = { trigger_event = db_pilgrimage_decision.0007 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_view } }
						trigger_event = db_pilgrimage_decision.0017
					}
					else = { trigger_event = db_pilgrimage_decision.0007 }
				}
				70 = { trigger_event = db_pilgrimage_decision.0007 }
			}
		}
	}
}

db_pilgrimage_decision.0007 = {
	type = character_event
	title = db_pilgrimage.0007.t
	desc = db_pilgrimage.0007.desc
	theme = dragon_of_the_north
	override_background = { reference = tablets }
	
	left_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	trigger = {
		root.var:db_high_hrothgar_tablets = 7
	}
	
	immediate = {
		root = { change_variable = { name = db_high_hrothgar_tablets add = 1 } }
	}
	option = {
		name = db_pilgrimage.0007.a
		add_piety = minor_piety_gain
		stress_impact = {
			humble = minor_stress_loss
			patient = minor_stress_loss
			arrogant = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0007.b
		trigger = {
			OR = {
				learning >= 15
				has_trait = thuum_mastery
			}
		}
		add_learning_lifestyle_xp = minor_lifestyle_xp
		if = {
			limit = {
				has_trait = thuum_mastery
				has_trait_xp = {
					trait = thuum_mastery
					value <= 20
				}
			}
			add_trait_xp = {
				trait = thuum_mastery
				value = 4
			}
		}
		stress_impact = {
			scholar = minor_stress_loss
			cynical = minor_stress_loss
		}
	}
	option = {
		name = db_pilgrimage.0007.c
		add_prestige = minor_prestige_gain
		stress_impact = {
			wrathful = minor_stress_loss
			arrogant = minor_stress_loss
			humble = minor_stress_gain
			patient = minor_stress_gain
		}
	}
	after = {
		hidden_effect = {
			random_list = {
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_wolfs } }
						trigger_event = db_pilgrimage_decision.0011
					}
					else = { trigger_event = db_pilgrimage_decision.0008 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_kyn } }
						trigger_event = db_pilgrimage_decision.0012
					}
					else = { trigger_event = db_pilgrimage_decision.0008 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_pilgrim } }
						trigger_event = db_pilgrimage_decision.0014
					}
					else = { trigger_event = db_pilgrimage_decision.0008 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_snowstorm } }
						trigger_event = db_pilgrimage_decision.0015
					}
					else = { trigger_event = db_pilgrimage_decision.0008 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_troll } }
						trigger_event = db_pilgrimage_decision.0016
					}
					else = { trigger_event = db_pilgrimage_decision.0008 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_view } }
						trigger_event = db_pilgrimage_decision.0017
					}
					else = { trigger_event = db_pilgrimage_decision.0008 }
				}
				70 = { trigger_event = db_pilgrimage_decision.0008 }
			}
		}
	}
}

db_pilgrimage_decision.0008 = {
	type = character_event
	title = db_pilgrimage.0008.t
	desc = db_pilgrimage.0008.desc
	theme = dragon_of_the_north
	override_background = { reference = tablets }
	
	left_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	trigger = {
		root.var:db_high_hrothgar_tablets = 8
	}
	
	immediate = {
		root = { change_variable = { name = db_high_hrothgar_tablets add = 1 } }
	}
	option = {
		name = db_pilgrimage.0008.a
		add_piety = minor_piety_gain
		stress_impact = {
			patient = minor_stress_loss
			stubborn = minor_stress_loss
			wrathful = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0008.b
		trigger = {
			OR = {
				learning >= 15
				has_trait = thuum_mastery
			}
		}
		add_learning_lifestyle_xp = minor_lifestyle_xp
		if = {
			limit = {
				has_trait = thuum_mastery
				has_trait_xp = {
					trait = thuum_mastery
					value <= 20
				}
			}
			add_trait_xp = {
				trait = thuum_mastery
				value = 4
			}
		}
		stress_impact = {
			scholar = minor_stress_loss
			calm = minor_stress_loss
		}
	}
	option = {
		name = db_pilgrimage.0008.c
		add_prestige = minor_prestige_gain
		stress_impact = {
			wrathful = minor_stress_loss
			arrogant = minor_stress_loss
			patient = minor_stress_gain
			craven = minor_stress_gain
		}
	}
	after = {
		hidden_effect = {
			random_list = {
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_wolfs } }
						trigger_event = db_pilgrimage_decision.0011
					}
					else_if = {
						limit = {
							is_target_in_global_variable_list = {
								name = talos_patron_available
								target = flag:db_ysmir_dragon_of_the_north
							}
						}
						trigger_event = db_pilgrimage_decision.2009
					}
					else = { trigger_event = db_pilgrimage_decision.0009 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_kyn } }
						trigger_event = db_pilgrimage_decision.0012
					}
					else_if = {
						limit = {
							is_target_in_global_variable_list = {
								name = talos_patron_available
								target = flag:db_ysmir_dragon_of_the_north
							}
						}
						trigger_event = db_pilgrimage_decision.2009
					}
					else = { trigger_event = db_pilgrimage_decision.0009 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_pilgrim } }
						trigger_event = db_pilgrimage_decision.0014
					}
					else_if = {
						limit = {
							is_target_in_global_variable_list = {
								name = talos_patron_available
								target = flag:db_ysmir_dragon_of_the_north
							}
						}
						trigger_event = db_pilgrimage_decision.2009
					}
					else = { trigger_event = db_pilgrimage_decision.0009 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_snowstorm } }
						trigger_event = db_pilgrimage_decision.0015
					}
					else_if = {
						limit = {
							is_target_in_global_variable_list = {
								name = talos_patron_available
								target = flag:db_ysmir_dragon_of_the_north
							}
						}
						trigger_event = db_pilgrimage_decision.2009
					}
					else = { trigger_event = db_pilgrimage_decision.0009 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_troll } }
						trigger_event = db_pilgrimage_decision.0016
					}
					else_if = {
						limit = {
							is_target_in_global_variable_list = {
								name = talos_patron_available
								target = flag:db_ysmir_dragon_of_the_north
							}
						}
						trigger_event = db_pilgrimage_decision.2009
					}
					else = { trigger_event = db_pilgrimage_decision.0009 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_view } }
						trigger_event = db_pilgrimage_decision.0017
					}
					else_if = {
						limit = {
							is_target_in_global_variable_list = {
								name = talos_patron_available
								target = flag:db_ysmir_dragon_of_the_north
							}
						}
						trigger_event = db_pilgrimage_decision.2009
					}
					else = { trigger_event = db_pilgrimage_decision.0009 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_avalanche } }
						trigger_event = db_pilgrimage_decision.0018
					}
					else_if = {
						limit = {
							is_target_in_global_variable_list = {
								name = talos_patron_available
								target = flag:db_ysmir_dragon_of_the_north
							}
						}
						trigger_event = db_pilgrimage_decision.2009
					}
					else = { trigger_event = db_pilgrimage_decision.0009 }
				}
				15 = {
					if = {
						limit = { NOT = { has_character_flag = db_high_hrothgar_thuum } }
						trigger_event = db_pilgrimage_decision.0019
					}
					else_if = {
						limit = {
							is_target_in_global_variable_list = {
								name = talos_patron_available
								target = flag:db_ysmir_dragon_of_the_north
							}
						}
						trigger_event = db_pilgrimage_decision.2009
					}
					else = { trigger_event = db_pilgrimage_decision.0009 }
				}
				70 = {
					if = {
						limit = {
							is_target_in_global_variable_list = {
								name = talos_patron_available
								target = flag:db_ysmir_dragon_of_the_north
							}
						}
						trigger_event = db_pilgrimage_decision.2009
					}
					else = { trigger_event = db_pilgrimage_decision.0009 }
				}
			}
		}
	}
}

db_pilgrimage_decision.0009 = {
	type = character_event
	title = db_pilgrimage.0009.t
	desc = db_pilgrimage.0009.desc
	theme = dragon_of_the_north
	
	override_background = { reference = greaybeards_no_talos }
	
	left_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	trigger = {
		NOT =  {
			is_target_in_global_variable_list = {
				name = talos_patron_available
				target = flag:db_ysmir_dragon_of_the_north
			}
		}
		root.var:db_high_hrothgar_tablets = 9
	}
	
	immediate = {
		root = { change_variable = { name = db_high_hrothgar_tablets add = 1 } }
	}
	option = {
		name = db_pilgrimage.0009.a
		add_prestige = minor_prestige_gain
		stress_impact = {
			ambitious = minor_stress_loss
			arrogant = minor_stress_loss
			content = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0009.b
		add_piety = minor_piety_gain
		stress_impact = {
			patient = minor_stress_loss
			humble = minor_stress_loss
			impatient = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0009.c
		trigger = {
			has_trait = dragonbron
		}
		add_piety = major_piety_gain
		if = {
			limit = {
				has_trait = thuum_mastery
				has_trait_xp = {
					trait = thuum_mastery
					value <= 20
				}
			}
			add_trait_xp = {
				trait = thuum_mastery
				value = 4
			}
		}
	}
	after = {
		trigger_event = db_pilgrimage_decision.0010
	}
}

db_pilgrimage_decision.2009 = {
	type = character_event
	title = db_pilgrimage.2009.t
	desc = db_pilgrimage.2009.desc
	theme = dragon_of_the_north
	
	override_background = { reference = greaybeards_talos }
	
	cooldown = { years = 1 }
	
	trigger = {
		is_target_in_global_variable_list = {
			name = talos_patron_available
			target = flag:db_ysmir_dragon_of_the_north
		}
		root.var:db_high_hrothgar_tablets = 9
	}
	
	immediate = {
		global_var:db_ysmir_dotn = {
			save_scope_as = ysmir
		}
		root = { change_variable = { name = db_high_hrothgar_tablets add = 1 } }
	}
	
	left_portrait = {
		character = root
		animation = interested
	}
	
	right_portrait = {
		character = scope:ysmir
		animation = personality_bold
	}
	
	option = {
		name = db_pilgrimage.2009.a
		add_piety = minor_piety_gain
		if = {
			limit = { 
				has_trait = p_dv_talos
			}
			add_piety = minor_piety_gain
		}
		stress_impact = {
			zealous = minor_stress_loss
			p_dv_talos = medium_stress_loss
			cynical = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.2009.b
		trigger = {
			OR = {
				has_trait = dragonborn
				has_trait = thuum_mastery
			}
		}
		add_prestige = minor_prestige_gain
		if = {
			limit = {
				has_trait = thuum_mastery
				has_trait_xp = {
					trait = thuum_mastery
					value <= 20
				}
			}
			add_trait_xp = {
				trait = thuum_mastery
				value = 4
			}
		}
		stress_impact = {
			ambitious = minor_stress_loss
			arrogant = minor_stress_loss
		}
	}
	option = {
		name = db_pilgrimage.2009.c
		stress_impact = {
			cynical = minor_stress_loss
			paranoid = minor_stress_loss
			zealous = minor_stress_gain
			trusting = minor_stress_gain
		}
	}
	after = {
		trigger_event = db_pilgrimage_decision.0010
	}
}

db_pilgrimage_decision.0010 = {
	type = character_event
	title = db_pilgrimage.0010.t
	desc = db_pilgrimage.0010.desc
	theme = dragon_of_the_north
	override_background = { reference = greybeards }
	
	left_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	trigger = {
		root.var:db_high_hrothgar_tablets = 10
	}
	
	immediate = {
		root = { change_variable = { name = db_high_hrothgar_tablets add = 1 } }
	}
	option = {
		name = db_pilgrimage.0010.a
		add_piety = minor_piety_gain
		stress_impact = {
			humble = minor_stress_loss
			calm = minor_stress_loss
			patient = minor_stress_loss
			impatient = minor_stress_gain
			wrathful = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0010.b
		trigger = {
			OR = {
				learning >= 15
				has_trait = thuum_mastery
			}
		}
		add_magic_lifestyle_xp = minor_lifestyle_xp
		if = {
			limit = {
				has_trait = thuum_mastery
				has_trait_xp = {
					trait = thuum_mastery
					value <= 20
				}
			}
			add_trait_xp = {
				trait = thuum_mastery
				value = 4
			}
		}
		stress_impact = {
			humble = minor_stress_loss
			patient = minor_stress_loss
		}
	}
	option = {
		name = db_pilgrimage.0010.c
		add_prestige = minor_prestige_gain
		stress_impact = {
			wrathful = minor_stress_loss
			arrogant = minor_stress_loss
			ambitious = minor_stress_loss
			humble = minor_stress_gain
			craven = minor_stress_gain
		}
	}
	after = {
		if = {
			limit = {
				has_trait = dragonborn
				has_character_flag = flag_summoned_by_greybeards
				NOT = { has_character_flag = flag_ysmir_dragon_of_the_north }
			}
			trigger_event = db_pilgrimage_decision.0022
		}
		else_if = {
			limit = {
				has_trait = dragonborn
			}
			trigger_event = db_pilgrimage_decision.0021
		}
		else_if = {
			limit = {
				has_trait = thuum_mastery
				has_trait_xp = {
					trait = thuum_mastery
					value >= 20
				}
			}
			trigger_event = db_pilgrimage_decision.0021
		}
		else = {
			trigger_event = db_pilgrimage_decision.0020
		}
	}
}
db_pilgrimage_decision.0011 = {
	type = character_event
	title = db_pilgrimage.0011.t
	desc = db_pilgrimage.0011.desc
	theme = dragon_of_the_north
	override_background = { reference = between_tablets }
	
	right_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	trigger = {
		root.var:db_high_hrothgar_tablets > 2
		root.var:db_high_hrothgar_tablets < 10
	}
	
	immediate = {
		add_character_flag = {
			flag = db_high_hrothgar_wolfs
			days = 30
		}
	}
	
	option = {
		name = db_pilgrimage.0011.a
		add_prestige = minor_prestige_gain
		random = {
			chance = 40
			modifier = {
				add = -20
				prowess >= 12
			}
			modifier = {
				add = -10
				prowess >= 18
			}
			add_trait = wounded_1
		}
		stress_impact = {
			brave = minor_stress_loss
			wrathful = minor_stress_loss
			craven = minor_stress_gain
		}
		random = {
			chance = 10
			remove_trait = craven
			add_trait = brave
		}
	}
	option = {
		name = db_pilgrimage.0011.b
		stress_impact = {
			craven = minor_stress_loss
			brave = minor_stress_gain
			arrogant = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0011.c
		trigger = {
			has_perk = illusion_journeyman_perk
		}
		add_magic_lifestyle_xp = minor_lifestyle_xp
		stress_impact = {
			patient = minor_stress_loss
			calm = minor_stress_loss
		}
	}
	after = {
		if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 3
			}
			trigger_event = db_pilgrimage_decision.0003
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 4
			}
			trigger_event = db_pilgrimage_decision.0004
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 5
			}
			trigger_event = db_pilgrimage_decision.0005
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 6
			}
			trigger_event = db_pilgrimage_decision.0006
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 7
			}
			trigger_event = db_pilgrimage_decision.0007
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 8
			}
			trigger_event = db_pilgrimage_decision.0008
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 9
				is_target_in_global_variable_list = {
					name = talos_patron_available
					target = flag:db_ysmir_dragon_of_the_north
				}
			}
			trigger_event = db_pilgrimage_decision.2009
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 9
			}
			trigger_event = db_pilgrimage_decision.0009
		}
	}
}

db_pilgrimage_decision.0012 = {
	type = character_event
	title = db_pilgrimage.0012.t
	desc = db_pilgrimage.0012.desc
	theme = dragon_of_the_north
	override_background = { reference = between_tablets }
	
	right_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	trigger = {
		root.var:db_high_hrothgar_tablets > 2
		root.var:db_high_hrothgar_tablets < 10
	}
	
	immediate = {
		add_character_flag = {
			flag = db_high_hrothgar_kyn
			days = 30
		}
	}
	
	option = {
		name = db_pilgrimage.0012.a
		add_piety = minor_piety_gain		
		if = {
			limit = { 
				has_trait = p_dv_kynareth 
			}
			add_character_modifier = {
				modifier = travel_health_boost_modifier
				years = 2
			}
		}
		else = {
			add_character_modifier = {
				modifier = travel_health_boost_modifier
				years = 1
			}
		}
		stress_impact = {
			zealous = minor_stress_loss
			p_dv_kynareth = minor_stress_loss
			lazy = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0012.b
		add_piety = minor_piety_gain
		stress_impact = {
			impatient = minor_stress_loss
			patient = minor_stress_loss
			cynical = minor_stress_gain
		}
	}
	after = {
		if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 3
			}
			trigger_event = db_pilgrimage_decision.0003
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 4
			}
			trigger_event = db_pilgrimage_decision.0004
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 5
			}
			trigger_event = db_pilgrimage_decision.0005
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 6
			}
			trigger_event = db_pilgrimage_decision.0006
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 7
			}
			trigger_event = db_pilgrimage_decision.0007
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 8
			}
			trigger_event = db_pilgrimage_decision.0008
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 9
				is_target_in_global_variable_list = {
					name = talos_patron_available
					target = flag:db_ysmir_dragon_of_the_north
				}
			}
			trigger_event = db_pilgrimage_decision.2009
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 9
			}
			trigger_event = db_pilgrimage_decision.0009
		}
	}
}

db_pilgrimage_decision.0014 = {
	type = character_event
	title = db_pilgrimage.0014.t
	desc = db_pilgrimage.0014.desc
	theme = dragon_of_the_north
	override_background = { reference = between_tablets }
	
	cooldown = { years = 1 }
	
	trigger = {
		root.var:db_high_hrothgar_tablets > 4
		root.var:db_high_hrothgar_tablets < 10
	}
	
	immediate = {
		db_spawn_random_nord_pilgrim_effect = yes
		add_character_flag = {
			flag = db_high_hrothgar_pilgrim
			days = 30
		}
	}
	
	left_portrait = {
		character = root
		animation = interested
	}
	
	right_portrait = {
		character = scope:random_nord_pilgrim
		animation = prayer
	}
	
	option = {
		name = db_pilgrimage.0014.a
		add_piety = minor_piety_gain
		stress_impact = {
			compassionate = minor_stress_loss
			callous = minor_stress_gain
			sadistic = minor_stress_gain
		}
		random = {
			chance = 20
			remove_trait = callous
			add_trait = compassionate
		}
	}
	option = {
		name = db_pilgrimage.0014.b
		stress_impact = {
			callous = minor_stress_loss
			arrogant = minor_stress_loss
			compassionate = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0014.c
		trigger = {
			has_trait = sadistic
		}
		add_gold = minor_gold_value
		stress_impact = {
			sadistic = medium_stress_loss
		}
	}
	after = {
		hidden_effect = {
			scope:random_nord_pilgrim = {
				death = { death_reason = death_vanished }
			}
		}
		if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 3
			}
			trigger_event = db_pilgrimage_decision.0003
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 4
			}
			trigger_event = db_pilgrimage_decision.0004
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 5
			}
			trigger_event = db_pilgrimage_decision.0005
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 6
			}
			trigger_event = db_pilgrimage_decision.0006
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 7
			}
			trigger_event = db_pilgrimage_decision.0007
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 8
			}
			trigger_event = db_pilgrimage_decision.0008
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 9
				is_target_in_global_variable_list = {
					name = talos_patron_available
					target = flag:db_ysmir_dragon_of_the_north
				}
			}
			trigger_event = db_pilgrimage_decision.2009
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 9
			}
			trigger_event = db_pilgrimage_decision.0009
		}
	}
}

db_pilgrimage_decision.0015 = {
	type = character_event
	title = db_pilgrimage.0015.t
	desc = db_pilgrimage.0015.desc
	theme = dragon_of_the_north
	override_background = { reference = between_tablets }
	
	right_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	trigger = {
		root.var:db_high_hrothgar_tablets > 4
		root.var:db_high_hrothgar_tablets < 10
	}
	
	immediate = {
		add_character_flag = {
			flag = db_high_hrothgar_snowstorm
			days = 30
		}
	}
	
	option = {
		name = db_pilgrimage.0015.a
		add_piety = minor_piety_gain
		random = {
			chance = 20
			play_music_cue = "mx_cue_illness"
			show_as_tooltip = { add_trait = ill }
			hidden_effect = {
				contract_disease_effect = { 
					DISEASE = ill 
					TREATMENT_EVENT = yes 
				} 	
			}
			current_travel_plan = {
				if = {
					limit = {
						any_entourage_character = { has_court_position = court_physician_court_position }
					}
					random_entourage_character = {
						limit = { has_court_position = court_physician_court_position }
						save_scope_as = traveling_court_physician
					}
				}
			}
		}
		stress_impact = {
			brave = minor_stress_loss
			zealous = minor_stress_loss
			craven = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0015.b
		stress_impact = {
			patient = minor_stress_loss
			craven = minor_stress_loss
			impatient = minor_stress_gain
			brave = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0015.c
		trigger = {
			has_trait = thuum_mastery
			has_trait_xp = {
				trait = thuum_mastery
				value >= 80
			}
		}
		add_prestige = medium_prestige_gain		
		add_trait_xp = {
			trait = thuum_mastery
			value = 5
		}
		stress_impact = {
			arrogant = minor_stress_loss
			ambitious = minor_stress_loss
		}
	}
	after = {
		if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 3
			}
			trigger_event = db_pilgrimage_decision.0003
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 4
			}
			trigger_event = db_pilgrimage_decision.0004
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 5
			}
			trigger_event = db_pilgrimage_decision.0005
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 6
			}
			trigger_event = db_pilgrimage_decision.0006
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 7
			}
			trigger_event = db_pilgrimage_decision.0007
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 8
			}
			trigger_event = db_pilgrimage_decision.0008
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 9
				is_target_in_global_variable_list = {
					name = talos_patron_available
					target = flag:db_ysmir_dragon_of_the_north
				}
			}
			trigger_event = db_pilgrimage_decision.2009
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 9
			}
			trigger_event = db_pilgrimage_decision.0009
		}
	}
}

db_pilgrimage_decision.0016 = {
	type = character_event
	title = db_pilgrimage.0016.t
	desc = db_pilgrimage.0016.desc
	theme = dragon_of_the_north
	override_background = { reference = between_tablets }
	
	right_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	trigger = {
		root.var:db_high_hrothgar_tablets > 6
		root.var:db_high_hrothgar_tablets < 10
	}
	
	immediate = {
		add_character_flag = {
			flag = db_high_hrothgar_troll
			days = 30
		}
	}
	
	option = {
		name = db_pilgrimage.0016.a
		random_list = {
			50 = {
				add_prestige = medium_prestige_gain
				modifier = {
					add = 20
					prowess >= 15
				}
				modifier = {
					add = 10
					prowess >= 20
				}
				modifier = {
					add = 10
					prowess >= 25
				}
				modifier = {
					add = 10
					prowess >= 30
				}
				modifier = {
					add = 40
					prowess >= 35
				}
				modifier = {
					add = 40
					prowess >= 40
				}
			}
			25 = {
				add_trait = wounded_1
			}
			20 = {
				add_trait = wounded_2
			}
			5 = {
				death = { death_reason = death_wild_animal }
			}
		}
		stress_impact = {
			brave = minor_stress_loss
			wrathful = minor_stress_loss
			craven = minor_stress_gain
		}
		random = {
			chance = 20
			remove_trait = craven
			add_trait = brave
		}
	}
	option = {
		name = db_pilgrimage.0016.b
		stress_impact = {
			craven = minor_stress_loss
			patient = minor_stress_loss
			brave = minor_stress_gain
			arrogant = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0016.c
		trigger = {
			has_perk = illusion_expert_perk
		}
		add_learning_lifestyle_xp = minor_lifestyle_xp
		stress_impact = {
			calm = minor_stress_loss
		}
	}
	after = {
		if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 3
			}
			trigger_event = db_pilgrimage_decision.0003
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 4
			}
			trigger_event = db_pilgrimage_decision.0004
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 5
			}
			trigger_event = db_pilgrimage_decision.0005
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 6
			}
			trigger_event = db_pilgrimage_decision.0006
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 7
			}
			trigger_event = db_pilgrimage_decision.0007
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 8
			}
			trigger_event = db_pilgrimage_decision.0008
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 9
				is_target_in_global_variable_list = {
					name = talos_patron_available
					target = flag:db_ysmir_dragon_of_the_north
				}
			}
			trigger_event = db_pilgrimage_decision.2009
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 9
			}
			trigger_event = db_pilgrimage_decision.0009
		}
	}
}

db_pilgrimage_decision.0017 = {
	type = character_event
	title = db_pilgrimage.0017.t
	desc = db_pilgrimage.0017.desc
	theme = dragon_of_the_north
	override_background = { reference = between_tablets }
	
	right_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	trigger = {
		root.var:db_high_hrothgar_tablets > 6
		root.var:db_high_hrothgar_tablets < 10
	}
	
	immediate = {
		add_character_flag = {
			flag = db_high_hrothgar_view
			days = 30
		}
	}
	
	option = {
		name = db_pilgrimage.0017.a
		add_piety = minor_piety_gain
		stress_impact = {
			calm = minor_stress_loss
			patient = minor_stress_loss
		}
	}
	option = {
		name = db_pilgrimage.0017.b
		stress_impact = {
			cynical = minor_stress_loss
			impatient = minor_stress_loss
			arrogant = minor_stress_loss
			zealous = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0017.c
		if = {
			limit = { 
				has_trait = lifestyle_poet 
			}
			add_trait_xp = {
				trait = lifestyle_poet 
				value = 10
			}
		}
		else = {
			add_trait = lifestyle_poet
		}
		stress_impact = {
			arrogant = minor_stress_loss
		}
	}
	after = {
		if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 3
			}
			trigger_event = db_pilgrimage_decision.0003
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 4
			}
			trigger_event = db_pilgrimage_decision.0004
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 5
			}
			trigger_event = db_pilgrimage_decision.0005
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 6
			}
			trigger_event = db_pilgrimage_decision.0006
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 7
			}
			trigger_event = db_pilgrimage_decision.0007
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 8
			}
			trigger_event = db_pilgrimage_decision.0008
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 9
				is_target_in_global_variable_list = {
					name = talos_patron_available
					target = flag:db_ysmir_dragon_of_the_north
				}
			}
			trigger_event = db_pilgrimage_decision.2009
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 9
			}
			trigger_event = db_pilgrimage_decision.0009
		}
	}
}

db_pilgrimage_decision.0018 = {
	type = character_event
	title = db_pilgrimage.0018.t
	desc = db_pilgrimage.0018.desc
	theme = dragon_of_the_north
	override_background = { reference = between_tablets }
	
	right_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	trigger = {
		root.var:db_high_hrothgar_tablets = 9
	}
	
	immediate = {
		add_character_flag = {
			flag = db_high_hrothgar_avalanche
			days = 30
		}
	}
	
	option = {
		name = db_pilgrimage.0018.a
		add_prestige = minor_prestige_gain
		stress_impact = {
			diligent = minor_stress_loss
			stubborn = minor_stress_loss
			lazy = minor_stress_gain
			arrogant = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0018.b
		random_list = {
			80 = {
				add_prestige = minor_prestige_gain
			}
			20 = {
				add_trait = wounded_1
			}
		}
		stress_impact = {
			brave = minor_stress_loss
			impatient = minor_stress_loss
			craven = minor_stress_gain
		}
	}
	option = {
		name = db_pilgrimage.0018.c
		trigger = {
			has_perk = destruction_journeyman_perk
		}
		add_learning_lifestyle_xp = minor_lifestyle_xp
		stress_impact = {
			arrogant = minor_stress_loss
			impatient = minor_stress_loss
		}
	}
	after = {
		if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 3
			}
			trigger_event = db_pilgrimage_decision.0003
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 4
			}
			trigger_event = db_pilgrimage_decision.0004
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 5
			}
			trigger_event = db_pilgrimage_decision.0005
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 6
			}
			trigger_event = db_pilgrimage_decision.0006
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 7
			}
			trigger_event = db_pilgrimage_decision.0007
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 8
			}
			trigger_event = db_pilgrimage_decision.0008
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 9
				is_target_in_global_variable_list = {
					name = talos_patron_available
					target = flag:db_ysmir_dragon_of_the_north
				}
			}
			trigger_event = db_pilgrimage_decision.2009
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 9
			}
			trigger_event = db_pilgrimage_decision.0009
		}
	}
}

db_pilgrimage_decision.0019 = {
	type = character_event
	title = db_pilgrimage.0019.t
	desc = db_pilgrimage.0019.desc
	theme = dragon_of_the_north
	override_background = { reference = between_tablets }
	
	cooldown = { years = 1 }
	
	trigger = {
		root.var:db_high_hrothgar_tablets = 9
	}
	
	immediate = {
		title:d_greybeards.holder = { save_scope_as = greybeards_leader }
		add_character_flag = {
			flag = db_high_hrothgar_thuum
			days = 30
		}
	}
	
	left_portrait = {
		character = root
		animation = shock
	}
	
	lower_center_portrait = {
		character = scope:greybeards_leader
	}
	
	option = {
		name = db_pilgrimage.0019.a
		add_piety = minor_piety_gain
		stress_impact = {
			humble = minor_stress_loss
			zealous = minor_stress_loss
			arrogant = minor_stress_gain
		}
		random = {
			chance = 20
			remove_trait = cynical
			add_trait = zealous
		}
	}
	option = {
		name = db_pilgrimage.0019.b
		add_prestige = minor_prestige_gain
		stress_impact = {
			ambitious = minor_stress_loss
			arrogant = minor_stress_loss
			brave = minor_stress_loss
			humble = minor_stress_gain
			craven = minor_stress_gain
		}
	}
	
	option = {
		name = db_pilgrimage.0019.c
		trigger = {
			OR = {
				learning >= 15
				has_trait = thuum_mastery
			}
		}
		add_prestige = medium_prestige_gain
		if = {
			limit = {
				has_trait = thuum_mastery
				has_trait_xp = {
					trait = thuum_mastery
					value <= 20
				}
			}
			add_trait_xp = {
				trait = thuum_mastery
				value = 4
			}
		}
		stress_impact = {
			ambitious = minor_stress_loss
			brave = minor_stress_loss
		}
	}
	after = {
		if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 3
			}
			trigger_event = db_pilgrimage_decision.0003
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 4
			}
			trigger_event = db_pilgrimage_decision.0004
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 5
			}
			trigger_event = db_pilgrimage_decision.0005
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 6
			}
			trigger_event = db_pilgrimage_decision.0006
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 7
			}
			trigger_event = db_pilgrimage_decision.0007
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 8
			}
			trigger_event = db_pilgrimage_decision.0008
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 9
				is_target_in_global_variable_list = {
					name = talos_patron_available
					target = flag:db_ysmir_dragon_of_the_north
				}
			}
			trigger_event = db_pilgrimage_decision.2009
		}
		else_if = {
			limit = {
				root.var:db_high_hrothgar_tablets = 9
			}
			trigger_event = db_pilgrimage_decision.0009
		}
	}
}

db_pilgrimage_decision.0020 = {
	type = character_event
	title = db_pilgrimage.0020.t
	desc = db_pilgrimage.0020.desc
	theme = dragon_of_the_north
	override_background = { reference = greybeards }
	
	right_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	immediate = {
	
	}
	option = {
		name = db_pilgrimage.0020.a
		hidden_effect = {
			random_list = {
				20 = {
					trigger_event = db_pilgrimage_decision.0021
					modifier = {
						add = 10
						piety_level >= 5
					}
					modifier = {
						add = 10
						prestige_level >= 5
					}
				}
				80 = {
					trigger_event = db_pilgrimage_decision.0023
					modifier = {
						add = -10
						piety_level >= 5
					}
					modifier = {
						add = -10
						prestige_level >= 5
					}
				}
			}
		}
	}
	option = {
		name = db_pilgrimage.0020.b
		add_piety = minor_piety_gain
		trigger_event = db_pilgrimage_decision.0023
	}
	after = {
		
	}
}

db_pilgrimage_decision.0021 = {
	type = character_event
	title = db_pilgrimage.0021.t
	
	desc = {
    	first_valid = {
			triggered_desc = {
    		    trigger = { has_trait = dragonborn }
    		   desc = db_pilgrimage.0021.desc_dragonborn
    		}
    		triggered_desc = {
    		    trigger = {
					NOT = {
						has_trait = dragonborn
					}
					has_trait_xp = {
						trait = thuum_mastery
						value >= 20
					}
				}
    		   desc = db_pilgrimage.0021.desc_thuum_mastery
    		}
    		triggered_desc = {
    		    trigger = {
					NOT = {
						has_trait = thuum_mastery
						has_trait = dragonborn
					}
				}
    		    desc = db_pilgrimage.0021.desc
    		}
    	}
    }
	
	theme = dragon_of_the_north
	override_background = { reference = high_hrothgar }
	
	right_portrait = {
		character = root
		animation = interested
	}
	
	cooldown = { years = 1 }
	
	immediate = {
	
	}
	option = {
		name = db_pilgrimage.0021.a
		add_piety = minor_piety_gain
		root = { remove_variable = db_high_hrothgar_tablets }
		db_remove_pilgrimage_flags = yes
	}
	option = {
		name = db_pilgrimage.0021.c
		trigger = {
			has_trait = thuum_mastery
			OR = {
				years_as_ruler >= 40
				ek_human_age_equivalent >= 70
			}
			player_heir = {
				exists = yes
				is_adult = yes
				is_imprisoned = no				
				NOT = { has_trait = incapable }
			}
		}
		trigger_event = db_pilgrimage_decision.0026
	}
	option = {
		name = db_pilgrimage.0021.d
		trigger = {
			has_trait = dragonborn
			has_trait_xp = {
				trait = thuum_mastery
				value >= 20
			}
		}
		trigger_event = db_pilgrimage_decision.0027
	}
	after = {
	
	}
}

db_pilgrimage_decision.0022 = {
	type = character_event
	title = db_pilgrimage.0022.t
	desc = db_pilgrimage.0022.desc
	theme = dragon_of_the_north
	override_background = { reference = high_hrothgar }
	cooldown = { years = 1 }
	
	immediate = {
		title:d_greybeards.holder = { save_scope_as = greybeards_leader }
	}
	
	left_portrait = {
		character = root
		animation = interested
	}
	
	right_portrait = {
		character = scope:greybeards_leader
		animation = personality_zealous
	}
	option = {
		name = db_pilgrimage.0022.a
		stress_impact = {
			ambitious = minor_stress_loss
			arrogant = minor_stress_loss
			brave = minor_stress_loss
			humble = minor_stress_gain
			craven = minor_stress_gain
		}
		trigger_event = db_pilgrimage_decision.0025
	}
	option = {
		name = db_pilgrimage.0022.b
		stress_impact = {
			ambitious = minor_stress_gain
			arrogant = minor_stress_gain
			brave = minor_stress_gain
			humble = minor_stress_loss
			craven = minor_stress_loss
		}
		add_to_global_variable_list = {
			name = talos_patron_available
			target = flag:db_greybeards_rejected_call
		}
		remove_character_flag = flag_summoned_by_greybeards
		trigger_event = db_pilgrimage_decision.0024
	}
	after = {
		
	}
}

db_pilgrimage_decision.0023 = {
	type = character_event
	title = db_pilgrimage.0023.t
	desc = db_pilgrimage.0023.desc
	theme = dragon_of_the_north
	override_background = { reference = high_hrothgar }
	
	right_portrait = {
		character = root
		animation = disapproval
	}
	
	cooldown = { years = 1 }
	
	immediate = {
		
	}
	
	option = {
		name = db_pilgrimage.0023.a
		add_stress = major_stress_gain
	}
	after = {
		root = { remove_variable = db_high_hrothgar_tablets }
		db_remove_pilgrimage_flags = yes
	}
}

db_pilgrimage_decision.0024 = {
	type = character_event
	title = db_pilgrimage.0024.t
	desc = db_pilgrimage.0024.desc
	theme = dragon_of_the_north
	override_background = { reference = high_hrothgar }
	cooldown = { years = 1 }
	
	immediate = {
		title:d_greybeards.holder = { save_scope_as = greybeards_leader }
	}
	
	left_portrait = {
		character = root
		animation = personality_bold
	}
	
	right_portrait = {
		character = scope:greybeards_leader
		animation = shock
	}
	
	weight_multiplier = {
		base = 1
	}
	
	option = {
		name = db_pilgrimage.0024.a
	}
	after = {
		root = { remove_variable = db_high_hrothgar_tablets }
		db_remove_pilgrimage_flags = yes
	}
}

db_pilgrimage_decision.0025 = {
	type = character_event
	title = db_pilgrimage.0025.t
	desc = db_pilgrimage.0025.desc
	theme = dragon_of_the_north
	override_background = { reference = high_hrothgar }
	
	cooldown = { years = 1 }
	
	immediate = {
		title:d_greybeards.holder = { save_scope_as = greybeards_leader }
		add_character_flag = flag_ysmir_dragon_of_the_north
		save_scope_as = ysmir
		set_global_variable = {
			name = db_ysmir_dotn
			value = scope:ysmir
		}
		if = {
			limit = {
				exists = title:e_skyrim.holder
			}
			add_pressed_claim = title:e_skyrim
		}
	}
	
	left_portrait = {
		character = root
		animation = personality_bold
	}
	
	right_portrait = {
		character = scope:greybeards_leader
		animation = personality_zealous
	}
	
	option = {
		name = db_pilgrimage.0025.a
		add_character_modifier = { modifier = db_ysmir_dragon_of_the_north_modifier }
		add_character_modifier = {
			modifier = exhausted_modifier
			months = 3
		}
		add_stress = major_stress_gain
		add_trait_xp = {
			trait = thuum_mastery
			value = 80
		}
	}
	after = {
		remove_nickname = yes
		give_nickname = nick_the_ysmir_dragon_of_the_north
		root = { remove_variable = db_high_hrothgar_tablets }
		db_remove_pilgrimage_flags = yes
	}
}

db_pilgrimage_decision.0026 = {
	type = activity_event
	title = db_pilgrimage.0026.t
	desc = db_pilgrimage.0026.desc
	theme = dragon_of_the_north
	override_background = { reference = high_hrothgar }
	
	cooldown = { years = 1 }
	
	immediate = {
		title:d_greybeards.holder = { save_scope_as = greybeards_leader }
		root = { save_scope_as = future_greybeard }
	}
	
	left_portrait = {
		character = root
		animation = personality_bold
	}
	
	right_portrait = {
		character = scope:greybeards_leader
		animation = personality_zealous
	}
	
	option = {
		name = db_pilgrimage.0026.a
		player_heir = { 
			add_opinion = {
				modifier = thankful_opinion
				target = root
				opinion = 25
			}
		}
		depose = yes
		hidden_effect = {
			dynasty = {
				add_dynasty_prestige = major_dynasty_prestige_loss
			}
		}
	}
	option = {
		name = db_pilgrimage.0026.a
	}
	after = {
		scope:future_greybeard = {
			add_trait = greybeard
			set_employer = scope:greybeards_leader
			remove_variable = db_high_hrothgar_tablets
		}
	}
}

db_pilgrimage_decision.0027 = {
	type = activity_event
	title = db_pilgrimage.0027.t
	desc = db_pilgrimage.0027.desc
	theme = dragon_of_the_north
	override_background = { reference = high_hrothgar }
	
	cooldown = { years = 1 }
	
	immediate = {
		title:d_greybeards.holder = { save_scope_as = greybeards_leader }
	}
	
	left_portrait = {
		character = root
		animation = personality_bold
	}
	
	right_portrait = {
		character = scope:greybeards_leader
		animation = personality_zealous
	}
	
	option = {
		name = db_pilgrimage.0027.a
		add_stress = major_stress_gain
		if = {
			limit = {
				OR = {
					has_trait = education_learning_4
					has_trait = education_learning_5
				}
			}
			add_trait_xp = {
				trait = thuum_mastery
				value = 15
			}
		}
		else = {
			add_trait_xp = {
				trait = thuum_mastery
				value = 10
			}
		}
	}
	after = {
		root = { remove_variable = db_high_hrothgar_tablets }
		db_remove_pilgrimage_flags = yes
	}
}