﻿action_no_heir = {
	type = alert

	check_create_action = {
		if = {
			limit = {
				NOT = {
					any_held_title = {
						any_title_heir = {
							dynasty = root.dynasty
						}
					}
				}
				is_ruler = yes
			}
			if = {
				limit = { exists = primary_heir }
				try_create_important_action = {
					important_action_type = action_no_heir
					actor = root
					recipient = primary_heir
				}
			}
			else = {
				try_create_important_action = {
					important_action_type = action_no_heir
					actor = root
				}
			}
		}
	}

	effect = {
		scope:actor = {
			open_view_data = {
				view = character
			}
		}
		start_tutorial_lesson = reactive_advice_looming_game_over
	}
}

