﻿reman_tomb_decision = {
	picture = { reference = "gfx/interface/illustrations/decisions/reman_tomb.dds" }
	ai_check_interval = 120
	desc = reman_tomb_decision_desc
	decision_group_type = major
	
	is_shown = {
		is_ai = no
		is_landed = yes
		OR = {
			has_trait = dragonborn
			has_title = title:e_colovian_estates
			has_title = title:e_nibenay
			has_title = title:e_cyrodiilic_potentate
			has_title = title:e_cyrodiil
			has_title = title:k_heartlands
			has_title = title:e_tamriel
			highest_held_title_tier >= tier_empire
			AND = {
				has_trait = p_dv_akatosh
				piety_level >= 2
				prestige_level >= 3
				highest_held_title_tier >= tier_kingdom
			}
		}
		NOR = {
			any_character_artifact = {
				has_artifact_modifier = aok_modifier
			}
			has_character_flag = flag_ttst
			has_character_flag = race_daedra
			is_target_in_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:reman_tomb_decision
			} 
		}
	}

	is_valid = {
			age >= 16
			is_independent_ruler = yes
			completely_controls = title:c_sancre_tor
			OR = {
				has_trait = dragonborn
				highest_held_title_tier >= tier_empire
				AND = {
					has_trait = p_dv_akatosh
					piety_level >= 2
					prestige_level >= 3
					highest_held_title_tier >= tier_kingdom
				}
			}
	}
	
	cost = {
		prestige = 500
		piety = 1000
	}
	effect = {
		if = {
			limit = {
				capital_county = title:c_sancre_tor
			}
			custom_tooltip = reman_tomb_decision_effect_1
			trigger_event = reman_tomb.0001
			hidden_effect = {
				add_character_flag = {
					flag = flag_ttst
				}
			}	
		}
		else = {
			custom_tooltip = reman_tomb_decision_effect_1
			start_travel_plan = {
				destination = title:b_sancre_tor.title_province
				players_use_planner = yes
				on_travel_planner_cancel_event = reman_tomb.0002
				on_arrival_event = reman_tomb.0001
			}
			hidden_effect = {
				add_character_flag = {
					flag = flag_ttst
				}
			}
		}
	}
}

reman_tomb_camp_decision = {
	picture = { reference = "gfx/interface/illustrations/decisions/reman_tomb.dds" }
	ai_check_interval = 120
	desc = reman_tomb_camp_decision_desc
	decision_group_type = adventurer
	
	is_shown = {
		is_ai = no
		is_landless_adventurer = yes
		OR = {
			has_trait = dragonborn
			AND = {
				has_trait = p_dv_akatosh
				piety_level >= 2
				prestige_level >= 3
			}
		}
		NOR = {
			any_character_artifact = {
				has_artifact_modifier = aok_modifier
			}
			has_character_flag = flag_ttst
			has_character_flag = race_daedra
			is_target_in_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:reman_tomb_decision
			} 
		}
	}

	is_valid = {
		age >= 16
		is_independent_ruler = yes
		OR = {
			has_trait = dragonborn
			AND = {
				has_trait = p_dv_akatosh
				piety_level >= 2
				prestige_level >= 3
			}
		}
		custom_tooltip = {
			text = sanctor_holder_desc_tt
			OR = {
				title:c_sancre_tor.holder ?= {
					has_relation_friend = root
				}
				title:c_sancre_tor.holder ?= {
					opinion = {
						target = root
						value >= 80
					}
				}
				has_strong_hook = title:c_sancre_tor.holder
			}
		}
	}
	
	cost = {
		gold = 400
		prestige = 1000
		piety = 1000
	}
	effect = {
		if = {
			limit = {
				domicile.domicile_location.barony = title:b_sancre_tor
			}
			custom_tooltip = reman_tomb_camp_decision_effect_1
			trigger_event = reman_tomb.0001
			use_hook = title:c_sancre_tor.holder
			hidden_effect = {
				add_character_flag = {
					flag = flag_ttst
				}
			}	
		}
		else = {
			custom_tooltip = reman_tomb_camp_decision_effect_1
			start_travel_plan = {
				destination = title:b_sancre_tor.title_province
				players_use_planner = yes
				on_travel_planner_cancel_event = reman_tomb.0003
				on_arrival_event = reman_tomb.0001
			}
			use_hook = title:c_sancre_tor.holder
			hidden_effect = {
				add_character_flag = {
					flag = flag_ttst
				}
			}
		}
	}
}