﻿# Tests in this effect will only run if the game is in debug mode

run_setup_tests_effect = {
	every_living_character = {
		if = {
			limit = {
				is_married = yes
				is_adult = no
			}
			error_log = "[THIS.Char.GetLogName] is married but not an adult!"
		}
	}
	every_ruler = {
		if = {
			limit = {
				has_government = herder_government
				holds_landed_title = yes
				liege = {
					this != prev
					has_government = nomad_government
				}
			}
			error_log = "[THIS.Char.GetLogName] is a landed herder marked as a vassal of a nomadic ruler!"
		}
		if = {
			limit = { suzerain != this }
			if = {
				limit = {
					NOR = {
						has_government = nomad_government
						has_government = herder_government
					}
					OR = {
						has_subject_contract_group = tributary_nomadic
						has_subject_contract_group = tributary_steppe
					}
				}
				error_log = "[THIS.Char.GetLogName] is not a herder or nomad tributary but has a nomadic or steppe subject contract!"
			}
			else_if = {
				limit = {
					OR = {
						has_government = nomad_government
						has_government = herder_government
					}
					NOR = {
						has_subject_contract_group = tributary_nomadic
						has_subject_contract_group = tributary_steppe
					}
				}
				error_log = "[THIS.Char.GetLogName] is a herder or nomad tributary with a non-nomadic/steppe subject contract!"
			}
		}
	}
}
